Sebastian Dröge
1ebd34e637
omxvideodec: Make sure to always get the right buffer
2013-03-13 09:38:03 +01:00
Sebastian Dröge
f4ad6e0858
omxvideodec: Make sure the buffer is released to the pool if it's not the one we wanted
2013-03-13 09:37:58 +01:00
Sebastian Dröge
ef357cce80
omxvideodec: Drop too late frames instead of finishing them
2013-03-13 09:37:43 +01:00
Sebastian Dröge
fa7be0b618
omx: Release buffers to the correct port
2013-03-13 09:37:36 +01:00
Sebastian Dröge
303b6c4dc5
omx: Always load the OpenMAX IL cores with G_MODULE_BIND_LOCAL
2013-03-13 09:37:02 +01:00
Sebastian Dröge
f505dad87a
omx: Lazy-load symbols of libbcm_host.so
...
It exports eglIntOpenMAXILDoneMarker(), which is also
exported by libopenmaxil.so... but we need the version
from libopenmaxil.so as the other one is just a stub.
2013-03-13 09:35:20 +01:00
Sebastian Dröge
3544fa5ae3
omx: Don't set profile/level in other encoders if downstream caps don't specify any
2013-03-11 13:59:15 +01:00
Sebastian Dröge
77f95de529
omxh264enc: If caps specify no profile/level use the component's defaults
2013-03-11 13:49:38 +01:00
Sebastian Dröge
3c13502b75
omxvideoenc: Always allocate output buffers from the loop function
2013-03-11 13:45:04 +01:00
Sebastian Dröge
bd53faacc9
omxh264enc: The h264 encoders are supposed to output byte-stream/au
2013-03-11 13:13:22 +01:00
Sebastian Dröge
79a1fed0e0
omxvideoenc: Wait until the Executing state is reached before passing buffers to the component
2013-03-11 11:52:57 +01:00
Sebastian Dröge
448ea34b75
omxvideodec: Don't provide buffers to downstream
...
This only works reliable if we have a way to tell downstream to
release all our buffers for reconfiguration.
2013-03-11 10:39:25 +01:00
Sebastian Dröge
8bf902b69d
omxaudioenc: Disable output port when setting a new format
2013-03-11 10:29:44 +01:00
Sebastian Dröge
f518ce5ed9
omxvideoenc: Disable output port when setting a new format
2013-03-11 10:29:30 +01:00
Sebastian Dröge
00be69f4a0
omxvideodec: Disable output port when setting a new format
...
Based on a patch by Josep Torra <n770galaxy@gmail.com>
2013-03-11 10:22:07 +01:00
Sebastian Dröge
65174bbd7f
omx: Catch errors when releasing buffers to a port and handle them
2013-03-11 10:04:10 +01:00
Sebastian Dröge
eac2078056
omxvideoenc: Use the correct video codec state when filling an input buffer
2013-03-10 12:09:23 +01:00
Sebastian Dröge
98cf9f6fe2
omxvideoenc: Store correct input state
2013-03-10 12:05:50 +01:00
Sebastian Dröge
fb3b213b3e
omxvideoenc: Allocate output buffers as early as possible
2013-03-10 11:31:55 +01:00
Sebastian Dröge
b9bf849a39
omx: Log unknown events
2013-03-10 11:03:18 +01:00
Josep Torra
bd071327da
omx: Fix deadlock in encoders and add explainatory comments.
2013-03-09 14:14:40 +01:00
Josep Torra
7423e3e023
omxvideodec: fix printf format identifier
2013-03-09 13:27:08 +01:00
Josep Torra
cde5df17fa
omx: Minor changes on debuging info
2013-03-09 13:24:30 +01:00
Josep Torra
6d8bf76391
omxvideodec: avoid a deadlock
2013-03-09 13:24:16 +01:00
Sebastian Dröge
aa6be53375
omxvideodec: Don't forget to populate output port
2013-03-08 15:58:01 +01:00
Sebastian Dröge
c014b1c9a3
omx: Flush and stop srcpad when configuring new caps
2013-03-08 15:50:20 +01:00
Sebastian Dröge
716adfa5be
Revert "omx: use no-component-reconfigure hack on the Raspberry PI"
...
This reverts commit e123b2089f
.
It's not required anymore after the fix from the last commit.
2013-03-07 17:40:21 +01:00
Sebastian Dröge
ed0de9d699
omxvideodec: Only negotiate a color format with downstream on the initial caps
2013-03-07 17:38:40 +01:00
Sebastian Dröge
bbd30a96bd
omxvideodec: Make sure the output port is disabled while we allocate buffers
2013-03-07 17:29:43 +01:00
Sebastian Dröge
20c9ae0823
omx: Also wait for disabled output ports to be reconfigured
2013-03-07 17:27:05 +01:00
Sebastian Dröge
0cd96e8c6b
omxvideodec: Add buffer pool for sharing OpenMAX memory with downstream
2013-03-07 14:10:12 +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
Josep Torra
cc495aeb16
omxvideodec: fixes reconfiguration
...
Avoid having fixed fields from previous caps on reconfiguration.
2013-03-07 11:24:54 +01:00
Josep Torra
e123b2089f
omx: use no-component-reconfigure hack on the Raspberry PI
2013-03-07 11:02:39 +01:00
Josep Torra
118c023f55
omxvideoenc: drop unused data member
2013-03-01 15:32:47 +01:00
Sebastian Dröge
0b348473fa
omxvideoenc: And set it actually on the right port
2013-03-01 12:24:09 +01:00
Sebastian Dröge
eef92abf28
omxvideoenc: Set the coding type in the subclasses to the specific codec
2013-03-01 12:18:08 +01:00
Sebastian Dröge
42937eaea0
omxvideoenc: gst_omx_port_update_port_definition() returns a OMX_ERRORTYPE, not a gboolean
2013-03-01 11:49:53 +01:00
Sebastian Dröge
687a188dad
omxvideo{dec,enc}: Don't use the input state if it wasn't set yet
2013-03-01 11:44:17 +01:00
Sebastian Dröge
d92fb127ae
omxaudioenc: Only enable the output port after we know the output format
2013-03-01 11:25:04 +01:00
Sebastian Dröge
a53c5638e2
omxvideoenc: Only enable the output port after we know the output format
2013-03-01 11:24:56 +01:00
Sebastian Dröge
63e0d61971
omxvideodec: Only enable the output port after we know the output format
2013-03-01 11:21:25 +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
dc0385d762
omx: Return port definition update errors
2013-02-28 15:38:28 +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
5132a89331
omx: Always tell the component about the right number of buffers that we're going to allocate
2013-02-28 13:26:56 +01:00
Sebastian Dröge
59e92f955d
omx: Invert assertion to let it express what was intended
2013-02-28 13:07:58 +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
e42faae652
omx: Refactor code flow a bit if output port settings have changed
2013-02-27 16:56:02 +01:00
Sebastian Dröge
b12610efd7
omx: Clean up port settings change handling
2013-02-27 15:50:20 +01:00
Josep Torra
26b69d99a2
omxvideodec: initialize param structure before using it
2013-02-27 11:30:14 +01:00
Josep Torra
b85358aff7
omxvideoenc: prevent a NULL pointer access
2013-02-27 10:21:39 +01:00
Josep Torra
3973425689
omxvideodec: prevent a NULL pointer access
2013-02-26 17:25:49 +01:00
Sebastian Dröge
8872afff1d
omx: Fix deadlock during reconfiguration
2013-02-25 13:11:16 +01:00
Sebastian Dröge
5b45cb0810
omx: Auto-detect the port indizes if possible
2013-02-25 12:42:05 +01:00
Sebastian Dröge
3e090dd83b
omx: Refactor querying of component supported caps into its own function
2013-02-25 11:42:38 +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
fa9bf95c40
omxaudioenc: Rename component variable
2013-02-25 09:19:08 +01:00
Sebastian Dröge
92c7944499
omxvideoenc: Rename component variable
2013-02-25 09:19:08 +01:00
Sebastian Dröge
e08b801fea
omxvideodec: Rename component variable
2013-02-25 09:19:08 +01:00
Josep Torra
71b4573a34
omxvideoenc: remove duplicated line
2013-02-22 16:27:33 +01:00
Sebastian Dröge
cba466b61c
Retry loading libbcm_host.so without an absolute path if that failed
2013-02-22 10:42:08 +01:00
Sebastian Dröge
9ed06008cd
Add OpenMAX IL target for Bellagio
...
Not tested since a very long time though.
2013-02-21 11:03:23 +01:00
Sebastian Dröge
cfafeabfa2
Allow using external OpenMAX IL headers
2013-02-21 10:59:29 +01:00
Sebastian Dröge
05819da94d
Set default hacks for the RPI target and always initialize bcm_host
2013-02-21 10:08:07 +01:00
Sebastian Dröge
5d6d6ec2df
omx: Add FIXME for the future
2013-02-12 11:55:39 +01:00
Sebastian Dröge
219a93bbaf
omx: Some minor refactoring and cleanup
2013-02-12 11:49:21 +01:00
Sebastian Dröge
4399c0b96b
omx: Don't access the port's buffers array if it wasn't allocated yet
2013-02-12 11:49:07 +01:00
Sebastian Dröge
dd3ad9e6d5
omx: Mark an array as const
2013-02-12 11:44:40 +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
58a093bc0c
omx: Flushing is also allowed in Paused state
2013-02-12 11:37:38 +01:00
Sebastian Dröge
39672e70c4
omxvideoenc: Set stride, slice height and buffer size
2013-02-12 11:28:36 +01:00
Sebastian Dröge
044a88f838
omxvideoenc: Properly negotiate OMX color format with the component
2013-02-12 11:03:32 +01:00
Sebastian Dröge
023b542ad5
omxvideoenc: Implement getcaps() vfunc
2013-02-12 11:03:30 +01:00
Julian Scheel
3d7a50944d
omx: add mpeg2 video decoder
...
This adds a decoder class for mpeg2, as well as an extended
configuration for raspberry pi.
https://bugzilla.gnome.org/show_bug.cgi?id=692446
Signed-off-by: Julian Scheel <julian@jusst.de>
2013-01-24 22:46:52 +00:00
Sebastian Dröge
5c4799ccf1
omx: Minimize the time when the messages lock is held
...
Fixes a deadlock if any OMX functions are called when the
messages are handled.
Thanks to Nicolas Dufresne for noticing.
2013-01-18 16:47:52 +01:00
Tim-Philipp Müller
453d81886d
omx: improve debug message when we can't find the config file
...
Mention where we looked for the config file.
2013-01-18 15:28:20 +00: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
e5bf204a1d
omx: Update port definition when changing some port setting
2013-01-15 14:37:37 +01:00
Sebastian Dröge
449017b50b
omx: Rename from libgstopenmax.so to ligstomx.so for consistency
2013-01-15 14:37:37 +01:00
Nicolas Dufresne
8c3bd103ff
omx: Add a method to send message
2013-01-14 10:37:13 +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
be31e7273b
omx: Fix some memory leaks and suboptimal locking
2013-01-14 10:36:57 +01:00
Sebastian Dröge
bcb181bd2d
omxvideoenc: Don't forget to unmap frame in error cases
2013-01-14 10:36:50 +01:00
Sebastian Dröge
25d5c55764
omxvideoenc: Fix copying of the video frames to the OMX buffers
2013-01-14 10:36:44 +01:00
Sebastian Dröge
2fd8d72c50
omxvideodec: Fix copying of the video frames from the OMX buffers
2013-01-14 10:36:38 +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
1bf69c8f69
omxvideodec: Set the OMX buffer nFilledLength field properly
2012-12-20 19:30:38 +01:00
Sebastian Dröge
29aabc223e
omxrecmutex: Fix another race condition when two threads are trying to lock for recursion at the same time
2012-12-20 18:48:21 +01:00
Sebastian Dröge
500410226f
omxrecmutex: Fix yet another race condition that resulted in deadlocks
2012-12-20 18:16:43 +01:00
Sebastian Dröge
e026926951
omx: Fix another race condition in the recursive mutex
...
Between lock() and begin_recursion() it was possible for another thread to
try to do a recursive_lock(). This would block because the mutex was already
locked(), but not ready for recursive locking yet. unlock() would never
happen in the original thread because it was waiting for the other thread
to finish first.
Happened on the Raspberry Pi.
2012-12-20 17:46:36 +01:00
Sebastian Dröge
1c7fcf832e
omxrecmutex: Fix a small race condition when unlocking a non-recursive lock
2012-12-20 14:45:18 +01:00
Sebastian Dröge
1d01c0ebf0
omx: Fix ununsed variable compiler warning
2012-12-20 12:30:05 +01:00
Sebastian Dröge
83b4c1d892
omx: No need to start the srcpad task in ::start() already
...
It will be started properly after the caps are set.
2012-12-20 12:27:47 +01:00
Sebastian Dröge
4ef40839a2
omxvideodec: OMX_ErrorNoMore is no error and just means we ended iteration
2012-12-20 12:23:49 +01:00
Sebastian Dröge
f90a6ed9e9
omx: Improve debug output
2012-12-20 12:20:31 +01:00
Sebastian Dröge
f6f078e847
omxvideodec: Don't forget to free a GList
2012-12-20 12:02:30 +01:00
Sebastian Dröge
20280afa1f
omxvideodec: Map OMX_COLOR_FormatYUV420PackedPlanar to I420 too
...
This is used on the Raspberry Pi.
2012-12-20 11:56:29 +01:00
Sebastian Dröge
a80e2b9053
omxvideodec: During negotiation of the output format make sure we use the correct OpenMAX format
2012-12-20 11:55:36 +01:00
Sebastian Dröge
07e0d674a0
omxvideodec: If negotiation fails this could also mean that the component can't do it at this point yet
2012-12-20 11:42:17 +01:00
Sebastian Dröge
7354baec66
omxvideodec: Improve format negotiation a bit
...
Don't leak caps and make sure to fixate caps.
2012-12-20 11:40:28 +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
9c464924a5
omxvideodec: Extract data from the input buffer, not the codec data
2012-12-19 12:44:31 +01:00
Sebastian Dröge
b93d86abbe
omx: Use has_suffix() instead of has_prefix() for the Broadcom hack
2012-12-19 12:19:12 +01:00
Sebastian Dröge
5105daba1a
omx: Add hack to load and initialize libbcm_host.so
...
Needed on the Raspberry Pi. Patch based on a patch by
George Kiagiadakis <george.kiagiadakis@collabora.com>
2012-12-19 11:31:51 +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
31bf1c8bd6
config: Add raspberry-pi configuration in a different directory
2012-12-19 11:26:36 +01:00
George Kiagiadakis
78035a4848
raspberry: Add a gstomx.conf for the Raspberry Pi
2012-12-19 11:07:25 +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
7fa4616598
omx: Fix refcount problem with frames being dropped because of decoder bugs
2012-11-12 15:14:09 +01:00
Sebastian Dröge
2481ceb8c4
omx: Update to new GLib thread API
2012-11-12 11:29:48 +01:00
Sebastian Dröge
bced70525a
omx: Use open/close vfuncs
2012-10-22 14:34:53 +02:00
Sebastian Dröge
9d0e582484
omx: Handle video meta correctly
2012-10-22 14:28:04 +02:00
Sebastian Dröge
5fdb490f1a
omx: Port to video base classes from -base
2012-10-22 14:20:41 +02:00
Tim-Philipp Müller
49ba281e8b
omx: gst_element_class_set_details_simple() -> set_static_metadata()
2012-10-17 17:57:43 +01:00
George Kiagiadakis
f93feb2644
omx: fix debug statement
2012-09-03 12:37:02 +03:00
George Kiagiadakis
8a669ee308
omx: use recursive_lock inside set_last_error(), since this function may be called from an event handler
2012-09-03 12:36:53 +03:00
Tim-Philipp Müller
3f963f87fb
omx: fix plugin name for new GST_PLUGIN_DEFINE API
2012-08-03 19:32:13 +01:00
Sebastian Dröge
48163f60f0
omx: Update for allocation query API changes
2012-07-10 09:57:09 +02:00
Sebastian Dröge
e84fee6488
omx: Fix compilation after gst_pad_start_task() API changes
2012-06-20 11:09:13 +01:00
George Kiagiadakis
7b3dac67af
omx: Fix spelling mistake found by lintian: s/Seperate/Separate/
2012-05-08 16:16:00 +03: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
George Kiagiadakis
4aa3fa8a0d
omxvideodec: Fix coding style in the drain-may-not-return hack code
2012-05-03 12:20:05 +02:00
Arun Raghavan
34a83c184e
omx: Fix trivial debug print bug
2012-04-26 09:42:54 +05:30
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
Arun Raghavan
036cd16756
omx: Fix deadlock between ending a flush and the event handler
...
gst_omx_port_set_flushing() calls OMX_FillThisBuffer at the end of a flush
without releasing the port lock, and this can cause a deadlock with the
EventHandler. This patches fixes this by dropping the lock for the duration of
the fill buffer call.
2012-04-26 09:42:50 +05:30
Sebastian Dröge
d99fa5e3b3
omx: Update video encoder/decoder base classes from gst-plugins-bad
2012-04-24 15:41:38 +02:00
Sebastian Dröge
3523724970
omxaudioenc: Use gst_buffer_extract() to copy the input buffer data to the OpenMAX buffer
2012-04-16 08:35:33 +02:00
Alessandro Decina
e6e3f05948
Fix relative/absolute path glitch
...
Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@collabora.com>
2012-04-13 17:16:42 -04:00
Olivier Crête
ff2603a727
Port to Gst 0.11
2012-04-13 12:16:34 -04:00
Reynaldo H. Verdejo Pinochet
766dc7c541
Enable building with Android's buildsystem
...
This change adds prelimary buildsystem hooks to
build gst-omx with the Android buildsystem. Like
the rest of GStreamer's Android hooks, the process
relies on the availability of androgenizer. A tool
developed by Collabora to automatically generate
Android.mk files from within the auto* setup.
Androgenizer is currently available at:
http://cgit.collabora.com/git/user/derek/androgenizer.git/
2012-01-19 14:08:12 -03:00
Sebastian Dröge
4fd185be6f
basevideocodec: Don't use G_TYPE_REGISTER_BOXED() yet
...
This would require GLib 2.26.
2011-12-14 21:15:29 +01:00
Jonas Larsson
887d43c290
omxaudioenc: Add hack for encoder components that don't allow empty EOS buffers
2011-12-14 10:09:34 +01:00
Jonas Larsson
2cab5b5db5
omxvideoenc: Fix deadlock when using the EOS hack
2011-12-14 10:07:29 +01:00
Sebastian Dröge
3db75118dd
omxvideoenc: Remove workaround for basevideocodec bug
2011-12-12 14:26:48 +01:00
Sebastian Dröge
4c225f9cdd
omxvideodec: Remove workaround for basevideocodec bug
2011-12-12 14:26:34 +01:00
Matej Knopp
30005be2e5
basevideo: Make GstVideoFrame a reference counted boxed object
...
...and also clear all existing frames when resetting the decoder or encoder.
2011-12-12 14:24:47 +01: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
Dake Gu
b8b64ac746
omxaacenc: Generate and set codec_data on the caps for raw AAC
2011-12-09 10:21:47 +01:00
Alessandro Decina
247e410df0
basevideoencoder: handle failures in start() and stop()
2011-12-08 11:56:58 +01:00
Vincent Penquerc'h
f27ca88ecc
basevideoenc: do not try to calculate latency from an unknown framerate
...
It'll divide by zero, and latency is unknown for an unknown framerate.
Fixes an assert in the schroenc test.
https://bugzilla.gnome.org/show_bug.cgi?id=657419
2011-12-08 11:55:03 +01:00
Sebastian Dröge
8e662fffb0
basevideoencoder: Only make the header buffer metadata writable, not the buffer
2011-12-08 11:50:49 +01:00
Sebastian Dröge
9ea6e7d2f2
basevideoencoder: Fix handling of force-keyunit events
2011-12-08 10:18:36 +01:00
Sebastian Dröge
766f5bd161
omxaudioenc: Don't forward EOS events immediately but let all other events be handled by the base class
...
Previously this logic was inversed, which did not make any sense at all.
2011-12-06 13:28:41 +01:00
Sebastian Dröge
064e4c628c
omxaudioenc: Use correct timestamp, duration and filled length for the EOS buffers
2011-12-06 12:47:25 +01:00
Sebastian Dröge
05ad3343bf
omxvideodec: Use correct timestamp, duration and filled length for the EOS buffers
2011-12-06 12:47:12 +01:00
Sebastian Dröge
bd60f141e9
omxvideoenc: Use correct timestamp, duration and filled length for the EOS buffers
2011-12-06 12:46:51 +01:00
Sebastian Dröge
0cb32a4ebd
omx: Improve debugging of buffer handling
2011-12-05 13:18:09 +01:00
Sebastian Dröge
781e61d569
omxvideoenc: Drop EOS events in ::finish()
...
The event will be forwarded downstream from the srcpad
loop function after the last buffer was generated by the
component. Forwarding it after ::finish() will use the
sinkpad streaming thread and does not guarantee that
the encoder is completely drained.
2011-12-05 08:12:48 +01:00
Sebastian Dröge
b4e632cefe
omxvideodec: Properly drop frames due to QoS
...
Instead of finishing them they should be passed to drop(), which
will then send QoS messages.
2011-12-01 16:20:36 +01:00
Jonas Larsson
9c4b926c41
omxh264enc: Add support for resending headers after a forced-keyframe
2011-11-29 12:21:32 +01:00
Sebastian Dröge
458199abfb
basevideoencoder: Pass the all-headers field of the force-key-unit event to the subclass
2011-11-29 12:20:09 +01:00
Sebastian Dröge
3cb4bbe97e
basevideoencoder: Implement full support for the new force-key-unit event
...
Including support for the running-time and count fields.
2011-11-29 12:20:09 +01:00
Sebastian Dröge
11b2dea82d
basevideoencoder: Use new force-keyunit event API from gst-plugins-base
2011-11-29 12:20:09 +01:00
Sebastian Dröge
77db7e5780
basevideoencoder: Adjusting padding is not required for -bad libraries
2011-11-29 12:20:09 +01:00
Sebastian Dröge
db756fb190
basevideoencoder: Move some fields to the private part of the instance struct
2011-11-29 12:20:09 +01:00
Sebastian Dröge
050700d561
basevideoencoder: Make headers metadata writable before pushing downstream
...
The timestamp, duration, etc of the headers has to be changed.
2011-11-29 12:20:09 +01:00
Sebastian Dröge
1f3f8c9dc5
basevideoencoder: Push the downstream force-keyframe event after the next keyframe
...
Even if the corresponding GstVideoFrame doesn't have the is_sync_point
flag set.
2011-11-29 12:20:09 +01:00
Sebastian Dröge
38b3f1ac00
basevideoencoder: Don't push an upstream force-keyunit event downstream
2011-11-29 12:20:09 +01:00
Jonas Larsson
36d2a21aa3
basevideoencoder: Add initial support for the all-headers field of the force-keyframe event
...
See bug #607742 .
2011-11-29 12:20:09 +01:00
Tim-Philipp Müller
b42f17240a
basevideodecoder: some more debug logging
2011-11-28 16:17:19 +00:00
Tim-Philipp Müller
f40c93efb0
basevideodecoder: add API to drop a frame and post a QoS message on the bus
...
https://bugzilla.gnome.org/show_bug.cgi?id=640017
API: gst_base_video_decoder_drop_frame()
2011-11-28 16:17:19 +00:00
Tim-Philipp Müller
f27800d598
docs: fix comment in gst_base_video_decoder_get_max_decode_time() docs
2011-11-28 16:17:19 +00:00
Tim-Philipp Müller
f1bbb0f8a4
basevideodecoder: fix weird event list handling
...
Get rid of weird code that copies a list manually, taking
ownership of the elements and then frees the old list. Instead,
just take over the old list entirely. (If the intent was to
reverse the list, one could use g_list_reverse() instead).
Then, push events in the list out from last to first (since they
were prepended as they came in) instead of just pushing out the
last in the list and leaking the others.
2011-11-28 16:17:19 +00:00
Sebastian Dröge
217ac7b3be
omxaudioenc: Use audio base classes from gst-plugins-base instead of having our own copies
2011-11-25 11:31:58 +01:00
Sebastian Dröge
9917fbe4c5
omxaudioenc: First set ports to flushing before waiting for the srcpad streaming thread to finish
2011-11-18 10:00:31 -08:00
Sebastian Dröge
be4e1e184e
omxvideoenc: First set ports to flushing before waiting for the srcpad streaming thread to finish
2011-11-18 09:59:43 -08:00
Sebastian Dröge
1c0396de0e
omxvideodec: First set ports to flushing before waiting for the srcpad streaming thread to finish
2011-11-18 09:58:58 -08:00
Sebastian Dröge
47d66cadfa
omx: Only disabling of a port is like flushing, enabling is like unflushing
2011-11-17 14:38:54 -08:00
Sebastian Dröge
c144ebd054
omx: Enabling/disabling a port is also like flushing
...
The component returns all buffers to us and shouldn't get any
new buffers passed anymore.
2011-11-17 14:11:51 -08:00
Sebastian Dröge
8a5fbb876c
omxaudioenc: Signal the drain GCond even if downstream returned an error
2011-11-17 11:29:39 -08:00
Sebastian Dröge
1ba8ec3d37
omxvideoenc: Signal the drain GCond even if downstream returned an error
2011-11-17 11:29:39 -08:00
Sebastian Dröge
1371dafae4
omxvideodec: Signal the drain GCond even if downstream returned an error
2011-11-17 11:29:18 -08:00
Sebastian Dröge
cc50d894af
basevideoencoder: Only call ::reset once in READY->PAUSED
2011-11-17 10:34:19 -08:00
Sebastian Dröge
7df465bfb3
omxaudioenc: Shutdown component in PAUSED->READY and deallocate buffers
2011-11-17 10:19:47 -08:00
Sebastian Dröge
2408e0d33a
omxvideoenc: Shutdown component in PAUSED->READY and deallocate buffers
2011-11-17 10:19:47 -08:00
Sebastian Dröge
30610a746e
omxvideodec: Shutdown component in PAUSED->READY and deallocate buffers
2011-11-17 10:19:47 -08:00
Sebastian Dröge
879349ba11
omxvideoenc: Set force_keyframe to FALSE after handling it
...
There's no reason why the base class should forward the event
further downstream if we already handled it and will insert a
keyframe.
2011-11-16 12:02:08 -08:00
Sebastian Dröge
c99af4a32e
omxvideodec: Always push buffers downstream, even if we didn't find a corresponding GstVideoFrame
2011-11-16 11:21:25 -08:00
Sebastian Dröge
70b735da82
omx: Fix debug level for flushing in wrong state from ERROR to DEBUG
...
It's not really an error and doesn't matter at all if flush is called
when the component is not running.
2011-11-15 09:47:55 -08:00
Sebastian Dröge
1b58fa487e
omxh264enc: Detect bytestream stream format and don't put SPS/PPS into the caps for this format
2011-11-15 08:40:07 -08:00
Sebastian Dröge
22ba4e1b9e
omxvideoenc: Add vfunc for handling the output frames
...
This can be used by subclasses to override the buffer flags
or to handle some frames differently than the default behaviour.
2011-11-15 08:28:32 -08:00
Sebastian Dröge
0f07403ff2
omxvideodec: Don't release buffers twice if dropping because of QoS
2011-11-14 12:50:26 -08:00
Sebastian Dröge
6736a39671
omx: Add XXX to the nOffset reset hack comment for QCOM
2011-11-14 09:13:06 -08:00
Sebastian Dröge
1ab4e4b945
omxaudioenc: Make srcpad caps setting threadsafe
2011-11-10 15:18:08 +01:00
Sebastian Dröge
0a4e222e60
omxvideoenc: Make srcpad caps setting threadsafe
2011-11-10 15:17:56 +01:00
Sebastian Dröge
30d2f970f9
omxvideodec: Make srcpad caps setting threadsafe
2011-11-10 15:17:41 +01:00
Sebastian Dröge
f0775fac6f
omxaudioenc: Make the srcpad task and the sinkpad streaming thread handling threadsafe
2011-11-10 15:10:14 +01:00
Sebastian Dröge
b62ffe1ada
omxaudioenc: Always flush the ports and make sure no processing is happening in ::flush
...
This fixes a race condition that happened when seeking
very often in a short period of time.
2011-11-10 15:03:05 +01:00
Sebastian Dröge
fbe171ee2c
omxvideoenc: Always flush the ports and make sure no processing is happening in ::reset
...
This fixes a race condition that happened when seeking
very often in a short period of time.
2011-11-10 15:02:22 +01:00
Sebastian Dröge
e56cff5f2a
omxvideoenc: Fix minor race condition when draining after upstream signalled EOS
2011-11-10 15:01:36 +01:00
Sebastian Dröge
05e4b48855
omxaudioenc: Improve EOS handling
...
If downstream return UNEXPECTED we should still signal the
drain cond because nothing will trigger this again later.
2011-11-10 14:56:19 +01:00
Sebastian Dröge
56bcfc0397
omxvideoenc: Improve EOS handling
...
If downstream return UNEXPECTED we should still signal the
drain cond because nothing will trigger this again later.
2011-11-10 14:56:11 +01:00
Sebastian Dröge
1b7742ca98
omxaudioenc: Improve debugging of EOS and draining
2011-11-10 14:54:33 +01:00
Sebastian Dröge
abd399ecbc
omxvideoenc: Improve debugging of EOS and draining
2011-11-10 14:54:17 +01:00
Sebastian Dröge
b36db47cba
omxvideodec: Log if acquiring buffer for EOS failed
2011-11-10 14:51:06 +01:00
Sebastian Dröge
3412ecf538
omxvideodec: The component is not started in READY
2011-11-10 14:42:13 +01:00
Sebastian Dröge
8c1aee4171
omxaudioenc: No need to signal the drain cond when going from READY to PAUSED
...
Also the component is not started in READY
2011-11-10 14:41:50 +01:00
Sebastian Dröge
de7d237851
omxvideoenc: No need to signal the drain cond when going from READY to PAUSED
...
Also the component is not started in READY.
2011-11-10 14:41:50 +01:00
Sebastian Dröge
6e41e31e6c
omxvideodec: Always flush the ports and make sure no processing is happening in ::reset
...
This fixes a race condition that happened when seeking
very often in a short period of time.
2011-11-09 15:46:39 +01:00
Sebastian Dröge
60a6c1b49f
omxvideodec: Fix minor race condition when draining after upstream signalled EOS
2011-11-09 15:45:20 +01:00
Sebastian Dröge
92c26f684a
omxvideodec: Improve EOS handling
...
If downstream return UNEXPECTED we should still signal the
drain cond because nothing will trigger this again later.
2011-11-09 15:44:11 +01:00
Sebastian Dröge
c026bee8c6
omxvideodec: Improve debugging of EOS and draining
2011-11-09 15:43:32 +01:00
Sebastian Dröge
59faafc30b
omxvideodec: The component is not started already when going from READY to PAUSED
2011-11-09 15:42:46 +01:00
Sebastian Dröge
6c2cca3e94
omxvideodec: No need to signal the drain cond when going from READY to PAUSED
2011-11-09 15:42:13 +01:00
Sebastian Dröge
b66fd610d6
omx: Always reset buffer flags for output ports, even in flushing/error state
2011-11-09 15:41:02 +01:00
Sebastian Dröge
cf22a12156
omxvideodec: Improve debugging in case of QoS-related frame drops
2011-11-09 09:00:57 +01:00
Sebastian Dröge
fb5d700ec9
omxvideoenc: Release the video codec stream lock before acquiring an input buffer
...
Otherwise the srcpad task might block on this lock and
no buffers ever become available again.
2011-11-08 12:47:00 +01:00
Sebastian Dröge
b45197c0d7
omxaudioenc: Release the audio encoder stream lock before acquiring an input buffer
...
Otherwise the srcpad task might block on this lock and
no buffers ever become available again.
2011-11-08 12:47:00 +01:00
Sebastian Dröge
3da6d8bfa3
omxvideodec: Release the video codec stream lock before acquiring an input buffer
...
Otherwise the srcpad task might block on this lock and
no buffers ever become available again.
2011-11-08 12:47:00 +01:00
Sebastian Dröge
17d0751887
omxaudioenc: Don't try to drain the component after EOS
...
And don't send EOS twice in any case. This most likely
will cause the component to not output it again and
is not necessary anyway.
2011-11-08 11:10:57 +01:00
Sebastian Dröge
2d6239678f
omxvideoenc: Don't try to drain the component after EOS
...
And don't send EOS twice in any case. This most likely
will cause the component to not output it again and
is not necessary anyway.
2011-11-08 11:10:52 +01:00
Sebastian Dröge
9251e0004c
omxvideodec: Don't try to drain the component after EOS
...
And don't send EOS twice in any case. This most likely
will cause the component to not output it again and
is not necessary anyway.
2011-11-08 11:08:06 +01:00
Sebastian Dröge
b10c2cfc72
omxvideodec: Implement dropping of too late frames via QoS
2011-11-08 09:09:28 +01:00
Sebastian Dröge
093a27fea3
omxaudioenc: Minor code refactoring
2011-11-08 08:31:58 +01:00
Sebastian Dröge
ae6616ad0d
omxvideoenc: Minor code refactoring
2011-11-08 08:31:43 +01:00
Sebastian Dröge
d4eb77fa2b
omxvideodec: Make sure to always release buffers back to OMX
2011-11-08 08:31:32 +01:00
Sebastian Dröge
1d071c05dc
omx: Also properly release buffers when in error state
2011-11-08 08:24:49 +01:00
Jonas Larsson
0682012181
omx: Properly release buffers during flushing
...
We can't pass them back to OMX_FillThisBuffer() or OMX_EmptyThisBuffer()
but instead of doing nothing we have to put them back into our queue.
Otherwise the buffer is leaked and we will have too few buffers in
the future.
2011-11-08 08:24:49 +01:00
Sebastian Dröge
9151617d39
omxvideodec: Free pending frames after draining component
2011-11-07 14:00:47 +01:00
Sebastian Dröge
0b301021de
omxvideoenc: Free pending frames after draining the component
2011-11-07 14:00:35 +01:00
Sebastian Dröge
636cdd31bf
omxvideoenc: Make handling and usage of the base video codec frames threadsafe
2011-11-07 11:07:01 +01:00
Sebastian Dröge
9a6cea5af3
omxvideoenc: Fix deadlock between srcpad stream lock and ::reset()
2011-11-07 11:05:29 +01:00
Sebastian Dröge
95b06504f9
omxvideoenc: Make handling and usage of the base video codec frames threadsafe
2011-11-07 11:04:27 +01:00
Sebastian Dröge
a80ca97ec3
omxvideoenc: Free all pending frames after draining the component
2011-11-07 10:58:44 +01:00
Sebastian Dröge
be1f75d2f4
omxvideodec: Always free all pending frames when caps changes require reconfiguration
2011-11-07 10:58:24 +01:00
Sebastian Dröge
0c0aa78373
omxaudioenc: Only drain the component a single time and only after processing started
2011-11-04 09:44:04 +01:00
Sebastian Dröge
d5371b9208
omxvideodec: Only drain the component a single time and only after processing started
2011-11-04 09:44:04 +01:00
Sebastian Dröge
3a17d11109
omxvideoenc: Only drain the component a single time and only after processing started
2011-11-04 09:44:04 +01:00
Sebastian Dröge
fa6881c1cc
omx: Reset buffer flags to 0 after it was consumed by the component or the element
...
Some implementations don't reset the flags and the standard is not
really clear on the expected behaviour. Let's just always reset the
flags as they're not valid at this point anymore.
2011-11-04 09:04:16 +01:00
Sebastian Dröge
ef67a43702
omxvideoenc: Better handling of encoder parameters
...
Only set them if necessary and allow to use the component
defaults.
2011-11-02 13:50:14 +01:00
Sebastian Dröge
08fabd6a07
omxvideoenc: Make unsupported bitrate/quantizer settings less fatal
2011-11-02 13:22:50 +01:00
Sebastian Dröge
ec9dde48e5
omxvideodec: If no stride was set for the OMX output port assume GStreamer stride
...
This is not really correct but there's nothing else we could do.
2011-11-02 10:39:50 +01:00
Sebastian Dröge
7ebef2941b
omxvideoenc: If no stride was set for the OMX input port assume GStreamer stride
...
This is not really correct but there's nothing else we could do.
2011-11-02 10:39:10 +01:00
Sebastian Dröge
1ef38751c7
omxaudioenc: Implement draining of the component and use it
...
This makes sure that all buffers are encoded and pushed downstream
before flushing the ports and losing some buffers.
2011-11-01 16:46:09 +01:00
Sebastian Dröge
8eaf25c10e
omxvideoenc: Implement draining of the component and use it
...
This makes sure that all buffers are encoded and pushed downstream
before flushing the ports and losing some buffers.
2011-11-01 16:41:46 +01:00
Sebastian Dröge
e4b7ffcc1b
omxvideodec: Implement draining of the component and use it
...
This makes sure that all buffers are decoded and pushed downstream
before flushing the ports and losing some buffers.
2011-11-01 16:23:22 +01:00
Sebastian Dröge
2f2c17a1b5
omxvideodec: Fix deadlock if ::reset is called before finding the corresponding frame of a decoded buffer
2011-11-01 16:23:22 +01:00
Sebastian Dröge
f93a45fb66
omxaudioenc: Forward downstream flow returns to upstream
2011-11-01 15:10:12 +01:00
Sebastian Dröge
21faf556ff
omxvideoenc: Forward downstream flow returns to upstream
2011-11-01 15:10:01 +01:00
Sebastian Dröge
3b4260e54f
omxvideodec: Forward downstream flow returns to upstream
2011-11-01 13:58:38 +01:00
Sebastian Dröge
10a5680692
omxvideodec: Fix deadlock caused by calling reset while the loop function does something with the base video codec stream lock
2011-10-20 15:21:07 +02:00
Sebastian Dröge
6689faa661
omxvideoenc: Fix deadlock caused by calling reset while the loop function does something with the base video codec stream lock
2011-10-20 15:20:47 +02:00
Sebastian Dröge
cf6f14d03c
omxvideodec: Move locking at the correct place
2011-10-20 14:30:38 +02: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
2750a8869b
omx: Reset nOffset to 0 in EmptyBufferDone if nFilledLen is 0
...
Some OMX implementations don't reset nOffset when the complete
buffer is emptied but instead only reset nFilledLen. We reset
nOffset to 0 if nFilledLen == 0, which is safe to do because
the offset *must* be 0 if the buffer is not filled at all.
Seen in QCOM's OMX implementation.
2011-10-14 10:26:21 +02:00
Sebastian Dröge
ac8085dce9
omxvideoenc: If one parameter/configuration is not supported don't skip the next
2011-10-10 10:38:29 +02:00
Sebastian Dröge
37967b4316
omxh264dec: Require stream-format=byte-stream
...
Other stream-formats are unlikely to be supported by OMX components.
2011-10-03 09:13:29 +02:00
Sebastian Dröge
bb1dd8aaba
omxvideodec: Add API for subclasses to prepare/convert frames
2011-09-29 10:44:20 +02:00
Sebastian Dröge
febb83ec54
omxaudioenc: Switch to Idle first and wait before switching to Loaded and deallocating buffers
...
Allocating buffers before the Idle state is reached can lead to crashes.
2011-09-28 10:35:38 +02:00
Sebastian Dröge
e364088596
omxvideoenc: Switch to Idle first and wait before switching to Loaded and deallocating buffers
...
Allocating buffers before the Idle state is reached can lead to crashes.
2011-09-28 10:35:37 +02:00
Sebastian Dröge
ab9ce7db7d
omxvideodec: Switch to Idle first and wait before switching to Loaded and deallocating buffers
...
Allocating buffers before the Idle state is reached can lead to crashes.
2011-09-28 10:35:37 +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
a7f77e22a4
omx: Change a g_assert() into a GST_WARNING_OBJECT()
2011-09-27 12:28:22 +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
7dbf68a232
omxaudioenc: Add a check to prevent a zero-sized OMX buffer
2011-09-23 17:04:15 +02:00
Sebastian Dröge
d5452a53b0
omxvideoenc: Add some more checks for correct OMX buffer sizes
2011-09-23 17:04:14 +02:00
Sebastian Dröge
5659bd3b4f
omxvideodec: Add some more checks for OMX buffer sizes
2011-09-23 16:40:30 +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
3ba45aa0af
omxvideodec: Negotiate video format with downstream and what the component claims to support
2011-09-02 14:43:43 +02:00
Vincent Penquerc'h
fa2dff1ad6
basevideoencoder: fix element leak
...
and this concludes an hour of yelling at the bloody test failing,
only to track down the problem not being in the test.
https://bugzilla.gnome.org/show_bug.cgi?id=657368
2011-08-26 10:27:16 +02:00
Sebastian Dröge
9eb39ceef2
omxvideoenc: Release basevideocodec stream lock while waiting for a buffer
...
This prevents deadlocks if no empty input buffers are available and
releasing input buffers requires the loop function to handle some
output buffers first.
2011-08-19 09:23:58 +02:00
Sebastian Dröge
e583c48222
omxvideodec: Release basevideocodec stream lock while waiting for a buffer
...
This prevents deadlocks if no empty input buffers are available and
releasing input buffers requires the loop function to handle some
output buffers first.
2011-08-19 09:23:54 +02:00
Sebastian Dröge
e494792ca4
basevideodecoder: Fix deadlock
2011-08-18 10:24:40 +02:00
Sebastian Dröge
024f61e75a
baseaudiodecoder: Don't take the stream lock in the seek handler
...
This will lead to deadlocks
2011-08-18 10:03:20 +02:00
Sebastian Dröge
58104f9ce5
basevideo: Fix locking, especially if both pads have different streaming threads
2011-08-18 10:02:50 +02:00
Sebastian Dröge
d439d8c337
basevideo: Don't call g_type_class_peek_parent() in class_init
...
This is already done by the GObject boilerplate macro
2011-08-18 09:42:02 +02:00
Sebastian Dröge
6991638d72
baseaudiodecoder: Don't call g_type_class_peek_parent() in class_init
...
This is already done by the boilerplate macro
2011-08-18 09:40:46 +02:00
Sebastian Dröge
affd6e2eb9
baseaudiodecoder: Fix thread safety issues if both pads have different streaming threads
2011-08-18 09:34:38 +02:00
Sebastian Dröge
fc511eb45d
baseaudiodecoder: Delay sending of serialized events to finish_frame()
2011-08-18 09:17:04 +02:00
Sebastian Dröge
c5360dfae8
omxaudioenc: Always require at least OMX_MIN_PCMPAYLOAD_MSEC per input buffer
2011-08-17 14:33:31 +02:00
Sebastian Dröge
d42390efd9
baseaudioencoder: Add support for requesting a minimum and maximum number of samples per frame
...
This extends the special case of a fixed number of samples per frame
that was supported before already.
2011-08-17 14:28:44 +02:00
Sebastian Dröge
1daa53e554
omxaudioenc: Handle inbuf==NULL properly in ::handle_frame()
2011-08-17 14:17:18 +02:00
Sebastian Dröge
0928205ed4
omxaacenc: Implement ::get_num_samples() vfunc
2011-08-17 13:04:19 +02:00
Sebastian Dröge
d1e1980e01
omxaudioenc: Add vfunc to get the number of samples inside a buffer
2011-08-17 13:03:50 +02:00
Sebastian Dröge
92545e554c
omxaudioenc: Release baseaudioencoder stream lock while waiting for a buffer in ::handle_frame()
...
This prevents deadlocks if no empty input buffers are available and
releasing input buffers requires the loop function to handle some
output buffers first.
2011-08-17 11:34:31 +02:00
Sebastian Dröge
60a1e0e967
baseaudioencoder: Fix thread safety issues if both pads have different streaming threads
2011-08-17 11:34:04 +02:00
Sebastian Dröge
ebc740ea06
baseaudioencoder: Taking the OBJECT lock in reset() is not needed
2011-08-17 09:58:01 +02:00
Sebastian Dröge
c24533c8be
omxaudioenc: Remove hack that only applies to the video encoder class
2011-08-16 11:03:24 +02:00
Sebastian Dröge
422ca1796b
omxaacenc: Add initial version of OpenMAX AAC encoder element
2011-08-16 10:49:21 +02:00
Sebastian Dröge
3f33a577a9
omxaudioenc: Add initial version of audio encoder base class
2011-08-16 10:48:36 +02:00
Sebastian Dröge
c0202cc283
baseaudioencoder: Delay sending of serialized events to finish_frame()
2011-08-15 14:14:11 +02:00
Sebastian Dröge
0a44778d61
audio: Integrate audio base classes into the build system and fixup
2011-08-15 13:06:51 +02:00
Sebastian Dröge
0d07b52760
audio: Add audio decoder/encoder base classes
...
Taken from http://cgit.collabora.com/git/user/manauw/gst-plugins-bad.git/log/?h=baseaudio
2011-08-15 12:56:00 +02:00
Sebastian Dröge
b673e37546
basevideoencoder: Proxy the width/height/framerate/PAR constraints of downstream caps to upstream
...
This allows to specify constraints on the compressed downstream caps
by muxers or capsfilters, which will then be forwarded to upstream
and allows video converters to fulfill the constraints.
Code based on Mark Nauwelaerts audio encoder base class.
2011-08-12 12:30:07 +02:00
Sebastian Dröge
9ea8ecc191
basevideoencoder: Remove old ::getcaps() comment
2011-08-12 12:30:07 +02:00
Sebastian Dröge
f91a4e53db
basevideoencoder: Remove ::get_caps() vfunc
...
Subclasses can set the caps more efficiently and this only
caused additional indirections.
2011-08-12 12:30:07 +02:00
Sebastian Dröge
75c843670f
omxvideoenc: Use "video/x-raw-yuv" as sink template caps instead of strict I420 caps
2011-08-10 10:24:48 +02:00
Sebastian Dröge
274b3b3526
omxmpeg4videodec: Don't require width/height on sink pad caps
2011-08-10 10:23:39 +02:00
Sebastian Dröge
7a09447406
omxvideodec: Use "video/x-raw-yuv" as src template caps instead of strict I420 caps
2011-08-10 10:21:15 +02:00
Sebastian Dröge
8e422b7cc2
omxvideoenc: Set the state back to StateLoaded even if an error happened
2011-08-10 09:56:30 +02:00
Sebastian Dröge
9dcaf5c2bb
omx: Don't hold any locks while calling OMX_SendCommand()
...
It might call into one of the callbacks and lead to deadlocks, e.g.
with the Qualcomm OMX implementation.
2011-08-10 09:49:57 +02:00
Sebastian Dröge
0bb345a16d
omx: Move some code
2011-08-10 09:32:01 +02:00
Sebastian Dröge
e413b8403c
omx: Reset pending reconfigure output ports when changing the state from Executing to any lower state
2011-08-10 09:23:10 +02:00
Sebastian Dröge
25fd0594f5
omx: Fix crash when setting last error after the ports were freed
2011-08-10 09:08:00 +02:00
Sebastian Dröge
9678efdf88
omx: Free component structure
2011-08-10 09:03:52 +02:00
Sebastian Dröge
52a422f637
omx: Make component destruction safer
2011-08-10 09:02:52 +02:00
Sebastian Dröge
8fd4eaae69
omx: Set pAppPrivate of buffers to NULL when deallocating buffers
...
This prevents usage of freed memory later if the OMX component
has weird behaviour.
2011-08-10 08:55:18 +02:00
Sebastian Dröge
2ea5bdf553
omxvideodec: Set the state back to StateLoaded even if an error happened
2011-08-10 08:52:25 +02:00
Sebastian Dröge
cb001aa85f
omx: Add some assertions to check if the buffer pAppPrivate is still correct
2011-08-10 08:51:54 +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
825d435d7d
omx: Only prevent setting a higher state if the component is in an error state
2011-08-08 12:12:58 +02:00
Sebastian Dröge
5319d33ca1
basevideodecoder: Use the cached video frame size instead of recalculating it
2011-08-03 16:02:01 +02:00
Sebastian Dröge
2c4dcf418a
omx: Improve debugging in param/config getter/setter wrappers
2011-08-03 15:35:01 +02:00
Sebastian Dröge
febc2d99cb
omxvideodec: Don't abort if the color format is not supported but give a useful error message
2011-08-03 13:10:33 +02:00
Sebastian Dröge
714ba59b11
omxvideoenc: Don't fail if setting the bitrate or profile is not supported by the component
...
Also always set/get the profile, even if there are no peer caps.
2011-08-02 15:14:37 +02:00
Sebastian Dröge
624c2b4fdb
basevideoencoder: Make access to the list of frames threadsafe
2011-08-02 15:14:24 +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
cba41896a6
omx: Add workaround for QCOM 7x30 race condition
2011-07-29 13:56:59 +02:00
Sebastian Dröge
b085e11c37
omxh263enc: Add H.263 encoder element
2011-07-29 12:06:21 +02:00
Sebastian Dröge
73cde0af8a
omxmpeg4videoenc: Add support for setting profile/level via caps
2011-07-29 11:26:39 +02:00
Sebastian Dröge
27a0cb4c91
omxh264enc: Add support for setting profile/level via caps
2011-07-28 14:14:45 +02:00
Sebastian Dröge
4329821a0b
omxvideoenc: Add support for forcing the next frame to be a keyframe
2011-07-28 12:58:25 +02:00
Sebastian Dröge
e7b421c131
omxvideoenc: Add support for setting bitrate/quantization related parameters
2011-07-28 12:52:24 +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
decf765502
omxvideoenc: Don't output 0-byte buffers
2011-07-28 12:16:38 +02:00
Sebastian Dröge
1fa3b2662e
omx: Ensure that the pAppPrivate pointer in OMX buffers is set correctly
2011-07-25 15:05:08 +02:00
Sebastian Dröge
8ac445abd8
omxvideo{enc,dec}: Only set/unset flushing state on ports if they were created already
2011-07-25 13:19:06 +02:00
Sebastian Dröge
8977906f4b
omxwmvdec: Add WMV video decoder element
2011-07-25 12:01:05 +02:00
Sebastian Dröge
4a110e129c
omxh263dec: Add H.263 decoder element
2011-07-25 11:44:56 +02:00
Sebastian Dröge
e01eb8c35c
omxh264enc: Add H.264 encoder element
2011-07-25 11:32:51 +02:00
Sebastian Dröge
87587dd6d2
omxvideodec: Try harder to deallocate the buffers after errors happened
2011-07-25 10:48:58 +02:00
Sebastian Dröge
ae7ed44e6b
omxvideoenc: Try harder to deallocate the buffers after errors happened
2011-07-25 10:47:28 +02:00
Sebastian Dröge
9e1cfa300b
omx: Deallocate port buffers before freeing the component
...
They should be deallocated by the caller before reaching the
Loaded state but to be on the safe side we will make sure
they're really deallocated here.
2011-07-25 10:46:49 +02:00
Sebastian Dröge
7350dcc8cd
omxvideoenc: Add initial support for stride conversion
2011-07-21 11:15:14 +02:00
Sebastian Dröge
254bee9be9
omx: Set default roles for the components if none were set from the config file
2011-07-21 10:38:26 +02:00
Sebastian Dröge
a86debaf36
omx: Failure to set the component role is fatal
2011-07-21 10:36:19 +02:00
Sebastian Dröge
644fa35789
omxvideoenc: Add support for setting codec_data on the srcpad caps
2011-07-21 07:53:25 +02:00
Sebastian Dröge
182a488f49
omxvideoenc: Free/drop GstVideoFrames that resulted in an empty buffer
2011-07-21 07:44:34 +02:00
Sebastian Dröge
34da745dc5
basevideoencoder: Allow finishing of frames with no src_buffer to drop/free the GstVideoFrame
2011-07-21 07:44:10 +02:00
Sebastian Dröge
c0d304f819
omxvideoenc: Remove obsolete TODO comment
2011-07-21 07:31:05 +02:00
Sebastian Dröge
e8b2ffe6f4
omx: Use libgstopenmax.so for the plugin filename and openmax for the plugin name
...
Resolves conflicts with gst-openmax.
2011-07-20 11:09:54 +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
9619d9c95d
basevideoencoder: Only get caps from the subclass if they were not set yet by the subclass
2011-07-20 11:08:18 +02:00
Sebastian Dröge
fdd049a41c
basevideoencoder: Delay sending of serialized sink events until finish_frame()
2011-07-20 11:08:18 +02:00
Sebastian Dröge
159093cd6a
basevideoencoder: Add ::reset vfunc and handle ::reset/::finish the same way as in the decoder
2011-07-20 11:08:18 +02:00
Sebastian Dröge
92643716e4
basevideoencoder: Use a temporary GstVideoState until the subclass accepted the caps
...
Also store the caps in the GstVideoState and assume a PAR of 1/1 instead
of 0/1 if no PAR is specified in the caps.
2011-07-20 08:19:01 +02:00
Sebastian Dröge
71d176f71a
omx: Improve debug output a bit
2011-07-19 12:29:51 +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
f3f3bd1dff
omx: When acquiring a buffer from an input port always wait until all output ports are reconfigured
2011-07-18 13:10:49 +02:00
Sebastian Dröge
9377aefb87
omxvideodec: Add support for converting between omx and gst rowstrides
2011-07-18 08:41:20 +02:00
Sebastian Dröge
51dbc82ef4
omx: Provide all buffers to output ports after enabling them
2011-07-14 10:34:09 +02:00
Sebastian Dröge
41feed55b7
omxvideodec: Add support for NV12 / OMX_COLOR_FormatYUV420SemiPlanar
2011-07-14 08:29:03 +02:00
Sebastian Dröge
961445aa1b
omxvideodec: Only flush the component ports after we passed input to them
2011-07-14 07:58:41 +02:00
Sebastian Dröge
252624c7cc
omxvideodec: Only change states downwards if an upper state was reached
2011-07-13 21:19:34 +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
9ab5f79784
build: Only require GStreamer >= 0.10.29 and GLib >= 2.16
2011-07-13 14:35:51 +02:00
Sebastian Dröge
5732b44606
build: Dist gstomx.conf
2011-07-13 14:04:47 +02:00
Sebastian Dröge
8a78da68a6
omxvideodec: Fix typo
2011-07-13 14:02:50 +02:00
Sebastian Dröge
0966307189
omx: Dist gstomx.h
2011-07-13 13:59:50 +02:00
Sebastian Dröge
fb0ca24654
omxvideodec: Set SYNCFRAME flag on the OMX buffers for non-delta units
2011-07-13 12:46:50 +02:00
Sebastian Dröge
f5690ff412
omxvideodec: Free all pending frames when resetting the decoder
...
Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=654529
2011-07-13 12:37:44 +02:00
Sebastian Dröge
af159705c9
omxvideodec: Handle output buffers without a corresponding GstVideoFrame more gracefully
...
This can happen on EOS in some cases and when the input is not
properly framed.
2011-07-13 10:02:20 +02:00
Sebastian Dröge
1b08dfa2a6
omxvideodec: Fix deadlock when finishing old frames that are left over by the decoder
2011-07-13 09:31:22 +02:00
Sebastian Dröge
24e0196d1d
omxh264dec: It's called H.264, not H264
2011-07-12 11:37:28 +02:00
Sebastian Dröge
a24cdd41bc
omxvideodec: Make sink/src pad template caps configurable
2011-07-12 11:36:42 +02:00
Sebastian Dröge
2023754bcf
omx: Allow to set a preferred configuration directory with the GST_OMX_CONFIG_DIR environment variable
2011-07-12 11:13:50 +02:00
Sebastian Dröge
113d18caea
omxvideodec: Make core/component-name and in/outport index configurable
2011-07-12 11:04:16 +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
6bd84629ed
omxh264dec: Rename from omxh264videodec to omxh264dec
2011-07-12 08:54:22 +02:00
Sebastian Dröge
4fede99e2d
omxh264videodec: Require alignment=au and stream-format={avc,bytestream}
2011-07-12 08:40:48 +02:00
Sebastian Dröge
0c72a15019
basevideodecoder: First inform subclass about resetting before resetting/freeing all internal state
...
The subclass might want to access the old state.
2011-07-12 08:36:01 +02:00
Sebastian Dröge
99c9f57460
basevideodecoder: Track present position on discont before resetting it
2011-07-12 08:36:01 +02:00
Sebastian Dröge
99da6b1db1
basevideodecoder: Also protect the list of pending frames from concurrent access when pushing all pendings events
2011-07-12 08:36:00 +02:00
Sebastian Dröge
07e3936abf
basevideocodec: Protect access to the list of pending frames with the object lock
...
This is required if ::finish_frame() and all buffer output happens
on a different thread than the sinkpad streaming thread.
2011-07-12 08:36:00 +02:00
Sebastian Dröge
9edd003406
basevideodecoder: Set the correct lists to NULL after freeing
2011-07-12 08:36:00 +02:00
Sebastian Dröge
9a2b87f196
basevideodecoder: Work with a copy of the GstVideoState in setcaps until the caps are accepted
...
Also fix a refcount problem with the codec_data.
2011-07-12 08:36:00 +02:00
Sebastian Dröge
079098c3d6
omxh264videodec: Add h.264 video decoder
2011-07-12 08:34:44 +02:00
Sebastian Dröge
b0154bc1fa
omxmpeg4videodec: Fix debug category name
2011-07-12 08:29:15 +02:00
Sebastian Dröge
0d724f58f2
basevideo: Move the utils from the codec header to its own header
2011-07-09 11:41:42 +02:00
Sebastian Dröge
9695e504ff
basevideo: Use GSlice for allocating GstVideoFrame and don't duplicate code in the decoder base class
2011-07-09 11:32:06 +02:00
Sebastian Dröge
2042e08b33
omxvideodec: Use the destroy notify to free the coder_hook
2011-07-09 11:06:06 +02:00
Sebastian Dröge
f79460ff52
basevideo: Add destroy notify for the coder_hook to prevent memory leaks
...
Fixes bug #654293 .
2011-07-09 11:06:06 +02:00
Sebastian Dröge
c62dd0f0c3
basevideo: Fix GType names to not conflict with the public video base classes
...
It's still not possible to include headers of both in the same file
or compile/link both into the same plugin but that shouldn't be
necessary anyway.
2011-07-09 11:06:06 +02:00
Sebastian Dröge
9c9315059e
omxvideodec: Fix some minor memory leaks
2011-07-09 11:06:06 +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
0fbff1000f
omxvideodec: Use the frames storage of the base class instead of implementing our own
...
They could get out of sync and we could store already destroyed frames.
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
Sebastian Dröge
c8c1c7f10f
omx: Add more checks to acquire_buffer() and return the current state additional to the buffer
...
Also refactor the code flow in the video decoder for this. This makes
the usage of acquire_buffer() easier and more atomic.
2011-07-09 11:06:06 +02:00
Sebastian Dröge
934fac7946
omxvideodec: Also flush/unflush the input port when changing the state PAUSED<->READY
2011-07-09 11:06:06 +02:00
Sebastian Dröge
28688414b8
omx: Don't broadcast port->port_cond after allocating buffers successfully
...
Allocating buffers must happen while no thread is waiting for the
cond and especially must happen from the thread that would acquire
buffers from the port.
2011-07-09 11:06:06 +02:00
Sebastian Dröge
3ac2bfc976
omxvideodec: Don't leak the codec_data after sending it
2011-07-09 11:06:06 +02:00
Sebastian Dröge
d9e2391448
omx: Always check if the component is in an error state before waiting for a condition variable to be signalled
...
Otherwise we might wait forever because nothing is going to signal
the condition variable anymore.
2011-07-09 11:06:06 +02:00
Sebastian Dröge
46fe757270
omx: Always hold port->port_lock before signalling port->port_cond when notifying about errors
...
Otherwise a port might be in the critical section, has checked the error state
already but waits after port->port_cond is signalled, which will lead
to a deadlock.
2011-07-09 11:06:05 +02:00
Sebastian Dröge
939d30ed17
omxvideodec: Remove reconfiguration test hack
2011-07-09 11:06:05 +02:00
Sebastian Dröge
b53c001bf2
omx: Improve debug output a bit
2011-07-09 11:06:05 +02:00
Sebastian Dröge
7739049df5
omx: Always try to deallocate buffers, even if there's a component error
2011-07-09 11:06:05 +02:00
Sebastian Dröge
0b9c0ac78d
omx: Use G_USEC_PER_SEC for clarity instead of 1000000
2011-07-09 11:06:05 +02:00
Sebastian Dröge
9a3753bd61
omxvideodec: Error out if the GStreamer allocated buffer is smaller than the OpenMAX output buffer
...
Usually this must never happen but currently it happens during reconfigurations
because of a race condition. Still it's better than crashing.
2011-07-09 11:06:05 +02:00