Commit graph

54 commits

Author SHA1 Message Date
jitendra
715b44ea66 omx: Add pads based on element type
This allows to later add sources and sink that only have a srcpad
or sinkpad.

https://bugzilla.gnome.org/show_bug.cgi?id=699754
2013-05-06 16:20:20 +02:00
Sebastian Dröge
8a1bb1b4a3 omxvideodec: Add support for egl_render on RPi 2013-03-26 14:00:03 +01:00
Tim-Philipp Müller
d7862b927c omx: log commands as strings
Makes logs easier to read.
2013-03-15 09:29:56 +00:00
Tim-Philipp Müller
07e6ae99f1 omx: log states as strings 2013-03-15 09:29:55 +00:00
Tim-Philipp Müller
118345eef5 omx: log component name in debug messages
Useful when we have more different components
active at the same time.
2013-03-15 09:29:55 +00:00
Sebastian Dröge
22dce51dd4 omx: Handle the OMX_EventBufferFlag to detect EOS too 2013-03-14 12:51:54 +01:00
Sebastian Dröge
acf15e84a9 omx: Mark OpenMAX buffers as EGLImage if they contain one
Needs special handling in some places, e.g. because nFilledLen
will always be 0.
2013-03-13 13:10:28 +01:00
Sebastian Dröge
7a1eaec3b9 omx: Add timeout to the flush operation and move buffer populating to a separate function 2013-03-07 13:57:00 +01:00
Sebastian Dröge
001b7f0ed9 omx: Remove min buffer count hack for RPi again
It's not necessary anymore
2013-03-07 13:56:50 +01:00
Sebastian Dröge
60861f3990 omx: Do number of buffers configuration explicitely 2013-03-07 13:56:44 +01:00
Sebastian Dröge
0bb816e32c omx: Handle errors more gracefully 2013-03-01 11:18:38 +01:00
Sebastian Dröge
aeec430261 omx: Return the OMX_ERRORTYPE from gst_omx_port_update_port_definition 2013-02-28 15:49:14 +01:00
Sebastian Dröge
1dd6214f44 omx: Add hack for RPi for the minimum number of buffers required for a port
The value in the port definition is invalid and the initial actual
buffer count should be used.
2013-02-28 13:57:43 +01:00
Sebastian Dröge
1a906da409 omx: Add API for allocating a specific number of buffers and using EGLImages or buffers allocated elsewhere 2013-02-28 11:20:52 +01:00
Sebastian Dröge
b12610efd7 omx: Clean up port settings change handling 2013-02-27 15:50:20 +01:00
Sebastian Dröge
70368c31cd omx: Refactor waiting for buffers to be released by the component to a separate function 2013-02-25 10:41:12 +01:00
Sebastian Dröge
f79bbc302b omx: Add methods to set up and close a tunnel between components 2013-02-25 09:47:37 +01:00
Sebastian Dröge
219a93bbaf omx: Some minor refactoring and cleanup 2013-02-12 11:49:21 +01:00
Sebastian Dröge
c3bcc43db7 omx: Split enabling/disabling of port into sending the command and waiting for it
This allows to do anything necessary after sending the command to actually let it finish
2013-02-12 11:41:43 +01:00
Sebastian Dröge
4044aaecbe omx: Fix includes to properly work with the 1.0 releases 2013-01-17 18:08:15 +01:00
Sebastian Dröge
2d913c6773 omx: Atomic ops are not required anymore for the reconfiguration 2013-01-14 10:37:06 +01:00
Sebastian Dröge
a42f27547d omx: Implement new approach for locking that should solve all deadlocks on RPi
No mutex is locked while calling any OpenMAX functions anymore
and everything from the OpenMAX callbacks is inserted into a message
queue and handled from outside the callbacks.

Also there's only a single mutex and condition variable per component
now for handling anything from OpenMAX callbacks and a single mutex
for keeping our component/port state sane.
2013-01-14 10:36:32 +01:00
Sebastian Dröge
a70a71b9a5 omx: Also initialize nStep field of the OMX structures 2012-12-19 13:05:28 +01:00
Sebastian Dröge
73dc5bb199 omx: Initialize struct version with the OMX version we compiled with 2012-12-19 13:03:37 +01:00
Sebastian Dröge
7c53535026 configure: Add configure option to pack OpenMAX structures
This is required to set to 4 for the Raspberry Pi for example.
2012-12-19 11:26:36 +01:00
George Kiagiadakis
147dd89e21 omx: Initialize structures to version 1.1.2 2012-12-19 11:26:36 +01:00
Sebastian Dröge
3244201b49 omx: Fix some compilation errors caused by circular includes 2012-12-12 17:45:39 +00:00
Sebastian Dröge
2481ceb8c4 omx: Update to new GLib thread API 2012-11-12 11:29:48 +01:00
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
George Kiagiadakis
5c15caef8e omx: Add hack to disable setting roles to components.
Conflicts:

	omx/gstomx.c
2012-05-03 13:21:18 +02:00
George Kiagiadakis
7ca067be28 omxvideodec: Implement no-empty-eos-buffer hack, as in omxvideoenc.
Conflicts:

	omx/gstomxvideodec.c
2012-05-03 12:24:43 +02:00
Arun Raghavan
9e4cddee7e omxvideodec: Add hack for Ducati components not returning from drain
This happens on the Galaxy Nexus, and causes the pipeline to hang waiting
endlessly for a drain. The hack replaces the wait with a wait + 500ms timeout.
2012-04-26 09:42:52 +05:30
Olivier Crête
ff2603a727 Port to Gst 0.11 2012-04-13 12:16:34 -04:00
Sebastian Dröge
9e6665e8f8 omx: Add hack for encoder components that don't allow empty EOS buffers 2011-12-09 12:24:01 +01:00
Sebastian Dröge
72fa93956b omx: Remove QCOM hack to reset nOffset in EmptyBufferDone
This is now done in a generic way that does not require any
hacks because it will work without any side effects on any
OMX implementation.
2011-10-14 10:27:47 +02:00
Sebastian Dröge
792cdb7d1f omxvideodec: New hack for QCOM to recreate the component instead of reconfiguring it on caps changes 2011-09-28 10:35:31 +02:00
Sebastian Dröge
837fc4ca66 omx: Add hack for Qualcomm's OMX implementation to manually reset nOffset in EmptyBufferDone 2011-09-26 13:05:23 +02:00
Sebastian Dröge
f0fe1148b7 omx: Wait until the Executing state is reached before calling OMX_FillThisBuffer()
This correctly works around the QCOM race condition that happens when calling
FTB after setting the new state and before reaching it.
2011-09-14 10:16:41 +02:00
Sebastian Dröge
8791be3f95 omx: Add parenthesis at correct places in the struct init macro 2011-08-08 13:04:30 +02:00
Sebastian Dröge
aced7478ab omx: Add a hacks flag for the Qualcomm 7x30 OMX_FillThisBuffer() race and make it optional 2011-08-01 13:22:05 +02:00
Sebastian Dröge
f2b456e2e6 omx: Add wrapper functions for OMX_[GS]et{Config,Parameter} 2011-07-28 12:16:43 +02:00
Sebastian Dröge
35850e7233 omx: Add macro to initialize OpenMAX structures 2011-07-28 12:16:43 +02:00
Sebastian Dröge
2343decb3c omxvideoenc: Add video encoder base class and MPEG4 video encoder
Unfortunately requires lots of hacks again to work properly with
Bellagio.
2011-07-20 11:08:18 +02:00
Sebastian Dröge
b6558570bf omx: Rework port reconfiguration again and only use the Bellagio specific hacks with Bellagio
We only reconfigure ports that need to be reconfigured now instead of
always all ports.
2011-07-19 10:33:54 +02:00
Sebastian Dröge
4616d804ac omx: Add infrastructure to enable special hacks for broken OpenMAX implementations 2011-07-19 10:33:15 +02:00
Sebastian Dröge
f0cbbad0f1 omx: Add support for setting the component-role 2011-07-13 20:37:02 +02:00
Sebastian Dröge
0a9fe2f146 omx: Improve error reporting by formatting the error codes better and also providing their string representation 2011-07-13 20:22:51 +02:00
Sebastian Dröge
940febae88 omx: Add initial version of configuration system
This now only registers elements that are specified in the
configuration file.

The configuration file is a keyfile in the first XDG configuration
directory with the name gstomx.conf.
2011-07-12 11:04:11 +02:00
Sebastian Dröge
db08890edd omx: Rework port reconfiguration
We always reconfigure all ports now if the settings of one
port changes to prevent lots of race conditions, dropped
frames and similar issues.
2011-07-09 11:06:06 +02:00
Sebastian Dröge
43b9dee4b2 omx: Clarify GQueue/GPtrArray element types 2011-07-09 11:06:06 +02:00