Commit graph

14 commits

Author SHA1 Message Date
Sebastian Dröge 6132788b02 Update for caps/structure-related string API changes
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1048>
2023-01-15 22:58:44 +02:00
Sebastian Dröge e344585d99 mp4mux: Adjust durations and possibly stream start time on encountering a gap buffer
If there was a previous sample in this stream then its duration needs to
be extended by the gap position, and if there was none then the start
time of the whole stream has to be shifted by the duration.

Not doing so causes timestamps to be offset wrongly by the duration of
the gap.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1015>
2022-12-16 13:24:21 +02:00
Sebastian Dröge 9307acf7fa mp4mux: Fix edit list shift for streams with initial DTS smaller earliest PTS but initial DTS positive
This would be a stream where the initial DTS is negative if the initial
PTS was zero, but it is offset so the initial DTS became positive now.
The edit list shift has to happen exactly the same way though.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1014>
2022-12-15 18:52:47 +02:00
Sebastian Dröge ed429d570e mp4mux: Don't write gap edit lists if their duration would be zero
The track might start later than the earliest track by less than one
timescale units, in which case writing an empty gap edit list would be
useless and confusing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1014>
2022-12-15 18:45:19 +02:00
Sebastian Dröge f8024f072f mp4mux: Don't write empty chunks at the end if the last buffer of a stream started a new chunk and happened to be a from a gap event
Empty chunks are not valid in MP4.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1014>
2022-12-15 17:44:03 +02:00
Sebastian Dröge 3f904553ea Fix various new clippy warnings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1011>
2022-12-13 11:43:16 +02:00
Jordan Petridis a84eeeb240 mux/{mp4, fmp4}: Hard depend on feature v1_18
Else --no-default-features was failing to compile.

v1_18 is needed to for the aggregator code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/588>
2022-11-29 21:06:12 +02:00
Sebastian Dröge ae4b49c668 mp4mux: For video with N/1001 framerates use N as timescale
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3049

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/981>
2022-11-18 16:10:10 +02:00
Sebastian Dröge 3003987c3a mp4mux: Make use of i64::TryFrom<gst::Signed<u64>> impl
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/979>
2022-11-18 12:26:18 +02:00
Sebastian Dröge 9903d536b5 mp4mux: Factor out running time to UTC time calculation into a function
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/979>
2022-11-18 12:21:25 +02:00
Sebastian Dröge aa7fd34097 mp4mux: Remove unnecessary error case of negative PTS when doing the ONVIF UTC time calculations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/979>
2022-11-18 12:21:25 +02:00
Sebastian Dröge 4d310434ab mp4mux: Skip gap buffers instead of writing empty samples
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/974>
2022-11-10 12:59:53 +02:00
Sebastian Dröge 2b4fd40d62 mp4: Add ONVIF non-fragmented MP4 muxer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/974>
2022-11-10 12:59:53 +02:00
Sebastian Dröge c2f403f998 gst-plugin-mp4: Add new MP4 plugin with a non-fragmented MP4 muxer 2022-11-08 19:08:47 +02:00