depix 1.0.8 → 1.1.1
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 +12 -0
- data/lib/depix.rb +12 -5
- data/lib/depix/benchmark.rb +1 -1
- data/test/test_depix.rb +6 -0
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
=== 1.1.1 / 2009-12-27
|
2
|
+
|
3
|
+
* Return nil for flame_reel if the header was empty
|
4
|
+
|
5
|
+
=== 1.1.0 / 2009-11-16
|
6
|
+
|
7
|
+
* Be more intelligent when selecting timecode framerate source
|
8
|
+
|
9
|
+
=== 1.0.9 / 2009-11-16
|
10
|
+
|
11
|
+
* Accomodate the frames per second value from the file for synthetics time code
|
12
|
+
|
1
13
|
=== 1.0.8 / 2009-11-14
|
2
14
|
|
3
15
|
* Fix the version tag check so that it allows all versions but is still included, and so that the tests run
|
data/lib/depix.rb
CHANGED
@@ -10,21 +10,25 @@ require File.dirname(__FILE__) + '/depix/editor'
|
|
10
10
|
|
11
11
|
|
12
12
|
module Depix
|
13
|
-
VERSION = '1.
|
13
|
+
VERSION = '1.1.1'
|
14
14
|
|
15
15
|
class InvalidHeader < RuntimeError; end
|
16
16
|
|
17
17
|
# Offers convenience access to a few common attributes bypassing the piecemeal structs
|
18
18
|
module Synthetics
|
19
19
|
|
20
|
+
DEFAULT_DPX_FPS = 25
|
21
|
+
|
20
22
|
# Get formatted keycode as string, empty elements are omitted
|
21
23
|
def keycode
|
22
24
|
[film.id, film.type, film.offset, film.prefix, film.count].compact.join(' ')
|
23
25
|
end
|
24
26
|
|
25
|
-
# Return the flame reel name. The data after the first null byte is not meant to be seen
|
27
|
+
# Return the flame reel name. The data after the first null byte is not meant to be seen
|
28
|
+
# and is used by Flame internally
|
26
29
|
# as it seems
|
27
30
|
def flame_reel
|
31
|
+
return nil unless orientation.device
|
28
32
|
orientation.device.split(0x00.chr).shift
|
29
33
|
end
|
30
34
|
|
@@ -33,14 +37,17 @@ module Depix
|
|
33
37
|
orientation.device = new_reel
|
34
38
|
end
|
35
39
|
|
36
|
-
# Get television.time_code as a Timecode object with a framerate
|
40
|
+
# Get television.time_code as a Timecode object with a framerate.
|
41
|
+
# We explicitly use the television frame rate since Northlight
|
42
|
+
# writes different rates for television and film time code
|
37
43
|
def time_code
|
38
|
-
|
44
|
+
framerate = television.frame_rate || film.frame_rate || DEFAULT_DPX_FPS
|
45
|
+
Timecode.from_uint(television.time_code, framerate)
|
39
46
|
end
|
40
47
|
|
41
48
|
# Assign frame rate and timecode from a Timecode object
|
42
49
|
def time_code=(new_tc)
|
43
|
-
television.time_code,
|
50
|
+
television.time_code, television.frame_rate = new_tc.to_uint, new_tc.fps
|
44
51
|
end
|
45
52
|
|
46
53
|
# Get the name of the transfer function (Linear, Logarithmic, ...)
|
data/lib/depix/benchmark.rb
CHANGED
data/test/test_depix.rb
CHANGED
@@ -112,6 +112,12 @@ class ReaderTest < Test::Unit::TestCase
|
|
112
112
|
assert_raise(Depix::InvalidHeader) { Depix.from_string(s) }
|
113
113
|
|
114
114
|
end
|
115
|
+
|
116
|
+
def test_parse_with_timecode_mismatch
|
117
|
+
# This file has mismatching framerates in the film and television headers
|
118
|
+
dpx = Depix.from_file(File.dirname(__FILE__) + "/samples/northlight_tc_mode_mismatch.dpx")
|
119
|
+
assert_equal "22:02:18:24", dpx.time_code.to_s
|
120
|
+
end
|
115
121
|
end
|
116
122
|
|
117
123
|
class EditorTest < Test::Unit::TestCase
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: depix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-28 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|