<HTML><HEAD><TITLE>Samsung Enterprise Portal mySingle</TITLE>
<META content="text/html; charset=utf-8" 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>But EOS buffer is still lost in your apporoach.</P>
<P>We need to decide how popped eos buffer is processed. (currently this buffer is lost).</P>
<P> </P>
<P>Anyway I cannot resolve repeatation problem using your patch.</P><BR><BR>------- <B>Original Message</B> -------<BR><B>Sender</B> : Felipe Contreras<felipe.contreras@gmail.com><BR><B>Date</B> : 2010-09-10 08:06 (GMT+09:00)<BR><B>Title</B> : Re: [Gstreamer-openmax] Repeat Mode of Totem Player<BR><BR>On Mon, Aug 30, 2010 at 2:25 PM, Mickey Kim <jihun.kim@samsung.com> wrote: <BR>> >From 794a96ffdbb7c1a4451ff0e0e14a7e2fad337c45 Mon Sep 17 00:00:00 2001 <BR>> From: mickey <mickey@avatar.(none)> <BR>> Date: Mon, 30 Aug 2010 15:44:00 +0900 <BR>> Subject: [PATCH] [gst-openmax] Fix repeate mode issue of totem player <BR>> When totem play single file in playlist in repeat mode, single file is played for 2times. <BR>> Totem stops at third time, only plays when seek button is pressed. <BR>> When totem player detects EOS (end of stream) in repeat mode, it doesn't change the statete. <BR>> gst-openmax, libomx source code are implemented without consideration of this case. <BR>> The repeate mode without state change causes a buffer loss in gst-openmax queue for one repeatation. <BR>> Singed-off-by: Mickey Kim <jihun.kim@samsung.com> <BR>> --- <BR>> omx/gstomx_base_filter.c | 1 + <BR>> omx/gstomx_util.c | 13 +++++++++++-- <BR>> 2 files changed, 12 insertions(+), 2 deletions(-) <BR>> diff --git a/omx/gstomx_base_filter.c b/omx/gstomx_base_filter.c <BR>> index a16cb5f..40d4c4c 100644 <BR>> --- a/omx/gstomx_base_filter.c <BR>> +++ b/omx/gstomx_base_filter.c <BR>> @@ -504,6 +504,7 @@ output_loop (gpointer data) <BR>> GST_DEBUG_OBJECT (self, "got eos"); <BR>> gst_pad_push_event (self->srcpad, gst_event_new_eos ()); <BR>> ret = GST_FLOW_UNEXPECTED; <BR>> + g_omx_port_push_buffer (out_port, omx_buffer); <BR>> goto leave; <BR>> } <BR>> <BR>> diff --git a/omx/gstomx_util.c b/omx/gstomx_util.c <BR>> index 283c32d..ce226e0 100644 <BR>> --- a/omx/gstomx_util.c <BR>> +++ b/omx/gstomx_util.c <BR>> @@ -697,8 +697,17 @@ g_omx_port_flush (GOmxPort *port) <BR>> OMX_BUFFERHEADERTYPE *omx_buffer; <BR>> while ((omx_buffer = async_queue_pop_forced (port->queue))) <BR>> { <BR>> - omx_buffer->nFilledLen = 0; <BR>> - g_omx_port_release_buffer (port, omx_buffer); <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>> } <BR>> } <BR>> else <BR>> -- <BR>> 1.7.0.4 <BR><BR>I don't think this is the right approach. <BR><BR>Buffers marked with EOS should not be any different from other <BR>buffers; they should be returned with OMX_FillThisBuffer(). <BR><BR>However, it does seem true that the EOS is not handled correctly as <BR>the buffers are lost. <BR><BR>What do you think about this instead? <BR><BR>--- a/omx/gstomx_base_filter.c <BR>+++ b/omx/gstomx_base_filter.c <BR>@@ -499,14 +499,6 @@ output_loop (gpointer data) <BR> GST_WARNING_OBJECT (self, "empty buffer"); <BR> } <BR><BR>- 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; <BR>- goto leave; <BR>- } <BR>- <BR> if (self->share_output_buffer && <BR> !omx_buffer->pBuffer && <BR> omx_buffer->nOffset == 0) <BR>@@ -542,6 +534,14 @@ output_loop (gpointer data) <BR> GST_ERROR_OBJECT (self, "no input buffer to share"); <BR> } <BR><BR>+ 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>+ omx_buffer->nFlags &= ~OMX_BUFFERFLAG_EOS; <BR>+ ret = GST_FLOW_UNEXPECTED; <BR>+ } <BR>+ <BR> omx_buffer->nFilledLen = 0; <BR> GST_LOG_OBJECT (self, "release_buffer"); <BR> g_omx_port_release_buffer (out_port, omx_buffer); <BR><BR>-- <BR>Felipe Contreras <BR><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>