dashdemux: Log protection events on corresponding pad
GstDashDemuxStream is not a GstObject, so use its pad as associated object when emitting log messages. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2389>
This commit is contained in:
parent
cbb1096c52
commit
be7e0600ec
@ -888,21 +888,23 @@ gst_dash_demux_send_content_protection_event (gpointer data, gpointer userdata)
|
|||||||
GstBuffer *pssi;
|
GstBuffer *pssi;
|
||||||
glong pssi_len;
|
glong pssi_len;
|
||||||
gchar *schemeIdUri;
|
gchar *schemeIdUri;
|
||||||
|
GstPad *pad = GST_ADAPTIVE_DEMUX_STREAM_PAD (stream);
|
||||||
|
|
||||||
if (cp->schemeIdUri == NULL)
|
if (cp->schemeIdUri == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
GST_TRACE_OBJECT (stream, "check schemeIdUri %s", cp->schemeIdUri);
|
GST_TRACE_OBJECT (pad, "check schemeIdUri %s", cp->schemeIdUri);
|
||||||
/* RFC 2141 states: The leading "urn:" sequence is case-insensitive */
|
/* RFC 2141 states: The leading "urn:" sequence is case-insensitive */
|
||||||
schemeIdUri = g_ascii_strdown (cp->schemeIdUri, -1);
|
schemeIdUri = g_ascii_strdown (cp->schemeIdUri, -1);
|
||||||
if (g_str_has_prefix (schemeIdUri, "urn:uuid:")) {
|
if (g_str_has_prefix (schemeIdUri, "urn:uuid:")) {
|
||||||
pssi_len = strlen (cp->value);
|
pssi_len = strlen (cp->value);
|
||||||
pssi = gst_buffer_new_memdup (cp->value, pssi_len);
|
pssi = gst_buffer_new_memdup (cp->value, pssi_len);
|
||||||
GST_LOG_OBJECT (stream, "Queuing Protection event on source pad");
|
|
||||||
/* RFC 4122 states that the hex part of a UUID is in lower case,
|
/* RFC 4122 states that the hex part of a UUID is in lower case,
|
||||||
* but some streams seem to ignore this and use upper case for the
|
* but some streams seem to ignore this and use upper case for the
|
||||||
* protection system ID */
|
* protection system ID */
|
||||||
event = gst_event_new_protection (cp->schemeIdUri + 9, pssi, "dash/mpd");
|
event = gst_event_new_protection (cp->schemeIdUri + 9, pssi, "dash/mpd");
|
||||||
|
GST_LOG_OBJECT (pad,
|
||||||
|
"Queueing protection event %" GST_PTR_FORMAT " on source pad", event);
|
||||||
gst_adaptive_demux_stream_queue_event ((GstAdaptiveDemuxStream *) stream,
|
gst_adaptive_demux_stream_queue_event ((GstAdaptiveDemuxStream *) stream,
|
||||||
event);
|
event);
|
||||||
gst_buffer_unref (pssi);
|
gst_buffer_unref (pssi);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user