Commit graph

7876 commits

Author SHA1 Message Date
Sebastian Dröge
80c1722cba avwait: Don't post messages with the mutex locked
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2063>
2021-03-09 13:01:45 +02:00
Vivia Nikolaidou
cde4e74eca 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>
2021-03-08 21:02:01 +02:00
Vivia Nikolaidou
cb55d30b3c 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>
2021-03-08 21:01:50 +02:00
Tim-Philipp Müller
766bd655fc 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>
2021-03-03 18:34:26 +00:00
Jan Alexander Steffens (heftig)
b9cc83ccf8 mpegtsparse: Fix switched DTS/PTS when set-timestamps=false
Fixes 30ee21eae3.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2047>
2021-03-01 16:29:58 +01:00
Tim-Philipp Müller
438449db69 sdpsrc: fix double free if sdp is provided as string via the property
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1532

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2025>
2021-02-19 00:05:41 +00:00
Michael Olbrich
5a03862fca h264parse: don't invalidate the last PPS when parsing a new SPS
When a SPS is received then any previous PPS remains valid. So don't clear
the PPS flag from the parser state.

This is important because there are encoders that don't generated a PPS after
every SPS.

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/571

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2019>
2021-02-17 16:22:18 +00:00
Vivia Nikolaidou
66bfd0e8ae h265parse: Detect height change on field-based interlaced files
The first time update_src_caps is called, there's no frame parsed yet,
therefore we don't know whether the file has alternate-field interlacing
mode. If we run it again after we have a frame, it might be that now we
have the SEI pic_struct parsed, and therefore we know that it's
field-based interlaced, and therefore the height must be multiplied by
two. Earlier on this was not detected as a change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2022>
2021-02-17 13:46:41 +00:00
Vivia Nikolaidou
21347e13f5 h265parse: Fix FPS/duration for interlaced files
There can be h265 files with frame-based, not field-based, interlacing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2020>
2021-02-17 13:46:03 +02:00
Mathieu Duponchelle
8ae56d60a3 h264parse: fix timestamping of interlaced fields in output
Instead of relying on GstBaseParse default behaviour of computing
the duration of a parsed buffer based on the framerate passed
to gst_base_parse_set_framerate(), we instead compute the duration
ourselves, as we have more information available.

In particular, this means we now output buffers with a duration
that matches that of raw interlaced buffers when each field is
output in a separate buffer.

This fixes DTS interpolation performed by GstBaseParse, as the
previous behaviour of outputting each field with the duration of
a full frame was messing up the base class calculations.

When not enough information is available, h264parse simply falls
back to calculating the duration based on the framerate and hope
for the best as was the case previously.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1973>
2021-02-16 17:15:27 +01:00
Vivia Nikolaidou
ae66a5772c h265parse: Support for alternate-field interlacing
Also don't set interlacing information on the caps, see #1313

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1996>
2021-02-03 16:09:45 +02:00
Jan Alexander Steffens (heftig)
0f084d4624 h264/h265parse: Add VideoTimeCodeMeta to the outgoing buffer
The parsers attempted to add the meta to the incoming buffer, which
might not be the outgoing buffer or may not have been writable yet.

To fix this, call `gst_buffer_make_writable` earlier and make sure to
use the `parse_buffer` to add the meta.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2002>
2021-02-02 18:44:49 +01:00
He Junyan
db134d27a0 av1parse: set the default alignment for input and output.
1. Set the default output alignment to frame, rather than current
   alignment of obu. This make it the same behaviour as h264/h265
   parse, which default align to AU.
2. Set the default input alignment to byte. It can handle the "not
   enough data" error while the OBU alignment can not. Also make it
   conform to the comments.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1979>
2021-01-26 12:22:31 +00:00
He Junyan
5abf4ad4dd av1parse: Reset the annex_b when meet TU inside a buffer.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1979>
2021-01-26 12:22:31 +00:00
He Junyan
d83f253258 av1parse: Output each OBU when output is aligned to obu.
The current behaviour for obu aligned output is not very precise.
Several OBUs will be output together within one gst buffer. We
should output each gst buffer just containing one OBU. This is
the same way as the h264/h265 parse do when NAL aligned.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1979>
2021-01-26 12:22:31 +00:00
He Junyan
ee1f6017ac av1parse: Always copy the OBU to cache.
The current optimization when input align and out out align are
the same is not very correct. We simply copy the data from input
buffer to output buffer, but we failed to consider the dropping of
OBUs. When we need to drop some OBUs(such as filter out the OBUs
of some temporal ID), we can not do simple copy. So we need to
always copy the input OBUs into a cache.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1979>
2021-01-26 12:22:31 +00:00
He Junyan
a9c8aa4788 av1parse: Improve the logic when to drop the OBU.
When drop some OBU, we need to go on. The current manner will make
the data access out range of the buffer mapping.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1979>
2021-01-26 12:22:31 +00:00
He Junyan
7196abf7a3 av1parse: Fix some issues in the src caps.
1. Add the mono_chrome to identify 4:0:0 chroma-format.
2. Correct the mapping between subsampling_x/y and chroma-format.
   There is no 4:4:0 format definition in AV1. And 4:4:4 should
   let both subsampling_x/y be equal to 0.
3. Send the chroma-format when the color space is not RGB.

Fixes: #1502
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1974>
2021-01-23 10:53:44 +00:00
He Junyan
1029c84dbf vp9parse: Fix the subsampling_x/y to chroma format mapping.
The chroma format 4:4:4 needs both subsampling_x and subsampling_y
equal to 0.

Fixes: #1502
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1974>
2021-01-23 10:53:44 +00:00
He Junyan
fe19bc0a2e videoparsers: av1: Add the AV1 parse.
This AV1 parse implements the conversion between alignment of obu,
tu and frame, and the conversion between stream-format of obu-stream
and annexb.

TODO:
1. May need a property of operating_point to filter the OBUs
2. May add a property to disable deep parse.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1614>
2021-01-19 18:38:03 +00:00
Raju Babannavar
7e7e54d089 dvbsuboverlay: Add support for dynamic resolution update.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1487

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1897>
2020-12-21 15:34:46 +05:30
Jan Schmidt
1b3ba87d13 audiobuffersplit: Calculate the correct size for fixed size buffers
Fix the output-buffer-size property to do what it says by calculating
the correct audio buffer size for that target size, rounded down to
the nearest whole number of samples.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1887>
2020-12-17 04:41:18 +11:00
Edward Hervey
83e4310da1 tsparse: Don't use non-object for debugging statement
Use the pad instead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1880>
2020-12-14 17:57:40 +01:00
Edward Hervey
fe6ae27046 mpegts: Don't add non-padded streams to collection on updates
When carrying over existing GstStream to a new GstStreamCollection we need to
check whether they *actually* were being used in the previous collection.

This avoids adding unknown streams (metadata, PSI, etc...) to the collection on
updates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1880>
2020-12-14 17:57:40 +01:00
Lim Siew Hoon
3ce1086b14 intervideosrc: fix negotiation of interlaced caps
In 1.0 the field in caps is called "interlace-mode", not "interlaced".

Fixes #1480

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1869>
2020-12-13 13:25:13 +00:00
Vivia Nikolaidou
82dcb27401 basetsmux: Don't send the capsheader if src pad has no caps
That means we're shutting down, so there's no point in the streamheader
being sent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1864>
2020-12-09 13:14:40 +00:00
Matthew Waters
1f7515100c rtmp2/connection: pass the parent cancellable down to the connection
Otherwise, when rtpm2src cancels an inflight operation that has a queued
message stored, then the rtmp connection operation is not stopped.

If the cancellation occurs during rtmp connection start up, then
rtpm2src does not have any way of accessing the connection object as it
has not been returned yet.  As a result, rtpm2src will cancel, the
connection will still be processing things and the
GMainContext/GMainLoop associated with the outstanding operation will be
destroyed.  All outstanding operations and the rtmpconnection object will
therefore be leaked in this case.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1425
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1862>
2020-12-08 23:43:02 +00:00
Marc Leeman
102c60f82c rtpmanagerbad: allow setting caps on rtpsrc
rtpsrc tries to do a lookup of the caps based on the encoding-name. For
not so standard encodings, the caps can be set, avoiding the lookup.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1406>
2020-12-04 14:51:38 +00:00
Edward Hervey
30ee21eae3 tsparse: Forward incoming timestamps
Ensure we properly forward the upstream PTS/DTS on the regular and program
source pads. All packets being processed will carry over the latest PTS/DTS (as
a reconstructed GstBuffer).

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

And properly forward PTS/DTS for program pads (which wasn't the case before)

Original patch by Vivia Nikolaidou <vivia@ahiru.eu>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1769>
2020-12-02 14:22:06 +00:00
Thibault Saunier
8eb0e637c7 transcodebin: Minor error message enhancement 2020-11-30 17:31:48 -03:00
Thibault Saunier
eb0d72f382 transcodebin: Unlock while setting decodebin caps
Otherwise it will deadlock recursing up to notify parent object property changes
2020-11-30 17:31:48 -03:00
Thibault Saunier
5ccaa595a9 transcodebin: Avoid plugin converter if filter handles ANY caps
For example identity or clocksync or this kind of elements can be
used with any data flow and we should not enforce decoding to row in
that case.
2020-11-30 17:31:48 -03:00
Thibault Saunier
878a196080 transcodebin: Add filter as soon as it is set
Instead of waiting so that we can simply use a clocksync element as
filter, otherwise we won't know the pipeline is live as it won't
return NO_PREROLL as one would expect in that case.

Adding it right away shouldn't create any issue, both ways are fine.
2020-11-30 17:31:48 -03:00
Thibault Saunier
530f694366 uritranscodebin: Add setup-source and element-setup signals
The same way as playbinX does it as it is often quite useful
2020-11-30 17:31:48 -03:00
Thibault Saunier
142e571c28 transcode: Port to encodebin2
This allows supporting muxing sinks like hlssink2 or splitmux
2020-11-30 17:31:48 -03:00
Marijn Suijten
dc90a3d3cf audio: Use new AudioFormatInfo::fill_silence function
The function is renamed to be properly associated with AudioFormatInfo
(its instance) instead of AudioFormat (an unrelated enum), see [1] for
the rename itself.

[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/940
2020-11-26 10:06:42 +02:00
Edward Hervey
50e230a270 mpegtsdemux: Fix off by one error
Turns out timestamps of zero are valid :) Fixes issues with streams where the
PTS/DTS would be equal to the first PCR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1807>
2020-11-13 17:50:03 +01:00
Mathieu Duponchelle
c969239c7c h264parse: try harder to update timecode
NumClockTS is the maximum number of timecodes the pic_timing SEI
can carry, but it is perfectly OK for it to carry fewer, and have
one of the clock_timestamp_flags set to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1804>
2020-11-13 13:09:01 +00:00
Mathieu Duponchelle
e93558efac h264parse: fix installing of update-timecode property
Simply fixes a typo that did not have any adverse effect,
and avoid hardcoding initializer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1805>
2020-11-12 21:34:18 +00:00
Seungha Yang
7cec64499d mpegdemux: Set duration on seeking query if possible
Set duration on seeking query in the same way as duration query handler.
Otherwise application might get confused as if the duration is unknown.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1791>
2020-11-11 14:10:27 +00:00
Edward Hervey
a2a73c02ef mpegtspacketizer: Handle PCR issues with adaptive streams
A lot of content producers out there targetting "adaptive streaming" are riddled
with non-compliant PCR streams (essentially all the players out there just use
PTS/DTS and don't care about the PCR).

In order to gracefully cope with these, we detect them appropriately and any
small (< 15s) PCR resets get gracefully ignored.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1785>
2020-11-09 18:30:51 +01:00
youngh.lee
49df312086 aiffparse: Also set a channel mask for 2 channels
And only do add debug output at FIXME level when using the fallback
channel mask, not for those defined in the AIFF spec.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1756>
2020-11-04 07:36:47 +00:00
Thibault Saunier
d1945de102 transcodebin: Create the decodebin in _init
This way user can request pads right from the beginning

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1151>
2020-10-29 13:30:07 +00:00
Philippe Normand
88c96789bf transcodebin: Accept more than one stream
Look-up the stream matching the given ID also after building the stream list
from the received collection. Without this change the transcoder would discard
the second incoming stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1151>
2020-10-29 13:30:07 +00:00
Thibault Saunier
b254c0d5fe transcodebin: Port to decodebin3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1151>
2020-10-29 13:30:07 +00:00
Thibault Saunier
a5fd2a4bc3 uritranscodebin: Move to using a urisourcebin for our source.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1151>
2020-10-29 13:30:07 +00:00
Seungha Yang
639fb6ac15 rtmp2src: Set buffer timestamp on output buffer
This timestamp information would be useful for queue2 element
when calculating time level and also it makes buffering decision
more reliable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1727>
2020-10-28 16:32:32 +00:00
Aaron Boxer
b2a0fd9e96 jpeg2000parse: sub-sampling parse should take component into account
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1653>
2020-10-27 08:26:23 +01:00
Stéphane Cerveau
7edff6e746 jpeg2000parse: no pts interpolation with subframe.
The jpeg2000parser must not interpolate PTS with subframes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1653>
2020-10-27 08:26:23 +01:00
Aaron Boxer
db13dc9d02 jpeg2000parse: support frame and stripe alignment in caps
forward alignment and num-stripes caps properties

Use caps height when setting caps for subframe

We want downstream to use full frame height, not subframe height

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1653>
2020-10-27 08:26:23 +01:00