Commit graph

599 commits

Author SHA1 Message Date
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
Sebastian Dröge
5d4f7890c2 omx: Don't use port_def.bEnabled to check if the Enable/Disable command is finished
bEnabled should be set immediately after sending the command, it's only
Bellagio that waits until the command is finished before setting it.
2011-07-09 11:06:05 +02:00
Sebastian Dröge
11d2e806c2 omxvideodec: Remove obsolete FIXME comment 2011-07-09 11:06:05 +02:00
Sebastian Dröge
3d50c1f99c omx: Improve error handling and reporting 2011-07-09 11:06:05 +02:00
Sebastian Dröge
08181d86dc omxvideodec: Make the inport and outport index configurable by the subclass 2011-07-09 11:06:05 +02:00
Sebastian Dröge
bc1e73e8c8 omx: Add initial version of OpenMAX framework, video decoder base class and MPEG4 video decoder
This currently hardcodes a lot of stuff but works at least.

Also adds a generic framework for handling OpenMAX cores, components
and ports.
2011-07-09 11:06:05 +02:00
Sebastian Dröge
8f66cb9e1a basevideodecoder: Don't reorder serialized src events
And allow to drop EOS by the subclass if ::finish returns
DROPPED.

Fixes bug #653544.
2011-07-09 11:06:01 +02:00
Sebastian Dröge
aaeff26189 basevideo: Add the caps to the GstVideoState and clean up caps/codec_data properly 2011-07-06 08:42:15 +02:00
Sebastian Dröge
93a675b570 basevideo: Add video encoder/decoder base classes from gst-plugins-bad 2011-07-06 08:42:15 +02:00
Sebastian Dröge
3dba85ea14 openmax: Add OpenMAX IL 1.1.2 headers 2011-07-06 08:42:09 +02:00
Sebastian Dröge
d2463b017f Initial commit with build system 2011-06-21 10:52:13 +02:00