Matthew Waters [Mon, 22 Mar 2021 03:34:36 +0000 (14:34 +1100)]
gst: don't use volatile to mean atomic
volatile is not sufficient to provide atomic guarantees and real atomics
should be used instead. GCC 11 has started warning about using volatile
with atomic operations.
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Discovered in https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/868
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2098>
Seungha Yang [Sat, 20 Mar 2021 07:26:21 +0000 (16:26 +0900)]
mfvideoenc: Enable Direct3D multi-thread protection
As documented by MS. See also
https://docs.microsoft.com/en-us/windows/win32/medfound/supporting-direct3d-11-video-decoding-in-media-foundation#open-a-device-handle
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2095>
Seungha Yang [Sat, 20 Mar 2021 07:15:35 +0000 (16:15 +0900)]
Revert "d3d11: Enable native multi-thread protection layer and make use of it"
This reverts commit
872b7f503c49442e559f6a381416c6a84b76a3c6.
Native multi-thread protection layer seems to be consuming more CPU
resource than application side protection approach in some cases
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2095>
Matthew Waters [Fri, 19 Mar 2021 05:36:41 +0000 (16:36 +1100)]
tests/webrtc: check for more sdp things across the board
e.g.
- test for a=setup:$val and direction attributes in all tests
- test number of media sections
- test number of formats in each m= section (for audio/video)
- test no duplicate formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2093>
Julien [Tue, 23 Jun 2020 19:41:27 +0000 (12:41 -0700)]
gs: add source and sink for Google Cloud Storage
Useful when having a service that runs a GStreamer pipeline
or application in Google Cloud to avoid storing the inputs
and outputs in the running container or service. For example
when analyzing a video from a Google Cloud Storage bucket
and extracting images or converting the video and then uploading
the results into another Google Cloud Storage bucket.
- gssrc allows to read from a file located in Google Cloud
Storage and it supports seeking.
- gssink allows to write to a file located in Google Cloud
Storage. There are 2 modes, one similar to multifilesink and
the other similar to filesink.
Example:
gst-launch-1.0 gssrc location=gs://mybucket/videos/sample.mp4 ! decodebin ! glimagesink
gst-launch-1.0 playbin uri=gs://mybucket/videos/sample.mp4
gst-launch-1.0 videotestsrc num-buffers=5 ! pngenc ! gssink object-name="img/img%05d.png" bucket-name="mybucket" next-file=buffer
gst-launch-1.0 filesrc location=sample.mp4 ! gssink object-name="videos/video.mp4" bucket-name="mybucket" next-file=none
When running locally simply set GOOGLE_APPLICATION_CREDENTIALS. But
when running in Google Cloud Run or Google Cloud Engine, just set the
"service-account-email" property on each element.
Closes #1264
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1369>
Seungha Yang [Wed, 17 Mar 2021 14:53:04 +0000 (23:53 +0900)]
d3d11: Enable native multi-thread protection layer and make use of it
... instead of our own GRecMutex locking. In this way, any other
Direct3D11 client (MediaFoundation for example) can safely call
any Direct3D11 API even when we are sharing our Direct3D11 device
with others.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2092>
Jan Schmidt [Thu, 25 Feb 2021 16:28:29 +0000 (03:28 +1100)]
examples: Add an mpegtsmux example of prog-map usage.
Add an example of how to construct the prog-map structure for
the MPEG-TS muxers and assign streams to programs, and set PCR
and PMT PIDs.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2039>
Jan Schmidt [Thu, 25 Feb 2021 15:53:33 +0000 (02:53 +1100)]
mpegtsmux: Add PMT_%d support to prog-map.
Support a PMT_%d field in the prog-map, that's optionally used
to set the PMT for each program in the mux.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2039>
Jan Schmidt [Fri, 12 Mar 2021 07:10:18 +0000 (18:10 +1100)]
mpegtsmux: Don't write PCR until PAT/PMT are output.
Make sure streams start cleanly with a PAT/PMT and defer the first PCR
output until after that.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
Mathieu Duponchelle [Thu, 11 Mar 2021 17:21:11 +0000 (18:21 +0100)]
tsmux: finalize PCR timing for complete accuracy
In order to always insert a PCR packet right on time, we need to
check whether one is needed when outputting any packet, not only
a packet for the PCR stream. Most of the PCR packets will remain
data-carrying packets, but as a last resort we may insert stuffing
packets on the PCR stream.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
Jan Schmidt [Thu, 11 Mar 2021 07:05:25 +0000 (18:05 +1100)]
mpegtsmux: Improve PCR/SI scheduling.
Change PCR / SI scheduling so that instead of checking if
the current PCR is larger than the next target time, instead
check if the PCR of the next packet would be too late, so PCR
and SI are always scheduled earlier than the target, not later.
There are still cases where PCR can be written too late though,
because we don't check before each output packet.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
Jan Schmidt [Thu, 11 Mar 2021 07:05:10 +0000 (18:05 +1100)]
tsmuxstream: Fix comment typo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2073>
Mathieu Duponchelle [Tue, 9 Mar 2021 12:22:10 +0000 (13:22 +0100)]
cccombiner: implement scheduling
Prior to that, cccombiner's behaviour was essentially that of
a funnel: it strictly looked at input timestamps to associate
together video and caption buffers.
This patch instead exposes a "schedule" property, with a default
of TRUE, to control whether caption buffers should be smoothly
scheduled, in order to have exactly one per output video buffer.
This can involve rewriting input captions, for example when the
input is CDP sequence counters are rewritten, time codes are dropped
and potentially re-injected if the input video frame had a time code
meta.
Caption buffers may also get split up in order to assign captions to
the correct field when the input is interlaced.
This can also imply that the input will drift from synchronization,
when there isn't enough padding in the input stream to catch up. In
that case the element will start dropping old caption buffers once
the number of buffers in its internal queue reaches a certain limit
(configurable).
The property is exposed so that existing users of cccombiner can
revert back to the original behaviour, but should eventually be
removed, as that behaviour was simply inadequate.
This commit also disallows changing the input caption type, as
this would needlessly complicate implementation, and removes
the corresponding test.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2076>
Seungha Yang [Wed, 17 Mar 2021 10:26:12 +0000 (19:26 +0900)]
d3d11: Use render-target and shader-resource bind flags by default
Even if bind flags is not needed by an element, other element
might need such bind flags.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2091>
He Junyan [Sun, 14 Mar 2021 16:04:21 +0000 (00:04 +0800)]
va: vpp: Fix features lost in transform_caps().
When we transform the caps from the sink to src, or vice versa, the
"caps" passed to us may only contain parts of the features. Which
makes our vpp lose some feature in caps and get a negotiation error.
The correct way should be:
Cleaning the format and resolution of that caps, but adding all VA,
DMA features to it, making it a full feature caps. Then, clipping it
with the pad template.
fixes: #1551
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2081>
Thibault Saunier [Mon, 15 Mar 2021 19:25:36 +0000 (16:25 -0300)]
wpe: Ignore 'error-cancelled' 'failures'
This happens when the user use the 'load-bytes' signal and nothing is wrong there
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2085>
Seungha Yang [Tue, 16 Mar 2021 10:09:59 +0000 (19:09 +0900)]
d3d11decoder: WARNING if ID3D11VideoDevice is unavailable, not ERROR
gst_d3d11_decoder_new() method is also used for device capability
checking during plugin init. Although we are checking hardware
flag prior to that, it doesn't guarantee ID3D11VideoDevice interface.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2088>
Seungha Yang [Tue, 16 Mar 2021 08:56:51 +0000 (17:56 +0900)]
mediafoundation: Fix resource leak
IMFActivate would hold its internal objects unless user call ShutdownObject(),
even if we release the IMFActivate. Here internal objects may
include Direct3D objects, such as texture, device handle for example.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2087>
Seungha Yang [Tue, 16 Mar 2021 06:58:57 +0000 (15:58 +0900)]
d3d11colorconvert: Fix caps leak
GstBaseTransform::fixate_caps() takes ownership of passed
othercaps argument.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2086>
Víctor Manuel Jáquez Leal [Sat, 13 Mar 2021 18:00:18 +0000 (19:00 +0100)]
va: example: multiple-vpp: test sharpen with dynamic controller
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2082>
Víctor Manuel Jáquez Leal [Sat, 13 Mar 2021 17:57:37 +0000 (18:57 +0100)]
va: postproc: synchronize segment with stream time
This is required to use dynamic controllable parameters.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2082>
Seungha Yang [Mon, 15 Mar 2021 09:26:03 +0000 (18:26 +0900)]
d3d11decoder: Do negotiation again per forward/reverse playback mode change
For reverse playback, we are always copying decoded
frame to downstream buffer. So the pool size can be
and need to be large enough.
In case that forward playback, however, we need to restrict
the max pool size for performance reason. Otherwise decoder
will keep copying decoded texture to downstream buffer pool
if decoding is faster than downstream throughput
performance and also there are queue element between them.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2083>
Seungha Yang [Mon, 15 Mar 2021 10:48:56 +0000 (19:48 +0900)]
d3d11videosink: Avoid switching conversion tool during playback
Decoder might be able to copy decoded texture to the other buffer pool
during playback depending on context. In that case, copied one
has no D3D11_BIND_DECODER bind flag.
If we used ID3D11VideoProcessor previously for decoder texture,
and incoming texture supports ID3D11VideoProcessor as well even if it has no
D3D11_BIND_DECODER flag (having D3D11_BIND_RENDER_TARGET for example),
allow zero-copying instead of using our fallback texture.
Frequent conversion tool change (between ID3D11VideoProcessor and generic shader)
might result in inconsistent image quality.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2084>
Víctor Manuel Jáquez Leal [Fri, 12 Mar 2021 12:50:59 +0000 (13:50 +0100)]
va: postproc: only drop filters if they change
Currently, at every frame the filters array is recreated. This is not
optimal, since it should be only rebuilt if the VA filter's related
properties change. This patches does that by using a flag.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2078>
Seungha Yang [Sun, 14 Mar 2021 07:11:12 +0000 (16:11 +0900)]
d3d11decoder: Refactor device open step and negotiation
* Remove redundant method arguments
* Don't allocate staging texture if downstream supports d3d11 memory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2079>
Seungha Yang [Sun, 14 Mar 2021 06:08:01 +0000 (15:08 +0900)]
d3d11decoder: Move profile GUID handling into decoder object
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2079>
Seungha Yang [Sun, 14 Mar 2021 05:26:17 +0000 (14:26 +0900)]
d3d11decoder: Get rid of private struct
Completely hide member variables
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2079>
Seungha Yang [Sun, 14 Mar 2021 03:50:21 +0000 (12:50 +0900)]
Revert "d3d11vp9dec: Add support for internal frame resizing"
This reverts commit
58a4c33a0e4f4e5415d8578166716e0d65c0c27e
We should use ID3D11VideoProcessor instead of shader
to avoid copy. We need to revisit this topic later
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2079>
Seungha Yang [Sat, 13 Mar 2021 13:47:55 +0000 (22:47 +0900)]
d3d11device: Hold ID3D11VideoDevice and ID3D11VideoContext object
... instead of QueryInterface-ing per elements. Note that
ID3D11VideoDevice and ID3D11VideoContext objects might not be available
if device doesn't support video interface.
So GstD3D11Device object will create those objects only when requested.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2079>
Seungha Yang [Sun, 14 Mar 2021 04:01:37 +0000 (13:01 +0900)]
d3d11: Run gst-indent for all C++ code
Since all d3d11 plugin implementation code are C++, we need to
run gst-indent manually. This is preparation for later
"gst-indent sys/d3d11/*.cpp" run.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2077>
Seungha Yang [Sat, 13 Mar 2021 08:40:57 +0000 (17:40 +0900)]
d3d11: Port to C++
Direct3D11 objects are COM, and most COM C APIs are verbose
(C++ is a little better). So, by using C++ APIs, we can make code
shorter and more readable.
Moreover, "ComPtr" helper class (which is C++ only) can be
utilized, that is very helpful for avoiding error-prone COM refcounting
issue/leak.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2077>
Víctor Manuel Jáquez Leal [Fri, 12 Mar 2021 11:36:52 +0000 (12:36 +0100)]
va: example: multiple-vpp: test direction change
If the driver supports it (iHD, so far) and the parameter -d is set,
the direction of the video will be changed randomly.
In the code you can select, at compilation time, if the direction
change is done by element's property or by pipeline events.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2074>
Víctor Manuel Jáquez Leal [Thu, 11 Mar 2021 17:53:09 +0000 (18:53 +0100)]
va: postproc: update passthrough and reconfigure pads
Added helper function _update_passthrough() which will define and set
the pass-through mode of the filter, and it'll either reconfigure both
pads or it will just mark the src pad for renegotiation or nothing at
all.
There are cases where both pads have to be reconfigured (direction
changed, for example), other when just src pad has to (filters
updated) or none (changing to ready state).
The requirement of renegotiation depends on the need to enable/disable
its VA buffer pools.
This patch sets pass-through mode by default, so the buffer pools
aren't allocated if no filtering/direction operations are defined,
which is the correct behavior.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2074>
Stéphane Cerveau [Thu, 25 Feb 2021 13:09:50 +0000 (14:09 +0100)]
zxing: update to support version 1.1.1
Support new API in 1.1.1
Update the supported input video format.
Update tests to use parse_launch
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2037>
Stéphane Cerveau [Wed, 10 Mar 2021 12:10:28 +0000 (13:10 +0100)]
mpegvideoparse: do not clip the frame
If the current buffer is delta unit such as P or B
frame, the buffer should not be clipped and need to
let the decoder handle the segment boundary situation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2070>
Seungha Yang [Wed, 10 Mar 2021 17:36:28 +0000 (02:36 +0900)]
d3d11device: Fix wrong printf formatting
Add missing '%' there
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2069>
Philippe Normand [Sat, 20 Feb 2021 11:36:42 +0000 (11:36 +0000)]
transcoder: Add state-changed signal
Similar to GstPlayer, a new signal for state tracking is now emitted at runtime,
as a commodity for applications which then don't need to monitor the pipeline
GstBus for state changes anymore.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2028>
Philippe Normand [Mon, 7 Dec 2020 10:47:30 +0000 (10:47 +0000)]
player: Rewrite as GstPlay wrapper
For the time being the GstPlayer library remains as a wrapper for GstPlay, in
order to keep existing applications working and give them time to port to
GstPlay. GstPlayer will remain in -bad for a couple cycles and the plan for
GstPlay is to move it to -base before 1.20.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
Philippe Normand [Mon, 7 Dec 2020 09:56:26 +0000 (09:56 +0000)]
play: Flush API bus before exiting main loop
Otherwise the bus might attempt to dispatch queued messages after the thread
ended, causing runtime warnings.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
Philippe Normand [Sun, 29 Nov 2020 18:55:48 +0000 (18:55 +0000)]
play: tests: Switch user-agent test to a real HTTP server
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
Philippe Normand [Sat, 14 Nov 2020 10:56:51 +0000 (10:56 +0000)]
play: tests: Refactor to use new Message bus API
Instead of relying on an extra GMainLoop, the messages are poped from the player
bus and handled synchronously. This should avoid flaky behaviors.
Fixes #608
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
Philippe Normand [Sat, 14 Nov 2020 10:47:53 +0000 (10:47 +0000)]
play: Plug media_info leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
Stephan Hesse [Tue, 28 Apr 2020 19:09:40 +0000 (21:09 +0200)]
play: Rename internal buffering field to buffering_percent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
Stephan Hesse [Sat, 2 Nov 2019 15:14:13 +0000 (16:14 +0100)]
play: Introducing the new playback library
This aims to be a replacement for the GstPlayer library. In GstPlay, notifications are
sent as application messages through a dedicated GstBus. The GMainContext-based
signal dispatcher was replaced by a GObject signal adapter, now relying on the
bus to emit its signals. The signal dispatcher is now optional and fully
decoupled from the GstPlay object.
Co-authored with: Philippe Normand <philn@igalia.com>
Fixes #394
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2061>
Sebastian Dröge [Tue, 9 Mar 2021 11:00:10 +0000 (13:00 +0200)]
avwait: Don't post messages with the mutex locked
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2063>
Matthew Waters [Mon, 1 Mar 2021 09:53:53 +0000 (20:53 +1100)]
webrtc: don't generate duplicate rtx payloads when bundle-policy is set
It was possible to generate a SDP that had an RTX payload type
that matched one of the media payload types when providing caps via
codec_preferences without any sink pads.
Fixes
m=video 9 UDP/TLS/RTP/SAVPF 96
...
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 nack pli
a=fmtp:96 apt=96
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2046>
Vivia Nikolaidou [Mon, 8 Mar 2021 12:30:52 +0000 (14:30 +0200)]
tests: Add negotiation tests for the interlace elements
Many complicated cases exist. Would be good to have some checks.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>
Vivia Nikolaidou [Mon, 8 Mar 2021 18:59:14 +0000 (20:59 +0200)]
interlace: Discard stored_frame on EOS and PAUSED_TO_READY
Would otherwise leak it.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>
Vivia Nikolaidou [Mon, 8 Mar 2021 14:16:25 +0000 (16:16 +0200)]
interlace: Specify interlace-modes in the sink pad template
Especially specify the field-order in the interleaved mode. Otherwise it
might cause the negotiation to fail, because
GST_PAD_SET_ACCEPT_INTERSECT is not set on the sinkpad, and the
field-order is missing in the sink template but can be present in the
outside caps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2062>
Seungha Yang [Sun, 7 Mar 2021 07:47:07 +0000 (16:47 +0900)]
nvh264sldec: Reopen decoder object if larger DPB size is required
Equivalent to the d3d11h264dec fix
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1839
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2059>
Seungha Yang [Tue, 2 Mar 2021 16:23:20 +0000 (01:23 +0900)]
d3d11: Fix an HLSL compiler warning
warning X3578: Output value 'main' is not completely initialized
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2052>
Bing Song [Wed, 27 Jan 2021 02:55:13 +0000 (10:55 +0800)]
transcoder: handle SIGINT and SIGHUP
Handle SIGINT and SIGHUP in transcoder. Or the output file maybe corrupt.
Fixes #1507
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1987>
Seungha Yang [Thu, 4 Mar 2021 08:42:28 +0000 (17:42 +0900)]
d3d11h264dec: Keep track of actually configured DPB size
... instead of the largest we ever seen.
Note that d3d11h264dec element holds previously configured DPB size
for later decoder object re-open decision.
This is to fix below case:
1) Initial SPS, required DPB size is 6
- decoder object is opened with DPB size 6
- max_dpb_size is now 6
2) SPS update with resolution change, required DPB size is 1
- decoder object is re-opened with DPB size 1
- max_dpb_size should be updated to 1, but it didn't happen (BUG)
3) SPS update without resolution change, only required DPB size is updated to 6
- decoder object should be re-opened but didn't happen
because we didn't update max_dpb_size at 2).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2056>
Tim-Philipp Müller [Wed, 3 Mar 2021 16:19:39 +0000 (16:19 +0000)]
interlace: add more formats, esp 10-bit, 12-bit and 16-bit ones
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2054>
Benjamin Gaignard [Tue, 16 Feb 2021 10:23:17 +0000 (11:23 +0100)]
v4l2codecs: h264: retrieve interlaced information
Lets the decoder knows if the frames are interlaced or not.
Provide this information to the driver while filling reference
pictures fields in slice params structure
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
Nicolas Dufresne [Fri, 27 Nov 2020 21:00:03 +0000 (16:00 -0500)]
v4l2codecs: h264: Reduce controls for subsequent slices
Only the SLICE_PARAMS and PRED_WEIGHTS are needed for the second and
following slices.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
Ezequiel Garcia [Fri, 14 Aug 2020 13:13:09 +0000 (10:13 -0300)]
v4l2codecs: h264: Implement optional scaling matrix
The new H.264 uAPI requires that all drivers support
scaling matrix only as an option, when a non-flat
scaling matrix is provided in the bitstream headers.
Take advantage of this and avoid passing the scaling
matrix if not needed.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
Ezequiel Garcia [Wed, 30 Sep 2020 17:34:15 +0000 (14:34 -0300)]
v4l2codecs: h264: Only set SPS control if needed
Given V4L2 controls are cached in V4L2, there is no need
to set them if they don't change. Set the SPS control
only if a new sequence was received by the parser.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
Ezequiel Garcia [Wed, 30 Sep 2020 17:22:14 +0000 (14:22 -0300)]
v4l2codecs: h264: Only slice-based need SLICE_PARAMS and PRED_WEIGHTS
Frame-based decoding mode doesn't require SLICE_PARAMS and
PRED_WEIGHTS controls.
Moreover, if the driver doesn't support these two controls, trying
to set them will fail. Fix this by only setting these on
slice-based decoding mode.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
Ezequiel Garcia [Wed, 30 Sep 2020 17:14:41 +0000 (14:14 -0300)]
v4l2codecs: h264: Add API checks
Check that the V4L2 H264 controls' sizes match
our expectation. If not, then probably there's an API
mismatch which will cause errors or decoding corruption.
Also, print a warning if the kernel version is too old.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
Ezequiel Garcia [Wed, 30 Sep 2020 13:40:51 +0000 (10:40 -0300)]
v4l2codecs: h264: Update to the new uAPI
Starting from Linux v5.11, the V4L2 stateless H.264 uAPI
is updated and stable.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
Ezequiel Garcia [Wed, 30 Sep 2020 13:33:59 +0000 (10:33 -0300)]
v4l2codecs: h264: Set the scaling matrix present flag unconditionally
We are currently always setting and passing a scaling matrix,
so need to set this flag accordingly. Passing a scaling matrix
optionally will be implemented in follow-up commit.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1624>
Víctor Manuel Jáquez Leal [Tue, 2 Mar 2021 11:46:24 +0000 (12:46 +0100)]
va: postproc: mention the possibility of color balance
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>
Víctor Manuel Jáquez Leal [Tue, 2 Mar 2021 11:46:06 +0000 (12:46 +0100)]
docs: plugins update VA elements
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>
Víctor Manuel Jáquez Leal [Tue, 2 Mar 2021 11:44:12 +0000 (12:44 +0100)]
va: vp8dec, vp9dec: only set NV12 color format for documentation
Mention in documentation only the most used output format in VA-API.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2050>
Seungha Yang [Tue, 2 Mar 2021 13:01:26 +0000 (22:01 +0900)]
d3d11convert: Forward colorimetry and chroma-site from upstream
Adopt the improvement of https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1033
into d3d11.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 08:47:03 +0000 (17:47 +0900)]
d3d11convert: Add support for border drawing
... and fix wrong resizing when downstream requested PAR value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 12:35:00 +0000 (21:35 +0900)]
d3d11convert: Prefer video processor over shader
... if video processor was used previously. Otherwise, switching
between video processor and shader would result in inconsistent
output image quality.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 09:07:36 +0000 (18:07 +0900)]
d3d11videoprocessor: Disable auto processing mode explicitly
Don't allow auto processing (e.g., denoising), as it might result
in unexpected output.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 12:10:24 +0000 (21:10 +0900)]
d3d11memory: Fix for wrong texture_array_size returns
Fix mismatched return values
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 12:13:18 +0000 (21:13 +0900)]
d3d11decoder: Add trace log for DPB pool size debugging
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 11:45:22 +0000 (20:45 +0900)]
d3d11decoder: Always use render-target bind flag for downstream pool
To convert decoded texture into other format, downstream would use
video processor instead of shader. In order for downstream to
be able to use video processor even if we copied decoded texture
into downstream pool, we should set this bind flag. Otherwise,
downstream would keep switching video processor and shader
to convert format which would result in inconsistent image quality.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Seungha Yang [Tue, 2 Mar 2021 11:37:04 +0000 (20:37 +0900)]
d3d11: Fix wrong preprocessing blocks
Missed in https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/464
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
He Junyan [Mon, 1 Mar 2021 05:44:09 +0000 (13:44 +0800)]
va: vpp: fix a wrong caps logic in vpp_transform_caps().
The current gst_va_vpp_transform_caps return such as:
video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ],
interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA,
BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16,
16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive, format=(string)
{ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw,
width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace-mode=(string)progressive,
format=(string){ VUYA, GRAY8, NV12, NV21, YUY2, UYVY, YV12, I420, P010_10LE };
video/x-raw(memory:VAMemory), width=(int)[ 1,
2147483647 ], height=(int)[ 1,
2147483647 ],
interlace-mode=(string)progressive; video/x-raw(memory:DMABuf), width=(int)[ 1,
2147483647 ],
height=(int)[ 1,
2147483647 ], interlace-mode=(string)progressive; video/x-raw, width=(int)
[ 1,
2147483647 ], height=(int)[ 1,
2147483647 ], interlace-mode=(string)progressive
Which is not correct. It mixes the template caps and the input query caps together.
The correct way should be: clip the template caps with the input caps(remove format
and rangify size). The correct answer should be:
video/x-raw(memory:VAMemory), width=(int)[ 16, 16384 ], height=(int)[ 16, 16384 ], interlace
-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA, BGRA, P010_10LE,
ARGB, ABGR, VUYA }; video/x-raw(memory:DMABuf), width=(int)[ 16, 16384 ], height=(int)[ 16,
16384 ], interlace-mode=(string)progressive, format=(string){ NV12, I420, YV12, YUY2, RGBA,
BGRA, P010_10LE, ARGB, ABGR, VUYA }; video/x-raw, width=(int)[ 16, 16384 ], height=(int)[ 16,
16384 ], interlace-mode=(string)progressive, format=(string){ VUYA, GRAY8, NV12, NV21, YUY2,
UYVY, YV12, I420, P010_10LE }
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2045>
Jan Alexander Steffens (heftig) [Mon, 1 Mar 2021 15:23:37 +0000 (16:23 +0100)]
mpegtsparse: Fix switched DTS/PTS when set-timestamps=false
Fixes
30ee21eae36e7279f63b77167ba1dcf5f70b8e83.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2047>
Ilya Kreymer [Thu, 15 Aug 2019 15:25:26 +0000 (08:25 -0700)]
webrtc ice: Add 'min/max-rtp-port' props for setting RTP port range
default min port == 0, max port == 65535 -- if min port == 0, uses existing random port selection (range ignored)
add 'gathering_started' flag to avoid changing ports after gathering has started
validity checks: min port <= max port enforced, error thrown otherwise
include tests to ensure port range is being utilized (by @hhardy)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119>
Olivier Crête [Thu, 25 Feb 2021 16:58:57 +0000 (11:58 -0500)]
webrtc ice: Only ever request one component, it's always rtcpmux
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/119>
Thibault Saunier [Fri, 26 Feb 2021 18:40:01 +0000 (15:40 -0300)]
transcoder: Add some missing API guards
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
Thibault Saunier [Fri, 26 Feb 2021 18:36:48 +0000 (15:36 -0300)]
transcoder: Fix potential use of uninitialized variables
gst_structure_get won't touch variables if the field is not present
leading to potential use of initialized vars
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
Thibault Saunier [Fri, 26 Feb 2021 18:31:29 +0000 (15:31 -0300)]
transcoder: Rework the API to create/get SignalAdapter
We can only have 1 single GstTranscoderSignalAdapter object for a
given GstTranscoder object, this enforces that by avoiding to expose
a constructor and instead add a method to GstTranscoder to get the
signal adapter (internally creating it when needed). We can still
cleanly ensure that the signal adapter is running for the requested
GMainContext and return NULL if it is not the case.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2044>
Matthew Waters [Mon, 22 Feb 2021 05:59:25 +0000 (16:59 +1100)]
webrtcbin: use regular ice nomination by default
1. We don't currently deal with an a=ice-options in the SDP which means
we currently violate https://tools.ietf.org/html/rfc5245#section-8.1.1
which states: "If its peer is using ICE options (present in
an ice-options attribute from the peer) that the agent does not
understand, the agent MUST use a regular nomination algorithm."
2. The recommendation is default to regular nomination in both RFC5245
and RFC8445. libnice change for this is
https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/125
which requires an API break in libnice.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2031>
Philippe Normand [Wed, 24 Feb 2021 18:43:07 +0000 (18:43 +0000)]
transcoder: Remove un-needed gst_init call
We can safely assume GStreamer is already initialized from here.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
Thibault Saunier [Thu, 26 Nov 2020 01:25:28 +0000 (22:25 -0300)]
transcoder: Port to a GstBus API instead
Following the move made by GstPlayer in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/35
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
Thibault Saunier [Thu, 26 Nov 2020 01:21:35 +0000 (22:21 -0300)]
transcoder: Automatically generate enums GTypes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
Thibault Saunier [Thu, 26 Nov 2020 01:01:30 +0000 (22:01 -0300)]
transcoder: Port to G_DECLARE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1840>
Sebastian Dröge [Fri, 26 Feb 2021 14:36:58 +0000 (16:36 +0200)]
decklinkvideosink: Use correct numerator for 29.97fps
It's not 0.2997fps.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2042>
Edward Hervey [Fri, 26 Feb 2021 10:39:10 +0000 (11:39 +0100)]
decklinksrc: Use a more accurate capture time
Use the hardware reference clock time when the frame was finished being captured
instead of a time much further down the road.
This improves the stability/accuracy of buffer times.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2040>
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 18:14:42 +0000 (19:14 +0100)]
va: allocator: No need of fourcc to create surface.
In commits
430aa327 and
a119a940 there are a regression since it is
possible to create surfaces without fourcc, only chroma (rtformat) is
required.
This regression is shown on radeonsi driver with certain color
formats.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2035>
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 12:06:51 +0000 (13:06 +0100)]
va: vpp: implement GstColorBalance interface
And modify multiple-vpp example to use it with -r parameter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>
Víctor Manuel Jáquez Leal [Tue, 23 Feb 2021 16:22:40 +0000 (17:22 +0100)]
va: filter: add controllable and mutable playing to GParamFlags
Add controllable and mutable playgin to common GParamFlags.
Also use this common flags to video-direction
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2033>
Víctor Manuel Jáquez Leal [Wed, 24 Feb 2021 15:57:06 +0000 (16:57 +0100)]
vulkan: Fix elements long name.
Fix vkcoloconvert and vkviewconvert long names.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2034>
Haihao Xiang [Tue, 12 Jan 2021 07:33:49 +0000 (15:33 +0800)]
msdk: allow user specify a drm device via an env variable
User may specify the required device via GST_MSDK_DRM_DEVICE
Example:
GST_MSDK_DRM_DEVICE=/dev/dri/card0 gst-launch-1.0 videotestsrc ! msdkh264enc
! fakesink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1953>
He Junyan [Tue, 19 Jan 2021 07:36:29 +0000 (15:36 +0800)]
VA: Add the vaav1dec element as the av1 decoder.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
He Junyan [Tue, 19 Jan 2021 07:17:58 +0000 (15:17 +0800)]
VA: Add the aux surface for gst buffer used by decoder.
The AV1 codec needs to support the film grain feature. When the film
grain feature is enabled, we need two surfaces as the output of the
decoded picture, one without film grain effect and the other one with
it. The first one acts as the reference and is needed for later pictures'
reconstruction, and the second one is the real display output.
So we need to attach another aux surface to the gst buffer/mem and make
that aux surface as the target of vaBeginPicture.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
He Junyan [Tue, 19 Jan 2021 07:07:38 +0000 (15:07 +0800)]
VA: Add a helper function of decoder_add_slice_buffer_with_n_params.
Some codecs such as AV1 needs several parameters associated with one
slice. It may have multi tiles within one slice and each tile needs
its description parameter.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
He Junyan [Tue, 19 Jan 2021 06:59:45 +0000 (14:59 +0800)]
codecs: AV1decoder: Add the AV1 decoder base class.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
He Junyan [Tue, 23 Feb 2021 05:47:29 +0000 (13:47 +0800)]
va: allocator: replace assert with error log in va alloc.
We should print error log rather than assert when the forcc or
the rt_format of va allocator is unrecognized.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1636>
Seungha Yang [Sun, 21 Feb 2021 08:38:38 +0000 (17:38 +0900)]
d3d11: Documentation update
* Update class metadata
* for wrapper bin elements to be distinguishable from internal element.
* D3D11 -> Direct3D11 for consistency
* Add missing Since mark everywhere
* Update plugin cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
Seungha Yang [Sun, 21 Feb 2021 11:38:37 +0000 (20:38 +0900)]
d3d11: Reorganize class hierarchy of convert elements
AS-IS:
D3D11Convert class is baseclass of D3D11ColorConvert and D3D11Scale
* GstD3D11Convert
|_ GstD3D11ColorConvert
|_ GstD3D11Scale
TO-BE:
Introducing a new base class for color conversion and/or rescale elements
* GstD3D11BaseConvert
|_ GstD3D11Convert
|_ GstD3D11ColorConvert
|_ GstD3D11Scale
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>
Seungha Yang [Sun, 21 Feb 2021 08:35:40 +0000 (17:35 +0900)]
d3d11deinterlace: Add missing system memory caps features on templates
This element can support system memory
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2029>