Commit graph

113094 commits

Author SHA1 Message Date
Nirbheek Chauhan
552da8569b deinterlace: Enable x86 assembly with nasm on MSVC
We need to remove x86inc.asm from the list of compiled assembly files
because it is not supposed to be compiled separately. It is directly
included by yadif.asm, and it exports no symbols.

The object file was getting ignored on all platforms except on msvc
where it was causing a linker hang when building with debugging
enabled because the object file had no debug symbols (or similar).
We've seen this before in FFmpeg too, which uses nasm:
https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg/-/merge_requests/46

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/825>
2020-11-24 22:11:50 +05:30
Víctor Manuel Jáquez Leal
8e6ad8267f va: allocator: add a memory pool object helper
Since both allocators use a memory pool, with its mutex and cond, this patch
refactors it into a single internal object, implementing a generic GstMemory
pool.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1815>
2020-11-24 13:00:00 +01:00
Víctor Manuel Jáquez Leal
8c128ead6d va: pool, allocator: honor GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT
In order to honor GST_BUFFER_POOL_ACQUIRE_FLAG_DONTWAIT in VA pool, allocators'
wait_for_memory() has to be decoupled from their prepare_buffer() so it could be
called in pools' acquire_buffer() if the flag is not set.

wait_for_memory() functions are blocking so the received memories are assigned
to the fist requested buffer, if multithreaded calls. For this a new mutex were
added.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1815>
2020-11-24 12:44:24 +01:00
Víctor Manuel Jáquez Leal
8fc50891b1 va: allocator: broadcast when flushing
This patch handles when the bufferpool request a new buffer while
flushing.

Also fixes the usage of g_cond_wait(), which demands to be used
inside a loop to avoid spurious wakeups.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1815>
2020-11-24 12:44:24 +01:00
Víctor Manuel Jáquez Leal
72ab56c376 va: allocator: free allocator when a mem is held
An application, using for example appsink, can hold buffers from any
va allocator after setting the pipeline to NULL. We need to destroy
the allocator when that memory is unrefed.

This patch juggles a bit with the allocator reference count in
memories in order to achieve this:

1. When memory is created no alloc ref is modified
2. When memory is released, alloc ref is decreased
3. When memory is reassiged to a buffer, alloc ref is increased
4. When memory is flushed, alloc ref is increased becase it is going
   to be decreased in gst_memory_unref()

Also this patch moves the deallocation of member variables to
finalize() rather than dispose()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1815>
2020-11-24 12:44:24 +01:00
Víctor Manuel Jáquez Leal
ba4442a29d va: allocator: dmabuf: initialize cond
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1815>
2020-11-24 12:44:24 +01:00
Olivier Crête
a801018ef1 webrtc: Make ssrc map into separate data structures
They now contain a weak reference and that could be freed later
causing strange crashes as GWeakRef are not movable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
1deb034e3d webrtcstats: Get the remote-inbound stats from the right RTPSource
This also means that we need to get the clock-rate from the codec instead
of from the RTPSource, as the remote one doesn't include a clock rate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
1c1661b54f webrtcbin: Implement getting stats for a specific pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
23ea950351 webrtcstats: Also return the raw rtpsource stats for more information
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
b895240241 webrtcstats: Avoid copy of GstStructure
Instead transfer the ownership to the new structure

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
a46c6e3a97 webrtcstats: Remove receiver side when sending
Those are just invalid and just reflect what we sent. We'd need to parse the
RTCP XR packets from the other side to know more about those.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
ba0dfa52d2 webrtcstats: Extract statistics from the rtpjitterbuffer
And expose them as standardised webrtc statistics

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
fc0f6db856 webrtcbin: Store the rtpjitterbuffer instances to extract stats from them
Store them as web refs to avoid having to worry about freeing later and because
the new-jitterbuffer is on a different thread

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
d9d7814182 webrtcstats: Document all RTP missing fields according to the latest spec
Just document all the missing fields and document which ones will never
be implemented because they depend on the codec or depayloader

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
895ea210c2 webrtcstats: RTCP computed RTT is only available at sender
The receiver doesn't have the information to compute it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
a5c3331197 webrtcstats: Remove redundant lines
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1766>
2020-11-24 04:27:52 +00:00
Olivier Crête
52c676546d webrtc: Also remove rtcp_transport from the structure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1765>
2020-11-24 01:59:55 +00:00
Olivier Crête
c5d76d944e webrtc: Remove APIs to set transport on sender/receiver
They're not not used ever.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1765>
2020-11-24 01:59:55 +00:00
Olivier Crête
5d5417f271 webrtc: Remove non rtcp-mux code
RTCP mux is now always required by the WebRTC spec

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1765>
2020-11-24 01:59:55 +00:00
Julian Bouzas
64f96facca nvcodec: Assume 25fps if framerate is invalid when calculating latency
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1826>
2020-11-23 18:27:43 +00:00
Stéphane Cerveau
52e7b2a8e0 gst-full: fix static build on Windows host
Static build needs a version script which is
not available on Windows.
Need to implement use of def file.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-build/-/merge_requests/226>
2020-11-23 17:32:08 +01:00
Emmanuel Gil Peyrot
20bc59f1ff rust: Regenerate Cargo.lock
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/27>
2020-11-23 15:29:44 +01:00
Emmanuel Gil Peyrot
3710c81432 rust: Bump async-tungstenite
This removes the pin-project 0.4 dependency to use 1.0 instead like the
rest of the code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-examples/-/merge_requests/27>
2020-11-23 15:28:28 +01:00
Víctor Manuel Jáquez Leal
1a5862dd39 codecs: h264decoder: fix memory leak
gst_h264_dbp_get_picture_all() returns a full transfer of the GArray, which
needs be unrefed. But it is not unrefed in
gst_h264_decoder_find_first_field_picture() leaking it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1827>
2020-11-23 15:23:35 +01:00
Edward Hervey
1749dc66c5 mpegts: Documentation fixes
gtk-doc was complaining :)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1825>
2020-11-21 08:58:43 +00:00
Olivier Crête
1209ab54f3 Update bindings 2020-11-20 17:09:58 -05:00
Tim-Philipp Müller
7c0dcb91fc taskpool: fix docs warnings
gsttaskpool.c:507: Warning: Gst: gst_shared_task_pool_get_max_threads: unknown parameter 'max_threads' in documentation comment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/703>
2020-11-20 14:57:55 +00:00
Tim-Philipp Müller
470c79be61 qroverlay: unset executable flag on source files
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1824>
2020-11-20 13:24:24 +00:00
Tim-Philipp Müller
53947cad29 qroverlay: fix auto detection of json-glib for plugin
Only want to check for json-glib when libqrencode was found,
but also it shouldn't be required but depend on the option.

Fixes #1465

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1824>
2020-11-20 13:22:48 +00:00
Edward Hervey
0dc419197f decodebin3: Take into account decoder latency for interleave size
Some decoders might introduce quite large latencies, which would result in
multiqueue draining out on some streams. In order to avoid that, check the
latency of decoders and adjust the minimum interleave time of multiqueue
accordingly.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/800

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/931>
2020-11-20 09:43:50 +01:00
Matthew Waters
9d14ae4740 qml: add some docs on display and contexts
Especially considering some dynamic pipeline scenarios.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/822>
2020-11-20 07:49:40 +00:00
Seungha Yang
d1e7290109 d3d11: Add support for packed 4:2:2 and 4:4:4 10bits formats
Add support for Y210 and Y410 formats which are commonly used format
for en/decoders on Windows. Note that those formats cannot be used for
render target (output) of shader.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1821>
2020-11-20 02:28:54 +09:00
Tim Schneider
2c76f03fe2 rpicamsrc: Added "src->started = FALSE;" to gst_rpi_cam_src_stop
Makes the element reusable multiple times after a state change back to READY.
Fixes #105

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/823>
2020-11-20 02:15:15 +11:00
Edward Hervey
929d2bca09 decodebin3: Don't leak filter caps
Introduced by previous commit

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/933

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/934>
2020-11-19 14:36:19 +01:00
Edward Hervey
32a4953882 decodebin3: Properly handle caps query with no filter
There's no guarantee that upstream elements will do queries with specified
filter caps. If that's the case, just return GST_CAPS_ANY

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/933>
2020-11-19 11:05:03 +01:00
Olivier Crête
03d710bd40 openh264dec: Accept constrained-high and progressive-high profiles
They're just subsets of the high profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1634>
2020-11-18 15:47:36 -05:00
Olivier Crête
f83039531e d3d11h264dec: Accept constrained-high and progressive-high profiles
They're just subsets of the high profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1634>
2020-11-18 15:47:34 -05:00
Olivier Crête
e17e88e033 msdkh264dec: Accept constrained-high and progressive-high profiles
They're just subsets of the high profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1634>
2020-11-18 15:46:52 -05:00
Olivier Crête
e53da20938 nvdec: Accept progressive-high and contrained-high profiles
They're subsets of the high profiles with no interlacing and
no B-frames for constrained

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1634>
2020-11-18 15:46:52 -05:00
Mathieu Duponchelle
5b08a6042d rtsp-stream: collect a clock_rate when blocking
This lets us provide a clock_rate in a fashion similar to the
other code paths in get_rtpinfo()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/174>
2020-11-18 20:36:50 +01:00
He Junyan
33fcb0faf0 codecparsers: av1: add the set_operating_point() API.
The av1 can support multi layers when scalability is enabled. We
need an API to set the operating point and filter the OBUs just
belonging to some layers(the layers are specified by the operating
point).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00
He Junyan
c4aaeb0509 codecparsers: av1: Add an API to reset the annex_b state only.
In practice, we encounter streams that have one or more temporal units
error. When that kind of error temporal units is in annex b format, the
whole temporal unit should be discarded.
But the temporal units before it are correct and can be used. More
important, because of the error temporal unit, the parser is in a wrong
state and all later temporal unit are also parsed uncorrectly.
We need to add this API to reset the annex_b state only when we meet
some temporal unit error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00
He Junyan
a4f459fe21 codecparsers: av1: clean the seen_frame_header in parse_tile_group().
The current seen_frame_header is not cleaned correctly. According
to the spec, it should be cleaned when tiles are parsed completely.
Also delete a verbose seen_frame_header init in reset_state().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00
He Junyan
6dedbc30c5 codecparsers: av1: fix a typo in parse_metadata_scalability
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00
He Junyan
227d7a9327 codecparsers: av1: Do not assert in identify_one_obu when check annex b size.
Some buggy stream just writes the wrong temporal unit and frame size in
the stream. We should return failure rather than assert to abort.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00
He Junyan
b511761f70 codecparsers: av1: Add unknow AV1 profile define for saint check.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00
He Junyan
0d4982a3d5 codecparsers: av1: Improve the parse_tile_info.
1. store more tile info when parse tile group.
   The column, row, tile offset and tile data size are all useful for
   decoder process, especially for HW kind decoder such as VAAPI dec.
   Also fix the tile group skip size for each tile data.
2. No min_inner_tile_width requirement in newest spec.
3. Calculate the sbs of each tile for both uniform tile and non-uniformi
   tile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00
He Junyan
da0584010c codecparsers: av1: Fix a tile info read typo in frame header.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00
He Junyan
26567354b9 codecparsers: av1: Fix a typo when get value of segmentation params.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1464>
2020-11-17 19:31:09 +00:00