GStreamer multimedia framework
Find a file
George Kiagiadakis 158775f497 Implement a new custom recursive mutex type and fix locking in callbacks so that in-context calls are allowed.
According to the OMX specification, implementations are allowed to call
callbacks in the context of their function calls. However, our callbacks
take locks and this causes deadlocks if the unerlying OMX implementation
uses this kind of in-context calls.

A solution to the problem would be a recursive mutex. However, a normal
recursive mutex does not fix the problem because it is not guaranteed
that the callbacks are called from the same thread. What we see in Broadcom's
implementation for example is:

- OMX_Foo is called
- OMX_Foo waits on a condition
- A callback is executed in a different thread
- When the callback returns, its calling function
  signals the condition that OMX_Foo waits on
- OMX_Foo wakes up and returns

The solution I came up with here is to take a second lock inside the callback,
but only if recursion is expected to happen. Therefore, all calls to OMX
functions are guarded by calls to gst_omx_rec_mutex_begin_recursion() / _end_recursion(),
which effectively tells the mutex that at this point we want to allow calls
to _recursive_lock() to succeed, although we are still holding the master lock.
2012-05-07 17:01:16 +03:00
common@dc702037b0 Automatic update of common submodule 2012-04-16 09:12:37 +02:00
omx Implement a new custom recursive mutex type and fix locking in callbacks so that in-context calls are allowed. 2012-05-07 17:01:16 +03:00
.gitignore Initial commit with build system 2011-06-21 10:52:13 +02:00
.gitmodules Initial commit with build system 2011-06-21 10:52:13 +02:00
Android.mk Enable building with Android's buildsystem 2012-01-19 14:08:12 -03:00
AUTHORS Initial commit with build system 2011-06-21 10:52:13 +02:00
autogen.sh Initial commit with build system 2011-06-21 10:52:13 +02:00
ChangeLog Initial commit with build system 2011-06-21 10:52:13 +02:00
configure.ac configure: Modernize autotools setup a bit 2012-04-16 09:16:10 +02:00
COPYING Initial commit with build system 2011-06-21 10:52:13 +02:00
gst-omx.doap Initial commit with build system 2011-06-21 10:52:13 +02:00
INSTALL Initial commit with build system 2011-06-21 10:52:13 +02:00
Makefile.am build: Dist autogen.sh 2011-07-13 14:36:14 +02:00
NEWS Initial commit with build system 2011-06-21 10:52:13 +02:00
README omx: Add minimal README file 2011-10-25 14:24:59 +02:00

GStreamer OpenMAX IL wrapper plugin
--------------------------

 This plugin wraps available OpenMAX IL components and makes
 them available as standard GStreamer elements.

License:
--------

  This package and its contents are licensend under the GNU Lesser General
Public License (LGPL).

Dependencies:
-------------

 * GStreamer core
 * gst-plugins-base