1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-05-20 01:08:06 +00:00
Commit graph

5 commits

Author SHA1 Message Date
Data Retriever 3ecfd0cc9d
Cargo fmt and clippy (#73)
* Run cargo clippy --fix

* Run cargo fmt --all
2022-05-31 20:50:49 -07:00
Nathan Fiedler 56cc260a5c
fix: minimize assertions in non-test code (#56)
Initial effort to reduce or eliminate the use of assertions in the
production code (i.e. not test code). See issue 43 for an example of how
this can cause an application (thread) to panic when reading an unusual
file. Not all of the changes were as simple as returning an Err, since some
functions did not return a Result. Also, the error type used (InvalidData)
is just a catch-all with a message, and in some cases a more refined error
type may be in order.

cargo test passes
2021-07-12 17:28:39 -07:00
ninthakeey eedccec776
Example/mp4sample supports fragmented mp4 (#46)
* feat: mvex box中的mehd box改为可选,支持fmp4的解析

* feat: example/mp4sample supports fragmented mp4

* feat: utilize function sample_count(), extract duplicated codes as a new function

* feat: field data_offset in TrunBox is optional

* feat: remove an ".expect()"

* feat: remove an ".expect()"

* chore: re-style code
2021-01-28 19:52:35 -08:00
Alfred Gutierrez 6ec013b7b9
Fragmented tracks (#31)
* Add trun box.

* Adding Movie Extends Box and subboxes (mvex, mehd, trex).

* Adding more support for parsing fragmented tracks. Add mp4sample example.

* cleanup

* Set default_sample_duration from moov.mvex.trex for getting fragmented samples.

* fix trex box parsing/writing.
2020-09-14 18:05:34 -07:00
Alfred Gutierrez f8f767dc07
Fragmented boxes (#30)
* Add trun box.

* Adding Movie Extends Box and subboxes (mvex, mehd, trex).
2020-09-13 00:25:08 -07:00