Sebastian Dröge
fb745f077b
fmp4mux: Skip gap buffers earlier to consider them for the sample durations and fragment start durations
...
Otherwise dropping the gap buffers would offset the timestamps of
following samples.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1017 >
2022-12-16 18:59:32 +02:00
Sebastian Dröge
1eea2219c6
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/1017 >
2022-12-16 18:52:03 +02:00
Sebastian Dröge
9b2d9ba4f9
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/1017 >
2022-12-16 18:51:57 +02:00
Sebastian Dröge
00615ab478
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/1017 >
2022-12-16 18:51:50 +02:00
Sebastian Dröge
6ceccac1be
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/1017 >
2022-12-16 18:51:30 +02:00
Sebastian Dröge
b4185134d1
Fix various new clippy warnings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1017 >
2022-12-16 18:51:00 +02:00
Jordan Petridis
b8d2d98027
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/1008 >
2022-12-12 13:32:02 +02:00
Sebastian Dröge
a7c75f8066
fmp4mux: Crank clock for the first fragment in more tests
...
Due to how aggregator works, it depends on how buffers are pulled
whether aggregate() is called again or it is waiting for a timeout or EOS:
works:
- pad 1: 4 buffers, pad 2: 4 buffers
- aggregate ready: take all 4/4 buffers
- pad 1: 1 buffers, pad 2: 1 buffer
- aggregate ready: take all 1/1 buffers
waits:
- pad 1: 5 buffers, pad 2: 4 buffers
- aggregate ready: take all 5/4 buffers
- pad 1: 0 buffers, pad 2: 1 buffer
- aggregate not ready: waiting for timeout or EOS
Also don't manually set the clock time as that's unnecessary.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/274
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/999 >
2022-12-05 00:47:51 +00:00
Sebastian Dröge
6a05b7f56a
mp4: Add version to gst-plugin-version-helper dependency
2022-11-28 11:46:29 +02:00
Sebastian Dröge
1f4a035dc0
Update versions to 0.9.2
2022-11-28 11:44:33 +02:00
Sebastian Dröge
649434bd04
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/987 >
2022-11-28 10:47:02 +02:00
Sebastian Dröge
10813ed621
mp4mux: Factor out running time to UTC time calculation into a function
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/987 >
2022-11-28 10:47:02 +02:00
Sebastian Dröge
ea0d5751a2
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/987 >
2022-11-28 10:47:02 +02:00
Sebastian Dröge
c771c86631
mp4mux: Skip gap buffers instead of writing empty samples
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/987 >
2022-11-28 10:47:02 +02:00
Sebastian Dröge
516b561191
mp4: Add ONVIF non-fragmented MP4 muxer
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/987 >
2022-11-28 10:47:02 +02:00
Sebastian Dröge
23e8fea170
mp4: Remove unneeded cast in tests
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/987 >
2022-11-28 10:47:02 +02:00
Sebastian Dröge
81a46ee33d
mp4: Update to url 2
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/987 >
2022-11-28 10:47:02 +02:00
Sebastian Dröge
e7f5e73e3f
gst-plugin-mp4: Add new MP4 plugin with a non-fragmented MP4 muxer
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/987 >
2022-11-28 10:47:02 +02:00
Sebastian Dröge
93ba677b18
fmp4mux: Handle EOS correctly if it happens before a fragment start time was determined
...
Whatever earliest time we have at that point is going to be the start
time.
Also handle the case correctly where all inputs are EOS before any
buffers were received at all.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/270
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/986 >
2022-11-27 20:52:30 +02:00
Sebastian Dröge
9491c77540
fmp4mux: 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/986 >
2022-11-27 20:51:48 +02:00
Sebastian Dröge
6c15bba592
fmp4mux: Re-work buffer dequeueing and calculations of timestamps
...
Especially simplify calculation of ONVIF UTC times. As a side-effect
this reduces the number of times the running times of a buffer are
calculated, and also causes streams to be interleaved correctly in ONVIF
mode if there is a non-constant UTC-to-running-time difference.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/986 >
2022-11-27 20:51:48 +02:00
Sebastian Dröge
e434fd19ca
Update versions to 0.9.1
2022-11-13 20:23:47 +02:00
Sebastian Dröge
43ac186e69
fmp4mux: Make media/trak timescales configurable
...
And refactor a bit of code for easier extensibility.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977 >
2022-11-12 15:52:50 +00:00
Sebastian Dröge
4556657602
fmp4mux: Don't allow VP9 for CMAF
...
This would require setting the correct compatible band for VP9 in CMAF,
which is not implemented yet.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977 >
2022-11-12 15:52:49 +00:00
Sebastian Dröge
cb5a956ee7
fmp4mux: Add initial Opus support
...
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/239
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977 >
2022-11-12 15:52:49 +00:00
Sebastian Dröge
07f3b0f504
Fix various new clippy warnings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977 >
2022-11-12 15:52:49 +00:00
Sebastian Dröge
8dc22d3bf1
fmp4mux: For VP9, write resolution into the tkhd and include a stss box to signal that not all frames are sync samples
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977 >
2022-11-12 15:52:49 +00:00
Sebastian Dröge
2b6d87cf66
fmp4mux: Remove unused uuid dependency
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/977 >
2022-11-12 15:52:49 +00:00
Sebastian Dröge
8e2a6500aa
fmp4mux: Clip negative PTS to zero/last PTS instead of erroring out
...
This can happen at the beginning of a stream if upstream is
rtpjitterbuffer and it has problems figuring out timestamps in the
beginning due to resetting / skew.
2022-10-27 15:35:17 +03:00
Sebastian Dröge
e268577994
fmp4mux: Send force-keyunit events for now if the ideal position has already passed
2022-10-27 15:35:17 +03:00
Sebastian Dröge
f2a6a8d3de
fmp4mux: Add debug log when writing the mfra box
2022-10-27 15:35:17 +03:00
Sebastian Dröge
51ff099221
fmp4mux: Reset timing infos to None if a stream only contained gap events for a whole fragment
2022-10-27 15:35:17 +03:00
Sebastian Dröge
eefa8540ba
fmp4mux: If a stream is longer than the main stream at EOS, simply include all of its buffers in the last fragment nonetheless
2022-10-27 15:35:17 +03:00
Matthew Waters
32d2372e90
fmp4mux: don't require dts for predictive-only formats like vp9
2022-10-27 15:34:52 +03:00
Matthew Waters
a54318fbb4
fmp4: add support for muxing VP9 streams in cmaf, dash and iso fmp4
...
As specified in https://www.webmproject.org/vp9/mp4/
2022-10-27 15:34:32 +03:00
Sebastian Dröge
ba5270d30a
Update to release versions of gtk-rs and gstreamer-rs
2022-10-24 19:28:41 +03:00
Sebastian Dröge
2ff40142db
Update versions to 0.9.0
2022-10-24 18:25:05 +03:00
Sebastian Dröge
9a68f6e221
Move from imp.instance()
to imp.obj()
...
It's doing the same thing and is shorter.
2022-10-23 23:08:46 +03:00
François Laignel
86776be58c
Remove &
for obj
in log macros
...
This is no longer necessary.
See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1137
2022-10-23 21:22:31 +02:00
Sebastian Dröge
f045099fc1
Fix GObject type names, GStreamer debug category names and element factory names
...
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/198
2022-10-23 20:46:08 +03:00
Sebastian Dröge
211cd095d6
Add new mux subdirectory for container formats
...
Contains the (incomplete) flavors FLV demuxer and the fragmented MP4
muxer for now.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/173
2022-10-23 20:25:08 +03:00