Commit graph

607 commits

Author SHA1 Message Date
Guillaume Desmottes
1fbb8a3fb8 omxh264enc: fix typo in 'set_avc_intra_period'
https://bugzilla.gnome.org/show_bug.cgi?id=784379
2017-07-03 10:22:20 -04:00
Guillaume Desmottes
752544841d omxh264dec: remove 'parsed=true' from sink pad
The decoder only requires to receive one frame per buffer which is
already enforced with 'alignment=au'. There is no need to require to
have a parser upstream.

Allow to run "encode ! decode" pipeline without having a parser.

https://bugzilla.gnome.org/show_bug.cgi?id=784344
2017-06-29 15:46:14 -04:00
Guillaume Desmottes
1fa2ea274f omxh264enc: set profile/level using OMX_VIDEO_PARAM_AVCTYPE as well
The OMX specification defines two API to set the AVC profile and level:
using OMX_VIDEO_PARAM_PROFILELEVELTYPE and OMX_VIDEO_PARAM_AVCTYPE.

We were already supporting the former but not the latter. We are now
setting both so implementation don't have to rely on a specific one.

https://bugzilla.gnome.org/show_bug.cgi?id=783862
2017-06-29 15:39:56 -04:00
Guillaume Desmottes
0dbe604209 omxh264enc: factor out update_param_profile_level()
https://bugzilla.gnome.org/show_bug.cgi?id=783862
2017-06-29 15:39:56 -04:00
Guillaume Desmottes
af207f8956 omxh264enc: factor out string to profile/level enum conversion
https://bugzilla.gnome.org/show_bug.cgi?id=783862
2017-06-29 15:39:56 -04:00
Guillaume Desmottes
424776ba5e omxh264enc: use OMX_IndexConfigBrcmVideoIntraPeriod on pi
The OMX_VIDEO_CONFIG_AVCINTRAPERIOD.nPFrames setting isn't of any use on
the raspbery pi. Instead it uses a custom extension to define the I
frame period.

https://bugzilla.gnome.org/show_bug.cgi?id=783829
2017-06-28 17:05:46 -04:00
Guillaume Desmottes
895086e2e2 omxh264enc: factor out set_avc_intra_perdiod()
https://bugzilla.gnome.org/show_bug.cgi?id=783829
2017-06-28 17:05:46 -04:00
Graham Leggett
463929af3e omxvideoenc: Improve debug output when setting codec state due to new codec_data fails
https://bugzilla.gnome.org/show_bug.cgi?id=783657
2017-06-12 09:56:20 +03:00
Julien Isorce
1c8f069e42 omx: allow 0 feature
Previously the omx plugin was blacklisted if GST_OMX_CONFIG_DIR
points to an invalid path or if the gstomx.conf contains 0 valid
component.
Problem is that once the plugin is blacklisted, a rescan is not
triggered upon changes of the env var or the gstomx.conf file
despite being setup with gst_plugin_add_dependency.

This also makes it more consistent with other plugins that auto
generate features. For example gst-{ffmeg,libav}, gstreamer-vaapi,
v4l2 video dec.

To clarify the diff, the plugin_init func will return TRUE even if
g_key_file_get_groups returns 0 element and even if
g_key_file_load_from_dirs fails.

https://bugzilla.gnome.org/show_bug.cgi?id=782867
2017-05-21 15:40:11 +01:00
Sejun Park
d980af213b omxvideodec: Removed unreachable code
https://bugzilla.gnome.org/show_bug.cgi?id=782416
2017-05-10 11:54:44 +01:00
Guillaume Desmottes
e8590db808 meson: add dep on GModule
libgstomx uses the GModule API and so needs it in its dependencies list.

https://bugzilla.gnome.org/show_bug.cgi?id=782387
2017-05-09 16:31:03 +02:00
Guillaume Desmottes
623d2df5a3 videoenc: use GST_ROUND_UP_N() macro
Makes the code much easier to read and understand.

https://bugzilla.gnome.org/show_bug.cgi?id=781409
2017-04-26 15:37:41 +01:00
Sebastian Dröge
812e24b06f omxvideoenc: Fix compiler warning
gstomxvideoenc.c: In function ‘gst_omx_video_enc_fill_buffer’:
  CC       libgstomx_la-gstomxaacdec.lo
gstomxvideoenc.c:1316:27: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘OMX_U32 {aka long unsigned int}’ [-Wformat=]
     GST_LOG_OBJECT (self, "Matched strides - direct copy %u bytes",
                           ^
         outbuf->omx_buf->nFilledLen);
         ~~~~~~~~~~~~~~~~~~
2017-04-07 14:27:23 +03:00
Jan Schmidt
75d9ec634c omxvideoenc: Add an unimplemented mapping for RGBA formats
Add some pixel formats mappings for 2 RGBA formats. Not yet
implemented in the buffer input code though, so no effect for now.
2017-03-14 03:02:06 +11:00
Jan Schmidt
413f05269c omxvideoenc: Add GST_OMX_HACK_HEIGHT_MULTIPLE_16 for Rpi
The Raspberry Pi encoder produces corrupt output unless
the input height is a multiple of 16. Add a hack that adds
zero padding when needed.
2017-03-14 03:00:49 +11:00
Jan Schmidt
f3a7bce442 omxvideoenc: Add a mapping for OMX_COLOR_FormatYUV420PackedSemiPlanar
The RaspberryPi
2017-03-14 02:42:15 +11:00
Jan Schmidt
c3078dd20c omxvideoenc: Filter out unimplemented formats
Don't announce pixel formats in the caps if they've not been
implemented.
2017-03-14 02:40:24 +11:00
Jan Schmidt
7c829886ca omxvideodec: demote ERROR message
There's no need to warn about failing to negotiate EGL output
 - that can be perfectly normal.
2017-03-14 02:34:36 +11:00
Vincent Penquerc'h
4e01a6f7b1 omxaacenc: let encoder know about incoming rate/channels
https://bugzilla.gnome.org/show_bug.cgi?id=777223
2017-01-20 13:37:46 -05:00
Matthew Waters
ed5f63c9ef build: add meson build definition
Currently only been tested on the RPi within gst-build.
2017-01-18 15:23:42 +11:00
Vincent Penquerc'h
a02f1e5c9b omxaudioenc: set base class format instead of just source pad caps 2017-01-11 11:38:05 +00:00
Graham Leggett
a1e613dd89 omx*dec: Flush before we stop the srcpad loop
Flushing could otherwise hang if output port queue of pending buffers was empty

https://bugzilla.gnome.org/show_bug.cgi?id=774654
2016-12-19 10:52:16 +02:00
Reynaldo H. Verdejo Pinochet
7925355d72 Fix broken build due to syntax error
Problem was introduced by 8716c23e2b
2016-12-14 13:32:16 -08:00
Graham Leggett
8716c23e2b Prevent early EOS by resetting eos flag once GST_OMX_ACQUIRE_BUFFER_EOS is triggered
https://bugzilla.gnome.org/show_bug.cgi?id=774600
2016-12-13 11:38:38 +02:00
Graham Leggett
5d5fbcd8f6 Add clear debug logging on all the paths out of gst_omx_port_acquire_buffer()
https://bugzilla.gnome.org/show_bug.cgi?id=774600
2016-12-13 11:38:36 +02:00
George Kiagiadakis
05b137a256 Add a signals-premature-eos hack for egl_render
egl_render seems to have a bug and signals EOS before it has finished
pushing out all data; this hack simply makes acquire_buffer() wait
a bit more before signalling EOS, in case egl_render decides to spit
out some more data.

https://bugzilla.gnome.org/show_bug.cgi?id=741856
2016-12-13 11:38:26 +02:00
Graham Leggett
8b01b06af6 Add support for OMX_COLOR_FormatYUV420PackedSemiPlanar and OMX_COLOR_Format24bitBGR888
https://bugzilla.gnome.org/show_bug.cgi?id=775959
2016-12-13 11:18:43 +02:00
Sebastian Dröge
53d8d353f0 omx: Fix compiler warning with latest clang
gstomx.c:1376:42: error: implicit conversion from enumeration type 'GstOMXAcquireBufferReturn' to different enumeration type 'OMX_ERRORTYPE'
      (aka 'enum OMX_ERRORTYPE') [-Werror,-Wenum-conversion]
  g_return_val_if_fail (!port->tunneled, GST_OMX_ACQUIRE_BUFFER_ERROR);
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

https://bugzilla.gnome.org/show_bug.cgi?id=775112
2016-11-26 00:07:13 +02:00
Matthew Waters
baaf404f2b videodecoder: remove use of EGLImage orientation
New code should use GstVideoTransformationMeta

(The defaults do the right thing here though).
2016-11-17 19:56:35 +11:00
Sebastian Dröge
cb9078627c omx: Also search for gstomx.conf in the autoconf --sysconfdir
https://bugzilla.gnome.org/show_bug.cgi?id=770743
2016-09-14 11:28:36 +02:00
Kazunori Kobayashi
766cd65fa4 omxvideodec: Use GST_VIDEO_FRAME_PLANE_STRIDE() to get output buffer's stride
GST_VIDEO_FRAME_PLANE_STRIDE() should be used to get the actual buffer stride,
as reported in the buffers's GstVideoMeta, when copying data to that buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=768173
2016-06-29 18:44:20 +10:00
Aurélien Zanelli
d07aa49943 omxaudioenc: implement GstPreset interface
To allow user to use GstPreset to quickly save and load a set of
parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=767907
2016-06-21 15:02:02 +03:00
Aurélien Zanelli
0c265c1e0e omxvideoenc: implement GstPreset interface
To allow user to use GstPreset to quickly save and load a set of
parameters.

https://bugzilla.gnome.org/show_bug.cgi?id=767907
2016-06-21 15:02:02 +03:00
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
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
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
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
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
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
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