Commit graph

940 commits

Author SHA1 Message Date
Sebastian Dröge
a78756c63f omx: #define OMX_SKIP64BIT on the RPi as required by their API
Also add generic support for OMX_SKIP64BIT to gst-omx, in case other
implementations also #define that for whatever reason.

https://bugzilla.gnome.org/show_bug.cgi?id=766475
2016-06-17 12:06:48 +03:00
Sebastian Dröge
198e31355f omxvideodec: Implement ::drain() virtual method
https://bugzilla.gnome.org/show_bug.cgi?id=767641
2016-06-17 10:59:45 +03:00
Tim-Philipp Müller
94789f19cf configure: remove AG_GST_PARSE_SUBSYSTEM_DISABLES
This would check which subsystems are disabled in core by grepping
gstconfig.h. Only problem is: gstconfig.h has moved into libdir now
so we've been checking a non-existent file for a while now. The
macro would just sets GST_DISABLE_* for use in configure.ac and
Makefile.am, but we don't use that anywhere so just get rid of it
(the one place where we use GST_DISABLE_GST_DEBUG is in a .c file
which gets the define from the gstconfig.h include).

https://bugzilla.gnome.org/show_bug.cgi?id=750056
2016-06-04 19:34:50 +01:00
Gwang Yoon Hwang
27d2cdd45d omxvideodec : Use gstglmemoryegl for the RPi
Modified to use gstglmemoryegl to avoid texture creation/copy operations
at the glupload.

[Matthew Waters]: gst-indent the sources and port testegl to GstGLMemoryEGL

https://bugzilla.gnome.org/show_bug.cgi?id=760918
2016-05-04 13:42:23 +10:00
Julien Isorce
91dd92964d Automatic update of common submodule
From 6f2d209 to ac2f647
2016-04-14 10:04:32 +01:00
Sebastian Dröge
e6792630a8 Automatic update of common submodule
From b64f03f to 6f2d209
2016-02-26 12:42:41 +02:00
Matthew Waters
705d7722fb examples: update egl example for gstgl API changes
https://bugzilla.gnome.org/show_bug.cgi?id=762053
https://bugzilla.gnome.org/show_bug.cgi?id=753917
2016-02-17 20:59:58 +11:00
Thiago Santos
e4ff24a907 Automatic update of common submodule
From 86e4663 to b64f03f
2016-02-05 18:11:06 -03:00
Koop Mast
e4c32adaf3 configure: Make -Bsymbolic check work with clang.
Update the -Bsymbolic check with the version glib has. This version
works with clang.

https://bugzilla.gnome.org/show_bug.cgi?id=759713
2015-12-21 12:28:11 +01:00
Nicolas Dufresne
d60c46920b Automatic update of common submodule
From b319909 to 86e4663
2015-12-07 09:11:32 -05:00
Enrique Ocaña González
271093d633 Remember the last_error after a failed set state call to avoid blocking the next get state call
gst_omx_video_dec_flush() blocks forever in
http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomxvideodec.c?id=9adf0ff82903cad5331e40975ae91ed5d11bc102#n2110
when the previous call to gst_omx_component_set_state() fails in
http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomx.c?id=9adf0ff82903cad5331e40975ae91ed5d11bc102#n827.
To mitigate that, I set "last_error" to true, so the code in
http://cgit.freedesktop.org/gstreamer/gst-omx/tree/omx/gstomx.c?id=9adf0ff82903cad5331e40975ae91ed5d11bc102#n862
exits early and doesn't block.

https://bugzilla.gnome.org/show_bug.cgi?id=758274
2015-11-18 15:18:02 +02:00
Enrique Ocaña González
d1a79d7c59 Properly handle drain requests while flushing
Without this commit the decoder streaming thread stops without ever attending
the drain request, leaving the decoder input thread waiting forever.

https://bugzilla.gnome.org/show_bug.cgi?id=758274
2015-11-18 15:18:02 +02:00
Nicolas Huet
9adf0ff829 omx: fix hacks leak on class init 2015-11-18 12:02:44 +00:00
Tim-Philipp Müller
bd50715ef2 Automatic update of common submodule
From b99800a to b319909
2015-10-21 14:37:13 +01:00
Sebastian Dröge
070f7a0fde Automatic update of common submodule
From 9aed1d7 to b99800a
2015-10-21 14:28:41 +03:00
Thiago Santos
03fc454457 omxaacdec: Do not accept unknown layouts
It was defaulting to RAW when an unknown layout was received but
the caps template would actually forbid that on the caps query
or accept-caps anyway.
2015-09-01 16:13:00 -03:00
Thiago Santos
1f3bf04fe7 omxaudiodec: use default pad accept-caps handling
Instead of the audiodecoder one. The OMX audioo decoders have their
valid input in the template pad, so just check against that to
avoid doing a query downstream.
2015-09-01 09:01:45 -03:00
Thiago Santos
c038df6671 omxvideodec: use default pad accept-caps handling
Instead of the videodecoder one. The OMX video decoders have their
valid input in the template pad, so just check against that to
avoid doing a query downstream.
2015-08-28 12:57:33 -03:00
Graham Leggett
703bab6885 omxvideoenc: Add keyframe support for the Rpi, using OMX_IndexConfigBrcmVideoRequestIFrame
https://bugzilla.gnome.org/show_bug.cgi?id=753085
2015-08-27 11:15:29 +03:00
Vineeth TM
fb95ce9bfc gst-omx: Fix memory leaks when context parse fails
When g_option_context_parse fails, context and error variables are not getting free'd
which results in memory leaks. Free'ing the same.

And replacing g_error_free with g_clear_error, which checks if the error being passed
is not NULL and sets the variable to NULL on free'ing.

https://bugzilla.gnome.org/show_bug.cgi?id=753865
2015-08-20 11:33:58 +03:00
Philippe Normand
e0327521f6 omxh264dec: implement is_format_change
The omxvideodecoder class only checks some of the caps parameters but if
other fields change such as h264 profile and/or level it wouldn't trigger a
reconfiguration.

https://bugzilla.gnome.org/show_bug.cgi?id=752376
2015-08-16 15:48:16 +02:00
Aurélien Zanelli
d2df0fb032 omxvideodec: unref allocator after getting it from allocation query
Otherwise a reference will be leaked for each allocator. It only happens
when target platform is Raspberry Pi and when we have GL support.

https://bugzilla.gnome.org/show_bug.cgi?id=751867
2015-07-06 11:54:28 +03:00
Stefan Sauer
461c7db44b Automatic update of common submodule
From f74b2df to 9aed1d7
2015-07-03 21:59:54 +02:00
Nicolas Dufresne
e40ca46e2c Automatic update of common submodule
From 6015d26 to f74b2df
2015-06-16 17:50:14 -04:00
Edward Hervey
e59b6150cb Automatic update of common submodule
From d9a3353 to 6015d26
2015-06-09 11:30:49 +02:00
Stefan Sauer
4d60cf379b Automatic update of common submodule
From d37af32 to d9a3353
2015-06-08 23:08:28 +02:00
Stefan Sauer
df1e16dca5 Automatic update of common submodule
From 21ba2e5 to d37af32
2015-06-07 23:07:22 +02:00
Stefan Sauer
d1c473c69f Automatic update of common submodule
From c408583 to 21ba2e5
2015-06-07 17:32:25 +02:00
Stefan Sauer
d996de589b Automatic update of common submodule
From c8fb372 to c408583
2015-06-07 17:16:43 +02:00
Sebastian Dröge
3f46a12aab omxaudiodec: Add an output adapter for chunking the output into codec frames
Otherwise the base class will be confused.
See https://bugzilla.gnome.org/show_bug.cgi?id=685730
2015-05-19 19:14:42 +03:00
Tim-Philipp Müller
afab78e52e Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:24:26 +01:00
Sebastian Dröge
62e6c5b3d8 Remove INSTALL file
autotools automatically generate this, and when using different versions
for autogen.sh there will always be changes to a file tracked by git.
2015-04-22 10:40:22 +02:00
Tim-Philipp Müller
ed7a301a42 Add m4 directory so aclocal doesn't complain in autogen.sh
Might come in handy, and these warnings seem to be
fatal in some environments.

You may need to git clean -x -d -f your tree before
git pulling/merging.
2015-04-08 16:03:34 +01:00
Tim-Philipp Müller
2dd79f5723 Update autogen.sh to latest version 2015-04-07 22:25:57 +01:00
Tim-Philipp Müller
f39f71ad9f Automatic update of common submodule
From bc76a8b to c8fb372
2015-04-03 18:58:17 +01:00
Luis de Bethencourt
24c0197e46 omxaudiodec: add comment explaining duplicate code path 2015-03-06 12:12:49 +00:00
Luis de Bethencourt
e8d76fb1ef Revert "omxaudiodec: remove duplicate code path"
This reverts commit a8d26ff27a.
2015-03-06 12:09:06 +00:00
Luis de Bethencourt
70c48cf85f omx: handle both errors in the two steps of update_port_definition
Also consider potential errors in the _get_parameter() in the return of the
update_port_definition function.

CID #1287052
2015-03-06 12:06:22 +00:00
Luis de Bethencourt
3aa008adb7 omxaudioenc: impossible if statement
ret is set to GST_STATE_CHANGE_SUCCESS and never touched, so it is impossible
for it to be anything else at the if check. Remove the if check.

CID #1287053
2015-03-06 10:57:53 +00:00
Luis de Bethencourt
964cb549bb omxaudiodec: impossible if statement
ret is set to GST_STATE_CHANGE_SUCCESS and never touched, so it is impossible
for it to be anything else at the if check. Remove it.

CID #1287054
2015-03-06 10:54:46 +00:00
Luis de Bethencourt
a8d26ff27a omxaudiodec: remove duplicate code path 2015-03-06 10:50:30 +00:00
George Kiagiadakis
0ef1e90b34 omx: call handle_messages() only once in acquire_buffer() to avoid potential deadlock
There is one rare case where calling handle_messages() more than once can cause a deadlock
in the video decoder element:

- sink pad thread starts the src pad task (gst_omx_video_dec_loop())
- _video_dec_loop() calls gst_omx_port_acquire_buffer() on dec_out_port
- blocks in gst_omx_component_wait_message() releasing comp->lock and comp->messages_lock
  (initially, there are no buffers configured on that port, so it waits for OMX_EventPortSettingsChanged)
- the sink pad thread pushes a buffer to the decoder with gst_omx_port_release_buffer()
- _release_buffer() grabs comp->lock and sends the buffer to OMX, which consumes it immediately
- EmptyBufferDone gets called at this point, which signals _wait_message() to unblock
- the message from EmptyBufferDone is processed in gst_omx_component_handle_messages()
  called from gst_omx_port_release_buffer()
- gst_omx_port_release_buffer releases comp->lock
- the src pad thread now gets to run, grabbing comp->lock while it exits from _wait_message()
- _acquire_buffer() calls the _handle_messages() on the next line after _wait_message(),
  which does nothing (no pending messages)
- then it goes to "retry:" and calls _handle_messages() again, which also does nothing
  (still no pending messages)
- scheduler switches to a videocore thread that calls EventHandler, informing us about the
  OMX_EventPortSettingsChanged event that just arrived
- EventHandler graps comp->messages_lock, but not comp->lock, so it can run in parallel at
  this point just fine.
- scheduler switches back to the src pad thread (which is in the middle of _acquire_buffer())
- the next _handle_messages() which is right before if (g_queue_is_empty (&port->pending_buffers))
  processes the OMX_EventPortSettingsChanged
- the buffer queue is still empty, so that thread blocks again in _wait_message()
- the sink pad thread tries to acquire the next input port buffer
- _acquire_buffer() also blocks this thread in:
   if (comp->pending_reconfigure_outports) { ... _wait_message() ... }
- DEADLOCK. gstreamer is waiting for omx to do something, omx waits for gstreamer to do something.

By removing those extra _handle_messages() calls, we can ensure that all the checks of
_acquire_buffer() will re-run. In the above case, after the scheduler switches back to
the middle of _acquire_buffer(), the code will enter _wait_message(), which will see that
there are pending messages and will return immediately, going back to "retry:" and
re-doing all the checks properly.

https://bugzilla.gnome.org/show_bug.cgi?id=741854
2015-03-04 09:51:03 +01:00
Wonchul Lee
df58d8baac omx: cleanup code a bit to remove else statement
https://bugzilla.gnome.org/show_bug.cgi?id=745191
2015-02-26 11:15:37 +02:00
Stefan Sauer
d0bb94ca63 Automatic update of common submodule
From f2c6b95 to bc76a8b
2015-01-12 16:13:35 +01:00
Sebastian Dröge
c77e7750e0 Automatic update of common submodule
From ef1ffdc to f2c6b95
2014-12-18 10:56:15 +01:00
Edward Hervey
248466f9f7 Automatic update of common submodule
From 7bb2bce to ef1ffdc
2014-11-27 17:12:42 +01:00
Jun Ji
8936f6634c omx: Add omxamrdec
https://bugzilla.gnome.org/show_bug.cgi?id=739333
2014-11-13 13:32:16 +01:00
Sebastian Dröge
da68e6adbf Automatic update of common submodule
From 84d06cd to 7bb2bce
2014-10-27 18:00:50 +01:00
Tim-Philipp Müller
e87c46fd19 Automatic update of common submodule
From a8c8939 to 84d06cd
2014-10-21 13:03:44 +01:00
Stefan Sauer
bdd0c6e5f7 Automatic update of common submodule
From 1f5d3c3 to a8c8939
2014-10-21 13:00:10 +02:00