Decryptor Element Seeking

Sebastian Dröge sebastian at centricular.com
Mon Mar 3 10:53:37 PST 2014


On Mo, 2014-03-03 at 08:13 -0800, MartinK wrote:
> Hi.I have written an element that decrypts an encrypted video file. The
> encrypted file consist of a header block followed by an encrypted version of
> the original unencrypted file. The difference in size between the original
> file and the encrypted file is just the size of the header block. The
> decryptor element strips the header from its first buffer and pushes a new
> buffer out to its src pad. The new buffer is smaller than the input buffer
> by the size of the header block. All remaining output buffers are the same
> size as the input buffer. The input buffer is unreffed (discarded). The
> element works fine when playing the encrypted file right through.  However,
> when seeking (using totem), the pipeline doesn't work (decoding errors). I
> tried handling the seek event and incrementing  the Start field of the seek
> event by the header block size and then passing the event upstream to the
> source element. This didn't work though.Does anyone have any idea what I
> should do to get seeking to work properly for my decryptor element?Regards, 

Additionally to what Nicolas said already... take a look at the
GstTagDemux base class. That's doing basically the same, a tag at the
beginning of the file is transparently removed and downstream elements
don't even know it existed.

-- 
Sebastian Dröge, Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140303/3956fc1e/attachment.pgp>


More information about the gstreamer-devel mailing list