How can an application get protection information

Enrique Ocaña González eocanha at
Thu Aug 31 14:37:54 UTC 2017

El jueves, 31 de agosto de 2017 14:21:55 (CEST) Jürgen Sachs escribió:

> [...]
> GST_EVENT_PROTECTION downstream to qtdemux. The qtdemux queues the event to
> send it further downstream to its source pads. But if the demuxer does not
> find a protection handler, it does not create any source pad at all. So the
> event is lost.
> In our use case additionally we have implemented the sink elements for video
> and audio, so if the sinks would be connected, we could evaluate the event.
> But we´re not connected because qtdemux does not have any source pads (see
> attached pipeline)
> Any idea how to handle this or a hint, where to find information?
> In case of protection we want to display a message to the user and stop the
> playback.

When patch "2/3 qtdemux: add context for a preferred protection (review 
suggestions applied)" on is 
finally merged, you will be able to subscribe to the "need-context" bus 
message and notice the existence of a protection system there.

We do it using a sync message[1] handler[2] which runs on the qtdemux 
streaming thread (beware of concurrency issues with code in your main 
thread!). If you don't actually want to manage encryption negotiation and only 
want to listen for the message in the main thread (no concurrency issues), I 
guess a regular[3] handler[4][5] might be enough.



Enrique Ocaña González

More information about the gstreamer-devel mailing list