wiretap 0.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.
Files changed (62) hide show
  1. data/LICENSE +32 -0
  2. data/README +93 -0
  3. data/ext/Makefile +146 -0
  4. data/ext/audio_format.cpp +224 -0
  5. data/ext/bmp.cpp +65 -0
  6. data/ext/extconf.rb +85 -0
  7. data/ext/format.cpp +347 -0
  8. data/ext/image.h +27 -0
  9. data/ext/image_format.cpp +194 -0
  10. data/ext/node.cpp +401 -0
  11. data/ext/nodechildren.cpp +67 -0
  12. data/ext/nodeframes.cpp +233 -0
  13. data/ext/nodemetadata.cpp +90 -0
  14. data/ext/ppm.cpp +132 -0
  15. data/ext/server.cpp +202 -0
  16. data/ext/serverlist.cpp +183 -0
  17. data/ext/sgi.cpp +69 -0
  18. data/ext/testserver/Makefile +5 -0
  19. data/ext/testserver/cfg/wiretap_path_translation_db.xml +44 -0
  20. data/ext/testserver/cfg/wiretapd.cfg +74 -0
  21. data/ext/testserver/cfg/wiretapd.res +60 -0
  22. data/ext/testserver/db.sql +50 -0
  23. data/ext/testserver/server.cpp +206 -0
  24. data/ext/testserver/testserver.rb +146 -0
  25. data/ext/thread_worker.cpp +85 -0
  26. data/ext/wiretap.cpp +68 -0
  27. data/ext/wiretap.h +115 -0
  28. data/lib/wiretap.rb +280 -0
  29. data/test/audio.rb +27 -0
  30. data/test/convert.rb +35 -0
  31. data/test/image.rb +101 -0
  32. data/test/read_frames.rb +142 -0
  33. data/test/wiretap-images/01.ppm +0 -0
  34. data/test/wiretap-images/32bit.stoneimage +621 -0
  35. data/test/wiretap-images/36bit.stoneimage +1036 -0
  36. data/test/wiretap-images/48bit.stoneimage +800 -1
  37. data/test/wiretap-images/a.stoneimage +0 -0
  38. data/test/wiretap-images/a0.stoneimage +0 -0
  39. data/test/wiretap-images/a1.stoneimage +0 -0
  40. data/test/wiretap-images/a2.stoneimage +0 -0
  41. data/test/wiretap-images/a3.stoneimage +0 -0
  42. data/test/wiretap-images/a4.stoneimage +0 -0
  43. data/test/wiretap-images/b1.stonesound +0 -0
  44. data/test/wiretap-images/importable-seq/00000001.ppm +0 -0
  45. data/test/wiretap-images/importable-seq/00000002.ppm +0 -0
  46. data/test/wiretap-images/importable-seq/00000003.ppm +0 -0
  47. data/test/wiretap-images/importable-seq/00000004.ppm +0 -0
  48. data/test/wiretap-images/importable-seq/00000005.ppm +0 -0
  49. data/test/wiretap-images/importable-seq/00000006.ppm +0 -0
  50. data/test/wiretap-images/importable-seq/00000007.ppm +0 -0
  51. data/test/wiretap-images/importable-seq/00000008.ppm +0 -0
  52. data/test/wiretap-images/importable-seq/00000009.ppm +0 -0
  53. data/test/wiretap-images/importable-seq/00000010.ppm +0 -0
  54. data/test/wiretap-images/importable-seq/00000011.ppm +0 -0
  55. data/test/wiretap-images/importable-seq/00000012.ppm +0 -0
  56. data/test/wiretap-images/monsters_001.tif +0 -0
  57. data/test/wiretap-images/monsters_002.tif +0 -0
  58. data/test/wiretap-images/monsters_003.tif +0 -0
  59. data/test/wiretap-images/output.mov +0 -0
  60. data/test/wiretap-images/output.wav +0 -0
  61. data/test/write_frames.rb +82 -0
  62. metadata +138 -0
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,82 @@
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
metadata ADDED
@@ -0,0 +1,138 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.0
3
+ specification_version: 1
4
+ name: wiretap
5
+ version: !ruby/object:Gem::Version
6
+ version: "0.1"
7
+ date: 2007-01-23 00:00:00 +03:00
8
+ summary: WireTap driver
9
+ require_paths:
10
+ - lib
11
+ email: max@maxidoors.ru
12
+ homepage: http://rubyforge.org/projects/wiretap/
13
+ rubyforge_project: wiretap
14
+ description:
15
+ autorequire: wiretap
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Max Lapshin
31
+ files:
32
+ - test/audio.rb
33
+ - test/convert.rb
34
+ - test/image.rb
35
+ - test/read_frames.rb
36
+ - test/wiretap-images
37
+ - test/wiretap_root
38
+ - test/write_frames.rb
39
+ - test/wiretap-images/01.ppm
40
+ - test/wiretap-images/32bit.stoneimage
41
+ - test/wiretap-images/36bit.stoneimage
42
+ - test/wiretap-images/48bit.stoneimage
43
+ - test/wiretap-images/a.stoneimage
44
+ - test/wiretap-images/a0.stoneimage
45
+ - test/wiretap-images/a1.stoneimage
46
+ - test/wiretap-images/a2.stoneimage
47
+ - test/wiretap-images/a3.stoneimage
48
+ - test/wiretap-images/a4.stoneimage
49
+ - test/wiretap-images/b1.stonesound
50
+ - test/wiretap-images/importable-seq
51
+ - test/wiretap-images/monsters_001.tif
52
+ - test/wiretap-images/monsters_002.tif
53
+ - test/wiretap-images/monsters_003.tif
54
+ - test/wiretap-images/output.mov
55
+ - test/wiretap-images/output.wav
56
+ - test/wiretap-images/importable-seq/00000001.ppm
57
+ - test/wiretap-images/importable-seq/00000002.ppm
58
+ - test/wiretap-images/importable-seq/00000003.ppm
59
+ - test/wiretap-images/importable-seq/00000004.ppm
60
+ - test/wiretap-images/importable-seq/00000005.ppm
61
+ - test/wiretap-images/importable-seq/00000006.ppm
62
+ - test/wiretap-images/importable-seq/00000007.ppm
63
+ - test/wiretap-images/importable-seq/00000008.ppm
64
+ - test/wiretap-images/importable-seq/00000009.ppm
65
+ - test/wiretap-images/importable-seq/00000010.ppm
66
+ - test/wiretap-images/importable-seq/00000011.ppm
67
+ - test/wiretap-images/importable-seq/00000012.ppm
68
+ - test/wiretap_root/192.168.171.17
69
+ - test/wiretap_root/192.168.171.208
70
+ - test/wiretap_root/192.168.171.17/stonefs
71
+ - test/wiretap_root/192.168.171.17/stonefs/Julik
72
+ - test/wiretap_root/192.168.171.17/stonefs/Julik/Default
73
+ - test/wiretap_root/192.168.171.17/stonefs/Julik/Default/freckles_8bit_snd
74
+ - test/wiretap_root/192.168.171.17/stonefs/Julik/Default/toyota_10bit
75
+ - test/wiretap_root/192.168.171.17/stonefs/Julik/Default/toyota_12bit
76
+ - test/wiretap_root/192.168.171.17/stonefs/Julik/Default/freckles_8bit_snd/freckles_8bit_snd (audio)
77
+ - test/wiretap_root/192.168.171.17/stonefs/Julik/Default/freckles_8bit_snd/freckles_8bit_snd (audio)/freckles_8bit_snd (stream)
78
+ - lib/wiretap.rb
79
+ - ext/audio_format.cpp
80
+ - ext/bmp.cpp
81
+ - ext/extconf.rb
82
+ - ext/format.cpp
83
+ - ext/image.h
84
+ - ext/image_format.cpp
85
+ - ext/Makefile
86
+ - ext/node.cpp
87
+ - ext/nodechildren.cpp
88
+ - ext/nodeframes.cpp
89
+ - ext/nodemetadata.cpp
90
+ - ext/ppm.cpp
91
+ - ext/server.cpp
92
+ - ext/serverlist.cpp
93
+ - ext/sgi.cpp
94
+ - ext/testserver
95
+ - ext/thread_worker.cpp
96
+ - ext/wiretap.cpp
97
+ - ext/wiretap.h
98
+ - ext/testserver/cfg
99
+ - ext/testserver/db.sql
100
+ - ext/testserver/Makefile
101
+ - ext/testserver/server.cpp
102
+ - ext/testserver/testserver.rb
103
+ - ext/testserver/cfg/wiretap_path_translation_db.xml
104
+ - ext/testserver/cfg/wiretapd.cfg
105
+ - ext/testserver/cfg/wiretapd.res
106
+ - README
107
+ - LICENSE
108
+ test_files:
109
+ - test/audio.rb
110
+ - test/convert.rb
111
+ - test/image.rb
112
+ - test/read_frames.rb
113
+ - test/write_frames.rb
114
+ rdoc_options:
115
+ - --main=README
116
+ - --line-numbers
117
+ - --webcvs=svn+ssh://rubyforge.org/var/svn/wiretap
118
+ - --charset=utf-8
119
+ - --promiscuous
120
+ extra_rdoc_files:
121
+ - README
122
+ - LICENSE
123
+ executables: []
124
+
125
+ extensions:
126
+ - ext/extconf.rb
127
+ requirements: []
128
+
129
+ dependencies:
130
+ - !ruby/object:Gem::Dependency
131
+ name: activesupport
132
+ version_requirement:
133
+ version_requirements: !ruby/object:Gem::Version::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: "1.0"
138
+ version: