summaryrefslogtreecommitdiff
path: root/omx
Commit message (Collapse)AuthorAgeFilesLines
* omxh264enc: send codec data downstreamGuillaume Desmottes2019-12-221-2/+7
| | | | | | | | | | | We are operating in stream-format=byte-stream so the codec data buffer is meant to be part of the buffer flow. The base class will push it when a key frame is requested (as we stored it with gst_video_encoder_set_headers()) but we still have to push it right away as part of the normal buffer flow. Also set the HEADER flag on this buffer.
* omxh264enc: no need to check if codeconfig has startcodeGuillaume Desmottes2019-12-221-18/+14
| | | | | We currently only support stream-format=byte-stream so there is no point re-checking for it when handling CODECCONFIG buffer.
* omxh26xenc: Negotiate subframe modeNicolas Dufresne2019-12-222-7/+45
| | | | | | | | We now negotiate subframe mode through the caps. To enabled subframe mode, the caps need to specify alignment=nal: ... ! omxh264enc ! video/x-h264,alignment=nal ! ... ... ! omxh265enc ! video/x-h265,alignment=nal ! ...
* omxvideoenc: use subframe base class APIGuillaume Desmottes2019-12-221-3/+13
| | | | Use subframe base class support.
* omx: Add helper to enable/disable/read subframe modeNicolas Dufresne2019-12-222-0/+57
|
* zynq: add mapping for latest custom indexesGuillaume Desmottes2019-12-191-0/+30
| | | | Fix warning when building using version 2019.2 of OMX headers.
* omxvideoenc: update qp-mode settingsVarunkumar Allagadapa2019-12-191-9/+67
| | | | Adds load-qp-absolute and load-qp-relative qp-modes
* omxvideoenc: Add stride check for input buffer extractionShinya Saito2019-12-111-2/+5
| | | | | Stride of input buffer may be different from that of omx input port even if both sizes are the same.
* omxvideoenc: pass padding requirements to ALLOCATION queryGuillaume Desmottes2019-11-051-1/+25
| | | | | | | | | | By passing the expected video buffer layout, the upstream producer may be able to produce buffers fitting those requierements allowing gst-omx to use dynamic buffer mode rather than having to copy each input buffer. This is particularly useful with v4l2src as it can request the capture driver to produce buffers with the required paddings.
* omxbufferpool: use gst_video_meta_set_alignment()Guillaume Desmottes2019-11-053-1/+105
| | | | | | | Tell buffer consumer about our paddings. v4l2src can now uses these paddings information when trying to import buffers to configure the v4l2 driver accordingly.
* omxvideoenc: fix buffer size in debug logGuillaume Desmottes2019-11-021-2/+2
| | | | | Use the actual OMX buffer size rather than the info.size as OMX may require larger buffer if the port requires some padding.
* Remove autotools buildTim-Philipp Müller2019-10-141-116/+0
|
* omxallocator: fix leak with a proper chaining finalizeStéphane Cerveau2019-10-071-0/+2
|
* omxvideoenc: revert draining on ALLOCATION and DRAIN queryGuillaume Desmottes2019-09-231-27/+0
| | | | | My latest patch introduces some regressions which I have no time to debug properly at the moment so just revert it for now.
* omxvideoenc: let encoder base class handle ALLOCATION queryGuillaume Desmottes2019-09-171-1/+0
| | | | | | | | | Fixing a regression introduced in my previous patch (7c40a91c31aa4bcbb191f7c6a5d222edf9dfd9d1). The ALLOCATION query needs to be handled by GstVideoEncoder (to call propose_allocation()) so chain up the query handling rather than early returning.
* omxvideoenc: drain encoder on ALLOCATION and DRAIN queriesGuillaume Desmottes2019-09-051-0/+28
| | | | | | | | | | | | | Ensure that the encoder releases all its input buffers when requested by upstream. Encoder input buffers may be shared with downstreaming (when using dmabuf), upstream may then request the encoder to drain when reconfiguring before destroying its buffers. Also drain on ALLOCATION query as we already do in kmssink as that notify of a format change. Fix "decoder ! encoder" pipeline when decoding a file with different resolutions on Zynq.
* omx: log the number of pending buffers when port is EOSGuillaume Desmottes2019-09-041-1/+2
|
* omx: log when an output port is eosGuillaume Desmottes2019-09-041-2/+8
|
* omxvideoenc: log the full input formatGuillaume Desmottes2019-09-041-2/+4
| | | | Make it easier to debug dynamic format changes.
* omxvideodec: fix dmabuf importGuillaume Desmottes2019-09-021-2/+12
| | | | | When importing dmabuf, UseBuffer() has to be called with the fd as pBuffer rather than the mapped address of the buffer.
* omxbufferpool: fix dmabuf importGuillaume Desmottes2019-09-021-3/+6
| | | | | | | When importing dmabuf from downstream, we want the allocator to be in OTHER_POOL mode despite output_mode being DMABUF. So check first if other_pool is set before checking for pool's output_mode.
* omxvideoenc: Remove unnecessary gst_video_frame_unmap()Shinya Saito2019-08-221-1/+0
|
* omxvideodec: log supported caps by the decoderGuillaume Desmottes2019-08-051-0/+3
| | | | | Can be useful when debugging to check the caps supported by the decoder before filtering.
* omxvideoenc: Unref frame of codec config bufferShinya Saito2019-07-111-0/+1
| | | | After handling codec config, codec frame should be unreffed.
* omxvideo: check difference between frame and requested tsGuillaume Desmottes2019-06-171-1/+12
| | | | | This has proven to be very useful when debugging to detect bugs where we match the wrong gst frame with an output OMX buffer.
* omxvideo: add debug infos to find_nearest_frame()Guillaume Desmottes2019-06-174-4/+12
| | | | | | Those debug infos have proved to be very helpful when debugging timestamp issues. They are often linked to gst-omx picking the wrong frame when trying to map from OMX.
* omxvideodec: Deactivate negotiated pool when output own bufferShinya Saito2019-06-071-0/+2
| | | | | If decoder outputs internal buffer and not use OMX_UseBuffer, downstream bufferpool should be stopped.
* omxh264enc: Add 'ref-frames' propertyShinya Saito2019-06-042-1/+24
| | | | | | Add a property to control the number of frames for reference. Min and max value is based on OpenMAX IL 1.2.0 Specification.
* doc: Build documentation of hotdocThibault Saunier2019-05-131-0/+2
|
* gstomx: remove gst_omx_buffer_set_omx_buf/get_omx_bufGeorge Kiagiadakis2019-04-252-21/+0
| | | | They are no longer used anywhere
* omxbufferpool: refactor to allow memory sharingGeorge Kiagiadakis2019-04-257-265/+849
| | | | | | | | | | | | | | | | | | | | | | One big restriction of the OMX buffer pool has always been that the GstMemory objects were flagged with NO_SHARE. This was because the buffer pool needed to be sure that when a buffer returned to the pool, it would be safe to release the OMX buffer back to OpenMAX. With this change, this is no longer a restriction. What this commit introduces is a new allocator that allows us to track the GstMemory objects independently. Now, when a buffer returns to the pool, it is not necessary for the memory to be released as well. We simply track the memory's ref count in the allocator and we return the OMX buffer back when the memory's ref count drops to 0. The reason for doing this is to allow implementing zero-copy transfers in situations where we may need to copy or map a certain region of the buffer. For instance, omxh264enc ! h264parse should be possible to be zero-copy by using an OMX buffer pool between them.
* omxbufferpool: fix memory mapping with offsetGuillaume Desmottes2019-04-231-1/+1
| | | | | | | | | gst_memory_map() is already adding the offset to the mapped pointer. Doing it in the memory implementation was resulting in the offset being accounted twice. It doesn't matter yet as we are only creating memory without offset for now but it will once we'll start sharing OMX memories.
* Fixes build with omx >= 1.2.0Julien Isorce2019-04-161-12/+19
| | | | | | | | | gstomx.c:1405:10: error: ‘OMX_IndexParamCustomContentPipe’ undeclared (first use in this function) case OMX_IndexParamCustomContentPipe Some enums have been deprecated in 1.2.0 https://gitlab.freedesktop.org/gstreamer/gst-omx/issues/27
* omx: fix autotools build for generic targetTim-Philipp Müller2019-04-101-1/+1
| | | | | | | gstomxvideoenc.c:2874:7: error: "USE_OMX_TARGET_ZYNQ_USCALE_PLUS" is not defined, evaluates to 0 [-Werror=undef] #elif USE_OMX_TARGET_ZYNQ_USCALE_PLUS Works on meson because it doesn't use -Wundef
* omx: disable OMX_API_TRACE code if gst debug is disabledGuillaume Desmottes2019-03-261-0/+6
| | | | | No need to create debug structs which won't be used as DEBUG macros are no-op.
* omx: log Get/SetParameter/Config callsGuillaume Desmottes2019-03-261-0/+476
| | | | Extend OMX_API_TRACE by logging component configuration calls.
* omxbufferpool: don't use CAT_PERFORMANCE if pool will copyGuillaume Desmottes2019-03-261-4/+1
| | | | | | | | | | This was the single place where this category was used in gst-omx so most users, including me, are generally not turning it and were missing this important information from logs. The copying code uses gst_video_frame_copy() which is already logging with CAT_PERFORMANCE so we can still have this information when using only this debug category.
* omxvideodec: add debug if proposed pool can't provide enough buffersGuillaume Desmottes2019-03-261-0/+2
| | | | | We were silently ignoring the pool which was pretty confusing when debugging.
* omx: Add hardware classifiers to encoders/decodersCharlie Turner2019-03-2618-18/+18
|
* omxvideo: use GST_VIDEO_CAPS_MAKE() for template capsGuillaume Desmottes2019-01-254-6/+8
| | | | | Simplify the code and so we advertise the formats actually supported by gst-omx.
* omxvideoenc: validate cpb-size and initial-delayGuillaume Desmottes2019-01-251-11/+19
| | | | cpb-size cannot be smaller than initial-delay.
* omxvideodec: Remove duplicated QoS codeNicolas Dufresne2019-01-251-10/+1
| | | | | The 'finish' function do the exact same check / drop, there is no need to duplicate this here.
* omxvideodec: Remove dead codeNicolas Dufresne2019-01-252-16/+0
| | | | | The omxvideodec base class have a totally unused prepare_frame() vritual function, remove it.
* omxvideoenc: add adaptive gop-mode optionVarunkumar Allagadapa2019-01-251-0/+2
| | | | Added adaptive gop-mode option to ZYNQ_USCALE_PLUS encoder properties
* omxvideoenc: Add dynamic framerate supportNicolas Dufresne2019-01-251-0/+52
| | | | | Instead of going through a full reset, try and change the framerate config on the encoder when only the framerate have change.
* omxvideoenc: Add dynamic IDR insertion support on zynqVarunkumar Allagadapa2019-01-091-0/+9
| | | | As the pi, the zynq has its own API to request keyframe.
* omxbufferpool: fix race when releasing input buffersGuillaume Desmottes2019-01-083-1/+13
| | | | | | | | | If buffers were released from the pool while gst_omx_video_enc_handle_frame() was waiting for new buffers, gst_omx_port_acquire_buffer() was never awaken as the buffers weren't released through OMX's messaging system. GQueue isn't thread safe so also protect it with the lock mutex.
* omxbufferpool: fix early input buffer releaseGuillaume Desmottes2018-12-214-11/+1
| | | | | | | | | | | | | | | | | We used to track the 'allocating' status on the pool. It is used while allocating so output buffers aren't passed right away to OMX and input ones are not re-added to the pending queue. This was causing a bug when exporting buffers to v4l2src. On start v4l2src acquires a buffer, read its stride and release it right away. As no buffer was received by the encoder element at this point, 'allocating' was still on TRUE and so the the buffer wasn't put back to the pending queue and, as result, no longer available to the pool. Fix this by checking the active status of the pool instead of manually tracking it down. The pool is considered as active at the very end of the activation process so we're good when buffers are released during the activation.
* omx: fix OMX_EventBufferFlag OMX_API_TRACE structGuillaume Desmottes2018-11-261-1/+2
| | | | The GType was missing from the second field of the struct.
* omx: rename OMX_PERFORMANCE debug cat to OMX_API_TRACEGuillaume Desmottes2018-09-261-20/+20
| | | | | | | This debug category can now be used to track more OMX calls and events so best to rename it to something more generic. https://bugzilla.gnome.org/show_bug.cgi?id=797171