bmff 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +25 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +183 -0
- data/Rakefile +9 -0
- data/bmff.gemspec +25 -0
- data/lib/bmff/binary_accessor.rb +186 -0
- data/lib/bmff/box/audio_sample_entry.rb +16 -0
- data/lib/bmff/box/base.rb +66 -0
- data/lib/bmff/box/bit_rate.rb +14 -0
- data/lib/bmff/box/chunk_large_offset.rb +16 -0
- data/lib/bmff/box/chunk_offset.rb +16 -0
- data/lib/bmff/box/clean_aperture.rb +20 -0
- data/lib/bmff/box/colour_information.rb +27 -0
- data/lib/bmff/box/compact_sample_size.rb +32 -0
- data/lib/bmff/box/composition_offset.rb +25 -0
- data/lib/bmff/box/composition_to_decode.rb +17 -0
- data/lib/bmff/box/container.rb +70 -0
- data/lib/bmff/box/copyright.rb +13 -0
- data/lib/bmff/box/data_entry_url.rb +12 -0
- data/lib/bmff/box/data_entry_urn.rb +13 -0
- data/lib/bmff/box/data_information.rb +12 -0
- data/lib/bmff/box/data_reference.rb +14 -0
- data/lib/bmff/box/degradation_priority.rb +19 -0
- data/lib/bmff/box/edit.rb +12 -0
- data/lib/bmff/box/edit_list.rb +27 -0
- data/lib/bmff/box/file_type.rb +17 -0
- data/lib/bmff/box/free_space.rb +6 -0
- data/lib/bmff/box/full.rb +11 -0
- data/lib/bmff/box/handler.rb +15 -0
- data/lib/bmff/box/hint_media_header.rb +16 -0
- data/lib/bmff/box/hint_sample_entry.rb +14 -0
- data/lib/bmff/box/level_assignment.rb +35 -0
- data/lib/bmff/box/map.rb +15 -0
- data/lib/bmff/box/media.rb +12 -0
- data/lib/bmff/box/media_data.rb +6 -0
- data/lib/bmff/box/media_header.rb +25 -0
- data/lib/bmff/box/media_information.rb +12 -0
- data/lib/bmff/box/meta_data_sample_entry.rb +5 -0
- data/lib/bmff/box/movie.rb +12 -0
- data/lib/bmff/box/movie_extends.rb +12 -0
- data/lib/bmff/box/movie_extends_header.rb +16 -0
- data/lib/bmff/box/movie_fragment.rb +12 -0
- data/lib/bmff/box/movie_fragment_header.rb +12 -0
- data/lib/bmff/box/movie_fragment_random_access.rb +12 -0
- data/lib/bmff/box/movie_fragment_random_access_offset.rb +12 -0
- data/lib/bmff/box/movie_header.rb +36 -0
- data/lib/bmff/box/null_media_header.rb +6 -0
- data/lib/bmff/box/padding_bits.rb +23 -0
- data/lib/bmff/box/pixel_aspect_ratio.rb +13 -0
- data/lib/bmff/box/progressive_download_info.rb +17 -0
- data/lib/bmff/box/sample_auxiliary_information_offsets.rb +24 -0
- data/lib/bmff/box/sample_auxiliary_information_sizes.rb +23 -0
- data/lib/bmff/box/sample_dependency_type.rb +26 -0
- data/lib/bmff/box/sample_description.rb +27 -0
- data/lib/bmff/box/sample_entry.rb +15 -0
- data/lib/bmff/box/sample_size.rb +19 -0
- data/lib/bmff/box/sample_table.rb +12 -0
- data/lib/bmff/box/sample_to_chunk.rb +20 -0
- data/lib/bmff/box/shadow_sync_sample.rb +18 -0
- data/lib/bmff/box/sound_media_header.rb +13 -0
- data/lib/bmff/box/sub_sample_information.rb +41 -0
- data/lib/bmff/box/sync_sample.rb +16 -0
- data/lib/bmff/box/text_meta_data_sample_entry.rb +18 -0
- data/lib/bmff/box/time_to_sample.rb +18 -0
- data/lib/bmff/box/track.rb +12 -0
- data/lib/bmff/box/track_extends.rb +17 -0
- data/lib/bmff/box/track_fragment.rb +12 -0
- data/lib/bmff/box/track_fragment_base_media_decode_time.rb +16 -0
- data/lib/bmff/box/track_fragment_header.rb +18 -0
- data/lib/bmff/box/track_fragment_random_access.rb +54 -0
- data/lib/bmff/box/track_group.rb +12 -0
- data/lib/bmff/box/track_group_type.rb +12 -0
- data/lib/bmff/box/track_header.rb +36 -0
- data/lib/bmff/box/track_reference.rb +12 -0
- data/lib/bmff/box/track_reference_type.rb +15 -0
- data/lib/bmff/box/track_run.rb +31 -0
- data/lib/bmff/box/track_selection.rb +16 -0
- data/lib/bmff/box/unknown.rb +5 -0
- data/lib/bmff/box/uri.rb +12 -0
- data/lib/bmff/box/uri_init.rb +15 -0
- data/lib/bmff/box/uri_meta_sample_entry.rb +24 -0
- data/lib/bmff/box/user_data.rb +12 -0
- data/lib/bmff/box/video_media_header.rb +13 -0
- data/lib/bmff/box/visual_sample_entry.rb +37 -0
- data/lib/bmff/box/xml_meta_data_sample_entry.rb +19 -0
- data/lib/bmff/box.rb +115 -0
- data/lib/bmff/file_container.rb +20 -0
- data/lib/bmff/version.rb +3 -0
- data/lib/bmff.rb +7 -0
- data/test/bmff/box/test_audio_sample_entry.rb +46 -0
- data/test/bmff/box/test_base.rb +37 -0
- data/test/bmff/box/test_bit_rate.rb +30 -0
- data/test/bmff/box/test_chunk_large_offset.rb +35 -0
- data/test/bmff/box/test_chunk_offset.rb +35 -0
- data/test/bmff/box/test_clean_aperture.rb +40 -0
- data/test/bmff/box/test_colour_information.rb +73 -0
- data/test/bmff/box/test_compact_sample_size.rb +99 -0
- data/test/bmff/box/test_composition_offset.rb +64 -0
- data/test/bmff/box/test_composition_to_decode.rb +38 -0
- data/test/bmff/box/test_copyright.rb +55 -0
- data/test/bmff/box/test_data_entry_url.rb +30 -0
- data/test/bmff/box/test_data_entry_urn.rb +32 -0
- data/test/bmff/box/test_data_information.rb +26 -0
- data/test/bmff/box/test_data_reference.rb +58 -0
- data/test/bmff/box/test_degradation_priority.rb +62 -0
- data/test/bmff/box/test_edit.rb +26 -0
- data/test/bmff/box/test_edit_list.rb +72 -0
- data/test/bmff/box/test_file_type.rb +30 -0
- data/test/bmff/box/test_free_space.rb +42 -0
- data/test/bmff/box/test_handler.rb +67 -0
- data/test/bmff/box/test_hint_media_header.rb +38 -0
- data/test/bmff/box/test_hint_sample_entry.rb +38 -0
- data/test/bmff/box/test_level_assignment.rb +50 -0
- data/test/bmff/box/test_media.rb +26 -0
- data/test/bmff/box/test_media_data.rb +25 -0
- data/test/bmff/box/test_media_header.rb +72 -0
- data/test/bmff/box/test_media_information.rb +26 -0
- data/test/bmff/box/test_movie.rb +26 -0
- data/test/bmff/box/test_movie_extends.rb +26 -0
- data/test/bmff/box/test_movie_extends_header.rb +52 -0
- data/test/bmff/box/test_movie_fragment.rb +26 -0
- data/test/bmff/box/test_movie_fragment_header.rb +30 -0
- data/test/bmff/box/test_movie_fragment_random_access.rb +26 -0
- data/test/bmff/box/test_movie_fragment_random_access_offset.rb +30 -0
- data/test/bmff/box/test_movie_header.rb +110 -0
- data/test/bmff/box/test_null_media_header.rb +28 -0
- data/test/bmff/box/test_padding_bits.rb +38 -0
- data/test/bmff/box/test_pixel_aspect_ratio.rb +28 -0
- data/test/bmff/box/test_progressive_download_info.rb +36 -0
- data/test/bmff/box/test_sample_auxiliary_information_offsets.rb +94 -0
- data/test/bmff/box/test_sample_auxiliary_information_sizes.rb +70 -0
- data/test/bmff/box/test_sample_dependency_type.rb +70 -0
- data/test/bmff/box/test_sample_description.rb +355 -0
- data/test/bmff/box/test_sample_size.rb +61 -0
- data/test/bmff/box/test_sample_table.rb +26 -0
- data/test/bmff/box/test_sample_to_chunk.rb +39 -0
- data/test/bmff/box/test_shadow_sync_sample.rb +36 -0
- data/test/bmff/box/test_sound_media_header.rb +32 -0
- data/test/bmff/box/test_sub_sample_information.rb +90 -0
- data/test/bmff/box/test_sync_sample.rb +34 -0
- data/test/bmff/box/test_text_meta_data_sample_entry.rb +49 -0
- data/test/bmff/box/test_time_to_sample.rb +36 -0
- data/test/bmff/box/test_track.rb +26 -0
- data/test/bmff/box/test_track_extends.rb +38 -0
- data/test/bmff/box/test_track_fragment.rb +26 -0
- data/test/bmff/box/test_track_fragment_base_media_decode_time.rb +52 -0
- data/test/bmff/box/test_track_fragment_header.rb +200 -0
- data/test/bmff/box/test_track_fragment_random_access.rb +96 -0
- data/test/bmff/box/test_track_group.rb +26 -0
- data/test/bmff/box/test_track_group_type.rb +30 -0
- data/test/bmff/box/test_track_header.rb +118 -0
- data/test/bmff/box/test_track_reference.rb +26 -0
- data/test/bmff/box/test_track_reference_type.rb +100 -0
- data/test/bmff/box/test_track_run.rb +282 -0
- data/test/bmff/box/test_track_selection.rb +33 -0
- data/test/bmff/box/test_uri.rb +30 -0
- data/test/bmff/box/test_uri_init.rb +32 -0
- data/test/bmff/box/test_uri_meta_sample_entry.rb +74 -0
- data/test/bmff/box/test_user_data.rb +26 -0
- data/test/bmff/box/test_video_media_header.rb +34 -0
- data/test/bmff/box/test_visual_sample_entry.rb +95 -0
- data/test/bmff/box/test_xml_meta_data_sample_entry.rb +51 -0
- data/test/bmff/test_binary_accessor.rb +805 -0
- data/test/bmff/test_file_container.rb +58 -0
- data/test/minitest_helper.rb +7 -0
- metadata +323 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxSampleToChunk < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("stsc")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0) # flags
|
|
16
|
+
io.write_uint32(3) # entry_count
|
|
17
|
+
# entry
|
|
18
|
+
3.times do |i|
|
|
19
|
+
io.write_uint32(i) # first_chunk
|
|
20
|
+
io.write_uint32(10 + i) # samples_per_chunk
|
|
21
|
+
io.write_uint32(20 + i) # sample_description_index
|
|
22
|
+
end
|
|
23
|
+
size = io.pos
|
|
24
|
+
io.pos = 0
|
|
25
|
+
io.write_uint32(size)
|
|
26
|
+
io.pos = 0
|
|
27
|
+
|
|
28
|
+
box = BMFF::Box.get_box(io, nil)
|
|
29
|
+
assert_instance_of(BMFF::Box::SampleToChunk, box)
|
|
30
|
+
assert_equal(size, box.actual_size)
|
|
31
|
+
assert_equal("stsc", box.type)
|
|
32
|
+
assert_equal(0, box.version)
|
|
33
|
+
assert_equal(0, box.flags)
|
|
34
|
+
assert_equal(3, box.entry_count)
|
|
35
|
+
assert_equal([0, 1, 2], box.first_chunk)
|
|
36
|
+
assert_equal([10, 11, 12], box.samples_per_chunk)
|
|
37
|
+
assert_equal([20, 21, 22], box.sample_description_index)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxShadowSyncSample < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("stsh")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0) # flags
|
|
16
|
+
io.write_uint32(3) # entry_count
|
|
17
|
+
3.times do |i|
|
|
18
|
+
io.write_uint32(i) # shadowed_sample_number
|
|
19
|
+
io.write_uint32(10 + i) # sync_sample_number
|
|
20
|
+
end
|
|
21
|
+
size = io.pos
|
|
22
|
+
io.pos = 0
|
|
23
|
+
io.write_uint32(size)
|
|
24
|
+
io.pos = 0
|
|
25
|
+
|
|
26
|
+
box = BMFF::Box.get_box(io, nil)
|
|
27
|
+
assert_instance_of(BMFF::Box::ShadowSyncSample, box)
|
|
28
|
+
assert_equal(size, box.actual_size)
|
|
29
|
+
assert_equal("stsh", box.type)
|
|
30
|
+
assert_equal(0, box.version)
|
|
31
|
+
assert_equal(0, box.flags)
|
|
32
|
+
assert_equal(3, box.entry_count)
|
|
33
|
+
assert_equal([0, 1, 2], box.shadowed_sample_number)
|
|
34
|
+
assert_equal([10, 11, 12], box.sync_sample_number)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxSoundMediaHeader < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("smhd")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0) # flags
|
|
16
|
+
io.write_int16(0) # balance
|
|
17
|
+
io.write_uint16(0) # reserved1
|
|
18
|
+
size = io.pos
|
|
19
|
+
io.pos = 0
|
|
20
|
+
io.write_uint32(size)
|
|
21
|
+
io.pos = 0
|
|
22
|
+
|
|
23
|
+
box = BMFF::Box.get_box(io, nil)
|
|
24
|
+
assert_instance_of(BMFF::Box::SoundMediaHeader, box)
|
|
25
|
+
assert_equal(size, box.actual_size)
|
|
26
|
+
assert_equal("smhd", box.type)
|
|
27
|
+
assert_equal(0, box.version)
|
|
28
|
+
assert_equal(0, box.flags)
|
|
29
|
+
assert_equal(0, box.balance)
|
|
30
|
+
assert_equal(0, box.reserved1)
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxSubSampleInformation < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse_v0
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("subs")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0) # flags
|
|
16
|
+
io.write_uint32(3) # entry_count
|
|
17
|
+
# entry
|
|
18
|
+
3.times do |i|
|
|
19
|
+
io.write_uint32(i) # sample_delta
|
|
20
|
+
io.write_uint16(2) # subsample_count
|
|
21
|
+
2.times do |j|
|
|
22
|
+
io.write_uint16(j) # subsample_size
|
|
23
|
+
io.write_uint8(10 + j) # subsample_priority
|
|
24
|
+
io.write_uint8(0) # discardable
|
|
25
|
+
io.write_uint32(0) # reserved1
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
size = io.pos
|
|
29
|
+
io.pos = 0
|
|
30
|
+
io.write_uint32(size)
|
|
31
|
+
io.pos = 0
|
|
32
|
+
|
|
33
|
+
box = BMFF::Box.get_box(io, nil)
|
|
34
|
+
assert_instance_of(BMFF::Box::SubSampleInformation, box)
|
|
35
|
+
assert_equal(size, box.actual_size)
|
|
36
|
+
assert_equal("subs", box.type)
|
|
37
|
+
assert_equal(0, box.version)
|
|
38
|
+
assert_equal(0, box.flags)
|
|
39
|
+
assert_equal(3, box.entry_count)
|
|
40
|
+
assert_equal([0, 1, 2], box.sample_delta)
|
|
41
|
+
assert_equal([2, 2, 2], box.subsample_count)
|
|
42
|
+
3.times do |i|
|
|
43
|
+
assert_equal([0, 1], box.subsamples[i].subsample_size)
|
|
44
|
+
assert_equal([10, 11], box.subsamples[i].subsample_priority)
|
|
45
|
+
assert_equal([0, 0], box.subsamples[i].discardable)
|
|
46
|
+
assert_equal([0, 0], box.subsamples[i].reserved1)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def test_parse_v1
|
|
51
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
52
|
+
io.extend(BMFF::BinaryAccessor)
|
|
53
|
+
io.write_uint32(0)
|
|
54
|
+
io.write_ascii("subs")
|
|
55
|
+
io.write_uint8(1) # version
|
|
56
|
+
io.write_uint24(0) # flags
|
|
57
|
+
io.write_uint32(3) # entry_count
|
|
58
|
+
# entry
|
|
59
|
+
3.times do |i|
|
|
60
|
+
io.write_uint32(i) # sample_delta
|
|
61
|
+
io.write_uint16(2) # subsample_count
|
|
62
|
+
2.times do |j|
|
|
63
|
+
io.write_uint32(j) # subsample_size
|
|
64
|
+
io.write_uint8(10 + j) # subsample_priority
|
|
65
|
+
io.write_uint8(0) # discardable
|
|
66
|
+
io.write_uint32(0) # reserved1
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
size = io.pos
|
|
70
|
+
io.pos = 0
|
|
71
|
+
io.write_uint32(size)
|
|
72
|
+
io.pos = 0
|
|
73
|
+
|
|
74
|
+
box = BMFF::Box.get_box(io, nil)
|
|
75
|
+
assert_instance_of(BMFF::Box::SubSampleInformation, box)
|
|
76
|
+
assert_equal(size, box.actual_size)
|
|
77
|
+
assert_equal("subs", box.type)
|
|
78
|
+
assert_equal(1, box.version)
|
|
79
|
+
assert_equal(0, box.flags)
|
|
80
|
+
assert_equal(3, box.entry_count)
|
|
81
|
+
assert_equal([0, 1, 2], box.sample_delta)
|
|
82
|
+
assert_equal([2, 2, 2], box.subsample_count)
|
|
83
|
+
3.times do |i|
|
|
84
|
+
assert_equal([0, 1], box.subsamples[i].subsample_size)
|
|
85
|
+
assert_equal([10, 11], box.subsamples[i].subsample_priority)
|
|
86
|
+
assert_equal([0, 0], box.subsamples[i].discardable)
|
|
87
|
+
assert_equal([0, 0], box.subsamples[i].reserved1)
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxSyncSample < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("stss")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0) # flags
|
|
16
|
+
io.write_uint32(3) # entry_count
|
|
17
|
+
3.times do |i|
|
|
18
|
+
io.write_uint32(i) # sample_number
|
|
19
|
+
end
|
|
20
|
+
size = io.pos
|
|
21
|
+
io.pos = 0
|
|
22
|
+
io.write_uint32(size)
|
|
23
|
+
io.pos = 0
|
|
24
|
+
|
|
25
|
+
box = BMFF::Box.get_box(io, nil)
|
|
26
|
+
assert_instance_of(BMFF::Box::SyncSample, box)
|
|
27
|
+
assert_equal(size, box.actual_size)
|
|
28
|
+
assert_equal("stss", box.type)
|
|
29
|
+
assert_equal(0, box.version)
|
|
30
|
+
assert_equal(0, box.flags)
|
|
31
|
+
assert_equal(3, box.entry_count)
|
|
32
|
+
assert_equal([0, 1, 2], box.sample_number)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxTextMetaDataSampleEntry < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("mett")
|
|
14
|
+
io.write_uint8(0) # reserved1
|
|
15
|
+
io.write_uint8(0) # reserved1
|
|
16
|
+
io.write_uint8(0) # reserved1
|
|
17
|
+
io.write_uint8(0) # reserved1
|
|
18
|
+
io.write_uint8(0) # reserved1
|
|
19
|
+
io.write_uint8(0) # reserved1
|
|
20
|
+
io.write_uint16(0) # data_reference_index
|
|
21
|
+
io.write_null_terminated_string("application/zip") # content_encoding
|
|
22
|
+
io.write_null_terminated_string("text/html") # mime_format
|
|
23
|
+
# bit_rate_box
|
|
24
|
+
io.write_uint32(20)
|
|
25
|
+
io.write_ascii("btrt")
|
|
26
|
+
io.write_uint32(65535) # buffer_size_db
|
|
27
|
+
io.write_uint32(1000000) # max_bitrate
|
|
28
|
+
io.write_uint32(500000) # avg_bitrate
|
|
29
|
+
size = io.pos
|
|
30
|
+
io.pos = 0
|
|
31
|
+
io.write_uint32(size)
|
|
32
|
+
io.pos = 0
|
|
33
|
+
|
|
34
|
+
box = BMFF::Box.get_box(io, nil)
|
|
35
|
+
assert_instance_of(BMFF::Box::TextMetaDataSampleEntry, box)
|
|
36
|
+
assert_equal(size, box.actual_size)
|
|
37
|
+
assert_equal("mett", box.type)
|
|
38
|
+
assert_equal([0, 0, 0, 0, 0, 0], box.reserved1)
|
|
39
|
+
assert_equal(0, box.data_reference_index)
|
|
40
|
+
assert_equal("application/zip", box.content_encoding)
|
|
41
|
+
assert_equal("text/html", box.mime_format)
|
|
42
|
+
assert_instance_of(BMFF::Box::BitRate, box.bit_rate_box)
|
|
43
|
+
assert_equal(20, box.bit_rate_box.actual_size)
|
|
44
|
+
assert_equal("btrt", box.bit_rate_box.type)
|
|
45
|
+
assert_equal(65535, box.bit_rate_box.buffer_size_db)
|
|
46
|
+
assert_equal(1000000, box.bit_rate_box.max_bitrate)
|
|
47
|
+
assert_equal(500000, box.bit_rate_box.avg_bitrate)
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxTimeToSample < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("stts")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0) # flags
|
|
16
|
+
io.write_uint32(3) # entry_count
|
|
17
|
+
3.times do |i|
|
|
18
|
+
io.write_uint32(20 + i) # sample_count
|
|
19
|
+
io.write_uint32(10 + i) # sample_delta
|
|
20
|
+
end
|
|
21
|
+
size = io.pos
|
|
22
|
+
io.pos = 0
|
|
23
|
+
io.write_uint32(size)
|
|
24
|
+
io.pos = 0
|
|
25
|
+
|
|
26
|
+
box = BMFF::Box.get_box(io, nil)
|
|
27
|
+
assert_instance_of(BMFF::Box::TimeToSample, box)
|
|
28
|
+
assert_equal(size, box.actual_size)
|
|
29
|
+
assert_equal("stts", box.type)
|
|
30
|
+
assert_equal(0, box.version)
|
|
31
|
+
assert_equal(0, box.flags)
|
|
32
|
+
assert_equal(3, box.entry_count)
|
|
33
|
+
assert_equal([20, 21, 22], box.sample_count)
|
|
34
|
+
assert_equal([10, 11, 12], box.sample_delta)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxTrack < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("trak")
|
|
14
|
+
size = io.pos
|
|
15
|
+
io.pos = 0
|
|
16
|
+
io.write_uint32(size)
|
|
17
|
+
io.pos = 0
|
|
18
|
+
|
|
19
|
+
box = BMFF::Box.get_box(io, nil)
|
|
20
|
+
assert_instance_of(BMFF::Box::Track, box)
|
|
21
|
+
assert_equal(size, box.actual_size)
|
|
22
|
+
assert_equal("trak", box.type)
|
|
23
|
+
assert_equal([], box.children)
|
|
24
|
+
assert(box.container?)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxTrackExtends < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("trex")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0) # flags
|
|
16
|
+
io.write_uint32(1) # track_id
|
|
17
|
+
io.write_uint32(2) # default_sample_description_index
|
|
18
|
+
io.write_uint32(3) # default_sample_duration
|
|
19
|
+
io.write_uint32(4) # default_sample_size
|
|
20
|
+
io.write_uint32(5) # default_sample_flags
|
|
21
|
+
size = io.pos
|
|
22
|
+
io.pos = 0
|
|
23
|
+
io.write_uint32(size)
|
|
24
|
+
io.pos = 0
|
|
25
|
+
|
|
26
|
+
box = BMFF::Box.get_box(io, nil)
|
|
27
|
+
assert_instance_of(BMFF::Box::TrackExtends, box)
|
|
28
|
+
assert_equal(size, box.actual_size)
|
|
29
|
+
assert_equal("trex", box.type)
|
|
30
|
+
assert_equal(0, box.version)
|
|
31
|
+
assert_equal(0, box.flags)
|
|
32
|
+
assert_equal(1, box.track_id)
|
|
33
|
+
assert_equal(2, box.default_sample_description_index)
|
|
34
|
+
assert_equal(3, box.default_sample_duration)
|
|
35
|
+
assert_equal(4, box.default_sample_size)
|
|
36
|
+
assert_equal(5, box.default_sample_flags)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxTrackFragment < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("traf")
|
|
14
|
+
size = io.pos
|
|
15
|
+
io.pos = 0
|
|
16
|
+
io.write_uint32(size)
|
|
17
|
+
io.pos = 0
|
|
18
|
+
|
|
19
|
+
box = BMFF::Box.get_box(io, nil)
|
|
20
|
+
assert_instance_of(BMFF::Box::TrackFragment, box)
|
|
21
|
+
assert_equal(size, box.actual_size)
|
|
22
|
+
assert_equal("traf", box.type)
|
|
23
|
+
assert_equal([], box.children)
|
|
24
|
+
assert(box.container?)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxTrackFragmentBaseMediaDecodeTime < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse_v0
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("tfdt")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0) # flags
|
|
16
|
+
io.write_uint32(1) # base_media_decode_time
|
|
17
|
+
size = io.pos
|
|
18
|
+
io.pos = 0
|
|
19
|
+
io.write_uint32(size)
|
|
20
|
+
io.pos = 0
|
|
21
|
+
|
|
22
|
+
box = BMFF::Box.get_box(io, nil)
|
|
23
|
+
assert_instance_of(BMFF::Box::TrackFragmentBaseMediaDecodeTime, box)
|
|
24
|
+
assert_equal(size, box.actual_size)
|
|
25
|
+
assert_equal("tfdt", box.type)
|
|
26
|
+
assert_equal(0, box.version)
|
|
27
|
+
assert_equal(0, box.flags)
|
|
28
|
+
assert_equal(1, box.base_media_decode_time)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def test_parse_v1
|
|
32
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
33
|
+
io.extend(BMFF::BinaryAccessor)
|
|
34
|
+
io.write_uint32(0)
|
|
35
|
+
io.write_ascii("tfdt")
|
|
36
|
+
io.write_uint8(1) # version
|
|
37
|
+
io.write_uint24(0) # flags
|
|
38
|
+
io.write_uint64(4294967296) # base_media_decode_time
|
|
39
|
+
size = io.pos
|
|
40
|
+
io.pos = 0
|
|
41
|
+
io.write_uint32(size)
|
|
42
|
+
io.pos = 0
|
|
43
|
+
|
|
44
|
+
box = BMFF::Box.get_box(io, nil)
|
|
45
|
+
assert_instance_of(BMFF::Box::TrackFragmentBaseMediaDecodeTime, box)
|
|
46
|
+
assert_equal(size, box.actual_size)
|
|
47
|
+
assert_equal("tfdt", box.type)
|
|
48
|
+
assert_equal(1, box.version)
|
|
49
|
+
assert_equal(0, box.flags)
|
|
50
|
+
assert_equal(4294967296, box.base_media_decode_time)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
# vim: set expandtab tabstop=2 shiftwidth=2 softtabstop=2 autoindent:
|
|
3
|
+
|
|
4
|
+
require_relative '../../minitest_helper'
|
|
5
|
+
require 'bmff/box'
|
|
6
|
+
require 'stringio'
|
|
7
|
+
|
|
8
|
+
class TestBMFFBoxTrackFragmentHeader < MiniTest::Unit::TestCase
|
|
9
|
+
def test_parse_flags_full_present
|
|
10
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
11
|
+
io.extend(BMFF::BinaryAccessor)
|
|
12
|
+
io.write_uint32(0)
|
|
13
|
+
io.write_ascii("tfhd")
|
|
14
|
+
io.write_uint8(0) # version
|
|
15
|
+
io.write_uint24(0x01 | 0x02 | 0x08 | 0x10 | 0x20) # flags
|
|
16
|
+
io.write_uint32(1) # track_id
|
|
17
|
+
io.write_uint64(2) # base_data_offset
|
|
18
|
+
io.write_uint32(3) # sample_description_index
|
|
19
|
+
io.write_uint32(4) # default_sample_duration
|
|
20
|
+
io.write_uint32(5) # default_sample_size
|
|
21
|
+
io.write_uint32(6) # default_sample_flags
|
|
22
|
+
size = io.pos
|
|
23
|
+
io.pos = 0
|
|
24
|
+
io.write_uint32(size)
|
|
25
|
+
io.pos = 0
|
|
26
|
+
|
|
27
|
+
box = BMFF::Box.get_box(io, nil)
|
|
28
|
+
assert_instance_of(BMFF::Box::TrackFragmentHeader, box)
|
|
29
|
+
assert_equal(size, box.actual_size)
|
|
30
|
+
assert_equal("tfhd", box.type)
|
|
31
|
+
assert_equal(0, box.version)
|
|
32
|
+
assert_equal(59, box.flags)
|
|
33
|
+
assert_equal(1, box.track_id)
|
|
34
|
+
assert_equal(2, box.base_data_offset)
|
|
35
|
+
assert_equal(3, box.sample_description_index)
|
|
36
|
+
assert_equal(4, box.default_sample_duration)
|
|
37
|
+
assert_equal(5, box.default_sample_size)
|
|
38
|
+
assert_equal(6, box.default_sample_flags)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def test_parse_flags_base_data_offset_present
|
|
42
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
43
|
+
io.extend(BMFF::BinaryAccessor)
|
|
44
|
+
io.write_uint32(0)
|
|
45
|
+
io.write_ascii("tfhd")
|
|
46
|
+
io.write_uint8(0) # version
|
|
47
|
+
io.write_uint24(0x01) # flags
|
|
48
|
+
io.write_uint32(1) # track_id
|
|
49
|
+
io.write_uint64(2) # base_data_offset
|
|
50
|
+
#io.write_uint32(3) # sample_description_index
|
|
51
|
+
#io.write_uint32(4) # default_sample_duration
|
|
52
|
+
#io.write_uint32(5) # default_sample_size
|
|
53
|
+
#io.write_uint32(6) # default_sample_flags
|
|
54
|
+
size = io.pos
|
|
55
|
+
io.pos = 0
|
|
56
|
+
io.write_uint32(size)
|
|
57
|
+
io.pos = 0
|
|
58
|
+
|
|
59
|
+
box = BMFF::Box.get_box(io, nil)
|
|
60
|
+
assert_instance_of(BMFF::Box::TrackFragmentHeader, box)
|
|
61
|
+
assert_equal(size, box.actual_size)
|
|
62
|
+
assert_equal("tfhd", box.type)
|
|
63
|
+
assert_equal(0, box.version)
|
|
64
|
+
assert_equal(1, box.flags)
|
|
65
|
+
assert_equal(1, box.track_id)
|
|
66
|
+
assert_equal(2, box.base_data_offset)
|
|
67
|
+
assert_nil(box.sample_description_index)
|
|
68
|
+
assert_nil(box.default_sample_duration)
|
|
69
|
+
assert_nil(box.default_sample_size)
|
|
70
|
+
assert_nil(box.default_sample_flags)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def test_parse_flags_sample_description_index_present
|
|
74
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
75
|
+
io.extend(BMFF::BinaryAccessor)
|
|
76
|
+
io.write_uint32(0)
|
|
77
|
+
io.write_ascii("tfhd")
|
|
78
|
+
io.write_uint8(0) # version
|
|
79
|
+
io.write_uint24(0x02) # flags
|
|
80
|
+
io.write_uint32(1) # track_id
|
|
81
|
+
#io.write_uint64(2) # base_data_offset
|
|
82
|
+
io.write_uint32(3) # sample_description_index
|
|
83
|
+
#io.write_uint32(4) # default_sample_duration
|
|
84
|
+
#io.write_uint32(5) # default_sample_size
|
|
85
|
+
#io.write_uint32(6) # default_sample_flags
|
|
86
|
+
size = io.pos
|
|
87
|
+
io.pos = 0
|
|
88
|
+
io.write_uint32(size)
|
|
89
|
+
io.pos = 0
|
|
90
|
+
|
|
91
|
+
box = BMFF::Box.get_box(io, nil)
|
|
92
|
+
assert_instance_of(BMFF::Box::TrackFragmentHeader, box)
|
|
93
|
+
assert_equal(size, box.actual_size)
|
|
94
|
+
assert_equal("tfhd", box.type)
|
|
95
|
+
assert_equal(0, box.version)
|
|
96
|
+
assert_equal(2, box.flags)
|
|
97
|
+
assert_equal(1, box.track_id)
|
|
98
|
+
assert_nil(box.base_data_offset)
|
|
99
|
+
assert_equal(3, box.sample_description_index)
|
|
100
|
+
assert_nil(box.default_sample_duration)
|
|
101
|
+
assert_nil(box.default_sample_size)
|
|
102
|
+
assert_nil(box.default_sample_flags)
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
def test_parse_flags_default_sample_duration_present
|
|
106
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
107
|
+
io.extend(BMFF::BinaryAccessor)
|
|
108
|
+
io.write_uint32(0)
|
|
109
|
+
io.write_ascii("tfhd")
|
|
110
|
+
io.write_uint8(0) # version
|
|
111
|
+
io.write_uint24(0x08) # flags
|
|
112
|
+
io.write_uint32(1) # track_id
|
|
113
|
+
#io.write_uint64(2) # base_data_offset
|
|
114
|
+
#io.write_uint32(3) # sample_description_index
|
|
115
|
+
io.write_uint32(4) # default_sample_duration
|
|
116
|
+
#io.write_uint32(5) # default_sample_size
|
|
117
|
+
#io.write_uint32(6) # default_sample_flags
|
|
118
|
+
size = io.pos
|
|
119
|
+
io.pos = 0
|
|
120
|
+
io.write_uint32(size)
|
|
121
|
+
io.pos = 0
|
|
122
|
+
|
|
123
|
+
box = BMFF::Box.get_box(io, nil)
|
|
124
|
+
assert_instance_of(BMFF::Box::TrackFragmentHeader, box)
|
|
125
|
+
assert_equal(size, box.actual_size)
|
|
126
|
+
assert_equal("tfhd", box.type)
|
|
127
|
+
assert_equal(0, box.version)
|
|
128
|
+
assert_equal(8, box.flags)
|
|
129
|
+
assert_equal(1, box.track_id)
|
|
130
|
+
assert_nil(box.base_data_offset)
|
|
131
|
+
assert_nil(box.sample_description_index)
|
|
132
|
+
assert_equal(4, box.default_sample_duration)
|
|
133
|
+
assert_nil(box.default_sample_size)
|
|
134
|
+
assert_nil(box.default_sample_flags)
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def test_parse_flags_default_sample_size_present
|
|
138
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
139
|
+
io.extend(BMFF::BinaryAccessor)
|
|
140
|
+
io.write_uint32(0)
|
|
141
|
+
io.write_ascii("tfhd")
|
|
142
|
+
io.write_uint8(0) # version
|
|
143
|
+
io.write_uint24(0x10) # flags
|
|
144
|
+
io.write_uint32(1) # track_id
|
|
145
|
+
#io.write_uint64(2) # base_data_offset
|
|
146
|
+
#io.write_uint32(3) # sample_description_index
|
|
147
|
+
#io.write_uint32(4) # default_sample_duration
|
|
148
|
+
io.write_uint32(5) # default_sample_size
|
|
149
|
+
#io.write_uint32(6) # default_sample_flags
|
|
150
|
+
size = io.pos
|
|
151
|
+
io.pos = 0
|
|
152
|
+
io.write_uint32(size)
|
|
153
|
+
io.pos = 0
|
|
154
|
+
|
|
155
|
+
box = BMFF::Box.get_box(io, nil)
|
|
156
|
+
assert_instance_of(BMFF::Box::TrackFragmentHeader, box)
|
|
157
|
+
assert_equal(size, box.actual_size)
|
|
158
|
+
assert_equal("tfhd", box.type)
|
|
159
|
+
assert_equal(0, box.version)
|
|
160
|
+
assert_equal(16, box.flags)
|
|
161
|
+
assert_equal(1, box.track_id)
|
|
162
|
+
assert_nil(box.base_data_offset)
|
|
163
|
+
assert_nil(box.sample_description_index)
|
|
164
|
+
assert_nil(box.default_sample_duration)
|
|
165
|
+
assert_equal(5, box.default_sample_size)
|
|
166
|
+
assert_nil(box.default_sample_flags)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
def test_parse_flags_default_sample_flags_present
|
|
170
|
+
io = StringIO.new("", "r+:ascii-8bit")
|
|
171
|
+
io.extend(BMFF::BinaryAccessor)
|
|
172
|
+
io.write_uint32(0)
|
|
173
|
+
io.write_ascii("tfhd")
|
|
174
|
+
io.write_uint8(0) # version
|
|
175
|
+
io.write_uint24(0x20) # flags
|
|
176
|
+
io.write_uint32(1) # track_id
|
|
177
|
+
#io.write_uint64(2) # base_data_offset
|
|
178
|
+
#io.write_uint32(3) # sample_description_index
|
|
179
|
+
#io.write_uint32(4) # default_sample_duration
|
|
180
|
+
#io.write_uint32(5) # default_sample_size
|
|
181
|
+
io.write_uint32(6) # default_sample_flags
|
|
182
|
+
size = io.pos
|
|
183
|
+
io.pos = 0
|
|
184
|
+
io.write_uint32(size)
|
|
185
|
+
io.pos = 0
|
|
186
|
+
|
|
187
|
+
box = BMFF::Box.get_box(io, nil)
|
|
188
|
+
assert_instance_of(BMFF::Box::TrackFragmentHeader, box)
|
|
189
|
+
assert_equal(size, box.actual_size)
|
|
190
|
+
assert_equal("tfhd", box.type)
|
|
191
|
+
assert_equal(0, box.version)
|
|
192
|
+
assert_equal(32, box.flags)
|
|
193
|
+
assert_equal(1, box.track_id)
|
|
194
|
+
assert_nil(box.base_data_offset)
|
|
195
|
+
assert_nil(box.sample_description_index)
|
|
196
|
+
assert_nil(box.default_sample_duration)
|
|
197
|
+
assert_nil(box.default_sample_size)
|
|
198
|
+
assert_equal(6, box.default_sample_flags)
|
|
199
|
+
end
|
|
200
|
+
end
|