Automatically freeing old groups in decodebin2

david.corvoysier at orange.com david.corvoysier at orange.com
Wed Apr 4 01:07:40 PDT 2012


Hi,

I am currently experimenting with the decodebin2 ability to switch from
a drained chain to a newly activated one.
The idea is to allow chained mp4 streams to be played consecutively,
pretty much in the same way as the ogg demux does with chained ogg files
(for those interested, it is related to the DASH adaptive streaming).
The issue I am facing is that when a new group takes over inside a
chain, the drained group it replaces is not immediately freed: instead
it is "hidden" and  goes into an "old group" list that is only freed
when the chain itself is freed.
Decoders are in particular kept alive, rapidly leading to memory and
hardware decoding bandwidth issues after a few streams have been played
consecutively.

I am new to Gstreamer, so I must confess I don't see why the old group
cannot be freed immediately, although a FIXME comment seems to suggest
that it should be done asynchronously in a different thread. 
"...
  /* FIXME: This should be done directly via a thread! */
  GList *old_groups;            /* Groups that should be freed later */

...."

Could someone elaborate why old groups cannot be freed immediately, and
how it could be done async ?

Regards

David


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120404/06c328b3/attachment.html>


More information about the gstreamer-devel mailing list