Commit graph

107 commits

Author SHA1 Message Date
Thibault Saunier 6e79932ad9 meson: List libraries and their corresponding gir definition
Introduces a `libraries` variable that contains all libraries in a
list with the following format:

``` meson
libraries = [
    [pkg_name, {
        'lib': library_object
        'gir': [ {full gir definition in a dict } ]
    ],
    ....
]
```

It therefore refactors the way we build the gir so that we can reuse the
same information to build them against 'gstreamer-full' in gst-build
when linking statically

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier e2dd28a753 meson: Mark files as files()
Making it more robust and future proof

And fix issues that it creates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Thibault Saunier 0e576127a5 bad:audio: Add generated files sources in declare_dependency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1093>
2021-10-15 19:27:30 -03:00
Seungha Yang ba79339d56 mediafoundation: Fix various string constness handling
... with fixing typo (g_strup -> g_strdup)

Constness needs to be explicit in C++ world otherwise compiler
would complain about that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1164>
2021-10-15 23:38:48 +09:00
Rob Agar f48c8f4d17 missing transceiver unref in WebRTC renegotiation example
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1160>
2021-10-15 10:03:46 +01:00
Mengkejiergeli Ba b57df4cfd1 tests:va: Fix null ptr dereference in multi-vpp
Dereference the pointer err before null check, which raised a null
pointer dereference issue by Coverity. Modify it to do the null check
of err first, then dereference it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1143>
2021-10-15 00:45:45 +00:00
Mengkejiergeli Ba 4a6cc431d2 va: Fix null ptr dereference for vadeocder
Making a null check in gst_va_decode_picture_free () indicates pic->buffers or pic->slices
can be null, then in _destroy_buffers () the pointers are dereferenced, which is detected
as dereference after null check by Coverity. Thus, modify the code to do null check in
_detroy_buffers ().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1143>
2021-10-15 00:45:44 +00:00
Vivia Nikolaidou 23bf9f75b6 tsdemux: Handle delayed seek events
Store the event in case it cannot be processed immediately and process
it after the first segment has been produced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/980>
2021-10-14 21:45:00 +00:00
Vivia Nikolaidou 5800ffea0f tsdemux: Protect demux->segment_event with a mutex
Would otherwise cause weird issues when processing a delayed seek event

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/980>
2021-10-14 21:45:00 +00:00
Nicolas Dufresne da464bde5f codecs: h264: Fix wrong type of ret variable
This ret is not a GstFlowReturn. This broke v4l2 decoder which does not
implement new_picture() virtual function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1154>
2021-10-14 20:12:03 +00:00
Seungha Yang b3710aa68d d3d11: Rename screen capture element
Old name "desktopdup" may confuse users. Now it's renamed to
"screencapture"

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1136>
2021-10-14 15:15:56 +00:00
Thibault Saunier 2dacd33e9e transcoder: Set state back to NULL after run() finishes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1063>
2021-10-14 12:04:45 +00:00
Thibault Saunier 07908ccead transcoder: Use full path for includes in 'gsttranscoder.h'
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1063>
2021-10-14 12:04:45 +00:00
Mengkejiergeli Ba 8f678c95d6 va:display: Don't close an fd with negative value
Cannot pass negative parameter to close() and thus no need to apply
close() when fd < 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1131>
2021-10-14 11:12:41 +00:00
Mengkejiergeli Ba 5e7aa06257 va: Fix error handling for decoder
Need to check if va decoder is closed successfully.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1131>
2021-10-14 11:12:41 +00:00
Mengkejiergeli Ba 2eaba0cefa va: Fix error handling for base transform
Need to check the returned value of gst_buffer_pool_set_active() when
setting the active status of buffer pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1131>
2021-10-14 11:12:41 +00:00
Thibault Saunier 0a781424e6 meson:avtp: Error out if sock_txtime is not present and avtp is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1142>
2021-10-14 01:01:54 +00:00
Seungha Yang 4dd0c6ce44 codecparsers: {h264,h265}parser: Fix typo around SEI nalu generator
Fix to create correct SEI nalu when the size of payloadType and/or
payloadType is larger than 255 (0xff)

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1601
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1106>
2021-10-13 17:21:52 +00:00
Víctor Manuel Jáquez Leal a2aa2cda42 vapostproc: Negotiate interlaced.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal 60be3dbd2a vapostproc: Copy missing fields at fixate.
When caps negotiation implies a caps feature change, some fields might
get lost. This patch brings them back from input caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal 5ae1072c2f vapostproc: Simplify size fixate.
gst_va_vpp_fixate_size() returned the fixated caps, but that is not
needed since `othercaps` are modified inline.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal b53446ddc9 vapostproc: Simplify fixate.
The first approach to fixate was simply a copy&paste of both
videoconvert and videoscale, trying to keep their logic as isolated
as possible. But that brought duplicated and sparse logic.

This patch merge both approaches simplifying the fixate operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Víctor Manuel Jáquez Leal 1642c3fc96 va: filter, deinterlace, vpp: Add gst_va_buffer_get_surface_flags().
Add a helper function to get, from GstVideoInfo and GstBuffers flags,
the VA interlace surface flags. This is used currently by vainterlace
element, but it will be used in vapostproc too if it can process
interlaced frames.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>
2021-10-13 14:59:09 +00:00
Mengkejiergeli Ba 40d559adcf msdkenc: fix vp9enc initialization fail
MediaSDK does not support to handle extbuff with id
MFX_EXTBUFF_VIDEO_SIGNAL_INFO for mjpegenc and vp9enc. Hence, need to
exclude mjpeg and vp9 when passing color properties to MediaSDK during
msdkenc initialization.

Fix issue: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/764

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1101>
2021-10-12 03:45:41 +00:00
Seungha Yang 1bf237e767 examples: d3d11: Add a desktop capture example
... with d3d11 desktop capture device provider

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1103>
2021-10-11 15:21:26 +00:00
Seungha Yang 4b85704b88 d3d11: Add device provider for d3d11desktopdupsrc
... and add support for multi-GPU/multi-monitor

By using newly added "monitor-handle" property, user can specify a
monitor to be captured via HMONITOR handle.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1673
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1103>
2021-10-11 15:21:26 +00:00
Stéphane Cerveau 2200a3dbcd ttml: fix log init
The log system should be init before calling a log

Fix regression after:

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2038

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1112>
2021-10-11 15:23:08 +02:00
Víctor Manuel Jáquez Leal 1cfae69bc9 tests: va: Add VA buffer copy tests.
It should only work for raw buffers, but fails on dmabuf since it
should have a drm modifier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal 35575e7b11 va: allocator: dmabuf: Use GstVaSurfaceCopy, if possible.
If dmabuf-based buffer to copy contains only one memory, and there are
memories available in the allocator's pool, it's possible a fast
memory copy using GstVaSurfaceCopy, regardless the drm modifier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal cf751d54a9 va: allocator: Use GstVaSurfaceCopy.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal ffa2522fc0 va: Add GstVaSurfaceCopy class.
This new class is a helper for fast/tricky copy of surfaces. First it
tries to copy using the function vaCopy in libva 1.12. If it fails, or
it's not available, a GstVaFilter is tried to be instantiated with the
allocator's parameters, and if succeed, it's used for copying the
source surface.

This is required for dmabuf surfaces with drm modifier.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal f1e2eb4f1e va: filter: Enable to pass VASurfaceID in GstVaSample.
Initially GstVaSample processed its GstBuffer member to get the
VASurfaceID. But it might cases where we already have the VASurfaceID
to process by the filter.

This patch enables the possibility to pass the surfaces rather than
the buffers. In order to validate the surfaces a function to check
surfaces were added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal 14156f8270 va: Split VA memory handling in different files.
Take out the VA memory wrappers from gstvallocator.c to an external
file exposing the functions.

This is going to be needed for the copy helper object.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal 1be43e76cc va: allocator: Add missing header file.
Added stdint.h because uintptr_t is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Víctor Manuel Jáquez Leal 2947bd6ef1 va: display: Add gst_va_display_has_vpp()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1023>
2021-10-10 17:03:29 +00:00
Benjamin Gaignard 7e9e17ebbe v4l2codecs: Align v4l2-controls header with kernel 5.15-rc3
Update v4l2-controls to be aligned with kernel 5.15-rc3.
Fix VP8 decoder to use the correct field name.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1081>
2021-10-10 15:50:57 +00:00
Seungha Yang 0d96e43c91 mediafoundation: mfvideoenc: Use DXGI adapter LUID
Make use of new DXGI adapter LUID based device context sharing.
Note that we were using DXGI adapter LUID to open MFT already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 03:23:58 +09:00
Seungha Yang 5707e487cf d3d11: d3d11decoder: Use DXGI adapter LUID
... instead of index of DXGI adapter.

The order of IDXGIAdapter1 enumerated via IDXGIFactory1::EnumAdapters1
can be varying even there's no rebooting in case that GPU preference order
is updated by user (for example, it can be done by using NVIDIA Control Panel
in case of multi-GPU laptop system) and eGPU is another possible case.

So, for an element which requires fixed target GPU requirement,
index based device enumeration is unreliable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 03:23:58 +09:00
Seungha Yang 98b82ef286 d3d11: d3d11utils: Add support for DXGI Adapter LUID based D3D11 device context sharing
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 03:23:58 +09:00
Seungha Yang 5ac7a21ef0 d3d11: d3d11device: Add gst_d3d11_device_new_{for_adapter_luid,wrapped}
* gst_d3d11_device_new_for_adapter_luid()
  Used for creating D3D11 device for a DXGI adapter (i.e., GPU)
  corresponding to a LUID (Locally Unique Identifier).
  This method can be useful for interop with other APIs such as
  Direct3D12, MediaFoundation, CUDA, etc.
* gst_d3d11_device_new_wrapped()
  Allows creating a new GstD3D11Device object by using already
  configured ID3D11Device. This is conceptually equivalent to
  gst_gl_context_new_wrapped()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 03:23:53 +09:00
Seungha Yang d8eff2623d d3d11: d3d11device: Remove "allow-tearing" property
Plugin can query DXGI_FEATURE_PRESENT_ALLOW_TEARING without d3d11device
help

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1098>
2021-10-10 01:01:44 +09:00
Sebastian Dröge 3011fa7ddd webrtcbin: Use the same promise reply structure name everywhere
This was an inconsistent mix of different names in the past. The name
has no meaning at all so let's set all to "application/x-gst-promise".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1099>
2021-10-09 11:45:46 +03:00
Vivia Nikolaidou 1fa1b18a24 chopmydata: Fix FIXMEs in gst_element_class_set_static_metadata
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1097>
2021-10-08 16:20:10 +03:00
Seungha Yang 7286c8e302 d3d11: d3d11desktopdupsrc: Add support for non-D3D11 downstream element
By this commit, application doesn't need to configure d3d11download
element for software pipeline which will make things simpler

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1082>
2021-10-08 16:13:46 +09:00
Seungha Yang 88437a9c9b codecs: Use GST_VIDEO_DECODER_ERROR() only for decoding error case
The GST_VIDEO_DECODER_ERROR() should be used only for robust/error-resilient
decoding purpose. Any other error codes such as not-negotiated or flushing
should be returned without modified for upstream to be able to handle
it immediately. (for example, application might want to try other
decoder element on not-negotiated)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1070>
2021-10-07 06:48:46 +00:00
Seungha Yang e31b797c05 codecs: h264decoder: Update for remaining gboolean to GstFlowReturn port
Fix for spurious/spammy warning and wrong function return type

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1085>
2021-10-07 06:07:29 +00:00
Nirbheek Chauhan be607d7cca meson: Fix build with -Dopenjpeg=disabled
tests/check/meson.build uses the openjpeg_dep variable
unconditionally, and the subdir_done() is useless anyway, since the
plugin is only built if openjpeg_dep.found() is true. Fixes:

..\tests\check\meson.build:23:0: ERROR: Unknown variable "openjpeg_dep".

In particular, this fixes the build on UWP since we disable openjpeg
explicitly in Cerbero when building for UWP.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1069>
2021-10-07 03:22:25 +00:00
Guillaume Desmottes de05bb3da2 bad: gs: update README
- add one missing dep
- change install path to match monorepo
- fix current dirs

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1008>
2021-10-06 21:35:08 +00:00
Víctor Manuel Jáquez Leal 01cfc1ee7e va: Use macro rather than VAMemory feature string.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1061>
2021-10-06 07:19:50 +00:00
Jan Alexander Steffens (heftig) 0596da1966 mpegtsparse: Don't assert the packet_size when filling for EOS
If the packetizer got reset for any reason (failure to find PCR?) then
the packet_size can be zero here even though we already enqueued some
packets.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1038>
2021-10-05 09:38:27 +00:00