Autopluggable Decryptor Element

MartinK martin.kohn at fortiumtech.com
Tue Feb 11 04:43:37 PST 2014


Using Gstreamer 0.10, I have created a decryptor element which processes an
encrypted video file presented to its sink pad. Its purpose is to reproduce
the original file (mp4, avi, etc) on its src pad. It is based on GstElement
and strips off an initial header block from the media stream and then
decrypts the rest of the stream to reproduce the original file.
The element needs to be loaded in by decodebin2 (autoplugged) since the
media-player we are using is based around decodebin2.
The decryptor sink pad caps are set to "data/CineLink" and a typefind
function is provided to detect a "data/CineLink" media stream (the encrypted
mp4, avi etc) by inspecting the header block. Its class is set to "Decoder"
and its rank is set to GST_RANK_MARGINAL, allowing it to be autoplugged by
decodebin2.

My question is as follows:-
How do I go about attaching a typefind element to the decryptor element so
that decodebin2 can autoplug the rest of the pipeline? Or is there any other
way of setting the caps on the decryptor src pad so decodebin2 can continue
properly?

I did try to create a bin containing the decryptor and typefind elements,
with the idea that decodebin2 could simply plug in the bin and proceed from
there. However, that approach failed (More than likely something I did
wrong!) So a second question is:-
What is the best way to create a bin (plugin) containing 2 elements such
that the bin can be autoplugged by decodebin2?

Thanks for taking the time to read this

Regards,  Martin.



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Autopluggable-Decryptor-Element-tp4665189.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list