edl 0.0.3 → 0.0.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/History.txt +4 -0
- data/Manifest.txt +0 -1
- data/SPECS.txt +3 -3
- data/lib/edl.rb +1 -1
- data/lib/edl/event.rb +7 -2
- data/test/test_edl.rb +42 -0
- metadata +1 -2
- data/test/.DS_Store +0 -0
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
data/SPECS.txt
CHANGED
@@ -38,7 +38,7 @@
|
|
38
38
|
* be parsed properly
|
39
39
|
|
40
40
|
== A Final Cut Pro originating reverse should
|
41
|
-
* be interpreted properly
|
41
|
+
* be interpreted properly
|
42
42
|
|
43
43
|
== EventMatcher should
|
44
44
|
* produce an Event
|
@@ -70,6 +70,6 @@
|
|
70
70
|
* be parsed cleanly
|
71
71
|
|
72
72
|
== A FinalCutPro speedup and reverse with fade at the end should
|
73
|
-
* parse cleanly
|
73
|
+
* parse cleanly
|
74
74
|
|
75
|
-
49 specifications, 1 empty (
|
75
|
+
49 specifications, 1 empty (145 requirements), 0 failures
|
data/lib/edl.rb
CHANGED
@@ -9,7 +9,7 @@ require File.dirname(__FILE__) + '/edl/timewarp'
|
|
9
9
|
# A simplistic EDL parser. Current limitations: no support for DF timecode, no support for audio,
|
10
10
|
# no support for split edits, no support for key effects, no support for audio
|
11
11
|
module EDL
|
12
|
-
VERSION = "0.0.
|
12
|
+
VERSION = "0.0.4"
|
13
13
|
DEFAULT_FPS = 25
|
14
14
|
|
15
15
|
# Represents an EDL, is returned from the parser. Traditional operation is functional style, i.e.
|
data/lib/edl/event.rb
CHANGED
@@ -116,12 +116,17 @@ module EDL
|
|
116
116
|
|
117
117
|
# Capture from (and including!) this timecode to complete this event including timewarps and transitions
|
118
118
|
def capture_from_tc
|
119
|
-
timewarp ? timewarp.source_used_from : src_start_tc
|
119
|
+
@timewarp ? @timewarp.source_used_from : src_start_tc
|
120
120
|
end
|
121
121
|
|
122
122
|
# Capture up to (but not including!) this timecode to complete this event including timewarps and transitions
|
123
123
|
def capture_to_tc
|
124
|
-
timewarp ? timewarp.source_used_upto : (
|
124
|
+
@timewarp ? @timewarp.source_used_upto : (src_end_tc + outgoing_transition_duration)
|
125
|
+
end
|
126
|
+
|
127
|
+
# Speed of this clip in percent relative to the source speed. 100 for non-timewarped events
|
128
|
+
def speed
|
129
|
+
@timewarp ? @timewarp.speed : 100
|
125
130
|
end
|
126
131
|
|
127
132
|
# Returns true if this event is a generator
|
data/test/test_edl.rb
CHANGED
@@ -136,6 +136,48 @@ context "An Event should" do
|
|
136
136
|
e.should.be.reverse
|
137
137
|
e.should.be.reversed
|
138
138
|
end
|
139
|
+
|
140
|
+
specify "report speed as 100 percent without a timewarp" do
|
141
|
+
e = EDL::Event.new
|
142
|
+
e.speed.should.equal 100
|
143
|
+
end
|
144
|
+
|
145
|
+
specify "consult the timewarp for speed" do
|
146
|
+
tw = flexmock
|
147
|
+
tw.should_receive(:speed).and_return(:something)
|
148
|
+
|
149
|
+
e = EDL::Event.new(:timewarp => tw)
|
150
|
+
e.speed.should.equal :something
|
151
|
+
end
|
152
|
+
|
153
|
+
|
154
|
+
specify "report capture_from_tc as the source start without a timewarp" do
|
155
|
+
e = EDL::Event.new(:src_start_tc => "1h".tc)
|
156
|
+
e.capture_from_tc.should.equal "1h".tc
|
157
|
+
end
|
158
|
+
|
159
|
+
specify "consult the timewarp for capture_from_tc if a timewarp is there" do
|
160
|
+
tw = flexmock
|
161
|
+
tw.should_receive(:source_used_from).and_return(:something)
|
162
|
+
|
163
|
+
e = EDL::Event.new(:timewarp => tw)
|
164
|
+
e.capture_from_tc.should.equal :something
|
165
|
+
end
|
166
|
+
|
167
|
+
specify "report capture_to_tc as record length plus transition when no timewarp present" do
|
168
|
+
e = EDL::Event.new(:src_end_tc => "1h 10s".tc, :outgoing_transition_duration => 2 )
|
169
|
+
e.capture_to_tc.should.equal "1h 10s 2f".tc
|
170
|
+
end
|
171
|
+
|
172
|
+
specify "consult the timewarp for capture_to_tc if timewarp is present" do
|
173
|
+
tw = flexmock
|
174
|
+
tw.should_receive(:source_used_upto).and_return(:something)
|
175
|
+
|
176
|
+
e = EDL::Event.new(:timewarp => tw)
|
177
|
+
e.capture_to_tc.should.equal :something
|
178
|
+
end
|
179
|
+
|
180
|
+
|
139
181
|
end
|
140
182
|
|
141
183
|
context "A Parser should" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik
|
@@ -77,7 +77,6 @@ files:
|
|
77
77
|
- lib/edl/grabber.rb
|
78
78
|
- lib/edl/timewarp.rb
|
79
79
|
- lib/edl/transition.rb
|
80
|
-
- test/.DS_Store
|
81
80
|
- test/samples/45S_SAMPLE.EDL
|
82
81
|
- test/samples/FCP_REVERSE.EDL
|
83
82
|
- test/samples/REVERSE.EDL
|
data/test/.DS_Store
DELETED
Binary file
|