Commit graph

18 commits

Author SHA1 Message Date
Sebastian Dröge
3044b0992f Revert "splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context"
This reverts commit f29c19be58. If this is
called for the reference context then we would run into an infinite
loop, which is not really better than an assertion.

By fixing up DTS to never be ahead of the PTS in the previous commit
this situation should be impossible to hit now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4498>
2023-04-28 11:00:19 +00:00
Sebastian Dröge
de907c225b splitmuxsink: Catch invalid DTS to avoid running into problems later
DTS > PTS makes no sense, so we clamp DTS to the PTS. Also if there's a
PTS but no DTS, then assume that PTS=DTS to make sure we're not working
with a much older DTS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4498>
2023-04-28 11:00:19 +00:00
Itamar Marom
b8730bc98e splitmuxsink: Fix docs support version
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4138>
2023-03-09 15:08:19 +02:00
Tim-Philipp Müller
56d3beed0b multifile: drop use of GSlice
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3695>
2023-01-24 15:25:06 +00:00
Vivia Nikolaidou
f29c19be58 splitmuxsink: Avoid assertion when WAITING_GOP_COLLECT on reference context
I have seen a backtrace out in the wild where this happened. Maybe after
receiving EOS and stream-start on the reference context.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3005>
2022-11-18 15:52:03 +00:00
Jan Schmidt
ab459f0528 splitmuxsink: Fix memory leak
Fix a leak of the buffer info struct when reaching
EOS without data on the reference input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2751>
2022-07-12 11:22:33 +00:00
Seungha Yang
b233df3537 splitmuxsink: Don't crash on EOS without buffer
Fix a case where upstream pushed EOS without buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2174>
2022-07-05 11:33:35 +00:00
Jan Alexander Steffens (heftig)
718d31fe63 splitmuxsink: When flushing, exit handle_mq_input quickly
If we just break the loop, we might run into the `gop != NULL` assert
that follows it. Rather, exit immediately with flushing flow.

Also use this flushing mechanism when we release a pad. This avoids
having an extra flag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1030>
2022-05-17 09:24:10 +00:00
Jan Alexander Steffens (heftig)
fd27ee1537 splitmuxsink: Avoid deadlock on release, harder
Unlock after broadcasting and wait for the pad to be free before
relocking the muxer, giving the input probe a chance to react to our
broadcast.

Improves the fix from
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/838.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1030>
2022-05-17 09:24:10 +00:00
Sebastian Dröge
241a26631d splitmuxsink: Warn when calculating the next fragment time in timecode mode fails
But only if timecode mode is enabled as it will fail all the time
otherwise.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1557>
2022-01-25 12:08:20 +00:00
Sebastian Dröge
2d4491e195 splitmuxsink: Don't assert on the input side if no GOP is available when shutting down
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1119>
2021-10-12 19:34:16 +00:00
Sebastian Dröge
4316be6571 splitmuxsink: Keep track of the pending input GOPs in a queue
This cleans up input GOP handling and makes it possible to handle more
than 2 pending GOPs, which could happen before if keyframes are arriving
with too short of a distance between them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge
ae8ceb801c splitmuxsink: Handle frame reordering due to B frames better
Instead of assuming that the PTS of a keyframe is the lowest PTS of a
GOP, wait until the DTS has passed this PTS and take the minimum PTS up
to that point. That way the minimum PTS of a GOP can be determined, at
least for closed GOP streams. Open GOP streams still can't be handled
properly.

By knowing the minimum PTS of each GOP, keyframes can be requested at
the correct time relative to the GOP (and thus fragment) start and
fragment overflow calculations can calculate the correct durations of
the GOPs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge
f83ed50c20 splitmuxsink: Reset timecodes when resetting the sink
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge
ed6823ad67 splitmuxsink: Use GST_CLOCK_STIME_NONE instead of 0 to initialize max out running time
Otherwise streams with only DTS would misbehave while it is negative.

For outputting everything immediately at EOS, use G_MAXINT64 instead
which is bigger-or-equal to any other running time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge
eed843eea0 splitmuxsink: Only update max in/out running time if it's actually bigger
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Sebastian Dröge
68683d15c4 splitmuxsink: Only count keyframes for the reference context, consistently
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1005>
2021-10-05 12:35:19 +00:00
Thibault Saunier
5ff769d731 Move files from gst-plugins-good into the "subprojects/gst-plugins-good/" subdir 2021-09-24 16:13:50 -03:00
Renamed from gst/multifile/gstsplitmuxsink.c (Browse further)