CVS Root: /cvs/gstreamer
Module: gst-openmax
Changes by: felipec
Date: Thu Nov 20 2008 16:58:51 UTC
Log message:
Cleanup flushing mechanism for seeking.
Flushes for seeking works differently in input and output ports.
In input ports a real omx flush command is issued, then wait for
completion.
In output ports the internal queue is flushed, but no flush command is
sent to omx. There's still the possibility that the output buffers
coming from omx are wrong (before the flush) so they need to be tainted
somehow.
Modified files:
omx : gstomx_base_filter.c gstomx_util.c gstomx_util.h
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-openmax/omx/gstomx_base_filter.c.diff?r1=1.64&r2=1.65
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-openmax/omx/gstomx_util.c.diff?r1=1.43&r2=1.44
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-openmax/omx/gstomx_util.h.diff?r1=1.24&r2=1.25
====Begin Diffs====
Index: gstomx_base_filter.c
===================================================================
RCS file: /cvs/gstreamer/gst-openmax/omx/gstomx_base_filter.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -d -r1.64 -r1.65
--- gstomx_base_filter.c 20 Nov 2008 16:53:20 -0000 1.64
+++ gstomx_base_filter.c 20 Nov 2008 16:58:36 -0000 1.65
@@ -668,8 +668,6 @@
gst_pad_pause_task (self->srcpad);
- g_omx_core_flush (gomx);
-
ret = TRUE;
break;
Index: gstomx_util.c
RCS file: /cvs/gstreamer/gst-openmax/omx/gstomx_util.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- gstomx_util.c 20 Nov 2008 16:51:10 -0000 1.43
+++ gstomx_util.c 20 Nov 2008 16:58:37 -0000 1.44
@@ -389,18 +389,10 @@
}
void
-g_omx_core_flush (GOmxCore *core)
-{
- OMX_SendCommand (core->omx_handle, OMX_CommandFlush, OMX_ALL, NULL);
-}
-void
g_omx_core_flush_stop (GOmxCore *core)
{
- g_omx_sem_down (core->flush_sem);
core_for_each_port (core, g_omx_port_flush);
core_for_each_port (core, g_omx_port_resume);
- core_for_each_port (core, port_start_buffers);
/*
@@ -582,7 +574,20 @@
g_omx_port_flush (GOmxPort *port)
- async_queue_flush (port->queue);
+ if (port->type == GOMX_PORT_OUTPUT)
+ {
+ OMX_BUFFERHEADERTYPE *omx_buffer;
+ while ((omx_buffer = async_queue_pop_forced (port->queue)))
+ {
+ omx_buffer->nFilledLen = 0;
+ g_omx_port_release_buffer (port, omx_buffer);
+ }
+ }
+ else
+ OMX_SendCommand (port->core->omx_handle, OMX_CommandFlush, port->port_index, NULL);
+ g_omx_sem_down (port->core->flush_sem);
Index: gstomx_util.h
RCS file: /cvs/gstreamer/gst-openmax/omx/gstomx_util.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- gstomx_util.h 20 Nov 2008 16:09:49 -0000 1.24
+++ gstomx_util.h 20 Nov 2008 16:58:37 -0000 1.25
@@ -131,7 +131,6 @@
void g_omx_core_set_done (GOmxCore *core);
void g_omx_core_wait_for_done (GOmxCore *core);
void g_omx_core_flush_start (GOmxCore *core);
-void g_omx_core_flush (GOmxCore *core);
void g_omx_core_flush_stop (GOmxCore *core);
GOmxPort *g_omx_core_setup_port (GOmxCore *core, OMX_PARAM_PORTDEFINITIONTYPE *omx_port);
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.