depix 1.1.3 → 1.1.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.
File without changes
@@ -1,3 +1,8 @@
1
+ === 1.1.4 / 2010-08-04
2
+
3
+ * Properly fallback to film framerate in timecode detection if television framerate is
4
+ recognized as being zero (is a fact for Nuke renders)
5
+
1
6
  === 1.1.3 / 2010-02-12
2
7
 
3
8
  * Discard charfield content that comes after the first null byte (seriously, who cares?)
File without changes
data/README.txt CHANGED
File without changes
data/Rakefile CHANGED
File without changes
@@ -10,7 +10,7 @@ require File.dirname(__FILE__) + '/depix/editor'
10
10
 
11
11
 
12
12
  module Depix
13
- VERSION = '1.1.3'
13
+ VERSION = '1.1.4'
14
14
 
15
15
  class InvalidHeader < RuntimeError; end
16
16
 
@@ -41,11 +41,13 @@ module Depix
41
41
  # We explicitly use the television frame rate since Northlight
42
42
  # writes different rates for television and film time code
43
43
  def time_code
44
- framerate = television.frame_rate || film.frame_rate || DEFAULT_DPX_FPS
44
+ framerates = [television.frame_rate, film.frame_rate, DEFAULT_DPX_FPS]
45
+ framerate = framerates.find{|e| !e.nil? && !e.zero? }
45
46
  if television.time_code
46
47
  Timecode.from_uint(television.time_code, framerate)
47
48
  else
48
- Timecode.new(0, framerate)
49
+ # Assume frame position
50
+ Timecode.new(film.frame_position, framerate)
49
51
  end
50
52
  end
51
53
 
File without changes
File without changes
File without changes
@@ -27,8 +27,12 @@ module Depix
27
27
  end
28
28
 
29
29
  # Copy headers from another DPX object
30
- def copy_from(another)
31
- @dpx = another
30
+ def copy_from(another, *fields_to_copy)
31
+ if fields_to_copy.empty?
32
+ @dpx = another.dup
33
+ else
34
+ fields_to_copy.each{|f| @dpx[f] = another[f] }
35
+ end
32
36
  end
33
37
 
34
38
  # Save the headers to file at path, overwriting the old ones
File without changes
File without changes
File without changes
File without changes
@@ -118,6 +118,14 @@ class ReaderTest < Test::Unit::TestCase
118
118
  dpx = Depix.from_file(File.dirname(__FILE__) + "/samples/northlight_tc_mode_mismatch.dpx")
119
119
  assert_equal "22:02:18:24", dpx.time_code.to_s
120
120
  end
121
+
122
+ def test_parse_zero_tc_fps
123
+ # This file has mismatching framerates in the film and television headers
124
+ dpx = Depix.from_file(File.dirname(__FILE__) + "/samples/from_nuke_no_TC_meta.dpx")
125
+ assert_equal "05:00:59:20", dpx.time_code.to_s
126
+ assert_equal 25, dpx.time_code.fps
127
+ end
128
+
121
129
  end
122
130
 
123
131
  class EditorTest < Test::Unit::TestCase
File without changes
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.1.3
4
+ version: 1.1.4
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: 2010-02-10 00:00:00 +01:00
12
+ date: 2010-08-04 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -25,6 +25,16 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.2.0
27
27
  version:
28
+ - !ruby/object:Gem::Dependency
29
+ name: rubyforge
30
+ type: :development
31
+ version_requirement:
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: 2.0.4
37
+ version:
28
38
  - !ruby/object:Gem::Dependency
29
39
  name: hoe
30
40
  type: :development
@@ -33,7 +43,7 @@ dependencies:
33
43
  requirements:
34
44
  - - ">="
35
45
  - !ruby/object:Gem::Version
36
- version: 2.3.3
46
+ version: 2.6.0
37
47
  version:
38
48
  description: Read and write DPX file metadata
39
49
  email: