edl 0.1.2 → 0.1.3
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/lib/edl.rb +1 -1
- data/lib/edl/event.rb +7 -2
- data/test/test_edl.rb +12 -0
- metadata +4 -4
data/History.txt
CHANGED
data/lib/edl.rb
CHANGED
@@ -10,7 +10,7 @@ require File.dirname(__FILE__) + '/edl/linebreak_magician'
|
|
10
10
|
|
11
11
|
# A simplistic EDL parser
|
12
12
|
module EDL
|
13
|
-
VERSION = "0.1.
|
13
|
+
VERSION = "0.1.3"
|
14
14
|
DEFAULT_FPS = 25.0
|
15
15
|
|
16
16
|
# Represents an EDL, is returned from the parser. Traditional operation is functional style, i.e.
|
data/lib/edl/event.rb
CHANGED
@@ -127,8 +127,13 @@ module EDL
|
|
127
127
|
def capture_from_tc
|
128
128
|
@timewarp ? @timewarp.source_used_from : src_start_tc
|
129
129
|
end
|
130
|
-
|
131
|
-
# Capture up to
|
130
|
+
|
131
|
+
# Capture up to AND INCLUDING this timecode to complete this event including timewarps and transitions
|
132
|
+
def capture_to_and_including_tc
|
133
|
+
capture_to_tc - 1
|
134
|
+
end
|
135
|
+
|
136
|
+
# Capture up to BUT NOT INCLUDING this timecode to complete this event including timewarps and transitions
|
132
137
|
def capture_to_tc
|
133
138
|
@timewarp ? @timewarp.source_used_upto : (src_end_tc + outgoing_transition_duration)
|
134
139
|
end
|
data/test/test_edl.rb
CHANGED
@@ -202,6 +202,11 @@ context "An Event should" do
|
|
202
202
|
e.capture_to_tc.should.equal "1h 10s 2f".tc
|
203
203
|
end
|
204
204
|
|
205
|
+
specify "report capture_to_and_including_tc as record length plus transition when no timewarp present" do
|
206
|
+
e = EDL::Event.new(:src_end_tc => "1h 10s".tc, :outgoing_transition_duration => 2 )
|
207
|
+
e.capture_to_and_including_tc.should.equal "1h 10s 1f".tc
|
208
|
+
end
|
209
|
+
|
205
210
|
specify "consult the timewarp for capture_to_tc if timewarp is present" do
|
206
211
|
tw = flexmock
|
207
212
|
tw.should_receive(:source_used_upto).and_return(:something)
|
@@ -455,6 +460,13 @@ context "EventMatcher should" do
|
|
455
460
|
tr.duration.should.equal 25
|
456
461
|
end
|
457
462
|
|
463
|
+
specify "produce a vanilla Event with proper source length" do
|
464
|
+
m = EDL::EventMatcher.new(25)
|
465
|
+
clip = m.apply([], '001 GEN V C 00:01:00:00 00:01:00:04 01:00:00:00 01:00:00:04')
|
466
|
+
clip.should.be.kind_of EDL::Event
|
467
|
+
clip.src_length.should.equal 4
|
468
|
+
end
|
469
|
+
|
458
470
|
specify "set flag on the previous event in the stack when a dissolve is encountered" do
|
459
471
|
m = EDL::EventMatcher.new(25)
|
460
472
|
previous_evt = flexmock
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Julik Tarkhanov
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-25 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|