<HTML><HEAD><TITLE>Samsung Enterprise Portal mySingle</TITLE>
<META content="text/html; charset=euc-kr" http-equiv=Content-Type>
<STYLE id=mysingle_style>P {
        MARGIN-TOP: 5px; FONT-FAMILY: Times New Roman, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
TD {
        MARGIN-TOP: 5px; FONT-FAMILY: Times New Roman, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
LI {
        MARGIN-TOP: 5px; FONT-FAMILY: Times New Roman, arial; MARGIN-BOTTOM: 5px; FONT-SIZE: 9pt
}
BODY {
        FONT-FAMILY: Times New Roman, arial; FONT-SIZE: 9pt
}
</STYLE>
<META name=GENERATOR content=ActiveSquare></HEAD>
<BODY>
<P>I'm using Totem Player on Ubuntu.</P>
<P>When I check repeat mode option in totem, player stops after only two time repeatation.</P>
<P> </P>
<P>I could find that totem doesn't change the state, when it meet the end of stream.</P>
<P>But I also could find gst-openmax code doesn't consider this case.</P>
<P>When gst-openmax meet EOS, it throw output buffer of queue (in output_loop()).</P>
<P>So there is one buffer loss during one time repeatation.</P>
<P><BR>
<META name=GENERATOR content=ActiveSquare><X-BODY><BR>To resolve this issue, I have modified two function as below.</P>
<P> </P>
<P>output_loop ()</P>
<P>{</P>
<P>...</P>
<P> if (G_UNLIKELY (omx_buffer->nFlags & OMX_BUFFERFLAG_EOS))<BR> {<BR> GST_DEBUG_OBJECT (self, "got eos");<BR> gst_pad_push_event (self->srcpad, gst_event_new_eos ());<BR> ret = GST_FLOW_UNEXPECTED;</P>
<P> // by Mickey<BR> // for repeat mode of totem player<BR> // In original code,<BR> // When gst-omx detect EOS buffer, this buffer are popped from queue and not pushed to queue.<BR> // This lead to empty queue in repeat mode.<BR><SPAN style="COLOR: #ff0000">#if 1<BR> g_omx_port_push_buffer (out_port, omx_buffer);<BR>#endif</SPAN><BR> goto leave;<BR> }</P>
<P>...</P>
<P>}</P>
<P> </P>
<P>g_omx_port_flush()</P>
<P>{</P>
<P> if (port->type == GOMX_PORT_OUTPUT)<BR> {<BR> OMX_BUFFERHEADERTYPE *omx_buffer;<BR> while ((omx_buffer = async_queue_pop_forced (port->queue)))<BR> {<BR> // by Mickey<BR> // for repeat mode of totem player<BR> // When gst-omx detect EOS, output_loop push buffer with EOS (to queue).<BR> // Then, g_omx_port_flush() push this buffer with no EOS flag (to queue).<BR><SPAN style="COLOR: #ff0000">#if 1<BR> if(omx_buffer->nFlags & OMX_BUFFERFLAG_EOS)<BR> {<BR> omx_buffer->nFlags = 0;<BR> g_omx_port_push_buffer (port, omx_buffer);<BR> break;<BR> }<BR> else<BR> {<BR> omx_buffer->nFilledLen = 0;<BR> g_omx_port_release_buffer (port, omx_buffer);<BR> }<BR><SPAN style="COLOR: #ff0000">#else</SPAN></SPAN><SPAN style="COLOR: #ff0000"><BR> omx_buffer->nFilledLen = 0;<BR> g_omx_port_release_buffer (port, omx_buffer);<BR>#endif</SPAN><BR> }<BR> }</P>
<P>....</P>
<P>}</P>
<P> </P>
<P> </P>
<P>Please give your opinion.</P>
<P> </P>
<P>Regards,</P>
<P>Mickey</P>
<P><BR> </P>
<P></P></X-BODY><BR>
<TABLE id=confidentialsignimg>
<TBODY>
<TR>
<TD NAMO_LOCK>
<P><IMG border=0 src="cid:QKNMBDIFBEI0@namo.co.kr" width=520></P></TD></TR></TBODY></TABLE>
<P></P></BODY></HTML>