wiretap 0.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +2 -1
- data/ext/Makefile +27 -24
- data/ext/audio_format.cpp +10 -8
- data/ext/charstream.h +41 -0
- data/ext/extconf.rb +8 -10
- data/ext/frame_io.cpp +120 -0
- data/ext/frame_io.h +45 -0
- data/ext/image_format.cpp +49 -169
- data/ext/image_io.cpp +466 -0
- data/ext/image_io.h +73 -0
- data/ext/node.cpp +71 -48
- data/ext/nodeframes.cpp +36 -34
- data/ext/nodemetadata.cpp +21 -3
- data/ext/server.cpp +2 -2
- data/ext/serverlist.cpp +20 -8
- data/ext/wiretap.cpp +11 -8
- data/ext/wiretap.h +17 -13
- data/lib/wiretap.rb +65 -5
- data/test_new/common.rb +8 -0
- data/{test/wiretap-images → test_new/fixtures/img/ppm-8bit}/01.ppm +0 -0
- data/test_new/fixtures/raw/cube_2k_12bitP_1f/0.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_2k_8bit_1f/0.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_10bit_5f/0.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_10bit_5f/1.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_10bit_5f/2.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_10bit_5f/3.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_10bit_5f/4.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitP_5f/0.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitP_5f/1.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitP_5f/2.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitP_5f/3.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitP_5f/4.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitU_5f/0.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitU_5f/1.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitU_5f/2.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitU_5f/3.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_12bitU_5f/4.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_8bit_8f/0.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_8bit_8f/1.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_8bit_8f/2.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_8bit_8f/3.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_8bit_8f/4.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_8bit_8f/5.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_8bit_8f/6.stoneimage +0 -0
- data/test_new/fixtures/raw/cube_SD_8bit_8f/7.stoneimage +0 -0
- data/{test/wiretap-images/b1.stonesound → test_new/fixtures/raw-snd/simple.stonesound} +0 -0
- data/{test/wiretap-images/output.wav → test_new/fixtures/snd/simple-wave.wav} +0 -0
- data/test_new/test_audio_conversions.rb +28 -0
- data/test_new/test_image_conversions.rb +132 -0
- data/test_new/test_parts/connect_to_test_host.rb +27 -0
- data/test_new/test_parts/constants.rb +7 -0
- data/test_new/test_parts/create_test_project.rb +37 -0
- data/test_new/test_parts/raw_formats_and_uploads.rb +170 -0
- data/test_new/test_parts/server_list.rb +20 -0
- data/test_new/test_parts/simple_node_lookup_and_browsing.rb +76 -0
- data/test_new/test_suite.rb +70 -0
- data/{test/convert.rb → test_new/test_thread_worker.rb} +2 -3
- metadata +71 -61
- data/ext/bmp.cpp +0 -65
- data/ext/image.h +0 -27
- data/ext/ppm.cpp +0 -132
- data/ext/sgi.cpp +0 -69
- data/test/audio.rb +0 -27
- data/test/image.rb +0 -101
- data/test/read_frames.rb +0 -142
- data/test/wiretap-images/32bit.stoneimage +0 -621
- data/test/wiretap-images/36bit.stoneimage +0 -1036
- data/test/wiretap-images/48bit.stoneimage +1 -800
- data/test/wiretap-images/a.stoneimage +0 -0
- data/test/wiretap-images/a0.stoneimage +0 -0
- data/test/wiretap-images/a1.stoneimage +0 -0
- data/test/wiretap-images/a2.stoneimage +0 -0
- data/test/wiretap-images/a3.stoneimage +0 -0
- data/test/wiretap-images/a4.stoneimage +0 -0
- data/test/wiretap-images/importable-seq/00000001.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000002.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000003.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000004.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000005.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000006.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000007.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000008.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000009.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000010.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000011.ppm +0 -0
- data/test/wiretap-images/importable-seq/00000012.ppm +0 -0
- data/test/wiretap-images/monsters_001.tif +0 -0
- data/test/wiretap-images/monsters_002.tif +0 -0
- data/test/wiretap-images/monsters_003.tif +0 -0
- data/test/wiretap-images/output.mov +0 -0
- data/test/write_frames.rb +0 -82
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/write_frames.rb
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
require File.dirname(__FILE__) + '/../lib/wiretap'
|
3
|
-
|
4
|
-
class WriteTest < Test::Unit::TestCase
|
5
|
-
def setup
|
6
|
-
@tezro = ENV['RUBY_WIRETAP_TEST_HOST']
|
7
|
-
@test_lib = "/stonefs/RubyWiretapTest/Default"
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_flame_write_video
|
11
|
-
libp = "#{@tezro}/#{@test_lib}"
|
12
|
-
puts libp
|
13
|
-
assert @library = Wiretap.open(libp)
|
14
|
-
|
15
|
-
assert @server = @library.server
|
16
|
-
assert_equal "1.7", @server.version
|
17
|
-
assert_equal "Discreet", @server.vendor
|
18
|
-
assert_equal "IFFFS @ mprel - Product_2744", @server.product
|
19
|
-
|
20
|
-
children_count = @library.children.count
|
21
|
-
|
22
|
-
@reel = @library.create_reel("WiretapTestReel")
|
23
|
-
assert_kind_of Wiretap::Reel, @reel, "A test reel shoudl have been created"
|
24
|
-
|
25
|
-
assert @library_cpy = Wiretap.open(libp)
|
26
|
-
## TBD assert_equal @library_cpy, @library
|
27
|
-
assert_equal children_count + 1, @library_cpy.children.count
|
28
|
-
assert @reel.destroy
|
29
|
-
|
30
|
-
@reel = @library.create_reel("WiretapTestReel")
|
31
|
-
assert_kind_of Wiretap::Reel, @reel, "A test reel shoudl have been created"
|
32
|
-
|
33
|
-
ppm_dir = File.dirname(__FILE__) + '/wiretap-images/importable-seq'
|
34
|
-
first_file = File.join(ppm_dir, "00000001.ppm")
|
35
|
-
|
36
|
-
@format = Wiretap::PPM::format(first_file)
|
37
|
-
assert_kind_of Wiretap::ClipFormat, @format
|
38
|
-
|
39
|
-
assert_equal 300, @format.width, "The PPM files are 300x240"
|
40
|
-
assert_equal 240, @format.height, "The PPM files are 300x240"
|
41
|
-
assert_equal 24, @format.bpp, "The PPM files are 1 byte per channel"
|
42
|
-
assert_equal 3, @format.channels, "PPM files are RGB"
|
43
|
-
assert_equal 25.0, @format.rate
|
44
|
-
assert_equal :rgb, @format.tag
|
45
|
-
assert_equal :IFFFS_XML, @format.meta_tag
|
46
|
-
|
47
|
-
@clip = @reel.send(:create_clip, "imported-sequence", "CLIP", @format)
|
48
|
-
assert_not_nil @clip
|
49
|
-
assert_kind_of Wiretap::Clip, @clip
|
50
|
-
assert_equal "imported-sequence", @clip.name
|
51
|
-
assert_equal 0, @clip.frames.length
|
52
|
-
|
53
|
-
assert_nothing_raised { @clip.import_directory(ppm_dir) }
|
54
|
-
|
55
|
-
@fmt = @clip.format
|
56
|
-
assert_equal 300, @fmt.width
|
57
|
-
assert_equal 240, @fmt.height
|
58
|
-
|
59
|
-
assert_equal 12, @clip.frames.length
|
60
|
-
assert_nothing_raised("Should replace the frame 0") { @clip.frames.write_from_file(0, first_file) }
|
61
|
-
assert_nothing_raised("Should replace the frame 8") { @clip.frames.write_from_file(8, first_file) }
|
62
|
-
assert_nothing_raised("Should replace the frame 10") { @clip.frames.write_from_file(10, first_file) }
|
63
|
-
|
64
|
-
### WHY?
|
65
|
-
# assert_nothing_raised("Should replace the frame 11") { @clip.frames.write_from_file(11, first_file) }
|
66
|
-
|
67
|
-
assert_equal 12, @clip.frames.length, "The number of frames should not change"
|
68
|
-
|
69
|
-
assert_raise(Wiretap::Error, "Should forbid adding frames to avoid a crash") {
|
70
|
-
@clip.frames.write_from_file(12, first_file)
|
71
|
-
}
|
72
|
-
|
73
|
-
assert_nothing_raised do
|
74
|
-
@another_clip = @reel.import_image("Test", first_file)
|
75
|
-
assert_kind_of Wiretap::Clip, @another_clip
|
76
|
-
assert_equal 1, @another_clip.frames.length, "The clip now has one frame"
|
77
|
-
end
|
78
|
-
|
79
|
-
assert_nothing_raised { @clip.destroy }
|
80
|
-
assert_nothing_raised { @another_clip.destroy }
|
81
|
-
end
|
82
|
-
end
|