hornetseye-ffmpeg 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +21 -18
- data/ext/avinput.hh +1 -2
- data/ext/avoutput.hh +1 -2
- data/ext/frame.cc +5 -0
- data/ext/frame.hh +2 -1
- data/ext/rubyinc.hh +54 -0
- metadata +6 -5
data/Rakefile
CHANGED
@@ -3,10 +3,11 @@ require 'date'
|
|
3
3
|
require 'rake/clean'
|
4
4
|
require 'rake/testtask'
|
5
5
|
require 'rake/packagetask'
|
6
|
+
require 'rake/loaders/makefile'
|
6
7
|
require 'rbconfig'
|
7
8
|
|
8
9
|
PKG_NAME = 'hornetseye-ffmpeg'
|
9
|
-
PKG_VERSION = '0.3.
|
10
|
+
PKG_VERSION = '0.3.2'
|
10
11
|
CXX = ENV[ 'CXX' ] || 'g++'
|
11
12
|
STRIP = ENV[ 'STRIP' ] || 'strip'
|
12
13
|
RB_FILES = FileList[ 'lib/**/*.rb' ]
|
@@ -27,16 +28,16 @@ HOMEPAGE = %q{http://wedesoft.github.com/hornetseye-ffmpeg/}
|
|
27
28
|
|
28
29
|
OBJ = CC_FILES.ext 'o'
|
29
30
|
$CXXFLAGS = ENV[ 'CXXFLAGS' ] || ''
|
30
|
-
$CXXFLAGS = "#{$CXXFLAGS} -fPIC"
|
31
|
-
if
|
32
|
-
$CXXFLAGS
|
33
|
-
|
31
|
+
$CXXFLAGS = "#{$CXXFLAGS} -fPIC -DNDEBUG"
|
32
|
+
if RbConfig::CONFIG[ 'rubyhdrdir' ]
|
33
|
+
$CXXFLAGS = "#{$CXXFLAGS} -I#{RbConfig::CONFIG[ 'rubyhdrdir' ]} " +
|
34
|
+
"-I#{RbConfig::CONFIG[ 'rubyhdrdir' ]}/#{RbConfig::CONFIG[ 'arch' ]}"
|
34
35
|
else
|
35
|
-
$CXXFLAGS += "#{$CXXFLAGS} -I#{
|
36
|
+
$CXXFLAGS += "#{$CXXFLAGS} -I#{RbConfig::CONFIG[ 'archdir' ]}"
|
36
37
|
end
|
37
|
-
$LIBRUBYARG =
|
38
|
-
$SITELIBDIR =
|
39
|
-
$SITEARCHDIR =
|
38
|
+
$LIBRUBYARG = RbConfig::CONFIG[ 'LIBRUBYARG' ]
|
39
|
+
$SITELIBDIR = RbConfig::CONFIG[ 'sitelibdir' ]
|
40
|
+
$SITEARCHDIR = RbConfig::CONFIG[ 'sitearchdir' ]
|
40
41
|
|
41
42
|
task :default => :all
|
42
43
|
|
@@ -93,6 +94,7 @@ Rake::PackageTask.new PKG_NAME, PKG_VERSION do |p|
|
|
93
94
|
end
|
94
95
|
|
95
96
|
begin
|
97
|
+
require 'rubygems'
|
96
98
|
require 'rubygems/builder'
|
97
99
|
$SPEC = Gem::Specification.new do |s|
|
98
100
|
s.name = PKG_NAME
|
@@ -114,7 +116,7 @@ begin
|
|
114
116
|
s.rdoc_options = %w{--no-private}
|
115
117
|
s.add_dependency %<malloc>, [ '~> 1.1' ]
|
116
118
|
s.add_dependency %<multiarray>, [ '~> 0.6' ]
|
117
|
-
s.add_dependency %<hornetseye-frame>, [ '~> 0.
|
119
|
+
s.add_dependency %<hornetseye-frame>, [ '~> 0.3' ]
|
118
120
|
s.add_development_dependency %q{rake}
|
119
121
|
end
|
120
122
|
GEM_SOURCE = "#{PKG_NAME}-#{PKG_VERSION}.gem"
|
@@ -137,7 +139,7 @@ begin
|
|
137
139
|
s.rdoc_options = %w{--no-private}
|
138
140
|
s.add_dependency %<malloc>, [ '~> 1.1' ]
|
139
141
|
s.add_dependency %<multiarray>, [ '~> 0.6' ]
|
140
|
-
s.add_dependency %<hornetseye-frame>, [ '~> 0.
|
142
|
+
s.add_dependency %<hornetseye-frame>, [ '~> 0.3' ]
|
141
143
|
end
|
142
144
|
GEM_BINARY = "#{PKG_NAME}-#{PKG_VERSION}-#{$BINSPEC.platform}.gem"
|
143
145
|
desc "Build the gem file #{GEM_SOURCE}"
|
@@ -168,13 +170,14 @@ rule '.o' => '.cc' do |t|
|
|
168
170
|
sh "#{CXX} #{$CXXFLAGS} -c -o #{t.name} #{t.source}"
|
169
171
|
end
|
170
172
|
|
171
|
-
file
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
file
|
176
|
-
|
173
|
+
file ".depends.mf" do |t|
|
174
|
+
sh "makedepend -f- -- #{$CXXFLAGS} -- #{CC_FILES.join ' '} > #{t.name}"
|
175
|
+
end
|
176
|
+
CC_FILES.each do |t|
|
177
|
+
file t.ext(".o") => t
|
178
|
+
end
|
179
|
+
import ".depends.mf"
|
177
180
|
|
178
181
|
CLEAN.include 'ext/*.o'
|
179
|
-
CLOBBER.include SO_FILE, 'doc', '.yardoc'
|
182
|
+
CLOBBER.include SO_FILE, 'doc', '.yardoc', '.depends.mf'
|
180
183
|
|
data/ext/avinput.hh
CHANGED
data/ext/avoutput.hh
CHANGED
data/ext/frame.cc
CHANGED
data/ext/frame.hh
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
#define FRAME_HH
|
18
18
|
|
19
19
|
#include <boost/smart_ptr.hpp>
|
20
|
-
#include
|
20
|
+
#include "rubyinc.hh"
|
21
21
|
#include <string>
|
22
22
|
|
23
23
|
class Frame
|
@@ -31,6 +31,7 @@ public:
|
|
31
31
|
int height(void);
|
32
32
|
char *data(void);
|
33
33
|
VALUE rubyObject(void) { return m_frame; }
|
34
|
+
void markRubyMember(void);
|
34
35
|
protected:
|
35
36
|
VALUE m_frame;
|
36
37
|
};
|
data/ext/rubyinc.hh
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
/* HornetsEye - Computer Vision with Ruby
|
2
|
+
Copyright (C) 2006, 2007 Jan Wedekind
|
3
|
+
|
4
|
+
This program is free software: you can redistribute it and/or modify
|
5
|
+
it under the terms of the GNU General Public License as published by
|
6
|
+
the Free Software Foundation, either version 3 of the License, or
|
7
|
+
(at your option) any later version.
|
8
|
+
|
9
|
+
This program is distributed in the hope that it will be useful,
|
10
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
+
GNU General Public License for more details.
|
13
|
+
|
14
|
+
You should have received a copy of the GNU General Public License
|
15
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
16
|
+
#ifndef HORNETSEYE_RUBYINC_HH
|
17
|
+
#define HORNETSEYE_RUBYINC_HH
|
18
|
+
|
19
|
+
#ifdef RSHIFT
|
20
|
+
#undef RSHIFT
|
21
|
+
#endif
|
22
|
+
|
23
|
+
#define gettimeofday rubygettimeofday
|
24
|
+
#define timezone rubygettimezone
|
25
|
+
#include <ruby.h>
|
26
|
+
// #include <version.h>
|
27
|
+
#undef timezone
|
28
|
+
#undef gettimeofday
|
29
|
+
#ifdef read
|
30
|
+
#undef read
|
31
|
+
#endif
|
32
|
+
#ifdef write
|
33
|
+
#undef write
|
34
|
+
#endif
|
35
|
+
#ifdef RGB
|
36
|
+
#undef RGB
|
37
|
+
#endif
|
38
|
+
|
39
|
+
#ifndef RUBY_VERSION_NUMBER
|
40
|
+
#define RUBY_VERSION_NUMBER ( RUBY_VERSION_MAJOR * 10000 + \
|
41
|
+
RUBY_VERSION_MINOR * 100 + \
|
42
|
+
RUBY_VERSION_TEENY )
|
43
|
+
#endif
|
44
|
+
|
45
|
+
#ifndef RUBY_METHOD_FUNC
|
46
|
+
#define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func)
|
47
|
+
#endif
|
48
|
+
|
49
|
+
#ifndef xfree
|
50
|
+
#define xfree free
|
51
|
+
#endif
|
52
|
+
|
53
|
+
#endif
|
54
|
+
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 2
|
9
|
+
version: 0.3.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jan Wedekind
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-10-05 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -55,8 +55,8 @@ dependencies:
|
|
55
55
|
- !ruby/object:Gem::Version
|
56
56
|
segments:
|
57
57
|
- 0
|
58
|
-
-
|
59
|
-
version: "0.
|
58
|
+
- 3
|
59
|
+
version: "0.3"
|
60
60
|
type: :runtime
|
61
61
|
version_requirements: *id003
|
62
62
|
- !ruby/object:Gem::Dependency
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- ext/frame.hh
|
96
96
|
- ext/avoutput.hh
|
97
97
|
- ext/avinput.hh
|
98
|
+
- ext/rubyinc.hh
|
98
99
|
- ext/error.hh
|
99
100
|
has_rdoc: yard
|
100
101
|
homepage: http://wedesoft.github.com/hornetseye-ffmpeg/
|