[Gstreamer-openmax] Repeat Mode of Totem Player

Clark, Rob rob at ti.com
Mon Aug 16 07:53:42 PDT 2010


Just so I understand properly, is the issue that in the case of your OMX IL component, the buffer with the EOS flag set is containing actual data that should not be thrown out?  If not, then I'm not entirely sure that I understand.

Is the buffer lost from the (n+1)'th playback?

Perhaps if possible, sharing a log w/ GST_DEBUG="*omx*:5" would be helpful


BR,
-R



On Aug 15, 2010, at 11:02 PM, Mickey Kim wrote:

> 
> I'm using Totem Player on Ubuntu.
> When I check repeat mode option in totem, player stops after only two time repeatation.
> 
> I could find that totem doesn't change the state, when it meet the end of stream.
> But I also could find gst-openmax code doesn't consider this case.
> When gst-openmax meet EOS, it throw output buffer of queue (in output_loop()).
> So there is one buffer loss during one time repeatation.
> 
> 
> To resolve this issue, I have modified two function as below.
> 
> output_loop ()
> {
> ...
>        if (G_UNLIKELY (omx_buffer->nFlags & OMX_BUFFERFLAG_EOS))
>        {
>            GST_DEBUG_OBJECT (self, "got eos");
>            gst_pad_push_event (self->srcpad, gst_event_new_eos ());
>            ret = GST_FLOW_UNEXPECTED;
>            // by Mickey
>            // for repeat mode of totem player
>            // In original code,
>            // When gst-omx detect EOS buffer, this buffer are popped from queue and not pushed to queue.
>            // This lead to empty queue in repeat mode.
> #if 1
>            g_omx_port_push_buffer (out_port, omx_buffer);
> #endif
>            goto leave;
>        }
> ...
> }
> 
> g_omx_port_flush()
> {
>    if (port->type == GOMX_PORT_OUTPUT)
>    {
>        OMX_BUFFERHEADERTYPE *omx_buffer;
>        while ((omx_buffer = async_queue_pop_forced (port->queue)))
>        {
>            // by Mickey
>            // for repeat mode of totem player
>            // When gst-omx detect EOS, output_loop push buffer with EOS (to queue).
>            // Then, g_omx_port_flush() push this buffer with no EOS flag (to queue).
> #if 1
>            if(omx_buffer->nFlags & OMX_BUFFERFLAG_EOS)
>            {
>                omx_buffer->nFlags = 0;
>                g_omx_port_push_buffer (port, omx_buffer);
>                break;
>            }
>            else
>            {
>                omx_buffer->nFilledLen = 0;
>                g_omx_port_release_buffer (port, omx_buffer);
>            }
> #else
>            omx_buffer->nFilledLen = 0;
>            g_omx_port_release_buffer (port, omx_buffer);
> #endif
>        }
>    }
> ....
> }
> 
> 
> Please give your opinion.
> 
> Regards,
> Mickey
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by 
> 
> Make an app they can't live without
> Enter the BlackBerry Developer Challenge
> http://p.sf.net/sfu/RIM-dev2dev 
> _______________________________________________
> Gstreamer-openmax mailing list
> Gstreamer-openmax at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-openmax





More information about the Gstreamer-openmax mailing list