Skip to content

Add basic AVIF parsing support #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Mar 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "mp4parse/av1-avif"]
path = mp4parse/av1-avif
url = https://github.com/AOMediaCodec/av1-avif.git
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ env:

script:
- cargo test --all --verbose $RELEASE
# We cannot run `cargo test` with the mp4parse_infallible feature enabled
# (see comment where the feature is defined in mp4parse_capi/Cargo.toml),
# but we can at least check for changes behind features that would break the
# build. Also note that we can't run `cargo check` before `cargo test` or
# else it breaks `build_ffi_test` for complicated reasons.
# See https://github.com/mozilla/mp4parse-rust/issues/197
- cargo check --all --verbose $RELEASE --tests --all-features
- cargo doc --package mp4parse_capi
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ overflow-checks = true

[profile.bench]
overflow-checks = true

# Uncomment below to test local changes to mp4parse_fallible crate
# [patch.crates-io]
# mp4parse_fallible = { path = "../mp4parse_fallible" }
10 changes: 4 additions & 6 deletions mp4parse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ authors = [
"Ralph Giles <[email protected]>",
"Matthew Gregan <[email protected]>",
"Alfredo Yang <[email protected]>",
"Jon Bauman <[email protected]>",
]

description = "Parser for ISO base media file format (mp4)"
Expand All @@ -24,16 +25,13 @@ travis-ci = { repository = "https://github.com/mozilla/mp4parse-rust" }

[dependencies]
byteorder = "1.2.1"
afl = { version = "0.3", optional = true }
abort_on_panic = { version = "1.0.0", optional = true }
bitreader = { version = "0.3.0" }
bitreader = { version = "0.3.2" }
num-traits = "0.2.0"
mp4parse_fallible = { version = "0.0.1", optional = true }
mp4parse_fallible = { version = "0.0.3", optional = true }
log = "0.4"
static_assertions = "1.1.0"

[dev-dependencies]
test-assembler = "0.1.2"

[features]
fuzz = ["afl", "abort_on_panic"]
env_logger = "0.7.1"
1 change: 1 addition & 0 deletions mp4parse/av1-avif
Submodule av1-avif added at 560a97
8 changes: 6 additions & 2 deletions mp4parse/src/boxes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ impl fmt::Display for FourCC {

box_database!(
FileTypeBox 0x6674_7970, // "ftyp"
MediaDataBox 0x6d64_6174, // "mdat"
PrimaryItemBox 0x7069_746d, // "pitm"
ItemInfoBox 0x6969_6e66, // "iinf"
ItemInfoEntry 0x696e_6665, // "infe"
ItemLocationBox 0x696c_6f63, // "iloc"
MovieBox 0x6d6f_6f76, // "moov"
MovieHeaderBox 0x6d76_6864, // "mvhd"
TrackBox 0x7472_616b, // "trak"
Expand Down Expand Up @@ -135,7 +140,7 @@ box_database!(
ProtectionSystemSpecificHeaderBox 0x7073_7368, // "pssh"
SchemeInformationBox 0x7363_6869, // "schi"
TrackEncryptionBox 0x7465_6e63, // "tenc"
ProtectionSchemeInformationBox 0x7369_6e66, // "sinf"
ProtectionSchemeInfoBox 0x7369_6e66, // "sinf"
OriginalFormatBox 0x6672_6d61, // "frma"
SchemeTypeBox 0x7363_686d, // "schm"
MP3AudioSampleEntry 0x2e6d_7033, // ".mp3" - from F4V.
Expand All @@ -149,7 +154,6 @@ box_database!(
MetadataItemListEntry 0x696c_7374, // "ilst"
MetadataItemDataEntry 0x6461_7461, // "data"
MetadataItemNameBox 0x6e61_6d65, // "name"
MetadataItemInformationBox 0x6974_6966, // "itif"
UserdataBox 0x7564_7461, // "udta"
AlbumEntry 0xa961_6c62, // "©alb"
ArtistEntry 0xa941_5254, // "©ART"
Expand Down
Loading