Sebastian Dröge
3525b5c625
fmp4mux: Fix draining in chunk mode if keyframes are too late
...
We would create another chunk that ends after the fragment end, and
would from then on consider the stream always filled for the chunk
because it starts after the current fragment end (i.e. nothing would go
into this fragment).
This is obviously wrong because the actual fragment end moved further
ahead because of the additional chunk.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1286 >
2023-07-19 09:53:07 +03:00
Sebastian Dröge
4f78e7b92e
Update versions to 0.10.10
2023-07-05 15:53:20 +03:00
Sebastian Dröge
698db4b13e
Correctly declare 1.64 as minimum supported Rust version
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1266 >
2023-07-05 12:36:57 +03:00
Sebastian Dröge
ab8525451a
Update versions to 0.10.9
2023-06-19 20:43:14 +03:00
François Laignel
f3ae457cfa
mp4, fmp4: fix byte order for opus extension
...
The "Encapsulation of Opus in ISO Base Media File Format" [1] specifications,
§ 4.3.2 Opus Specific Box, indicates that data must be stored as big-endian.
In `write_dops`, `to_le_bytes` variants were used.
Related to [2].
[1] https://opus-codec.org/docs/opus_in_isobmff.html#4.3.2
[2] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4875
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1248 >
2023-06-19 18:46:31 +03:00
Sebastian Dröge
361152d884
Update versions to 0.10.8
2023-06-07 00:54:32 +03:00
Sebastian Dröge
245990a078
fmp4mux: Don't wait for more data if a stream has no GOP starting before fragment end
...
Simply don't output anything for this stream and only include it in the
future.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1233 >
2023-06-06 22:43:56 +03:00
Sebastian Dröge
c9d2ba306b
fmp4mux: Consider a stream filled if the earliest GOP starts after the current chunk
...
There's not going to be any buffer to output for this stream in the
current chunk.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1233 >
2023-06-06 22:43:50 +03:00
Arun Raghavan
b72a0a2177
Revert "fmp4: Return a running time in get_next_time()"
...
This reverts commit 04bb7b4db0
.
As Sebastian points out, the chunk PTS is already in running time, so
this was wrong from the start.
Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/363
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1233 >
2023-06-06 22:34:30 +03:00
Antonio Kevo
19ffa05bb4
fmp4: Use updated start_pts when checking stream filled
...
After calculating the earliest pts, the fragment_start_pts and
chunk_start_pts in State are updated. However, when checking if the
stream is filled, the previous start_pts (set to None) is used instead.
This means that chunk_filled and fragment_filled will be false the first
time aggregate() is called, assuming timeout is false, all_eos is false,
and the sinkpad is not EOS. This requires aggregate() having to be
called a second time before the first fragment is sent.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1215 >
2023-05-18 17:55:02 +03:00
Sebastian Dröge
573307b32e
Update version to 0.10.7
2023-05-09 20:44:27 +03:00
Sebastian Dröge
48ffd4eb49
Update versions to 0.10.6
2023-04-06 11:24:25 +03:00
Tim-Philipp Müller
198477e63b
git: replace LICENSE file symlinks with copies
...
Git will de-duplicate the contents for us anyway, and
symlinks can cause problems with some versions of git
and also on Windows.
https://github.com/mesonbuild/meson/issues/11646
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4326
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1160 >
2023-04-05 15:12:40 +00:00
Sebastian Dröge
67de191be2
Update versions to 0.10.5
2023-03-19 18:40:49 +02:00
Sebastian Dröge
751a4c7597
Update versions to 0.10.4
2023-03-14 14:01:04 +02:00
Josef Kolář
1015439b01
fmp4mux: fix hls_live example
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1129 >
2023-03-14 13:36:15 +02:00
Arun Raghavan
fb79f30393
fmp4: Return a running time in get_next_time()
...
We were currently returning a value based on the next chunk PTS, but the
expectation in GstAggregator is that we return a running time. This
resulted in spurious wakeups and warnings like:
0:00:01.501685123 1552995 0x55899715c1e0 WARN fmp4mux mux/fmp4/src/fmp4mux/imp.rs:1818:gstfmp4::fmp4mux:👿 :FMP4Mux::drain_buffers:<fmp4mux0:sink_1> Don't have a complete GOP for the first stream on timeout in a live pipeline
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1129 >
2023-03-14 13:36:15 +02:00
Sebastian Dröge
20b18c23e6
Update versions to 0.10.3
2023-03-02 13:27:22 +02:00
Sebastian Dröge
f22b3420b6
Update versions to 0.10.2
2023-02-23 10:07:43 +02:00
Seungha Yang
3c4d22bc5c
mp4mux: Ignore framerate update
...
like mp4mux in -good does already
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1097 >
2023-02-21 16:16:31 +02:00
Seungha Yang
56a25af929
fmp4mux: Ignore framerate update
...
like mp4mux in -good does already
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1097 >
2023-02-21 16:16:25 +02:00
Sebastian Dröge
73a5703eeb
Update versions to 0.10.1
2023-02-13 11:52:37 +02:00
Sebastian Dröge
f3c1a91fb9
Add versions to local dependencies
2023-02-10 00:36:22 +02:00
Sebastian Dröge
6df679d69f
Update to gtk-rs-core 0.17, gtk4-rs 0.6 and gstreamer-rs 0.20 branches
2023-02-10 00:33:25 +02:00
Sebastian Dröge
85bf8d6c63
Update versions to 0.10.0
2023-02-10 00:26:24 +02:00
Sebastian Dröge
4d9b6c5472
fmp4mux: Pass one more buffer in test_buffer_multi_stream_short_gops test
...
This works around non-determinism in aggregator where depending on
timing it can happen that it consumes all buffers from both pads or
waits for another buffer on one pad while the other one already has one.
The effect in this test was that it sometimes timed out. By providing
one more buffer it is guaranteed now that at this point the muxer is
beyond the end of the first fragment.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1081 >
2023-02-09 20:36:44 +02:00
Sebastian Dröge
5965ff4364
fmp4mux: Accept more data on already filled streams if the remaining streams need more data for finishing a GOP
...
In other words, continue queueing buffers in sync from all streams until
all of them are ready for draining instead of stopping to queue buffers
on every stream that is already filled individually.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/310
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1081 >
2023-02-09 20:36:42 +02:00
Sebastian Dröge
3a408c0146
fmp4mux: Handle GOPs ending after the desired fragment end correctly
...
Either create further chunks if enough data is queued or simply start
the new fragment at a later time if the keyframe is later.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1077 >
2023-02-06 19:20:34 +02:00
Sebastian Dröge
5627bd8d7d
mp4: Add support for AV1
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1075 >
2023-02-04 13:48:37 +00:00
Sebastian Dröge
4c3ae6f8ce
fmp4: Add support for AV1
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1075 >
2023-02-04 13:48:37 +00:00
Sebastian Dröge
cef6fef079
fmp4: Add support for VP8
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1075 >
2023-02-04 13:48:37 +00:00
Sebastian Dröge
02ac4b3b04
mp4: Add support for VP8
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1075 >
2023-02-04 13:48:37 +00:00
Sebastian Dröge
ecb26a0b16
fmp4mux: Fix a couple of assertions by handling these cases cleaner
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1071 >
2023-02-01 14:57:00 +02:00
Sebastian Dröge
1998ecab45
fmp4mux: Refactor and clean up code
...
Split many longer functions into multiple functions and simplify various
parts. Overall this is functionally still the same as before.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1068 >
2023-01-30 14:41:33 +00:00
Sebastian Dröge
2a3d962dc5
fmp4mux: Add support for sub-fragments / chunking
...
Allow outputting sub-fragments (chunks in CMAF terms) that are shorter
than the fragment duration and don't usually start on a keyframe. By
this the buffering requirements of the element is reduced to one chunk
duration, as is the latency.
This is used for formats like low-latency / LL-HLS and DASH.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1059 >
2023-01-27 19:28:27 +00:00
Guillaume Desmottes
abe4efc4a2
fmp4mux: add 'offset-to-zero' property
...
Add it only to 'isofmp4mux', the onvif variant already does this and
CMAF and DASH are always single-stream so you rely on inter-container
synchronization via the running-time.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1063 >
2023-01-25 12:29:30 +00:00
Sebastian Dröge
3b4c48d9f5
Fix various new clippy warnings
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1062 >
2023-01-25 10:31:19 +02:00
Sebastian Dröge
ee8249eec7
fmp4mux: Don't write the first sample flags into any trun but the first
...
The flags are based on the first sample of this fragment so writing it
into any trun but the first is not very useful.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1060 >
2023-01-24 19:54:12 +02:00
Sebastian Dröge
1ceaea844a
fmp4mux: Fix decision whether per-sample flags are needed in the trun
...
Previously it would never use per-sample flags if any later sample
needed different flags than the first two.
Also comment the code a bit better.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1060 >
2023-01-24 19:54:11 +02:00
Sebastian Dröge
458b2386ed
Update for glib API changes
2023-01-21 18:13:48 +02:00
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
e9bbf804ba
fmp4mux: Remove obsolete comment
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1037 >
2023-01-06 14:52:56 +02:00
Sebastian Dröge
af9d9c0a5c
fmp4: Fix compilation after glib::List
API changes
2023-01-02 19:22:51 +02:00
Johan Bjäreholt
71c268da14
fmp4mux: Only push fragment_offset if write_mfra is true
...
This is done so that the fragment_offset vector does not infinitely
build up when write_mfra is disabled.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1023 >
2022-12-22 10:31:27 +01:00
Sebastian Dröge
13b6f8fad4
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/1016 >
2022-12-16 17:43: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