edl 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.0.4 / 2000-01-14
2
+
3
+ * EDL::Event#speed works as a shortcut for timewarp speed
4
+
1
5
  === 0.0.2 / 2000-01-14
2
6
 
3
7
  * Fix reverse timewarps
data/Manifest.txt CHANGED
@@ -10,7 +10,6 @@ lib/edl/event.rb
10
10
  lib/edl/grabber.rb
11
11
  lib/edl/timewarp.rb
12
12
  lib/edl/transition.rb
13
- test/.DS_Store
14
13
  test/samples/45S_SAMPLE.EDL
15
14
  test/samples/FCP_REVERSE.EDL
16
15
  test/samples/REVERSE.EDL
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 (FAILURE - 1)
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 (FAILURE - 2)
73
+ * parse cleanly
74
74
 
75
- 49 specifications, 1 empty (144 requirements), 2 failures
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.3"
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 : (src_start_tc + rec_length_with_transition)
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.3
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