Commit graph

7770 commits

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