wiretap 0.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. data/README +2 -1
  2. data/ext/Makefile +27 -24
  3. data/ext/audio_format.cpp +10 -8
  4. data/ext/charstream.h +41 -0
  5. data/ext/extconf.rb +8 -10
  6. data/ext/frame_io.cpp +120 -0
  7. data/ext/frame_io.h +45 -0
  8. data/ext/image_format.cpp +49 -169
  9. data/ext/image_io.cpp +466 -0
  10. data/ext/image_io.h +73 -0
  11. data/ext/node.cpp +71 -48
  12. data/ext/nodeframes.cpp +36 -34
  13. data/ext/nodemetadata.cpp +21 -3
  14. data/ext/server.cpp +2 -2
  15. data/ext/serverlist.cpp +20 -8
  16. data/ext/wiretap.cpp +11 -8
  17. data/ext/wiretap.h +17 -13
  18. data/lib/wiretap.rb +65 -5
  19. data/test_new/common.rb +8 -0
  20. data/{test/wiretap-images → test_new/fixtures/img/ppm-8bit}/01.ppm +0 -0
  21. data/test_new/fixtures/raw/cube_2k_12bitP_1f/0.stoneimage +0 -0
  22. data/test_new/fixtures/raw/cube_2k_8bit_1f/0.stoneimage +0 -0
  23. data/test_new/fixtures/raw/cube_SD_10bit_5f/0.stoneimage +0 -0
  24. data/test_new/fixtures/raw/cube_SD_10bit_5f/1.stoneimage +0 -0
  25. data/test_new/fixtures/raw/cube_SD_10bit_5f/2.stoneimage +0 -0
  26. data/test_new/fixtures/raw/cube_SD_10bit_5f/3.stoneimage +0 -0
  27. data/test_new/fixtures/raw/cube_SD_10bit_5f/4.stoneimage +0 -0
  28. data/test_new/fixtures/raw/cube_SD_12bitP_5f/0.stoneimage +0 -0
  29. data/test_new/fixtures/raw/cube_SD_12bitP_5f/1.stoneimage +0 -0
  30. data/test_new/fixtures/raw/cube_SD_12bitP_5f/2.stoneimage +0 -0
  31. data/test_new/fixtures/raw/cube_SD_12bitP_5f/3.stoneimage +0 -0
  32. data/test_new/fixtures/raw/cube_SD_12bitP_5f/4.stoneimage +0 -0
  33. data/test_new/fixtures/raw/cube_SD_12bitU_5f/0.stoneimage +0 -0
  34. data/test_new/fixtures/raw/cube_SD_12bitU_5f/1.stoneimage +0 -0
  35. data/test_new/fixtures/raw/cube_SD_12bitU_5f/2.stoneimage +0 -0
  36. data/test_new/fixtures/raw/cube_SD_12bitU_5f/3.stoneimage +0 -0
  37. data/test_new/fixtures/raw/cube_SD_12bitU_5f/4.stoneimage +0 -0
  38. data/test_new/fixtures/raw/cube_SD_8bit_8f/0.stoneimage +0 -0
  39. data/test_new/fixtures/raw/cube_SD_8bit_8f/1.stoneimage +0 -0
  40. data/test_new/fixtures/raw/cube_SD_8bit_8f/2.stoneimage +0 -0
  41. data/test_new/fixtures/raw/cube_SD_8bit_8f/3.stoneimage +0 -0
  42. data/test_new/fixtures/raw/cube_SD_8bit_8f/4.stoneimage +0 -0
  43. data/test_new/fixtures/raw/cube_SD_8bit_8f/5.stoneimage +0 -0
  44. data/test_new/fixtures/raw/cube_SD_8bit_8f/6.stoneimage +0 -0
  45. data/test_new/fixtures/raw/cube_SD_8bit_8f/7.stoneimage +0 -0
  46. data/{test/wiretap-images/b1.stonesound → test_new/fixtures/raw-snd/simple.stonesound} +0 -0
  47. data/{test/wiretap-images/output.wav → test_new/fixtures/snd/simple-wave.wav} +0 -0
  48. data/test_new/test_audio_conversions.rb +28 -0
  49. data/test_new/test_image_conversions.rb +132 -0
  50. data/test_new/test_parts/connect_to_test_host.rb +27 -0
  51. data/test_new/test_parts/constants.rb +7 -0
  52. data/test_new/test_parts/create_test_project.rb +37 -0
  53. data/test_new/test_parts/raw_formats_and_uploads.rb +170 -0
  54. data/test_new/test_parts/server_list.rb +20 -0
  55. data/test_new/test_parts/simple_node_lookup_and_browsing.rb +76 -0
  56. data/test_new/test_suite.rb +70 -0
  57. data/{test/convert.rb → test_new/test_thread_worker.rb} +2 -3
  58. metadata +71 -61
  59. data/ext/bmp.cpp +0 -65
  60. data/ext/image.h +0 -27
  61. data/ext/ppm.cpp +0 -132
  62. data/ext/sgi.cpp +0 -69
  63. data/test/audio.rb +0 -27
  64. data/test/image.rb +0 -101
  65. data/test/read_frames.rb +0 -142
  66. data/test/wiretap-images/32bit.stoneimage +0 -621
  67. data/test/wiretap-images/36bit.stoneimage +0 -1036
  68. data/test/wiretap-images/48bit.stoneimage +1 -800
  69. data/test/wiretap-images/a.stoneimage +0 -0
  70. data/test/wiretap-images/a0.stoneimage +0 -0
  71. data/test/wiretap-images/a1.stoneimage +0 -0
  72. data/test/wiretap-images/a2.stoneimage +0 -0
  73. data/test/wiretap-images/a3.stoneimage +0 -0
  74. data/test/wiretap-images/a4.stoneimage +0 -0
  75. data/test/wiretap-images/importable-seq/00000001.ppm +0 -0
  76. data/test/wiretap-images/importable-seq/00000002.ppm +0 -0
  77. data/test/wiretap-images/importable-seq/00000003.ppm +0 -0
  78. data/test/wiretap-images/importable-seq/00000004.ppm +0 -0
  79. data/test/wiretap-images/importable-seq/00000005.ppm +0 -0
  80. data/test/wiretap-images/importable-seq/00000006.ppm +0 -0
  81. data/test/wiretap-images/importable-seq/00000007.ppm +0 -0
  82. data/test/wiretap-images/importable-seq/00000008.ppm +0 -0
  83. data/test/wiretap-images/importable-seq/00000009.ppm +0 -0
  84. data/test/wiretap-images/importable-seq/00000010.ppm +0 -0
  85. data/test/wiretap-images/importable-seq/00000011.ppm +0 -0
  86. data/test/wiretap-images/importable-seq/00000012.ppm +0 -0
  87. data/test/wiretap-images/monsters_001.tif +0 -0
  88. data/test/wiretap-images/monsters_002.tif +0 -0
  89. data/test/wiretap-images/monsters_003.tif +0 -0
  90. data/test/wiretap-images/output.mov +0 -0
  91. 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
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