1
1
mirror of https://github.com/wader/fq.git synced 2024-12-23 05:13:30 +03:00

Merge pull request #514 from wader/mp4-frag-sample-flags

mp4: Add sym and description for traf sample flags
This commit is contained in:
Mattias Wadman 2022-12-09 17:17:57 +01:00 committed by GitHub
commit 1a0ea16363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 48 deletions

View File

@ -224,12 +224,24 @@ func decodeMvhdFieldMatrix(d *decode.D, name string) {
})
}
// ISO 14496-12 8.40.2.3 Sample dependency box semantics
func decodeSampleFlags(d *decode.D) {
d.FieldU4("reserved0")
d.FieldU2("is_leading")
d.FieldU2("sample_depends_on")
d.FieldU2("sample_is_depended_on")
d.FieldU2("sample_has_redundancy")
d.FieldU2("sample_depends_on", scalar.UToScalar{
0: scalar.S{Sym: "unknown"},
1: scalar.S{Sym: "other", Description: "Not I-picture"},
2: scalar.S{Sym: "none", Description: "Is I-picture"},
})
d.FieldU2("sample_is_depended_on", scalar.UToScalar{
0: scalar.S{Sym: "unknown"},
1: scalar.S{Sym: "other", Description: "Not disposable"},
2: scalar.S{Sym: "none", Description: "Is disposabl"},
})
d.FieldU2("sample_has_redundancy", scalar.UToScalar{
0: scalar.S{Sym: "unknown"},
2: scalar.S{Sym: "none", Description: "No redundant coding"},
})
d.FieldU3("sample_padding_value")
d.FieldU1("sample_is_non_sync_sample")
d.FieldU16("sample_degradation_priority")

View File

@ -340,9 +340,9 @@ $ fq -d mp4 dv dash_audio_init.mp4
| | | default_sample_flags{}: 0x32c-0x32f.7 (4)
0x320| 00 | . | reserved0: 0 0x32c-0x32c.3 (0.4)
0x320| 00 | . | is_leading: 0 0x32c.4-0x32c.5 (0.2)
0x320| 00 | . | sample_depends_on: 0 0x32c.6-0x32c.7 (0.2)
0x320| 00 | . | sample_is_depended_on: 0 0x32d-0x32d.1 (0.2)
0x320| 00 | . | sample_has_redundancy: 0 0x32d.2-0x32d.3 (0.2)
0x320| 00 | . | sample_depends_on: "unknown" (0) 0x32c.6-0x32c.7 (0.2)
0x320| 00 | . | sample_is_depended_on: "unknown" (0) 0x32d-0x32d.1 (0.2)
0x320| 00 | . | sample_has_redundancy: "unknown" (0) 0x32d.2-0x32d.3 (0.2)
0x320| 00 | . | sample_padding_value: 0 0x32d.4-0x32d.6 (0.3)
0x320| 00 | . | sample_is_non_sync_sample: 0 0x32d.7-0x32d.7 (0.1)
0x320| 00 00| ..| sample_degradation_priority: 0 0x32e-0x32f.7 (2)
@ -416,9 +416,9 @@ $ fq -d mp4 dv dash_audio_1.m4s
| | | default_sample_flags{}: 0x80-0x83.7 (4)
0x080|00 |. | reserved0: 0 0x80-0x80.3 (0.4)
0x080|00 |. | is_leading: 0 0x80.4-0x80.5 (0.2)
0x080|00 |. | sample_depends_on: 0 0x80.6-0x80.7 (0.2)
0x080| 00 | . | sample_is_depended_on: 0 0x81-0x81.1 (0.2)
0x080| 00 | . | sample_has_redundancy: 0 0x81.2-0x81.3 (0.2)
0x080|00 |. | sample_depends_on: "unknown" (0) 0x80.6-0x80.7 (0.2)
0x080| 00 | . | sample_is_depended_on: "unknown" (0) 0x81-0x81.1 (0.2)
0x080| 00 | . | sample_has_redundancy: "unknown" (0) 0x81.2-0x81.3 (0.2)
0x080| 00 | . | sample_padding_value: 0 0x81.4-0x81.6 (0.3)
0x080| 00 | . | sample_is_non_sync_sample: 0 0x81.7-0x81.7 (0.1)
0x080| 00 00 | .. | sample_degradation_priority: 0 0x82-0x83.7 (2)
@ -887,9 +887,9 @@ $ fq -d mp4 dv dash_video_init.mp4
| | | default_sample_flags{}: 0x32f-0x332.7 (4)
0x0320| 00| .| reserved0: 0 0x32f-0x32f.3 (0.4)
0x0320| 00| .| is_leading: 0 0x32f.4-0x32f.5 (0.2)
0x0320| 00| .| sample_depends_on: 0 0x32f.6-0x32f.7 (0.2)
0x0330|00 |. | sample_is_depended_on: 0 0x330-0x330.1 (0.2)
0x0330|00 |. | sample_has_redundancy: 0 0x330.2-0x330.3 (0.2)
0x0320| 00| .| sample_depends_on: "unknown" (0) 0x32f.6-0x32f.7 (0.2)
0x0330|00 |. | sample_is_depended_on: "unknown" (0) 0x330-0x330.1 (0.2)
0x0330|00 |. | sample_has_redundancy: "unknown" (0) 0x330.2-0x330.3 (0.2)
0x0330|00 |. | sample_padding_value: 0 0x330.4-0x330.6 (0.3)
0x0330|00 |. | sample_is_non_sync_sample: 0 0x330.7-0x330.7 (0.1)
0x0330| 00 00| | ..| | sample_degradation_priority: 0 0x331-0x332.7 (2)
@ -965,9 +965,9 @@ $ fq -d mp4 dv dash_video_1.m4s
| | | default_sample_flags{}: 0x88-0x8b.7 (4)
0x0080| 00 | . | reserved0: 0 0x88-0x88.3 (0.4)
0x0080| 00 | . | is_leading: 0 0x88.4-0x88.5 (0.2)
0x0080| 00 | . | sample_depends_on: 0 0x88.6-0x88.7 (0.2)
0x0080| 00 | . | sample_is_depended_on: 0 0x89-0x89.1 (0.2)
0x0080| 00 | . | sample_has_redundancy: 0 0x89.2-0x89.3 (0.2)
0x0080| 00 | . | sample_depends_on: "unknown" (0) 0x88.6-0x88.7 (0.2)
0x0080| 00 | . | sample_is_depended_on: "unknown" (0) 0x89-0x89.1 (0.2)
0x0080| 00 | . | sample_has_redundancy: "unknown" (0) 0x89.2-0x89.3 (0.2)
0x0080| 00 | . | sample_padding_value: 0 0x89.4-0x89.6 (0.3)
0x0080| 00 | . | sample_is_non_sync_sample: 0 0x89.7-0x89.7 (0.1)
0x0080| 00 00 | .. | sample_degradation_priority: 0 0x8a-0x8b.7 (2)

View File

@ -519,9 +519,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | default_sample_flags{}: 0x467-0x46a.7 (4)
0x00460| 00 | . | reserved0: 0 0x467-0x467.3 (0.4)
0x00460| 00 | . | is_leading: 0 0x467.4-0x467.5 (0.2)
0x00460| 00 | . | sample_depends_on: 0 0x467.6-0x467.7 (0.2)
0x00460| 00 | . | sample_is_depended_on: 0 0x468-0x468.1 (0.2)
0x00460| 00 | . | sample_has_redundancy: 0 0x468.2-0x468.3 (0.2)
0x00460| 00 | . | sample_depends_on: "unknown" (0) 0x467.6-0x467.7 (0.2)
0x00460| 00 | . | sample_is_depended_on: "unknown" (0) 0x468-0x468.1 (0.2)
0x00460| 00 | . | sample_has_redundancy: "unknown" (0) 0x468.2-0x468.3 (0.2)
0x00460| 00 | . | sample_padding_value: 0 0x468.4-0x468.6 (0.3)
0x00460| 00 | . | sample_is_non_sync_sample: 0 0x468.7-0x468.7 (0.1)
0x00460| 00 00 | .. | sample_degradation_priority: 0 0x469-0x46a.7 (2)
@ -539,9 +539,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | default_sample_flags{}: 0x487-0x48a.7 (4)
0x00480| 00 | . | reserved0: 0 0x487-0x487.3 (0.4)
0x00480| 00 | . | is_leading: 0 0x487.4-0x487.5 (0.2)
0x00480| 00 | . | sample_depends_on: 0 0x487.6-0x487.7 (0.2)
0x00480| 00 | . | sample_is_depended_on: 0 0x488-0x488.1 (0.2)
0x00480| 00 | . | sample_has_redundancy: 0 0x488.2-0x488.3 (0.2)
0x00480| 00 | . | sample_depends_on: "unknown" (0) 0x487.6-0x487.7 (0.2)
0x00480| 00 | . | sample_is_depended_on: "unknown" (0) 0x488-0x488.1 (0.2)
0x00480| 00 | . | sample_has_redundancy: "unknown" (0) 0x488.2-0x488.3 (0.2)
0x00480| 00 | . | sample_padding_value: 0 0x488.4-0x488.6 (0.3)
0x00480| 00 | . | sample_is_non_sync_sample: 0 0x488.7-0x488.7 (0.1)
0x00480| 00 00 | .. | sample_degradation_priority: 0 0x489-0x48a.7 (2)
@ -698,9 +698,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | default_sample_flags{}: 0x5c5-0x5c8.7 (4)
0x005c0| 01 | . | reserved0: 0 0x5c5-0x5c5.3 (0.4)
0x005c0| 01 | . | is_leading: 0 0x5c5.4-0x5c5.5 (0.2)
0x005c0| 01 | . | sample_depends_on: 1 0x5c5.6-0x5c5.7 (0.2)
0x005c0| 01 | . | sample_is_depended_on: 0 0x5c6-0x5c6.1 (0.2)
0x005c0| 01 | . | sample_has_redundancy: 0 0x5c6.2-0x5c6.3 (0.2)
0x005c0| 01 | . | sample_depends_on: "other" (1) (Not I-picture) 0x5c5.6-0x5c5.7 (0.2)
0x005c0| 01 | . | sample_is_depended_on: "unknown" (0) 0x5c6-0x5c6.1 (0.2)
0x005c0| 01 | . | sample_has_redundancy: "unknown" (0) 0x5c6.2-0x5c6.3 (0.2)
0x005c0| 01 | . | sample_padding_value: 0 0x5c6.4-0x5c6.6 (0.3)
0x005c0| 01 | . | sample_is_non_sync_sample: 1 0x5c6.7-0x5c6.7 (0.1)
0x005c0| 00 00 | .. | sample_degradation_priority: 0 0x5c7-0x5c8.7 (2)
@ -732,9 +732,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | first_sample_flags{}: 0x5f1-0x5f4.7 (4)
0x005f0| 02 | . | reserved0: 0 0x5f1-0x5f1.3 (0.4)
0x005f0| 02 | . | is_leading: 0 0x5f1.4-0x5f1.5 (0.2)
0x005f0| 02 | . | sample_depends_on: 2 0x5f1.6-0x5f1.7 (0.2)
0x005f0| 00 | . | sample_is_depended_on: 0 0x5f2-0x5f2.1 (0.2)
0x005f0| 00 | . | sample_has_redundancy: 0 0x5f2.2-0x5f2.3 (0.2)
0x005f0| 02 | . | sample_depends_on: "none" (2) (Is I-picture) 0x5f1.6-0x5f1.7 (0.2)
0x005f0| 00 | . | sample_is_depended_on: "unknown" (0) 0x5f2-0x5f2.1 (0.2)
0x005f0| 00 | . | sample_has_redundancy: "unknown" (0) 0x5f2.2-0x5f2.3 (0.2)
0x005f0| 00 | . | sample_padding_value: 0 0x5f2.4-0x5f2.6 (0.3)
0x005f0| 00 | . | sample_is_non_sync_sample: 0 0x5f2.7-0x5f2.7 (0.1)
0x005f0| 00 00 | .. | sample_degradation_priority: 0 0x5f3-0x5f4.7 (2)
@ -767,9 +767,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | default_sample_flags{}: 0x61d-0x620.7 (4)
0x00610| 02 | . | reserved0: 0 0x61d-0x61d.3 (0.4)
0x00610| 02 | . | is_leading: 0 0x61d.4-0x61d.5 (0.2)
0x00610| 02 | . | sample_depends_on: 2 0x61d.6-0x61d.7 (0.2)
0x00610| 00 | . | sample_is_depended_on: 0 0x61e-0x61e.1 (0.2)
0x00610| 00 | . | sample_has_redundancy: 0 0x61e.2-0x61e.3 (0.2)
0x00610| 02 | . | sample_depends_on: "none" (2) (Is I-picture) 0x61d.6-0x61d.7 (0.2)
0x00610| 00 | . | sample_is_depended_on: "unknown" (0) 0x61e-0x61e.1 (0.2)
0x00610| 00 | . | sample_has_redundancy: "unknown" (0) 0x61e.2-0x61e.3 (0.2)
0x00610| 00 | . | sample_padding_value: 0 0x61e.4-0x61e.6 (0.3)
0x00610| 00 | . | sample_is_non_sync_sample: 0 0x61e.7-0x61e.7 (0.1)
0x00610| 00| .| sample_degradation_priority: 0 0x61f-0x620.7 (2)
@ -846,9 +846,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | default_sample_flags{}: 0x1688-0x168b.7 (4)
0x01680| 01 | . | reserved0: 0 0x1688-0x1688.3 (0.4)
0x01680| 01 | . | is_leading: 0 0x1688.4-0x1688.5 (0.2)
0x01680| 01 | . | sample_depends_on: 1 0x1688.6-0x1688.7 (0.2)
0x01680| 01 | . | sample_is_depended_on: 0 0x1689-0x1689.1 (0.2)
0x01680| 01 | . | sample_has_redundancy: 0 0x1689.2-0x1689.3 (0.2)
0x01680| 01 | . | sample_depends_on: "other" (1) (Not I-picture) 0x1688.6-0x1688.7 (0.2)
0x01680| 01 | . | sample_is_depended_on: "unknown" (0) 0x1689-0x1689.1 (0.2)
0x01680| 01 | . | sample_has_redundancy: "unknown" (0) 0x1689.2-0x1689.3 (0.2)
0x01680| 01 | . | sample_padding_value: 0 0x1689.4-0x1689.6 (0.3)
0x01680| 01 | . | sample_is_non_sync_sample: 1 0x1689.7-0x1689.7 (0.1)
0x01680| 00 00 | .. | sample_degradation_priority: 0 0x168a-0x168b.7 (2)
@ -877,9 +877,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | first_sample_flags{}: 0x16b4-0x16b7.7 (4)
0x016b0| 02 | . | reserved0: 0 0x16b4-0x16b4.3 (0.4)
0x016b0| 02 | . | is_leading: 0 0x16b4.4-0x16b4.5 (0.2)
0x016b0| 02 | . | sample_depends_on: 2 0x16b4.6-0x16b4.7 (0.2)
0x016b0| 00 | . | sample_is_depended_on: 0 0x16b5-0x16b5.1 (0.2)
0x016b0| 00 | . | sample_has_redundancy: 0 0x16b5.2-0x16b5.3 (0.2)
0x016b0| 02 | . | sample_depends_on: "none" (2) (Is I-picture) 0x16b4.6-0x16b4.7 (0.2)
0x016b0| 00 | . | sample_is_depended_on: "unknown" (0) 0x16b5-0x16b5.1 (0.2)
0x016b0| 00 | . | sample_has_redundancy: "unknown" (0) 0x16b5.2-0x16b5.3 (0.2)
0x016b0| 00 | . | sample_padding_value: 0 0x16b5.4-0x16b5.6 (0.3)
0x016b0| 00 | . | sample_is_non_sync_sample: 0 0x16b5.7-0x16b5.7 (0.1)
0x016b0| 00 00 | .. | sample_degradation_priority: 0 0x16b6-0x16b7.7 (2)
@ -910,9 +910,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | default_sample_flags{}: 0x16e0-0x16e3.7 (4)
0x016e0|02 |. | reserved0: 0 0x16e0-0x16e0.3 (0.4)
0x016e0|02 |. | is_leading: 0 0x16e0.4-0x16e0.5 (0.2)
0x016e0|02 |. | sample_depends_on: 2 0x16e0.6-0x16e0.7 (0.2)
0x016e0| 00 | . | sample_is_depended_on: 0 0x16e1-0x16e1.1 (0.2)
0x016e0| 00 | . | sample_has_redundancy: 0 0x16e1.2-0x16e1.3 (0.2)
0x016e0|02 |. | sample_depends_on: "none" (2) (Is I-picture) 0x16e0.6-0x16e0.7 (0.2)
0x016e0| 00 | . | sample_is_depended_on: "unknown" (0) 0x16e1-0x16e1.1 (0.2)
0x016e0| 00 | . | sample_has_redundancy: "unknown" (0) 0x16e1.2-0x16e1.3 (0.2)
0x016e0| 00 | . | sample_padding_value: 0 0x16e1.4-0x16e1.6 (0.3)
0x016e0| 00 | . | sample_is_non_sync_sample: 0 0x16e1.7-0x16e1.7 (0.1)
0x016e0| 00 00 | .. | sample_degradation_priority: 0 0x16e2-0x16e3.7 (2)
@ -988,9 +988,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | default_sample_flags{}: 0x21a9-0x21ac.7 (4)
0x021a0| 01 | . | reserved0: 0 0x21a9-0x21a9.3 (0.4)
0x021a0| 01 | . | is_leading: 0 0x21a9.4-0x21a9.5 (0.2)
0x021a0| 01 | . | sample_depends_on: 1 0x21a9.6-0x21a9.7 (0.2)
0x021a0| 01 | . | sample_is_depended_on: 0 0x21aa-0x21aa.1 (0.2)
0x021a0| 01 | . | sample_has_redundancy: 0 0x21aa.2-0x21aa.3 (0.2)
0x021a0| 01 | . | sample_depends_on: "other" (1) (Not I-picture) 0x21a9.6-0x21a9.7 (0.2)
0x021a0| 01 | . | sample_is_depended_on: "unknown" (0) 0x21aa-0x21aa.1 (0.2)
0x021a0| 01 | . | sample_has_redundancy: "unknown" (0) 0x21aa.2-0x21aa.3 (0.2)
0x021a0| 01 | . | sample_padding_value: 0 0x21aa.4-0x21aa.6 (0.3)
0x021a0| 01 | . | sample_is_non_sync_sample: 1 0x21aa.7-0x21aa.7 (0.1)
0x021a0| 00 00 | .. | sample_degradation_priority: 0 0x21ab-0x21ac.7 (2)
@ -1022,9 +1022,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | first_sample_flags{}: 0x21d5-0x21d8.7 (4)
0x021d0| 02 | . | reserved0: 0 0x21d5-0x21d5.3 (0.4)
0x021d0| 02 | . | is_leading: 0 0x21d5.4-0x21d5.5 (0.2)
0x021d0| 02 | . | sample_depends_on: 2 0x21d5.6-0x21d5.7 (0.2)
0x021d0| 00 | . | sample_is_depended_on: 0 0x21d6-0x21d6.1 (0.2)
0x021d0| 00 | . | sample_has_redundancy: 0 0x21d6.2-0x21d6.3 (0.2)
0x021d0| 02 | . | sample_depends_on: "none" (2) (Is I-picture) 0x21d5.6-0x21d5.7 (0.2)
0x021d0| 00 | . | sample_is_depended_on: "unknown" (0) 0x21d6-0x21d6.1 (0.2)
0x021d0| 00 | . | sample_has_redundancy: "unknown" (0) 0x21d6.2-0x21d6.3 (0.2)
0x021d0| 00 | . | sample_padding_value: 0 0x21d6.4-0x21d6.6 (0.3)
0x021d0| 00 | . | sample_is_non_sync_sample: 0 0x21d6.7-0x21d6.7 (0.1)
0x021d0| 00 00 | .. | sample_degradation_priority: 0 0x21d7-0x21d8.7 (2)
@ -1058,9 +1058,9 @@ $ fq -d mp4 dv fragmented.mp4
| | | default_sample_flags{}: 0x2201-0x2204.7 (4)
0x02200| 02 | . | reserved0: 0 0x2201-0x2201.3 (0.4)
0x02200| 02 | . | is_leading: 0 0x2201.4-0x2201.5 (0.2)
0x02200| 02 | . | sample_depends_on: 2 0x2201.6-0x2201.7 (0.2)
0x02200| 00 | . | sample_is_depended_on: 0 0x2202-0x2202.1 (0.2)
0x02200| 00 | . | sample_has_redundancy: 0 0x2202.2-0x2202.3 (0.2)
0x02200| 02 | . | sample_depends_on: "none" (2) (Is I-picture) 0x2201.6-0x2201.7 (0.2)
0x02200| 00 | . | sample_is_depended_on: "unknown" (0) 0x2202-0x2202.1 (0.2)
0x02200| 00 | . | sample_has_redundancy: "unknown" (0) 0x2202.2-0x2202.3 (0.2)
0x02200| 00 | . | sample_padding_value: 0 0x2202.4-0x2202.6 (0.3)
0x02200| 00 | . | sample_is_non_sync_sample: 0 0x2202.7-0x2202.7 (0.1)
0x02200| 00 00 | .. | sample_degradation_priority: 0 0x2203-0x2204.7 (2)