<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.12">
<TITLE>Automatically freeing old groups in decodebin2</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I am currently experimenting with the decodebin2 ability to switch from a drained chain to a newly activated one.</FONT>

<BR><FONT SIZE=2 FACE="Arial">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).</FONT></P>

<P><FONT SIZE=2 FACE="Arial">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 &quot;hidden&quot; and&nbsp; goes into an &quot;old group&quot; list that is only freed when the chain itself is freed.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Decoders are in particular kept alive, rapidly leading to memory and hardware decoding bandwidth issues after a few streams have been played consecutively.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">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. </FONT></P>

<P><FONT SIZE=2 FACE="Arial">&quot;...</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; /* FIXME: This should be done directly via a thread! */</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp; GList *old_groups;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* Groups that should be freed later */&nbsp; </FONT>

<BR><FONT SIZE=2 FACE="Arial">&#8230;.&quot;</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Could someone elaborate why old groups cannot be freed immediately, and how it could be done async ?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Regards</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">David</FONT>
</P>
<BR>

</BODY>
</HTML>