one-k-rmov 0.2.3 → 0.2.4
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/CHANGELOG +5 -0
- data/Rakefile +1 -1
- data/ext/track.c +73 -14
- data/rmov.gemspec +2 -2
- data/spec/quicktime/hd_track_spec.rb +19 -19
- metadata +2 -2
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('rmov', '0.2.
|
5
|
+
Echoe.new('rmov', '0.2.4') do |p|
|
6
6
|
p.summary = "Ruby wrapper for the QuickTime C API."
|
7
7
|
p.description = "Ruby wrapper for the QuickTime C API. Updates by 1K include exposing some movie properties such as codec and audio channel descriptions"
|
8
8
|
p.url = "http://github.com/ryanb/rmov"
|
data/ext/track.c
CHANGED
@@ -389,40 +389,94 @@ static char* track_str_for_AudioChannelLabel(label) {
|
|
389
389
|
switch (label) {
|
390
390
|
|
391
391
|
case kAudioChannelLabel_Left:
|
392
|
-
trackStr = "
|
392
|
+
trackStr = "Left";
|
393
393
|
break;
|
394
394
|
case kAudioChannelLabel_Right:
|
395
|
-
trackStr = "
|
395
|
+
trackStr = "Right";
|
396
396
|
break;
|
397
397
|
case kAudioChannelLabel_Center:
|
398
|
-
trackStr = "
|
398
|
+
trackStr = "Center";
|
399
399
|
break;
|
400
400
|
case kAudioChannelLabel_LFEScreen:
|
401
401
|
trackStr = "LFEScreen";
|
402
402
|
break;
|
403
403
|
case kAudioChannelLabel_LeftSurround:
|
404
|
-
trackStr = "
|
404
|
+
trackStr = "LeftSurround";
|
405
405
|
break;
|
406
406
|
case kAudioChannelLabel_RightSurround:
|
407
|
-
trackStr = "
|
407
|
+
trackStr = "RightSurround";
|
408
408
|
break;
|
409
409
|
case kAudioChannelLabel_LeftCenter:
|
410
|
-
trackStr = "
|
410
|
+
trackStr = "LeftCenter";
|
411
411
|
break;
|
412
412
|
case kAudioChannelLabel_RightCenter:
|
413
|
-
trackStr = "
|
413
|
+
trackStr = "RightCenter";
|
414
414
|
break;
|
415
415
|
case kAudioChannelLabel_CenterSurround:
|
416
|
-
trackStr = "
|
416
|
+
trackStr = "CenterSurround";
|
417
417
|
break;
|
418
418
|
case kAudioChannelLabel_LeftSurroundDirect:
|
419
|
-
trackStr = "
|
419
|
+
trackStr = "LeftSurroundDirect";
|
420
420
|
break;
|
421
421
|
case kAudioChannelLabel_RightSurroundDirect:
|
422
|
-
trackStr = "
|
422
|
+
trackStr = "RightSurroundDirect";
|
423
423
|
break;
|
424
424
|
case kAudioChannelLabel_TopCenterSurround:
|
425
|
-
trackStr = "
|
425
|
+
trackStr = "TopCenterSurround";
|
426
|
+
break;
|
427
|
+
case kAudioChannelLabel_VerticalHeightLeft:
|
428
|
+
trackStr = "VerticalHeightLeft";
|
429
|
+
break;
|
430
|
+
case kAudioChannelLabel_VerticalHeightCenter:
|
431
|
+
trackStr = "VerticalHeightCenter";
|
432
|
+
break;
|
433
|
+
case kAudioChannelLabel_VerticalHeightRight:
|
434
|
+
trackStr = "VerticalHeightRight";
|
435
|
+
break;
|
436
|
+
case kAudioChannelLabel_TopBackLeft:
|
437
|
+
trackStr = "TopBackLeft";
|
438
|
+
break;
|
439
|
+
case kAudioChannelLabel_TopBackCenter:
|
440
|
+
trackStr = "TopBackCenter";
|
441
|
+
break;
|
442
|
+
case kAudioChannelLabel_TopBackRight:
|
443
|
+
trackStr = "TopBackRight";
|
444
|
+
break;
|
445
|
+
case kAudioChannelLabel_RearSurroundLeft:
|
446
|
+
trackStr = "RearSurroundLeft";
|
447
|
+
break;
|
448
|
+
case kAudioChannelLabel_RearSurroundRight:
|
449
|
+
trackStr = "RearSurroundRight";
|
450
|
+
break;
|
451
|
+
case kAudioChannelLabel_LeftWide:
|
452
|
+
trackStr = "LeftWide";
|
453
|
+
break;
|
454
|
+
case kAudioChannelLabel_RightWide:
|
455
|
+
trackStr = "RightWide";
|
456
|
+
break;
|
457
|
+
case kAudioChannelLabel_LFE2:
|
458
|
+
trackStr = "LFE2";
|
459
|
+
break;
|
460
|
+
case kAudioChannelLabel_LeftTotal:
|
461
|
+
trackStr = "LeftTotal";
|
462
|
+
break;
|
463
|
+
case kAudioChannelLabel_RightTotal:
|
464
|
+
trackStr = "RightTotal";
|
465
|
+
break;
|
466
|
+
case kAudioChannelLabel_HearingImpaired:
|
467
|
+
trackStr = "HearingImpaired";
|
468
|
+
break;
|
469
|
+
case kAudioChannelLabel_Narration:
|
470
|
+
trackStr = "Narration";
|
471
|
+
break;
|
472
|
+
case kAudioChannelLabel_Mono:
|
473
|
+
trackStr = "Mono";
|
474
|
+
break;
|
475
|
+
case kAudioChannelLabel_DialogCentricMix:
|
476
|
+
trackStr = "DialogCentricMix";
|
477
|
+
break;
|
478
|
+
case kAudioChannelLabel_CenterSurroundDirect:
|
479
|
+
trackStr = "CenterSurroundDirect";
|
426
480
|
break;
|
427
481
|
|
428
482
|
default:
|
@@ -474,13 +528,18 @@ static VALUE track_get_audio_channel_map(VALUE obj)
|
|
474
528
|
switch (layoutTag) {
|
475
529
|
|
476
530
|
case kAudioChannelLayoutTag_Mono:
|
477
|
-
ADD_CHANNEL(channels, channel, "
|
531
|
+
ADD_CHANNEL(channels, channel, "Mono");
|
478
532
|
break;
|
479
533
|
|
480
534
|
case kAudioChannelLayoutTag_Stereo:
|
481
|
-
ADD_CHANNEL(channels, channel, "
|
482
|
-
ADD_CHANNEL(channels, channel, "
|
535
|
+
ADD_CHANNEL(channels, channel, "Left");
|
536
|
+
ADD_CHANNEL(channels, channel, "Right");
|
483
537
|
break;
|
538
|
+
|
539
|
+
case kAudioChannelLayoutTag_MatrixStereo :
|
540
|
+
ADD_CHANNEL(channels, channel, "LeftTotal");
|
541
|
+
ADD_CHANNEL(channels, channel, "RightTotal");
|
542
|
+
|
484
543
|
|
485
544
|
default:
|
486
545
|
// unsupported
|
data/rmov.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rmov}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Ryan Bates, with updates by 1K Studios, LLC"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-03-01}
|
10
10
|
s.description = %q{Ruby wrapper for the QuickTime C API. Updates by 1K include exposing some movie properties such as codec and audio channel descriptions}
|
11
11
|
s.email = %q{ryan (at) railscasts (dot) com}
|
12
12
|
s.extensions = ["ext/extconf.rb"]
|
@@ -35,13 +35,13 @@ describe QuickTime::Track do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
it "should have an audio channel map with tags" do
|
38
|
-
@track.channel_map[0][:assignment].should == :
|
39
|
-
@track.channel_map[1][:assignment].should == :
|
38
|
+
@track.channel_map[0][:assignment].should == :Left
|
39
|
+
@track.channel_map[1][:assignment].should == :Right
|
40
40
|
end
|
41
41
|
|
42
42
|
it "should have all audio tracks > 1 mono" do
|
43
43
|
@movie.audio_tracks[1..-1].each do |tr|
|
44
|
-
tr.channel_map[0][:assignment].should == :
|
44
|
+
tr.channel_map[0][:assignment].should == :Mono
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -57,26 +57,26 @@ describe QuickTime::Track do
|
|
57
57
|
it "has audio track 0 with left/right" do
|
58
58
|
track = @movie.audio_tracks[0]
|
59
59
|
track.channel_map.should_not == nil
|
60
|
-
track.channel_map[0][:assignment].should == :
|
61
|
-
track.channel_map[1][:assignment].should == :
|
60
|
+
track.channel_map[0][:assignment].should == :Left
|
61
|
+
track.channel_map[1][:assignment].should == :Right
|
62
62
|
end
|
63
63
|
|
64
64
|
it "has audio track 1 with left/right" do
|
65
65
|
track = @movie.audio_tracks[1]
|
66
66
|
track.channel_map.should_not == nil
|
67
|
-
track.channel_map[0][:assignment].should == :
|
67
|
+
track.channel_map[0][:assignment].should == :Left
|
68
68
|
end
|
69
69
|
|
70
70
|
it "has audio tracks with proper assignments" do
|
71
71
|
channel_maps = @movie.audio_tracks.collect {|tr| tr.channel_map}
|
72
72
|
channel_maps.should == [
|
73
|
-
[{:assignment => :
|
74
|
-
[{:assignment => :
|
75
|
-
[{:assignment => :
|
76
|
-
[{:assignment => :
|
73
|
+
[{:assignment => :Left}, {:assignment => :Right}],
|
74
|
+
[{:assignment => :Left}],
|
75
|
+
[{:assignment => :Right}],
|
76
|
+
[{:assignment => :Center}],
|
77
77
|
[{:assignment => :LFEScreen}],
|
78
|
-
[{:assignment => :
|
79
|
-
[{:assignment => :
|
78
|
+
[{:assignment => :LeftSurround}],
|
79
|
+
[{:assignment => :RightSurround}],
|
80
80
|
]
|
81
81
|
end
|
82
82
|
|
@@ -91,13 +91,13 @@ describe QuickTime::Track do
|
|
91
91
|
it "has audio tracks with proper assignments" do
|
92
92
|
channel_maps = @movie.audio_tracks.collect {|tr| tr.channel_map}
|
93
93
|
channel_maps.should == [
|
94
|
-
[{:assignment => :
|
95
|
-
[{:assignment => :
|
96
|
-
[{:assignment => :
|
97
|
-
[{:assignment => :
|
98
|
-
[{:assignment => :
|
99
|
-
[{:assignment => :
|
100
|
-
[{:assignment => :
|
94
|
+
[{:assignment => :Left}, {:assignment => :Right}],
|
95
|
+
[{:assignment => :Mono}],
|
96
|
+
[{:assignment => :Mono}],
|
97
|
+
[{:assignment => :Mono}],
|
98
|
+
[{:assignment => :Mono}],
|
99
|
+
[{:assignment => :Mono}],
|
100
|
+
[{:assignment => :Mono}],
|
101
101
|
]
|
102
102
|
end
|
103
103
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: one-k-rmov
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bates, with updates by 1K Studios, LLC
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-03-01 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|