Commit graph

26015 commits

Author SHA1 Message Date
Jan Alexander Steffens (heftig)
9c2982d22c tests: mpegtsmux: Test we don't crash releasing unused pad
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1411>
2020-07-07 14:05:04 +02:00
Jan Alexander Steffens (heftig)
076189e2dc tests: mpegtsmux: Avoid use-after-unref
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1411>
2020-07-07 14:05:04 +02:00
Jan Alexander Steffens (heftig)
cba9ba9b38 mpegtsmux: Avoid crash releasing pad with NULL prog
If we release a pad while the muxer is running which has never been used
for aggregation (thus it does not have an assigned program), `prog` is
NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1411>
2020-07-07 14:05:04 +02:00
Haihao Xiang
9e977832c1 msdkh265enc: let MSDK select the encoding mode by default
MSDK may support lowpower and non-lowpower modes, some features are
available only under one of the two modes, which is hard to know for
user, so let MSDK select the mode by default.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1405>
2020-07-06 14:43:31 +00:00
Matthew Waters
d6635346a2 build: remove obsolete 'bad-transcoder' pc file
Replaced by 'transcoder' pc files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1409>
2020-07-06 14:17:34 +00:00
Tim-Philipp Müller
7b2c3a984c meson: add update-orc-dist target
Add target to update backup orc -dist.[ch] files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1408>
2020-07-04 15:05:23 +01:00
Vivia Nikolaidou
31d5d04bb1 videoparseutils: Only add a single closed caption meta
Otherwise, having a stream go through a parser multiple times would
result in duplicate closed caption meta.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1396>
2020-07-03 08:25:54 +00:00
Matthew Waters
c94675f1d4 decklinkvideosink: write the cdp timecode data correctly
We were mixing up the tens part with the unit parts all over the place.

e.g. 12 seconds would be encoded as 0x21 instead of the correct 0x12

Aligns the code with the same change applied to ccconverter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1400>
2020-07-03 06:54:46 +00:00
Matthew Waters
ebd1b2c929 ccconverter: write the cdp timecode data correctly
We were mixing up the tens part with the unit parts all over the place.

e.g. 12 seconds would be encoded as 0x21 instead of the correct 0x12

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1400>
2020-07-03 06:54:46 +00:00
Matthew Waters
327a79e982 ccconverter: output warning log if parsing a cdp packet fails
Simplifies figuring out why there may be no output from ccconverter with
a cdp input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1400>
2020-07-03 06:54:46 +00:00
Matthew Waters
6fa4a8c3c3 ccconverter: fix cdp timecode parsing
The first reserved bits are in the most significant bit.

i.e. 0xc0 vs 0x0c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1400>
2020-07-03 06:54:46 +00:00
Ederson de Souza
f8bf84307f avtp: Use g_strerror instead of strerror
It should avoid some implicit declaration errors (and be utf-8 friendly).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1404>
2020-07-03 04:04:39 +00:00
Tim-Philipp Müller
890df7ac8c Back to development 2020-07-03 02:03:56 +01:00
Tim-Philipp Müller
1408ffc6fa Release 1.17.2 2020-07-03 00:31:19 +01:00
Philippe Normand
8900f2d2f9 wpe: Update plugin's doc cache
This was forgotten in !1392.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1402>
2020-07-02 17:07:46 +00:00
Nicolas Dufresne
1bef43f9d4 v4l2decoder: Track pending request
With the asynchronous slice decoding, we only queue up to 2 slices
per frames. That side effect is that now we are dequeuing bitstream
buffers in both decoding and presentation order. This would lead to
a bitstream buffer from a previous frame being dequeued instead of
the expected last slice buffer and lead to us trying to queue an
already queued bitstream buffer.

We now fix this by tracking pending requests. As request are executed
in decoding order, we marking a request done, we can effectively
dequeue bitstream buffer from all previous request, as they have been
executed already.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
a88e63dd2f v4l2decoder: Improve debug tracing
Add some missing traces and move per-slice operation to TRACE level to
reduce the noise level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
d5a205cff4 v4l2decoder: Convert request pool to GstQueueArray
The decoder is not being access from multiple threads, instead it is
always protected by the streaming lock. For this reason, a
GstAtomicQueue for the request pool is overkill and may even introduce
unneeded overhead. Use a GstQueueArray in replacement, the
GstQueueArray is a good fit since the number of item is predictable and
unlikely to vary at run-time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
a2eb1b57ff v4l2slh264dec: Wait on previous pending request in slice mode
In slice mode, we'll do one request per slice. In order to recycle
bitstream buffer, and not run-out, wait for the last pending
request to complete and mark it done.

We only wait after having queued the current slice in order to reduce
that potential driver starvation and maintain performance (using dual
buffering).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
b20c6fe6c4 v4l2slh264dec: Renew bitstream buffer after submitting slice
Submitting a slice actually clears the bitstream buffer. Ensure we
have a newly allocated bitstream buffer for the next slice.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
bc1a0323a9 v4l2slh264dec: Factor out bitstream allocation
No functional changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
779f331bd4 v4l2slh264dec: Add a helper to ensure output buffer
In preparation of multi-slice decoding, we will decode multiple
slices into the same buffer. This will ensure we have a buffer to
decode to, queued into the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
d65f7de650 v4l2slh264dec: Factor out request wait
This will be reused to wait for previous slices to be complete
when dealing with following slices (in slice decoding mode).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
176a860169 v4l2slh264dec: Remove double return in submit_bitstream()
This is code cleanup, no functional changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Nicolas Dufresne
1f48e60bde v4l2slh264dec: Fix typo in debug trace
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1395>
2020-07-02 12:21:51 -04:00
Mathieu Duponchelle
b33f10e7e2 docs: remove gst prefix from plugin titles 2020-07-02 18:10:21 +02:00
Seungha Yang
c72ccded6c docs: Update plugin cache for Windows plugins 2020-07-02 17:21:33 +02:00
Seungha Yang
8d0dc4fdd2 plugins: Update for documentation of Windows plugins
* Add Since marks
* Make use of GST_PARAM_CONDITIONALLY_AVAILABLE flag
2020-07-02 17:21:29 +02:00
Seungha Yang
76793ffabc nvcodec: Update for documentation
* Add Since marks
* Make use of GST_PARAM_CONDITIONALLY_AVAILABLE flag
* Add documentation template caps
2020-07-02 17:21:24 +02:00
Philippe Normand
db0ab58e14 wpe: Set documentation caps
As the caps template can vary depending on the WPEBackend-FDO version
found at build time, set a fixed template for the generate documentation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1392>
2020-07-01 20:31:42 +00:00
Jan Alexander Steffens (heftig)
afdde9fa40 videoparsers: Fix parsing ATSC bar data
It rejected the case of all bars being disabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1394>
2020-07-01 20:02:35 +00:00
Jan Alexander Steffens (heftig)
01896c11d2 videoparsers: Fix parsing of ATSC AFD data
The test for 0x40 being set is repeated by
gst_video_parse_utils_parse_afd, which also extracts the low nibble
again, so we must not clear it here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1394>
2020-07-01 20:02:35 +00:00
Jan Alexander Steffens (heftig)
cedb07fe46 videoparsers: Give gstvideoparseutils.c a debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1394>
2020-07-01 20:02:35 +00:00
Matthew Waters
c6c4d42c4a ccconverter: fail negotiation when framerate conversion is not possible
Converting between anything but cdp will fail at converting
framerates and negotiation should reflect that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1393>
2020-07-01 19:33:56 +00:00
Matthew Waters
4f334234c8 ccconverter: fix missing output framerate on the caps
A pipeline like this:

closedcaption/x-cea-708,format=cdp,framerate=30000/1001 ! ccconverter ! closedcaption/x-cea-708,format=cc_data

would produce a critical/assert:

GStreamer-CRITICAL **: 14:21:11.509: gst_util_fraction_multiply: assertion 'a_d != 0' failed

because there would be no framerate field on ccconverter's output.

Fixed by always fixating a framerate if the input has a framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1393>
2020-07-01 19:33:56 +00:00
Jan Alexander Steffens (heftig)
1e29c5d52a rtmp2: Set connect args like libavformat does
To improve our compatibility. Critically, a server might elide data for
codecs we don't advertise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1384>
2020-07-01 18:33:42 +00:00
Jan Alexander Steffens (heftig)
2ad3aab1d4 rtmp2: Add support for AGGREGATE messages
They're multiple frames (tags) of FLV data wrapped into a message.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1384>
2020-07-01 18:33:42 +00:00
Jan Alexander Steffens (heftig)
30b1187108 rtmp2: Move FLV tag header parsing into rtmputils.c
To be shared with the AGGREGATE handling.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1384>
2020-07-01 18:33:42 +00:00
Jan Alexander Steffens (heftig)
368c038ef0 rtmp2: Mark our memory singleton as leakable
So it doesn't appear in the leaks tracer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1384>
2020-07-01 18:33:42 +00:00
Jan Alexander Steffens (heftig)
edd3c4fadf rtmp2: Remove GST_ERROR from rtmputils.c
This file does not have debug logging set up.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1384>
2020-07-01 18:33:42 +00:00
Tim-Philipp Müller
c229127b43 avtp: documentation fixes
Unclear why hotdoc wants 'gstavtp' as the plugin name here,
that's just wrong.

Add since marker and mark private subclasses as plugin API
so hotdoc knows they belong to the plugin and aren't external.

Fix GstAvtpAafTstampMode get_type() function.
2020-07-01 18:41:25 +01:00
Tim-Philipp Müller
22a00d78ce docs: update plugin cache with avtp plugin
CI picks this up now because the wrap was re-added in gst-build.
2020-07-01 11:17:51 +01:00
Seungha Yang
487f9a08de codecs: h264decoder: Fix for DPB size calculation
Some bitstreams might require more DPB size than that of what we've
calculated.

This change should've been part of initial commit of h264 stateless
codec implementation but it was missed.

See also https://chromium-review.googlesource.com/c/chromium/src/+/760276/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1385>
2020-06-30 22:20:29 +00:00
Andreas Frisch
297e5022ca mpegtsmux: Correctly set ISO-639 language descriptor
fixes #1340
Only 2 of the necessary 3 letters were copied because the teminating '\0'
needs to be counted, too - cf.
https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html#g-strlcat

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1375>
2020-06-30 11:41:27 +00:00
Olivier Crête
cceca1ffe8 webrtcbin: Expose "latency" property
This property sets the latency both on the rtpbin/rtpjittbuffer, but
also on the RTPStorage elements currently used by the FEC decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1367>
2020-06-29 22:45:31 -04:00
Seungha Yang
73ddf27898 dxgiscreencapsrc: Add missing debug category init
This should've been addressed in the commit 9042062072
but I was missed it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1383>
2020-06-30 02:51:14 +09:00
Víctor Manuel Jáquez Leal
c1b8802c71 codecs: h264picture: use g_array_remove_index_fast()
This algorithm is faster than the normal one. The problem is it
disorders the elements in the dpb, but it does not seem to mess
decoders.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1378>
2020-06-29 12:36:38 +00:00
Michael Olbrich
76411205c8 wlvideoformat: fix typo in the format list
DRM_FORMAT_ARGB8888 was actually used twice in the list for different SHM /
Gstreamer formats. In this case DRM_FORMAT_ABGR8888 is the correct format.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1382>
2020-06-28 18:55:02 +02:00
Víctor Manuel Jáquez Leal
79d11c2022 va: VA-API H.264 decoder and infrastructure
New plugin with an element for H.264 decoding with VA-API. This novel
approach, different from gstreamer-vaapi, uses gstcodecs library for
state handling.

The code is expected to looks cleaner because it uses VA-API without
further layers or wrappers.

* It uses the first supported DRM device as default VA display (other
  displays will be supported through user's GstContext)
* Requires libva >= 1.6
* No multiview/stereo profiles neither interlaced streams because
  gstcodecs doesn't handle them yet
* It is incompatible with gstreamer-vaapi
* Even if memory:VAMemory is exposed, it is not handled yet by any
  other element
* Caps templates are generated dynamically querying VAAPI, but YV12
  and I420 are added for system memory caps because they seem to be
  supported for all the drivers when downloading frames onto main
  memory, as they are used by xvimagesink and others, avoiding color
  conversion.
* Surfaces aren't bounded to context, so they can grow beyond the DBP
  size, allowing smooth reverse playback.
* There isn't yet error handling and recovery.
* 10-bit H.264 streams aren't supported by libva.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1379>
2020-06-28 11:47:35 +02:00
Víctor Manuel Jáquez Leal
9ff332e15d codecs: h264decoder: update max_dpb_frames only if VUI is present
There are some streams, with HRD, where the the calculated
max_dpb_frames is zero (max_dpb_mbs is less than size mb). In order to
get the dbp size it is required to rely on the VUI parameters if they
are present.

According to the spec Annex E.2.1

**max_dec_frame_buffering** specifies the required size of the HRD
decoded picture buffer (DPB) in units of frame buffers.  It is a
requirement of bitstream conformance that the coded video sequence
shall not require a decoded picture buffer with size of more than
Max(1, max_dec_frame_buffering) frame buffers to enable the output of
decoded pictures at the output times specified by dpb_output_delay of
the picture timing SEI messages. The value of max_dec_frame_buffering
shall be greater than or equal to max_num_ref_frames. An upper bound
for the value of max_dec_frame_buffering is specified by the level
limits in clauses A.3.1, A.3.2, G.10.2.1, and H.10.2.

When the max_dec_frame_buffering syntax element is not present, the
value of max_dec_frame_buffering shall be inferred as follows:

– If profile_idc is equal to 44, 86, 100, 110, 122, or 244 and
constraint_set3_flag is equal to 1, the value of
max_dec_frame_buffering shall be inferred to be equal to 0.

– Otherwise (profile_idc is not equal to 44, 86, 100, 110, 122, or 244
or constraint_set3_flag is equal to 0), the value of
max_dec_frame_buffering shall be inferred to be equal to MaxDpbFrames.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1381>
2020-06-27 14:05:25 +02:00