Commit graph

7970 commits

Author SHA1 Message Date
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
Nicolas Dufresne
dcb3044478 rtpsrc: Cleanup on BYE, timeout or when pad is reused
In this patch, we enabled 'autoremove' feature of rtpbin and also call
'clear-ssrc' on the rtpssrcdemux element when a pad is being reused. This
ensure that the jitterbuffer is removed and no threads accumulates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1575>
2020-10-16 17:23:46 +00:00
George Kiagiadakis
2fcbb4386b rtpsrc: re-use the same src pad for streams that have the same payload type
Also use payload type when naming pads, this will make it easier to identify
pads and simplify the code.

Fixes #1395

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1575>
2020-10-16 17:23:46 +00:00
Seungha Yang
634eb1fc38 h265parse: Don't enable passthrough by default
SEI messages contain various information which wouldn't be conveyed
by using upstream CAPS (HDR, timecode for example).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1639>
2020-10-15 03:25:17 +09:00
Marc Leeman
0be59181d7 rtpmanagerbad: remove duplicate parent declaration
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1689>
2020-10-12 13:56:50 +02:00
Tim-Philipp Müller
1ed969d276 rtmp2sink: fix since marker on new "stop-commands" property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1687>
2020-10-12 11:55:46 +01:00
Guillaume Desmottes
75dc98cc08 h265parse: set interlace-mode=interleaved on interlaced content
interlace-mode=alternate is a special case of interlace-mode=interleaved
where the fields are split using two different buffers.

We should use the latter instead of the former to no break compat with
elements supporting only 'interleaved'.
Decoders producing alternate, such as OMX on the Zynq, should change the
interlace-mode on their output caps.

Fix https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/825

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1655>
2020-10-09 10:19:52 +00:00
Jan Alexander Steffens (heftig)
5a1b56a0e0 mpegtsmux: Restore intervals when creating TsMux
Otherwise the settings from the properties would be overwritten with
the defaults.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1593>
2020-09-23 16:50:34 +00:00
Sanchayan Maity
248d2bb795 audiobuffersplit: Add support for specifying output buffer size
Currently for buffer splitting only output duration can be specified.
Allow specifying a buffer size in bytes for splitting.

Consider a use case of the below pipeline
appsrc ! rptL16pay ! capsfilter ! rtpbin ! udpsink

Maintaining MTU for RTP transfer is desirable but in a scenario
where the buffers being pushed to appsrc do not adhere to this,
an audiobuffersplit element placed between appsrc and rtpL16pay
with output buffer size specified considering the MTU can help
mitigate this.

While rtpL16pay already has a MTU setting, in case of where an
incoming buffer has a size close to MTU, for eg. with a MTU of
1280, a buffer of size 1276 bytes would be split into two buffers,
one of 1268 and other of 8 bytes considering RTP header size of
12 bytes. Putting audiobuffersplit between appsrc and rtpL16pay
can take care of this.

While buffer duration could still be used being able to specify
the size in bytes is helpful here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1578>
2020-09-21 15:17:18 +00:00
Haihao Xiang
4a93f6e651 h265parse: recognize more HEVC extension streams
There are streams which have the right general_profile_idc and
general_profile_compatibility_flag, but don't have the right extension
flags. We may try to use chroma_format_idc and bit_depth to
recognize these streams.

e.g.
https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/SCC/IBF_Disabled_A_MediaTek_2.zip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1328>
2020-09-16 16:51:45 +00:00
yychao
c6ae415ca8 tsdemux: Parse Audio Preselection Descriptor
For Dolby AC4 audio experience, parsing PMTs/APD from transport stream layer for all available presentations.
Refer to ETSI EN 300 468 V1.16.1 (2019-05)

1. 6.4.1 Audio preselection descriptor
2. Table M.1: Mapping of codec specific values to the audio preselection descriptor

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1555>
2020-09-14 06:27:07 +00:00
yychao
5269777a97 tsdemux: Add new API for fetching extended descriptors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1555>
2020-09-14 06:27:07 +00:00
Seungha Yang
2b152eae69 videoparsers: Add vp9parse element
Adding vp9parse element to parse various stream information such as
resolution, profile, and so on. If upstream does not provide resolution and/or
profile, this would be useful for decodebin pipeline for autoplugging
suitable decoder element depending on template caps of each decoder element.

In addition, vp9parse element supports unpacking superframe into
single frame for decoders. The vp9 superframe is a frame which consists
of multiple frames (or superframe with one frame is allowed) followed by superframe
index block. Then unpacked each frame will be considered as normal frame
by decoder. The decision for unpacking will be done by downstream element's
"alignment" caps field, which can be "super-frame" or "frame".
If downstream specifies the "alignment" as "frame",
then vp9parse element will split an incoming superframe into single frames
and the superframe index (located at the end of the superframe) data
will be discarded by vp9parse element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1041>
2020-09-10 14:56:52 +00:00
Jan Alexander Steffens (heftig)
16a07d303a rtmp2: Replace stats queue with stats lock
Making the thread receiving the stats wait on the loop to respond was
not a good idea, as the latter can get blocked on the streaming thread.

Have get_stats read the values directly, adding a lock to ensure we
don't read garbage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1550>
2020-09-09 06:34:51 +00:00
Nazar Mokrynskyi
ebc057bb7a rtmp2sink: add docs section with since marker on new stop-commands property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1256>
2020-09-09 05:53:08 +00:00
Nazar Mokrynskyi
8c37eea410 rtmp2: fix code style, update documentation cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1256>
2020-09-09 05:53:08 +00:00
Jan Alexander Steffens (heftig)
30274dee52 rtmp2: Clean up (improve) GstRtmpStopCommands type
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1256>
2020-09-09 05:53:08 +00:00
Nazar Mokrynskyi
9a2828c216 rtmp2sink: handle EOS event and close stream
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1285

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1256>
2020-09-09 05:53:08 +00:00
Jan Alexander Steffens (heftig)
66f9d37c37 mpegtsmux: Make handling of sinkpads thread-safe
Ensure we take the object lock while accessing `GstElement.sinkpads`.
Use an iterator when the code isn't simple to avoid deadlock.

When we find the best pad, take a reference so a concurrent pad
release doesn't destroy the pad before we're done with it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1553>
2020-09-09 02:25:40 +00:00
Edward Hervey
1068083135 mpegtsmux: Don't create streams with reserved PID
There are quite a few reserved PID in the various MPEG-TS (and derivate)
specifications which we should definitely not use. Those PID have a certain
meaning and purpose.

Furthermore, a lot of the code in the muxer implementation also makes assumption
on the purpose of streams based on their PID.

Therefore, when requesting a pad with a specific PID, make sure it is not a
restricted PID.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1561>
2020-09-08 21:09:36 +00:00
Sebastian Dröge
64039cdf84 gst: Update for gst_video_transfer_function_*() function renaming
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1557>
2020-09-07 12:14:47 +03:00
Jan Alexander Steffens (heftig)
ef8142ef90 mpegtsmux: Keep mux usable after stop
Otherwise you cannot request new pads until after it is started again.

gst_base_ts_mux_reset with FALSE is still called in the dispose
implementation, so the muxer still gets deallocated when we actually
clean up.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1552>
2020-09-01 14:01:56 +00:00
Nirbheek Chauhan
ce18a344f4 rtmp2: Need to unescape the userinfo before setting
This regressed in 827afa206d. The same
fix was also committed to the webrtc element, but rtmp2 was missed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1547>
2020-08-30 09:53:42 +00:00
Jose Quaresma
fe3a0c2c90 proxysink: event_function needs to handle the event when it is disconnecetd from proxysrc
without this a disconneted proxysink fail when goes to play with error:

 Internal data stream error.
 streaming stopped, reason error (-5)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1508>
2020-08-13 14:21:05 +00:00
Felix Yan
5886138c13 Correct typos in gsth264parse.c
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1511>
2020-08-12 17:03:00 +00:00
Nicolas Dufresne
76b4de79ca h264parse: Add new H.264 levels
The spec now list 6, 6.1 and 6.2.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1509>
2020-08-12 08:30:14 -04:00
Jordan Petridis
26bbcae973 gstautoconvert.c: fix clang warnings
clang 10 is complaining about incompatible types due to the
glib typesystem.

```
gst-plugins-bad/gst/autoconvert/b5c3019@@gstautoconvert@sha/gstautoconvert.c.o' -c ../subprojects/gst-plugins-bad/gst/autoconvert/gstautoconvert.c
../subprojects/gst-plugins-bad/gst/autoconvert/gstautoconvert.c:898:8: error: incompatible pointer types passing 'typeof ((((void *)0))) *' (aka 'void **') to parameter of type 'GList **' (aka 'struct _GList **') [-Werror,-Wincompatible-pointer-types]
  if (!g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL,
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/glib/gatomic.h:192:44: note: expanded from macro 'g_atomic_pointer_compare_and_exchange'
    __atomic_compare_exchange_n ((atomic), &gapcae_oldval, (newval), FALSE, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) ? TRUE : FALSE; \
                                           ^~~~~~~~~~~~~~
1 error generated.
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1487>
2020-08-04 11:37:52 +00:00
Nirbheek Chauhan
d4ca8820e7 webrtc, rtmp2: Warn if the user or password aren't escaped
If the user/pass aren't escaped, the userinfo will be ambiguous and we
won't know where to split. We will accidentally get it right if the :
belongs in the password.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1481>
2020-08-03 18:12:50 +00:00
Nirbheek Chauhan
827afa206d webrtc, rtmp2: Fix parsing of userinfo in URI strings
While parsing the string, `gst_uri_from_string()` also unescapes the
userinfo. This is bad if your username contains a `:` character, since
we will then split the userinfo at the wrong location when parsing it.

To fix this, we can use the new `gst_uri_from_string_escaped()` API
that was added in
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/583

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1481>
2020-08-03 18:12:50 +00:00
George Kiagiadakis
fc9a612e2c ristsrc: drop stream-start & eos messages posted from the internal udp sink(s)
See #1368

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1472>
2020-07-29 13:20:28 +00:00
George Kiagiadakis
914161f902 rtpsrc: drop stream-start & eos messages posted from the internal udp sink(s)
See #1368

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1472>
2020-07-29 13:20:28 +00:00
Vivia Nikolaidou
d8b37973d2 tsmux: Fix PCR calculation for CBR live streams
Take the first ever timestamp as an offset

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1431>
2020-07-28 16:18:45 +00:00
Jan Alexander Steffens (heftig)
5a358b7687 tsmux: Refactor get_current_pcr
No functional change.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1431>
2020-07-28 16:18:45 +00:00
Nicolas Dufresne
782dc857e0 rtpsrc: Add domain name support
This add domain name resolution (similar to udpsrc does) to the rtpsrc
element.

Fixes 1352

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne
19c632f4e8 ristsrc: Add support for domain name
This add domain name resolution (similar to udpsrc does) to the ristsrc
element.

Fixes 1352

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne
f6ac2e44bb rtpsrc: Always set rtcp socket address
Regardless if it's multicast or not, set the address property to match
the element address. This is the address of the interface to listen to,
which is expected to be ANY in most cases, but should be honnored even
for RTCP non-multicast case.

This also fixes an assertion if the address is not a parsable IPv4 or
IPv6 string.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne
82fe23f212 rtpsink: Fix error handling on bad DNS
This will properly print the DNS being attempted to resolved and avoid
trying to unref a NULL pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Nicolas Dufresne
89fbcc71d9 ristsink: Fix error handling on bad DNS
This will properly print the DNS being attempted to resolved and avoid
trying to unref a NULL pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1433>
2020-07-14 20:48:04 +00:00
Mathieu Duponchelle
13376f88fe basetsmux: make use of gst_aggregator_finish_buffer_list
Fixes #1276

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1429>
2020-07-10 20:12:11 +00:00
Tim-Philipp Müller
510e8ef8cb docs: fix element names in section headers
Hopefully that'll make hotdoc pick up the docs for these elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1428>
2020-07-10 19:22:29 +00:00
Andreas Frisch
0e075b4dbf mpegtsmux: Don't assume English for ISO-639 language descriptor
Previously, "en" (should have actually been "eng") was assumed
for the ISO-639 language descriptor if no language was explicitely given.
Neither ETSI EN 300 468 nor ATSC A/52 mandate for a language descriptor,
so we should simply not set it, if it's unknown.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1386>
2020-07-08 13:37:12 +00:00
Jan Schmidt
46cc64e09f mpegtsmux: Fix handling of MPEG-2 AAC
The audio/mpeg,mpegversion=2 caps in GStreamer refer to
MPEG-2 AAC (ISO 13818-7), not to the extended MP3 (ISO 13818-3),
which is audio/mpeg,mpegversion=1,mpegaudioversion=2/3

Fix the caps, and add handling for MPEG-2 AAC in both ADTS and raw
form, adding ADTS headers for the latter.
2020-07-08 12:24:13 +00:00
Tim-Philipp Müller
f3fdd76683 rtmp, transcodebin: fix i18n header includes
Fixes #1351

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1416>
2020-07-07 19:55:00 +01:00
Nicolas Dufresne
af741f0723 rist: Use g_signal_connect_object()
rtpbin can still emit signals when it is being disposed, and while
rtpbin is inside ristsrc/ristsink it can still live longer.

So we either have disconnect all signals at some point, or let GObject
take care of that automatically.

Related to !1412

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1413>
2020-07-07 15:37:57 +00:00
Josep Torra
7346e7c1e2 scenechange: use orc to compute score
Add an orc implementation for SAD operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1024>
2020-07-07 15:06:55 +01:00
Sebastian Dröge
b812d1c743 rtpsrc/sink: Use g_signal_connect_object()
rtpbin can still emit signals when it is being disposed, and while
rtpbin is inside rtpsrc/rtpsink it can still live longer.

So we either have disconnect all signals at some point, or let GObject
take care of that automatically.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1412>
2020-07-07 12:42:36 +00: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
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
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
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
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
Vivia Nikolaidou
290d0432c3 interlace: Make caps writable before modifying them
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1373>
2020-06-25 16:05:39 +03:00
Mathieu Duponchelle
e2f28c3d08 mxfvanc: document new sink pad template
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1368>
2020-06-25 06:59:18 +00:00
Sebastian Dröge
e54107db02 mxfdemux/mux: Add support for CEA-708 CDP from S436 essence tracks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1368>
2020-06-25 06:59:18 +00:00
Vivia Nikolaidou
482d2c9459 interlace: Switch field-pattern on the fly
The frame rate interlace uses changes when we change field-pattern, so
we need to issue a reconfigure event.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1364>
2020-06-24 17:44:46 +00:00
Vivia Nikolaidou
1eeaee24d4 interlace: Re-indentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1349>
2020-06-24 11:31:15 +03:00
Vivia Nikolaidou
b53c1363f2 interlace: Don't change field-pattern on PAUSED or PLAYING state
It would otherwise change the caps the element produces and cause the
element to misbehave

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1349>
2020-06-24 11:31:15 +03:00
Vivia Nikolaidou
7c7ac7a0dc interlace: Don't fail negotiation if capsfilters decide framerate
Try to negotiate if the framerates on either sides of the interlace are
decided using capsfilters and the framerates are correct. Otherwise the
following pipelines would fail to negotiate:

gst-launch-1.0 videotestsrc !
video/x-raw,framerate=24/1,interlace-mode=progressive ! interlace
field-pattern=2 ! video/x-raw,framerate =30/1 ! fakesink

gst-launch-1.0 videotestsrc !
video/x-raw,framerate=60/1,interlace-mode=progressive ! interlace
field-pattern=0 ! video/x-raw,framerate=30/1 ! fakesink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1349>
2020-06-24 11:15:48 +03:00
Vivia Nikolaidou
581d76b41a interlace: Restrict passthrough conditions
Don't do passthrough if interleave-mode=mixed or if we have one of the
telecine modes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1349>
2020-06-24 11:15:48 +03:00
Vivia Nikolaidou
76ce67e70b interlace: Add field switching mode for 2:2 field pattern
In the 2:2 field pattern, interlace can switch from bottom-field-first
to top-field-first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1349>
2020-06-24 11:15:48 +03:00
Vivia Nikolaidou
ba500b816a interlace: Only half the framerate for 1:1 field pattern
Keep the framerate for 2:2 field pattern, and completely remove it from
the caps for all others. Otherwise, negotiation will fail if caps on
both sides of the element specify a framerate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1349>
2020-06-24 11:15:48 +03:00
Vivia Nikolaidou
0c63c8d1f5 interlace: Add FIXME comment about false passthrough bug
If interlace-mode is missing from upstream caps, we can falsely do
passthrough when in fact we'd have to switch fields.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1349>
2020-06-24 11:15:48 +03:00
Thibault Saunier
059e8ff44a docs: Document basecamerabinsrc 2020-06-23 13:02:57 -04:00
Mathieu Duponchelle
6baffc2931 docs: mark more types as plugin API 2020-06-23 12:10:17 -04:00
Sebastian Dröge
ea5f38440d audiobuffersplit: Specify in the template caps that only interleaved audio is supported
Needs special support for non-interleaved audio and e.g. use the
GstPlanarAudioAdapter.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues/779

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1363>
2020-06-23 10:03:53 +03:00
Vivia Nikolaidou
652773de36 Revert "h264parse: Include interlace-mode in caps"
This reverts commit b75a61342f.

The parser would only set the mode to progressive or mixed, missing the
cases where it should have been interleaved. Interleaved is more
difficult to detect because in h264 it happens per frame. On the other
hand, h264 decoders detect the interlacing information per-frame and set
the caps correctly. By giving potentially incorrect interlacing
information in the parser already, it's being enforced downstream even
after decoding, breaking some use cases (e.g. an encoder can't properly
mark the stream as TFF or BFF). On the other hand, there's no valid use
case for having interlacing information on the caps at the parsing
stage, so after a lot of discussion, it was decided to revert this.

Initial commit message:
=========================
Those are the rules:

In the SPS:
  * if frame_mbs_only_flag=1 => all frame progressive
  * if frame_mbs_only_flag=0 => field_pic_flag defines if each frame is
    progressive or interlaced, thus the mode is 'mixed' in GStreamer
    terms.

https://bugzilla.gnome.org/show_bug.cgi?id=779309
=========================

Fixes #1313

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1335>
2020-06-22 16:08:41 +00:00
Jan Alexander Steffens (heftig)
434d685564 Revert "errorignore: Added convert-error signal"
The introduced API has [some problems][1] and [a better solution][2] was
found that made the feature obsolete.

This reverts commit f7626c1f2a.

[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/736#note_357702
[2]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/736#note_238830

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/916

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/916>
2020-06-20 19:11:57 +01:00
Jan Schmidt
1cf3cae5e1 dvbsubenc: Add DVB Subtitle encoder
Add an element that converts AYUV video frames to a DVB
subpicture stream.

It's fairly simple for now. Later it would be good to support
input via a stream that contains only GstVideoOverlayComposition
meta.

The element searches each input video frame for the largest
sub-region containing non-transparent pixels and encodes that
as a single DVB subpicture region. It can also do palette
reduction of the input frames using code taken from
libimagequant.

There are various FIXME for potential improvements for now, but
it works.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1227>
2020-06-17 12:50:13 +10:00
Tim-Philipp Müller
c7095abd31 yadif: remove plugin, there's now deinterlace method=yadif
Plugin code was still the GPL version, and the
functionality has now been moved into the deinterlace
element in gst-plugins-good as method=yadif (and LGPL).

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/444
and https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/621

Closes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/216
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/463

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1336>
2020-06-11 21:52:49 +01:00
Vivia Nikolaidou
969e647925 interlace: Fix crash with empty caps in setcaps
If the src_peer_caps are EMPTY (e.g. negotiation failed somewhere), the
assertion inside gst_video_info_from_caps would fail and the whole
pipeline would crash. Check for gst_caps_is_empty before
gst_video_info_from_caps and gracefully fail if it's empty.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1333>
2020-06-11 12:06:17 +00:00
Mathieu Duponchelle
a048ce81d4 plugins: uddate gst_type_mark_as_plugin_api() calls 2020-06-06 00:40:42 +02:00
Sebastian Dröge
a5b1e1e96d clockselect: Don't register GstClockSelectClockId multiple times 2020-06-04 13:33:16 -04:00
Sebastian Dröge
74f2f733be plugins: Use gst_type_mark_as_plugin_api() for all non-element plugin types 2020-06-04 13:33:16 -04:00
Jan Alexander Steffens (heftig)
23a2916afd mpegtsdemux: Deliver all packets to tsparse
34af8ed66a changed the code to use the
packetizer's packets instead of the incoming buffers, but mpegtsbase
didn't actually push all packets to the subclass. As a result, padding
(PID 0x1FFF) packets got lost.

Add a new boolean to toggle pushing unknown packets to mpegtsbase and
have mpegtsparse make use of it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1300>
2020-05-28 16:41:30 +00:00
Sebastian Dröge
bd67ef18e9 audiobuffersplit: Unset DISCONT flag if not discontinuous
And also set/unset the RESYNC flag accordingly.

It can happen that the flag is preserved by GstAdapter from the input
buffer. For example if a big input buffer is split into many small ones,
each of the small ones would have the flag set.

All other buffer flags seem safe to keep here if they were set,
including the GAP flag.

Also ensure that the buffer is actually writable before changing any
flags or metadata on it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1298>
2020-05-25 12:41:32 +00:00
Jan Schmidt
3fdf25cc37 tsdemux: Handle old streams claiming to be HDMV with Opus
GStreamer 1.16 and earlier produced streams with HDMV registration id
but with Opus audio streams on the stream ID that AC-4 now uses. Make
sure those still play back by special casing the check for AC-4 in HDMV

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1296>
2020-05-25 01:51:46 +10:00
Andrey Sazonov
d806dd2543 asfmux: consistent sscanf args usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1286>
2020-05-21 20:37:49 +00:00
Andrey Sazonov
5044967382 sdpdemux: fix klocwork issues
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1287>
2020-05-21 15:14:32 +00:00
Edward Hervey
f3d6026ad2 rtmp2src: Answer scheduling query
Just like for rtmpsrc, we must inform downstream that we are a
sequential (i.e. don't do random access efficiently) and
bandwith-limited (i.e. might need buffering downstream) element

Fixes buffering issues with playbin3

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1282>
2020-05-20 10:55:55 +02:00
Jan Alexander Steffens (heftig)
9b2ed3a3fc mpegtsdemux: Close a buffer leak and simplify input_done
tsparse leaked input buffers quite badly:

    GST_TRACERS=leaks GST_DEBUG=GST_TRACER:9 gst-launch-1.0 audiotestsrc num-buffers=3 ! avenc_aac ! mpegtsmux ! tsparse ! fakesink

The input_done vfunc was passed the input buffer, which it had to
consume. For this reason, the base class takes a reference on the buffer
if and only if input_done is not NULL.

Before 34af8ed66a, input_done was used in
tsparse to pass on the input buffer on the "src" pad. That commit
changed the code to packetize for that pad as well and removed the use
of input_done.

Afterwards, 0d2e908523 set input_done
again in order to handle automatic alignment of the output buffers to
the input buffers. However, it ignored the provided buffer and did not
even unref it, causing a leak.

Since no code makes use of the buffer provided with input_done, just
remove the argument in order to simplify things a bit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1274>
2020-05-18 14:11:40 +00:00
Alex Hoenig
0a2e026985 mpegtsmux: detect and ignore gap buffers
Fixes #1291.  Without this, when a stream has gaps and then resumes, the next buffer PTS that is written to the TS is given the PTS of the first gap.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1263>
2020-05-12 12:18:28 -04:00
Sebastian Dröge
79e65951a9 audiobuffersplit: Perform discont tracking on running time
Otherwise we would have to drain on every segment event. Like this we
can handle segment events that don't cause a discontinuity in running
time to be handled without draining.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1254>
2020-05-11 07:25:39 +00:00
Sebastian Dröge
20756e3387 audiobuffersplit: Keep incoming and outgoing segments separate
We might have to drain already queued input based on the old segment
before forwarding the new segment event. The new segment is only
forwarded after a discont as otherwise we might cause unnecessary
timestamp jumps as we output buffers timestamped based on sample counts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1254>
2020-05-11 07:25:39 +00:00
Sebastian Dröge
2a2e48fd9e onviftimestamp: Add missing break in set_property()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1257>
2020-05-10 11:17:19 +03:00
Nicolas Dufresne
269ab891c5 h264/h265parse: Fix initial skip
Account for start codes possibly be 4 bytes. For HEVC, also take into
account that we might be missing only one of the two identification
bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1251>
2020-05-07 12:08:36 -04:00
Nicolas Dufresne
3784bd4a73 h265parse: Ensure correct timestamps
If the input has a miss-placed filler zero byte (e.g. a filler without a 4
bytes start code on the next NAL), we would endup using the same timestamp
twice. Ask the base class to read the timestamp from the buffer were the NAL
actually starts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1251>
2020-05-07 12:08:36 -04:00
Nicolas Dufresne
dc4c470d75 h264parse: Properly handle 4 bytes start code
This will stop stripping four bytes start code. This was fixed and broken
again as it was causing the a timestamp shift. We now call
gst_base_parse_set_ts_at_offset() with the offset of the first NAL to ensure
that fixing a moderatly broken input stream won't affect the timestamps. We
also fixes the unit test, removing a comment about the stripping behaviour not
being correct.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1251>
2020-05-07 12:08:36 -04:00
Sebastian Dröge
0dfd05e574 timecodestamper: Unref latency query after usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1249>
2020-05-06 20:05:06 +03:00
Tim-Philipp Müller
270f2f83a1 autoconvert: fix compiler warnings with g_atomic on recent GLib versions
The volatile is not needed here and causes compiler warnings
with newer GLib versions.

gstautoconvert.c: In function ‘gst_auto_convert_dispose’ (and elsewhere):
glib/gatomic.h:108:3: warning: initialization discards ‘volatile’ qualifier from pointer target type [-Wdiscarded-qualifiers]
gstautoconvert.c:224:24: note: in expansion of macro ‘g_atomic_pointer_get’
  224 |     GList *factories = g_atomic_pointer_get (&autoconvert->factories);

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1237>
2020-05-01 14:50:58 +01:00
Ederson de Souza
3ea0f694de clockselect: Add TAI clock support
Via new value for property clock-id, "tai", it's possible to use
GST_CLOCK_TYPE_TAI as pipeline clock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1009>
2020-04-30 19:21:37 +00:00
Olivier Crête
d9512dc132 ristrtpdeext: Expose the largest sequence number received
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:32 +00:00
Olivier Crête
f2e8d4dcf2 ristrtpdeext: Update RTP header extension packet to latest spec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:32 +00:00
Olivier Crête
a602eb7eea ristrtpext: Update RTP header extension packet to latest spec
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:32 +00:00
Olivier Crête
03a60a47b5 rist: Document main profile support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:32 +00:00
Olivier Crête
15f89cd088 ristsrc: Add ristrtpdeext to the pipeline
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:32 +00:00
Olivier Crête
a0de749814 ristsink: Add ristrtpext to sink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:32 +00:00
Olivier Crête
f8bb1e0b85 ristsink: Receive RIST seqnum ext and feed it to rtxsend
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:32 +00:00
Olivier Crête
fc76254dfc ristsink: Pass the session id to the on-app-rtcp callback
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:31 +00:00
Olivier Crête
e873780a1f ristrtxsend: Use externally given seqnum extension when available
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:31 +00:00
Olivier Crête
58e31e116b ristrtxsend: Store sent packets with extended seqnum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1153>
2020-04-30 18:31:31 +00:00