Commit graph

7629 commits

Author SHA1 Message Date
Vivia Nikolaidou
3df3c3c5f6 tsparse: Add split-on-rai property
If set, buffers sized smaller than the alignment will be sent so that
RAI packets are at the start of a new buffer.

Fixes: #1190
2020-02-11 10:56:54 +00:00
Thiago Santos
0a128155b3 sdpdemux: check if connections are available on media entry before get
Otherwise we trigger an assert.
2020-02-02 22:15:40 +00:00
Vivia Nikolaidou
8d522bf3e6 mpegtsparse: Moved dispose function into finalize
dispose can be called several times and would double-free the flow
combiner in that case.
2020-01-29 20:39:44 +00:00
Vivia Nikolaidou
0d2e908523 mpegtsparse: Added alignment property
alignment works like in mpegtsmux, joining several MpegTS packets into
one buffer. Default value of 0 joins as many as possible for each
incoming buffer, to optimise CPU usage.
2020-01-29 20:39:44 +00:00
Vivia Nikolaidou
2f946274d5 mpegtsparse: Set delta unit flag on non-random-access buffers
If they don't have the random access flag set, they cannot be decoded
independently.
2020-01-29 20:39:44 +00:00
Vivia Nikolaidou
34af8ed66a mpegtsparse: Packetize output on default srcpad
Align buffer boundaries with mpeg-ts packets, instead of keeping
whatever packetization we have from the source (network, file reading).
2020-01-29 20:39:44 +00:00
Vivia Nikolaidou
e44cbfb1da mpegtsparse: Factor common code into mpegts_packet_to_buffer
The same code was used twice for turning an MpegTSPacketizerPacket into
a GstBuffer.
2020-01-29 20:39:44 +00:00
Vivia Nikolaidou
68f69d419b mpegtspacketizer: Fix typo in flag name 2020-01-29 20:39:44 +00:00
Sebastian Dröge
287f9b18b0 mpegdemux: Update the last_ts correctly if we have no DTS
If we have no DTS but a PTS then this means both are the same, and we
should update the last_ts with the PTS. Only if both are unknown then we
don't know the current position and should not update it at all.

Previously we would always update the last_ts to GST_CLOCK_TIME_NONE if
the DTS is unknown, which caused the position to jump around and to
cause spurious gap events to be sent.
2020-01-21 23:50:52 +00:00
Sebastian Dröge
5f95a9ec61 mpegpsdemux: Send gap events for late streams whenever updating the SCR
Instead of doing it on each packet and doing it based on the distance to
the previous SCR instead of based on the DTS.

Previously we would send gap events for audio all the time if the SCR
distance was 400ms because the threshold for audio is 300ms and by only
ever updating the position when the SCR updates we would always be 100ms
above the threshold and send needless gap events.

This fixes audio glitches on various files caused by gap events.
2020-01-21 10:08:53 +00:00
Jan Schmidt
e2bdc0c48d yadif: Re-renable MMX asm on x86_64 with meson
The meson build doesn't automatically set HAVE_CPU_* defines
like autotools did, so the yadif plugin was being built without
the MMX assembler support
2020-01-19 08:50:19 +00:00
Jan Schmidt
1986d4f942 yadif: Only build inline Asm with gcc/clang 2020-01-19 08:50:19 +00:00
Tim-Philipp Müller
415c798b73 mxfdemux: add support for Apple ProRes 2020-01-15 11:51:20 +00:00
Sebastian Dröge
f72aaed9c7 timecodestamper: Add property to set the extra latency to introduce for waiting for LTC timecodes
Default to 150ms instead of 8 frames, which seems to work in the
majority of cases.
2020-01-13 18:17:23 +00:00
Sebastian Dröge
fdca7ebb4c timecodestamper: Add some more debug output 2020-01-13 18:17:23 +00:00
Josep Torra
bebf20c906 h264parse: do not push wrong PTS with some raw files
Some raw h264 encoded files trigger the assignment of wrong PTS to buffers
when some SEI data is provided. This change prevents it to happen.

Also ensure this behavior is being tested.
2020-01-10 15:03:38 +00:00
Sebastian Dröge
a4c925f694 timecodestamper: Skip over invalid LTC timecodes immediately 2020-01-10 15:59:27 +02:00
Sebastian Dröge
a1443518e0 timecodestamper: Clean up old LTC timecodes on LTC discontinuity
We might have some old timecodes that are in the future now and have to
drop those to make sure that our queue is correctly ordered and we don't
have multiple timecodes for the same running time.
2020-01-10 15:59:26 +02:00
Sebastian Dröge
bbdb392abe timecodestamper: Fix waiting for the first video frame in case of live video input 2020-01-10 15:59:25 +02:00
Sebastian Dröge
d7bb5b8a16 timecodestamper: Fix up handling/queueing of LTC timecodes
Directly read them out of the decoder as soon as we passed audio and
then store them in a queue that we handle internally together with their
timestamps. This cleans up memory management and gives us proper control
over the queue instead of guessing how the queue inside the LTC decoder
actually works and when it overflows.
2020-01-10 15:59:24 +02:00
Sebastian Dröge
0a53f6560a timecodestamper: Only allow requesting LTC audio pad in NULL/READY states
And don't introduce any latency at all if not LTC audio pad was
requested.
2020-01-10 15:59:21 +02:00
Sebastian Dröge
0a499242e9 timecodestamper: In live mode wait correctly for the latency to pass
And also introduce 6 instead of 2 frames of latency compared to the LTC
audio input as that seems to be an upper bound for how much the LTC
library is lagging behind.
2020-01-10 15:58:29 +02:00
Sebastian Dröge
31d7862051 timecodestamper: Use the internal LTC timecode tracker instead of the last one we retrieved
Otherwise we don't interpolate between LTC timecodes but only ever put
an LTC timecode on buffers once we actually received one.
2020-01-10 15:58:06 +02:00
Stéphane Cerveau
4b8c47ee37 h26xparse: Handle state change on IDR first slice
As the H265/H264 bitstream can support multiple slices,
mastering_display_info_state and content_light_level_state
should be changed only on first slice segment.

Fix #1152
2020-01-07 08:55:28 +00:00
Stéphane Cerveau
d414e90eff h265parse: use same algo for MDCV and CLL SEI management 2020-01-07 08:55:28 +00:00
Stéphane Cerveau
b481edd745 h264parser: add MDCV and CLL SEI message parsing
Allow to parse SEI message for:
- mastering display colour volume
- Light level infomation

Set to caps if necessary.

Fix #958
2020-01-07 08:55:28 +00:00
Thibault Saunier
1e5c117c7c fakevideosink: Use our pad template to create pad 2020-01-06 20:35:00 +00:00
Mark Nauwelaerts
42b60627fa mpegtsdemux: resurrect actual and efficient seeking of all kinds
... by seeking to target offset determined by new seek segment,
rather than that of the previous segment.  The latter would typically
seek back to start for a non-accurate seek, and lead to a lot
of skipping in case of an accurate seek.
2019-12-31 10:44:35 +01:00
Stéphane Cerveau
add7878e14 bad: use of g_value_dup_string
Use helper method to get string from GValue.
2019-12-30 14:13:03 +00:00
Sebastian Dröge
0dc783d719 timecodestamper: Refactor LTC audio waiting and properly handle live inputs
If one of the inputs is live, add a latency of 2 frames to the video
stream and wait on the clock for that much time to pass to allow for the
LTC audio to be ahead.

In case of live LTC, don't do any waiting but only ensure that we don't
overflow the LTC queue.

Also in non-live LTC audio mode, flush too old items from the LTC queue
if the video is actually ahead instead of potentially waiting forever.
This could've happened if there was a bigger gap in the video stream.
2019-12-30 09:36:23 +00:00
Yeongjin Jeong
3f2240498b h265parser: Add simple GstH265Profile/string public utilites
It makes more simplifies the conversion between GstH265Profile and string.
2019-12-20 15:43:55 +00:00
Nicolas Dufresne
416728f213 autoconvert: Fix lock-less exchange or free condition
Before this change, we would free the list we just have saved.

Fixes #1158
2019-12-19 22:35:18 +00:00
Stéphane Cerveau
c6eb17be6e h264parse: Align GST_H264_PROFILE_HIGH_422 to H264 standards
According to H264 ITU standards from 06/19, GST_H264_PROFILE_HIGH_422
(profile_idc = 122) with constraint_set1_flag = 0 and
constraint_set3_flag = 0 can be mapped to high-4:2:2 or high-4:4:4.
GST_H264_PROFILE_HIGH_422 with constraint_set1_flag = 0 and
constraint_set3_flag = 1 can be mapped to high-4:2:2, high-4:4:4,
high-4:2:2-intra or high-4:4:4-intra.
2019-12-18 03:03:40 +00:00
Olivier Crête
1f766a7145 Revert "videoparseutils: support two new EIA 608 closed caption formats"
This reverts commit f5c1c90122.
2019-12-17 16:44:10 -05:00
Aaron Boxer
f5c1c90122 videoparseutils: support two new EIA 608 closed caption formats 2019-12-17 18:26:35 +00:00
Stéphane Cerveau
6bc0e9527e remove various useless linefeed in logs 2019-12-11 10:51:29 +01:00
Alicia Boya García
f816903e65 gsttestsrcbin: Avoid not-linked errors when switching tracks
The previous implementation had a very high reproducibility race where
if after a track switch, the ex-active track pad completed a buffer
chain (now returning not-linked) the flow combiner had all their pads in
non-linked state, propagating it as an error and stopping the pipeline.

By resetting the flow combiner in response to RECONFIGURE events that
race is made impossible.
2019-12-09 18:12:29 +01:00
Sebastian Dröge
812d593c4e interlace: Store unsigned integers in unsigned integer types
And add some assertions to guard against overflows and out of bounds
reads.
2019-12-03 21:12:26 +00:00
Sebastian Dröge
c67146b27a interlace: Increment phase_index before checking if we're at the end of the phase
Incrementing it afterwards will always have to phase_index >= 1 and we
will never be at the beginning (0) of the phase again, and thus never
reset timestamp tracking accordingly.

This was broken in bea13ef43b in 2010, and
causes interlace to run into integer overflows after 2^31 frames or
about 5 hours at 29.97fps. Due to usage of wrong types for the integers
this then causes negative numbers to be used in calculations and all
calculations spectacularly fail, leading to all following buffers to
have the timestamp of the first buffer minus one nanosecond.
2019-12-03 21:12:26 +00:00
Jan Alexander Steffens (heftig)
fd6c51b2e7
rtmp2sink: Only apply @setDataFrame to onMetaData messages
Only the metadata needs to be made "sticky". Custom data messages should
be passed on unmodified.

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/878
2019-12-03 14:11:47 +01:00
Jan Alexander Steffens (heftig)
042e439829
rtmp2: Add gst_rtmp_message_is_metadata
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/878
2019-12-03 14:11:47 +01:00
Jan Alexander Steffens (heftig)
e07a1bb48f
rtmp2: Add gst_rtmp_connection_set_data_frame
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/878
2019-12-03 14:11:47 +01:00
Jan Alexander Steffens (heftig)
8f1ae04ac5
rtmp2: Add single-value AMF0 parsing and serializing
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/878
2019-12-03 14:11:47 +01:00
Jan Alexander Steffens (heftig)
f5b068b26c
rtmp2: Minor changes
- Remove an unneeded initialization to zero from AmfParser
- Add missing initialization to gst_amf_serialize_command_valist
- Add a g_return_if_fail to gst_rtmp_connection_request_window_size

https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/merge_requests/878
2019-12-03 14:11:46 +01:00
Edward Hervey
d8a51c6097 atscmux: Add missing break in switch
CID: 1455515
2019-11-27 15:41:26 +01:00
Aaron Boxer
e3297be433 h264parse: buffer mismatch in map/unmap 2019-11-26 13:07:47 -05:00
Marc Leeman
31861b095a rtpmanagerbad: allow setting multicast-iface
Allowing the UDP elements to bind on an interface is needed in more
complex networks where there are mutiple networks interfaces without
default gateway
2019-11-19 12:39:59 +00:00
Sebastian Dröge
c7393af0bf timecodestamper: Create LTC sink pad with the correct name according to the template
Should be "ltc_sink" and not just "ltc"
2019-11-19 12:21:30 +02:00
Vivia Nikolaidou
851682629e videoparsers: Disable gst_base_parse_set_infer_ts
From the documentation of gst_base_parse_set_infer_ts, it should be
disabled for non-audio data. Currently just disabling for all video
parsers that have reordered data: h264, h265, mpeg, mpeg4, vc1. Was
already disabled in h263.
2019-11-19 10:23:31 +02:00
Kyrylo Polezhaiev
6af38c6ffe tsmux: Fix copying of buffer region 2019-11-18 07:31:33 +00:00