mediainfo 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -59,125 +59,125 @@ class MediainfoOmenImageTest < ActiveSupport::TestCase
59
59
  end
60
60
 
61
61
  ### VIDEO
62
-
62
+ =begin
63
63
  test "video Format" do
64
- assert_nil @info.video_format
64
+ assert_nil @info.video.format
65
65
  end
66
66
 
67
67
  test "video format profile" do
68
- assert_nil @info.video_format_profile
68
+ assert_nil @info.video.format_profile
69
69
  end
70
70
 
71
71
  test "video format settings CABAC" do
72
- assert_nil @info.video_format_settings_cabac
72
+ assert_nil @info.video.format_settings_cabac
73
73
  end
74
74
 
75
75
  test "video format settings ReFrames" do
76
- assert_nil @info.video_format_settings_cabac
76
+ assert_nil @info.video.format_settings_cabac
77
77
  end
78
78
 
79
79
  test "video Codec ID" do
80
- assert_nil @info.video_codec_id
80
+ assert_nil @info.video.codec_id
81
81
  end
82
82
 
83
83
  test "video Duration" do
84
- assert_nil @info.video_duration
84
+ assert_nil @info.video.duration
85
85
  end
86
86
 
87
87
  test "video Bit rate" do
88
- assert_nil @info.video_bit_rate
88
+ assert_nil @info.video.bit_rate
89
89
  end
90
90
 
91
91
  test "video bit rate mode" do
92
- assert_nil @info.video_bit_rate_mode
92
+ assert_nil @info.video.bit_rate_mode
93
93
  end
94
94
 
95
- test "resolution" do
96
- assert_equal "480x336", @info.resolution
95
+ test "frame size" do
96
+ assert_equal "480x336", @info.frame_size
97
97
  end
98
98
 
99
99
  test "video Width" do
100
- assert_nil @info.video_width
100
+ assert_nil @info.video.width
101
101
  end
102
102
 
103
103
  test "video Height" do
104
- assert_nil @info.video_height
104
+ assert_nil @info.video.height
105
105
  end
106
106
 
107
107
  test "video Display aspect ratio" do
108
- assert_nil @info.video_display_aspect_ratio
108
+ assert_nil @info.video.display_aspect_ratio
109
109
  assert_nil @info.display_aspect_ratio
110
110
  end
111
111
 
112
112
  test "video Frame rate" do
113
- assert_nil @info.video_frame_rate
113
+ assert_nil @info.video.frame_rate
114
114
  assert_nil @info.fps
115
115
  assert_nil @info.framerate
116
116
  end
117
117
 
118
118
  test "video frame rate mode" do
119
- assert_nil @info.video_frame_rate_mode
119
+ assert_nil @info.video.frame_rate_mode
120
120
  end
121
121
 
122
122
  test "video Resolution" do
123
- assert_nil @info.video_resolution
123
+ assert_nil @info.video.resolution
124
124
  end
125
125
 
126
126
  test "video colorimetry" do
127
- assert_nil @info.video_colorimetry
128
- assert_nil @info.video_colorspace
127
+ assert_nil @info.video.colorimetry
128
+ assert_nil @info.video.colorspace
129
129
  end
130
130
 
131
131
  test "video Scan type" do
132
- assert_nil @info.video_scan_type
132
+ assert_nil @info.video.scan_type
133
133
  assert !@info.interlaced?
134
134
  assert !@info.progressive?
135
135
  end
136
136
 
137
137
  test "video Bits/(Pixel*Frame)" do
138
- assert_nil @info.video_bits_pixel_frame
138
+ assert_nil @info.video.bits_pixel_frame
139
139
  end
140
140
 
141
141
  test "video Stream size" do
142
- assert_nil @info.video_stream_size
142
+ assert_nil @info.video.stream_size
143
143
  end
144
144
 
145
145
  ### AUDIO
146
146
 
147
147
  test "audio Format" do
148
- assert_nil @info.audio_format
148
+ assert_nil @info.audio.format
149
149
  end
150
150
 
151
151
  test "audio Format settings, Endianness" do
152
- assert_nil @info.audio_format_settings_endianness
152
+ assert_nil @info.audio.format_settings_endianness
153
153
  end
154
154
 
155
155
  test "audio Format settings, Sign" do
156
- assert_nil @info.audio_format_settings_sign
156
+ assert_nil @info.audio.format_settings_sign
157
157
  end
158
158
 
159
159
  test "audio Codec ID" do
160
- assert_nil @info.audio_codec_id
160
+ assert_nil @info.audio.codec_id
161
161
  end
162
162
 
163
163
  test "audio Codec ID/Info" do
164
- assert_nil @info.audio_codec_info
164
+ assert_nil @info.audio.codec_info
165
165
  end
166
166
 
167
167
  test "audio Duration" do
168
- assert_nil @info.audio_duration
168
+ assert_nil @info.audio.duration
169
169
  end
170
170
 
171
171
  test "audio Bit rate mode" do
172
- assert_nil @info.audio_bit_rate_mode
172
+ assert_nil @info.audio.bit_rate_mode
173
173
  end
174
174
 
175
175
  test "audio Bit rate" do
176
- assert_nil @info.audio_bit_rate
176
+ assert_nil @info.audio.bit_rate
177
177
  end
178
178
 
179
179
  test "audio Channel(s)" do
180
- assert_nil @info.audio_channels
180
+ assert_nil @info.audio.channels
181
181
  end
182
182
 
183
183
  test "stereo?" do
@@ -189,46 +189,44 @@ class MediainfoOmenImageTest < ActiveSupport::TestCase
189
189
  end
190
190
 
191
191
  test "audio Sampling rate" do
192
- assert_nil @info.audio_sampling_rate
192
+ assert_nil @info.audio.sampling_rate
193
193
  end
194
194
 
195
195
  test "audio Resolution" do
196
- assert_nil @info.audio_resolution
196
+ assert_nil @info.audio.resolution
197
197
  end
198
198
 
199
199
  test "audio Stream size" do
200
- assert_nil @info.audio_stream_size
200
+ assert_nil @info.audio.stream_size
201
201
  end
202
202
 
203
203
  test "audio Interleave, duration" do
204
- assert_nil @info.audio_interleave_duration
204
+ assert_nil @info.audio.interleave_duration
205
205
  end
206
206
 
207
207
  test "audio encoded date" do
208
- assert_nil @info.audio_encoded_date
208
+ assert_nil @info.audio.encoded_date
209
209
  end
210
210
 
211
211
  test "audio tagged date" do
212
- assert_nil @info.audio_tagged_date
212
+ assert_nil @info.audio.tagged_date
213
213
  end
214
-
214
+ =end
215
215
  ### IMAGE
216
216
 
217
217
  test "image format" do
218
- assert_equal "JPEG", @info.image_format
218
+ assert_equal "JPEG", @info.image.format
219
219
  end
220
220
 
221
221
  test "image width" do
222
- assert_equal 480, @info.image_width
223
- assert_equal 480, @info.width
222
+ assert_equal 480, @info.image.width
224
223
  end
225
224
 
226
225
  test "image height" do
227
- assert_equal 336, @info.image_height
228
- assert_equal 336, @info.height
226
+ assert_equal 336, @info.image.height
229
227
  end
230
228
 
231
229
  test "image resolution" do
232
- assert_equal "24 bits", @info.image_resolution
230
+ assert_equal "24 bits", @info.image.resolution
233
231
  end
234
232
  end
@@ -28,7 +28,9 @@ class MediainfoTest < ActiveSupport::TestCase
28
28
  :video_scan_type,
29
29
  :video_resolution,
30
30
  :video_colorimetry,
31
+ :video_standard,
31
32
  :video_format,
33
+ :video_format_info,
32
34
  :video_format_profile,
33
35
  :video_format_version,
34
36
  :video_format_settings_cabac,
@@ -62,8 +64,11 @@ class MediainfoTest < ActiveSupport::TestCase
62
64
  :audio_resolution,
63
65
  :audio_format,
64
66
  :audio_format_info,
67
+ :audio_format_profile,
65
68
  :audio_format_settings_endianness,
66
69
  :audio_format_settings_sign,
70
+ :audio_format_settings_sbr,
71
+ :audio_format_version,
67
72
  :audio_codec_id,
68
73
  :audio_codec_id_hint,
69
74
  :audio_codec_info,
@@ -62,201 +62,198 @@ class MediainfoVimeoTest < ActiveSupport::TestCase
62
62
  ### VIDEO
63
63
 
64
64
  test "video stream id" do
65
- assert_equal "0", @info.video_stream_id
65
+ assert_equal "0", @info.video.stream_id
66
66
  end
67
67
 
68
68
  test "video Format" do
69
- assert_equal "M-JPEG", @info.video_format
69
+ assert_equal "M-JPEG", @info.video.format
70
70
  end
71
71
 
72
72
  test "video format profile" do
73
- assert_nil @info.video_format_profile
73
+ assert_nil @info.video.format_profile
74
74
  end
75
75
 
76
76
  test "video format version" do
77
- assert_nil @info.video_format_version
77
+ assert_nil @info.video.format_version
78
78
  end
79
79
 
80
80
  test "video format settings Matrix" do
81
- assert_nil @info.video_format_settings_matrix
81
+ assert_nil @info.video.format_settings_matrix
82
82
  end
83
83
 
84
84
  test "video format settings CABAC" do
85
- assert_nil @info.video_format_settings_cabac
85
+ assert_nil @info.video.format_settings_cabac
86
86
  end
87
87
 
88
88
  test "video format settings ReFrames" do
89
- assert_nil @info.video_format_settings_reframes
89
+ assert_nil @info.video.format_settings_reframes
90
90
  end
91
91
 
92
92
  test "video Codec ID" do
93
- assert_equal "MJPG", @info.video_codec_id
93
+ assert_equal "MJPG", @info.video.codec_id
94
94
  end
95
95
 
96
96
  test "video Duration" do
97
- assert_equal 15164, @info.video_duration
98
- assert_equal "15s 164ms", @info.video_duration_before_type_cast
97
+ assert_equal 15164, @info.video.duration
98
+ assert_equal "15s 164ms", @info.video.duration_before_type_cast
99
99
  end
100
100
 
101
101
  test "video Bit rate" do
102
- assert_equal "2 019 Kbps", @info.video_bit_rate
102
+ assert_equal "2 019 Kbps", @info.video.bit_rate
103
103
  end
104
104
 
105
105
  test "video nominal bit rate" do
106
- assert_nil @info.video_nominal_bit_rate
106
+ assert_nil @info.video.nominal_bit_rate
107
107
  end
108
108
 
109
109
  test "video bit rate mode" do
110
- assert_nil @info.video_bit_rate_mode
111
- assert @info.vbr?
112
- assert !@info.cbr?
110
+ assert_nil @info.video.bit_rate_mode
111
+ assert @info.video.vbr?
112
+ assert !@info.video.cbr?
113
113
  end
114
114
 
115
- test "resolution" do
116
- assert_equal "320x240", @info.resolution
115
+ test "frame size" do
116
+ assert_equal "320x240", @info.video.frame_size
117
117
  end
118
118
 
119
119
  test "video Width" do
120
- assert_equal 320, @info.video_width
121
- assert_equal 320, @info.width
120
+ assert_equal 320, @info.video.width
122
121
  end
123
122
 
124
123
  test "video Height" do
125
- assert_equal 240, @info.video_height
126
- assert_equal 240, @info.height
124
+ assert_equal 240, @info.video.height
127
125
  end
128
126
 
129
127
  test "video Display aspect ratio" do
130
- assert_equal "4:3", @info.video_display_aspect_ratio
131
- assert_equal "4:3", @info.display_aspect_ratio
128
+ assert_equal "4:3", @info.video.display_aspect_ratio
132
129
  end
133
130
 
134
131
  test "video frame rate" do
135
- assert_equal "15.102 fps", @info.video_frame_rate
136
- assert_equal 15.102, @info.fps
137
- assert_equal 15.102, @info.framerate
132
+ assert_equal "15.102 fps", @info.video.frame_rate
133
+ assert_equal 15.102, @info.video.fps
134
+ assert_equal 15.102, @info.video.framerate
138
135
  end
139
136
 
140
137
  test "video frame rate mode" do
141
- assert_nil @info.video_frame_rate_mode
138
+ assert_nil @info.video.frame_rate_mode
142
139
  end
143
140
 
144
141
  test "video Resolution" do
145
- assert_equal 24, @info.video_resolution
146
- assert_equal "24 bits", @info.video_resolution_before_type_cast
142
+ assert_equal 24, @info.video.resolution
143
+ assert_equal "24 bits", @info.video.resolution_before_type_cast
147
144
  end
148
145
 
149
146
  test "video colorimetry" do
150
- assert_nil @info.video_colorimetry
151
- assert_nil @info.video_colorspace
147
+ assert_nil @info.video.colorimetry
148
+ assert_nil @info.video.colorspace
152
149
  end
153
150
 
154
151
  test "video Scan type" do
155
- assert_equal "Progressive", @info.video_scan_type
156
- assert !@info.interlaced?
157
- assert @info.progressive?
152
+ assert_equal "Progressive", @info.video.scan_type
153
+ assert !@info.video.interlaced?
154
+ assert @info.video.progressive?
158
155
  end
159
156
 
160
157
  test "video scan order" do
161
- assert_nil @info.video_scan_order
158
+ assert_nil @info.video.scan_order
162
159
  end
163
160
 
164
161
  test "video Bits/(Pixel*Frame)" do
165
- assert_equal "1.741", @info.video_bits_pixel_frame
162
+ assert_equal "1.741", @info.video.bits_pixel_frame
166
163
  end
167
164
 
168
165
  test "video Stream size" do
169
- assert_equal "3.65 MiB (97%)", @info.video_stream_size
166
+ assert_equal "3.65 MiB (97%)", @info.video.stream_size
170
167
  end
171
168
 
172
169
  ### AUDIO
173
170
 
174
171
  test "audio stream id" do
175
- assert_nil @info.audio_stream_id
172
+ assert_nil @info.audio.stream_id
176
173
  end
177
174
 
178
175
  test "audio Format" do
179
- assert_equal "ADPCM", @info.audio_format
176
+ assert_equal "ADPCM", @info.audio.format
180
177
  end
181
178
 
182
179
  test "audio format info" do
183
- assert_nil @info.audio_format_info
180
+ assert_nil @info.audio.format_info
184
181
  end
185
182
 
186
183
  test "audio codec id hint" do
187
- assert_equal "Intel", @info.audio_codec_id_hint
184
+ assert_equal "Intel", @info.audio.codec_id_hint
188
185
  end
189
186
 
190
187
  test "audio Format settings, Endianness" do
191
- assert_nil @info.audio_format_settings_endianness
188
+ assert_nil @info.audio.format_settings_endianness
192
189
  end
193
190
 
194
191
  test "audio Format settings, Sign" do
195
- assert_nil @info.audio_format_settings_sign
192
+ assert_nil @info.audio.format_settings_sign
196
193
  end
197
194
 
198
195
  test "audio Codec ID" do
199
- assert_equal "11", @info.audio_codec_id
196
+ assert_equal "11", @info.audio.codec_id
200
197
  end
201
198
 
202
199
  test "audio Codec ID/Info" do
203
- assert_nil @info.audio_codec_info
200
+ assert_nil @info.audio.codec_info
204
201
  end
205
202
 
206
203
  test "audio Duration" do
207
- assert_equal 15164, @info.audio_duration
208
- assert_equal "15s 164ms", @info.audio_duration_before_type_cast
204
+ assert_equal 15164, @info.audio.duration
205
+ assert_equal "15s 164ms", @info.audio.duration_before_type_cast
209
206
  end
210
207
 
211
208
  test "audio Bit rate mode" do
212
- assert_equal "Constant", @info.audio_bit_rate_mode
209
+ assert_equal "Constant", @info.audio.bit_rate_mode
213
210
  end
214
211
 
215
212
  test "audio Bit rate" do
216
- assert_equal "44.1 Kbps", @info.audio_bit_rate
213
+ assert_equal "44.1 Kbps", @info.audio.bit_rate
217
214
  end
218
215
 
219
216
  test "audio Channel(s)" do
220
- assert_equal 1, @info.audio_channels
217
+ assert_equal 1, @info.audio.channels
221
218
  end
222
219
 
223
220
  test "audio channel positions" do
224
- assert_nil @info.audio_channel_positions
221
+ assert_nil @info.audio.channel_positions
225
222
  end
226
223
 
227
224
  test "stereo?" do
228
- assert !@info.stereo?
225
+ assert !@info.audio.stereo?
229
226
  end
230
227
 
231
228
  test "mono?" do
232
- assert @info.mono?
229
+ assert @info.audio.mono?
233
230
  end
234
231
 
235
232
  test "audio Sampling rate" do
236
- assert_equal 11025, @info.audio_sample_rate
237
- assert_equal 11025, @info.audio_sampling_rate
238
- assert_equal "11.025 KHz", @info.audio_sampling_rate_before_type_cast
233
+ assert_equal 11025, @info.audio.sample_rate
234
+ assert_equal 11025, @info.audio.sampling_rate
235
+ assert_equal "11.025 KHz", @info.audio.sampling_rate_before_type_cast
239
236
  end
240
237
 
241
238
  test "audio resolution" do
242
- assert_equal 4, @info.audio_resolution
243
- assert_equal "4 bits", @info.audio_resolution_before_type_cast
239
+ assert_equal 4, @info.audio.resolution
240
+ assert_equal "4 bits", @info.audio.resolution_before_type_cast
244
241
  end
245
242
 
246
243
  test "audio Stream size" do
247
- assert_equal "82.8 KiB (2%)", @info.audio_stream_size
244
+ assert_equal "82.8 KiB (2%)", @info.audio.stream_size
248
245
  end
249
246
 
250
247
  test "audio Interleave, duration" do
251
- assert_equal "67 ms (1.00 video frame)", @info.audio_interleave_duration
248
+ assert_equal "67 ms (1.00 video frame)", @info.audio.interleave_duration
252
249
  end
253
250
 
254
251
  test "audio encoded date" do
255
- assert_nil @info.audio_encoded_date
252
+ assert_nil @info.audio.encoded_date
256
253
  end
257
254
 
258
255
  test "audio tagged date" do
259
- assert_nil @info.audio_tagged_date
256
+ assert_nil @info.audio.tagged_date
260
257
  end
261
258
 
262
259
  ### IMAGE