[gst-devel] decodebin, typefinding and seeking

Dezelon, Mark dez at ti.com
Tue May 10 15:23:56 CEST 2005


Hello folks --

I'm new to using decodebin, and I'm having a problem using decodebin via
gst-launch (v0.8.10).  I run the following:

    $ gst-launch filesrc location=myfile ! decodebin ! displaysink

"myfile" is a compressed video bitstream and "displaysink" takes a set
of raw yuv images.  Decodebin automatically picks the correct video
decoder (based on a dumb typefinding function), and the resulting
pipeline is "filesrc -> mydecoder -> displaysink".  Data starts
transferring successfully and the first part of the decoded video is
viewable on my display.

I've noticed a couple issues, however.  First the typefinding occurs
after every 4K read from "myfile".  In another words, according to the
(extremely lengthy) debug output, 4096 bytes are read and stored in a
decodebin buffer, a typefinding cycle is run, the next 4096 bytes are
read and appended, another typefinding cycle is run, and so forth until
EOF is reached.

It's the second issue that puzzles me most:  After reading 106496 bytes
from "myfile", the typefinder sends a seek event (GST_SEEK_METHOD_SET)
to the end of the file.  Afterwards it sends another seek event to the
middle of the file.  Then the above process of "read 4K, run a typefind
cycle" continues until the end of the file.

The problem is that the bytes in "myfile" must be sent through the
decoder continuously as every byte is dependent upon the byte before it.

Any thoughts?  I'd be happy to send out additional information.  Also,
if there's any documentation regarding decodebin aside from the
GStreamer Application Development Manual, I'd be happy to read that,
too.

-- Mark Dezelon / dez at ti.com / Don't Panic! --




More information about the gstreamer-devel mailing list