Commit graph

7849 commits

Author SHA1 Message Date
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