CVS Root: /cvs/gstreamer
Module: gst-openmax
Changes by: felipec
Date: Thu Nov 20 2008 16:01:34 UTC
Log message:
Add flushing functions in util.
Modified files:
omx : gstomx_util.c gstomx_util.h
Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-openmax/omx/gstomx_util.c.diff?r1=1.39&r2=1.40
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-openmax/omx/gstomx_util.h.diff?r1=1.22&r2=1.23
====Begin Diffs====
Index: gstomx_util.c
===================================================================
RCS file: /cvs/gstreamer/gst-openmax/omx/gstomx_util.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- gstomx_util.c 20 Nov 2008 16:00:26 -0000 1.39
+++ gstomx_util.c 20 Nov 2008 16:01:20 -0000 1.40
@@ -382,6 +382,24 @@
g_omx_sem_down (core->done_sem);
}
+void
+g_omx_core_flush_start (GOmxCore *core)
+{
+ core_for_each_port (core, g_omx_port_pause);
+ OMX_SendCommand (core->omx_handle, OMX_CommandFlush, OMX_ALL, NULL);
+ core_for_each_port (core, g_omx_port_flush);
+}
+
+g_omx_core_flush_stop (GOmxCore *core)
+ g_omx_sem_down (core->flush_sem);
+ core_for_each_port (core, g_omx_port_resume);
+#if 0
+ core_for_each_port (core, port_start_buffers);
+#endif
/*
* Port
*/
@@ -554,6 +572,12 @@
void
+g_omx_port_flush (GOmxPort *port)
+ async_queue_flush (port->queue);
g_omx_port_enable (GOmxPort *port)
{
GOmxCore *core;
@@ -578,7 +602,7 @@
OMX_SendCommand (core->omx_handle, OMX_CommandPortDisable, port->port_index, NULL);
g_omx_port_pause (port);
- async_queue_flush (port->queue); /** @todo should this be in a port_flush function? */
+ g_omx_port_flush (port);
port_free_buffers (port);
g_omx_sem_down (core->port_sem);
Index: gstomx_util.h
RCS file: /cvs/gstreamer/gst-openmax/omx/gstomx_util.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- gstomx_util.h 15 Aug 2008 15:14:05 -0000 1.22
+++ gstomx_util.h 20 Nov 2008 16:01:20 -0000 1.23
@@ -130,6 +130,8 @@
void g_omx_core_finish (GOmxCore *core);
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_stop (GOmxCore *core);
GOmxPort *g_omx_core_setup_port (GOmxCore *core, OMX_PARAM_PORTDEFINITIONTYPE *omx_port);
GOmxPort *g_omx_port_new (GOmxCore *core);
@@ -140,6 +142,7 @@
void g_omx_port_release_buffer (GOmxPort *port, OMX_BUFFERHEADERTYPE *omx_buffer);
void g_omx_port_resume (GOmxPort *port);
void g_omx_port_pause (GOmxPort *port);
+void g_omx_port_flush (GOmxPort *port);
void g_omx_port_enable (GOmxPort *port);
void g_omx_port_disable (GOmxPort *port);
void g_omx_port_finish (GOmxPort *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.