Commit graph

113094 commits

Author SHA1 Message Date
Seungha Yang
84db4b68fe mfvideoenc: Add support for Direct3D11 texture
Initial support for d3d11 texture so that encoder can copy
upstream d3d11 texture into encoder's own texture pool without
downloading memory.

This implementation requires MFTEnum2() API for creating
MFT (Media Foundation Transform) object for specific GPU but
the API is Windows 10 desktop only. So UWP is not target
of this change.
See also https://docs.microsoft.com/en-us/windows/win32/api/mfapi/nf-mfapi-mftenum2

Note that, for MF plugin to be able to support old OS versions
without breakage, this commit will load MFTEnum2() symbol
by using g_module_open()

Summary of required system environment:
- Needs Windows 10 (probably at least RS 1 update)
- GPU should support ExtendedNV12SharedTextureSupported feature
- Desktop application only (UWP is not supported yet)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1903>
2021-01-13 20:15:04 +00:00
Mathieu Duponchelle
86c009e7aa webrtc: expose transport property on sender and receiver
As advised by !1366#note_629558 , the nice transport should be
accessed through:

> transceiver->sender/receiver->transport/rtcp_transport->icetransport

All the objects on the path can be accessed through properties
except sender/receiver->transport. This patch addresses that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1952>
2021-01-13 19:22:42 +00:00
Seungha Yang
0f7af4b143 d3d11: Move core methods to gst-libs
Move d3d11 device, memory, buffer pool and minimal method
to gst-libs so that other plugins can access d3d11 resource.
Since Direct3D is primary graphics API on Windows, we need
this infrastructure for various plugins can share GPU resource
without downloading GPU memory.
Note that this implementation is public only for -bad scope
for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/464>
2021-01-13 15:01:20 +00:00
Matthew Waters
b60951a4fa gl: add get_type() implementations for all of our memory types
Otherwise, various bindings can't really know the type of an object as
required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/999>
2021-01-13 13:40:58 +00:00
Xavier Claessens
a64eacd73b meson: Update zlib.wrap to use wrapdb instead of github fork
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/217>
2021-01-13 12:55:06 +00:00
Jakub Adam
f5d971a19e rtpbasepayload: fix header extension length calculation
Since ternary operator has the lowest precedence in the expressions at
hand, wordlen would always incorrectly yield 0 or 1.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1009>
2021-01-12 22:26:19 +01:00
Seungha Yang
b71841c2d2 uri: Remove leftover documentation
Follow-up from https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/732>
2021-01-13 03:05:10 +09:00
Seungha Yang
98eebf3322 va: allocator: Fix deadlock caused by double lock
Trivial bug fix for deadlock

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1949>
2021-01-12 21:28:04 +09:00
Matthew Waters
94fea694bc wpesrc: replace object lock usage with a new lock
Using the object lock is problematic for anything that can dispatch to
another thread which is what createWPEView() does inside
gst_wpe_src_start().  Using the object lock there can cause a deadlock.

One example of such a deadlock is when createWPEView is called, but
another (or the same) wpesrc is on the WPEContextThread and e.g. posts a
bus message.  This message propagations takes and releases the object
lock of numerous elements in quick succession for determining various
information about the elements in the bin.  If the object lock is
already held, then the message propagation will block and stall bin
processing (state changes, other messages) and wpe servicing any events.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1490

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1934>
2021-01-12 08:35:10 +00:00
Seungha Yang
58a06bbdf9 symbols: Add gst_query_ref() symbol
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/134>
2021-01-11 22:14:06 +09:00
Seungha Yang
84a3f0448b gst: Add non-inline methods for bindings to able to use core APIs
Provide non-inline version of refcounting APIs so that it can be
consumed by bindings

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/-/issues/46
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728>
2021-01-11 21:54:48 +09:00
Ung, Teng En
a0a8b8785e vaapipostproc: fix code style.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/407>
2021-01-11 11:01:57 +00:00
Ung, Teng En
a354c14e58 vaapipostproc: Remove YUV to/from RGB color primary quirk since iHD driver has fixed in
a39fe9bc05.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/407>
2021-01-11 11:01:57 +00:00
Ung, Teng En
4ccb37fe37 vaapipostproc: Added gstreamer BT2020 color standard support.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/407>
2021-01-11 11:01:57 +00:00
Hou Qi
386b785e48 v4l2object: Map correct video format for RGBA
Map V4L2_PIX_FMT_RGBA32 pixel format to GST_VIDEO_FORMAT_RGBA instead of
GST_VIDEO_FORMAT_RGB video format to support RGBA.

Fixes #823

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/848>
2021-01-11 09:05:05 +08:00
Seungha Yang
ae7c20a6ed codecs: h264picture: Count only complete complementary field pair for dpb fullness decision
Our DPB implementation was designed as such that allowing
temporary DPB overflow in the middle of field picture decoding
and incomplete field pair should not trigger DPB bumping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1947>
2021-01-10 23:27:27 +09:00
Seungha Yang
e14bbd7f5c codecs: h264decoder: Add support for field-pair input frame
In case that upstream pushed buffer as a frame unit, not picture
unit for interlaced stream, baseclass should be able to detect
AU boundary (i.e., complementary field pair).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1947>
2021-01-10 23:11:01 +09:00
Seungha Yang
6366435e19 codecs: h264decoder: Remove unused private variables
... and reset() method to clear internal status at one place

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1947>
2021-01-10 22:02:54 +09:00
He Junyan
5e3fde8569 decoder: AV1: Fix a static analysis problem of update_state().
No need to check the picture pointer after we have already dereferenced it.

Fix: #298
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/408>
2021-01-09 21:01:16 +08:00
Mathieu Duponchelle
88e007fb21 webrtcbin: try harder not to pick duplicate media ids
On renegotiation, or when the user has specified a mid for
a transceiver, we need to avoid picking a duplicate mid for
a transceiver that doesn't yet have one.

Also assign the mid we created to the transceiver, that doesn't
fix a specific bug but seems to make sense to me.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1902>
2021-01-08 20:22:57 +00:00
Sebastian Dröge
ac5213dcdf rtspclientsink: Add "update-sdp" signal that allows updating the SDP before sending it to the server
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/178>
2021-01-08 13:26:01 +00:00
Thibault Saunier
139c2cae66 pad-monitor: Plug a leak 2021-01-08 08:38:12 -03:00
Thibault Saunier
dc969bf538 giosrc: Ensure that an error is posted when underlying file is deleted
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1001>
2021-01-08 09:31:30 +00:00
Jakub Adam
2d198ff10b video-blend: fix blending 8-bit and 16-bit frames together
Replace hardcoded 255s with the correct max value for the given color
depth. Use 64-bit integer in calculations where overflow may occur.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1000>
2021-01-08 08:04:55 +00:00
Thibault Saunier
5950fc1aae encodebasebin: Ensure that parsers are compatible with selected encoders
See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/845

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/963>
2021-01-07 20:36:30 +00:00
Seungha Yang
ad3fb007e1 meson: va: Skip configuration on non-linux environment
VA plugin is linux-only plugin, so we can skip it earlier.
Note that this plugin is making use of libdrm meson fallback,
which is unusable on the other platforms such as Windows

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1946>
2021-01-07 23:47:35 +09:00
Haihao Xiang
3e2e07bb8a msdkenc: the unit for max-frame-size is kbyte
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1944>
2021-01-07 12:07:28 +00:00
Philippe Normand
e02902a783 concat: Fix active-pad property doc typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/727>
2021-01-07 11:57:51 +00:00
Edward Hervey
4e7f7871db srt: Define options added in later revisions
Allows compiling the plugin against old headers.

For SRTO_BINDTODEVICE there's nothing we can do, since the value depends on
configuration options of the library. Nice.

Fixes build with libsrt < 1.4.2

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1945>
2021-01-07 09:23:28 +01:00
Jakub Adam
6c35222973 srtobject: distinguish authentication error messages
Use GST_RESOURCE_ERROR_NOT_AUTHORIZED code in posted error messages
related to SRT authentication (e.g. incorrect or missing password) so
that the application can recognize them more easily.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1943>
2021-01-06 23:35:20 +00:00
Jakub Adam
ef118f3d0a srtobject: detect socket errors from srt_epoll_wait()
On an error event, epoll wait puts the failed socket in both readfds and
writefds. We can take advantage of this and avoid explicitly checking
socket state before every read or write attempt.

In addition, srt_getrejectreason() will give us more detailed
description of the connection failure.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1943>
2021-01-06 23:35:20 +00:00
Olivier Crête
df8d29e9c3 webrtcbin: Remove remnant of non-rtcp-mux mode
There was some code left that wasn't used anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1930>
2021-01-06 23:02:37 +00:00
Jakub Adam
3c3e89304e srtobject: make possible to specify more sockopts in SRT URI
Any socket option that can be passed to libsrt's srt-live-transmit
through SRT URI query string is now recognized.

Also make the code that applies options to SRT sockets more generic.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1842>
2021-01-06 22:28:02 +00:00
Jakub Adam
5687b03438 srtsrc: fix typos
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1541>
2021-01-06 19:21:14 +00:00
Jakub Adam
1e461b3166 srtsink: remove unused connection_mode variable
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1541>
2021-01-06 19:21:14 +00:00
Jakub Adam
d540012091 srtobject: obey "wait-for-connection" in caller mode
The pipeline now gets stuck in gst_srt_object_write_one() until the
receiver comes online, which may or may not be desired based on the use
case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1836>
2021-01-06 18:55:37 +00:00
Jordan Petridis
3ec559700a ci_template: remove artifacts workaround for cerbero msvc
This was fixed 3 weeks ago and should no longer be needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-ci/-/merge_requests/387>
2021-01-06 20:48:41 +02:00
Víctor Manuel Jáquez Leal
4625ac92b6 va: mpeg2dec: refactor the picture reference filling
Add the helper function _get_surface_id() which extracts the
VASurfaceID from the passed picture. This function gets the surface of
the next and previous reference picture.

Instead of if-statements, this refactor uses a switch-statement with a
fall-through, for P-type pictures, making the code a bit more readable.

Also it adds quirks for gallium driver, which cannot handle invalid
surfaces as forwarding nor backwarding references, so the function fails.
Also iHD cannot handle them, but to avoid failing, the current picture
is used as self-reference.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1939>
2021-01-06 17:27:10 +01:00
Víctor Manuel Jáquez Leal
aff338bb24 va: mpeg2dec: set first field either frame or has a first field
Add a helper function _is_frame_start() which check if picture has a
frame structure or if it has not an interlaced first field yet. This
function is used with filling is_first_field parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1939>
2021-01-06 17:27:10 +01:00
Víctor Manuel Jáquez Leal
a926511df4 codecs: mpeg2decoder: decode only if B and not closed gop
Mark as decode only if picture type is B, without previous picture in DBP and
closed_gop is 0 as might be understood in "6.3.8 Group of pictures header".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1939>
2021-01-06 16:47:42 +01:00
Víctor Manuel Jáquez Leal
ec15caff93 codecs: mpeg2decoder: rename variables
Since prev_picture and next_picture are plain pointers, not pointer to pointers,
it's misleading to name them with _ptr suffix.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1939>
2021-01-06 16:47:42 +01:00
R S Nikhil Krishna
ddbe5ce83b Updated python port of Tutorial 2 with fixed line numbers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-docs/-/merge_requests/126>
2021-01-05 18:04:56 -03:00
Víctor Manuel Jáquez Leal
df6c4843a7 va: display: parse and set driver implementation
This enum can be used for quirk handling. It's not a property because
the driver enum list might change, it's not static, thus avoiding the
update of GType declaration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1938>
2021-01-05 17:54:34 +00:00
Víctor Manuel Jáquez Leal
543d54d492 va: display: add function precondition check
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1938>
2021-01-05 17:54:34 +00:00
Jakub Adam
00e44e8ed7 srtobject: post a message on the bus when broken socket is detected
So that the application gets notified may react to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1935>
2021-01-05 16:50:01 +00:00
He Junyan
5523b75550 libs: decoder: Add decode_with_surface_id for AV1 film_grain.
The AV1 film_graim feature needs two surfaces the same time for
decoding. One is for recon surface which will be used as reference
later, and the other one is for display. The GstVaapiPicture should
contain the surface for display, while the vaBeginPicture() need
the recon surface as the target.
We add a gst_vaapi_picture_decode_with_surface_id API to handle this
kind of requirement.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/191>
2021-01-06 00:08:10 +08:00
He Junyan
0a34b6882e libs: decoder: AV1: Add the av1 decoder support.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/191>
2021-01-06 00:08:01 +08:00
Matthew Waters
f573d91237 gl: document some GL caps specifics
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/854
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/996>
2021-01-05 15:03:54 +00:00
Thibault Saunier
d1aa359c2b launch: Ensure to add required ref to profiles from project
We were unreffing something we were not owning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/224>
2021-01-05 11:52:43 -03:00
Thibault Saunier
73a674ac2d validate: Do not check strv length on NULL pointers
This is not legal

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/234>
2021-01-05 11:33:51 -03:00