Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Created empty library

  • Loading branch information...
commit 2d4582a441e012231b01e70c48e25337be3d48b9 1 parent bc4ea74
@wedesoft authored
View
1  .document
@@ -0,0 +1 @@
+lib/**/*.rb
View
8 .gitignore
@@ -0,0 +1,8 @@
+.depends.mf
+doc
+pkg
+.yardoc
+*~
+*.gem
+*.swp
+
View
2  Rakefile
@@ -45,7 +45,7 @@ desc 'Compile Ruby extension (default)'
task :all => [ SO_FILE ]
file SO_FILE => OBJ do |t|
- sh "#{CXX} -shared -o #{t.name} #{OBJ} -lavformat -lswscale #{$LIBRUBYARG}"
+ sh "#{CXX} -shared -o #{t.name} #{OBJ} -lasound #{$LIBRUBYARG}"
sh "#{STRIP} --strip-all #{t.name}"
end
View
4 ext/.gitignore
@@ -0,0 +1,4 @@
+*~
+*.o
+*.so
+
View
38 ext/init.cc
@@ -0,0 +1,38 @@
+/* HornetsEye - Computer Vision with Ruby
+ Copyright (C) 2006, 2007, 2008, 2009, 2010 Jan Wedekind
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "rubyinc.hh"
+
+#ifdef WIN32
+#define DLLEXPORT __declspec(dllexport)
+#define DLLLOCAL
+#else
+#define DLLEXPORT __attribute__ ((visibility("default")))
+#define DLLLOCAL __attribute__ ((visibility("hidden")))
+#endif
+
+extern "C" DLLEXPORT void Init_hornetseye_alsa(void);
+
+extern "C" {
+
+ void Init_hornetseye_alsa(void)
+ {
+ // XInitThreads();
+ rb_require( "multiarray" );
+ VALUE rbHornetseye = rb_define_module( "Hornetseye" );
+ rb_require( "hornetseye_alsa_ext.rb" );
+ }
+
+}
View
54 ext/rubyinc.hh
@@ -0,0 +1,54 @@
+/* HornetsEye - Computer Vision with Ruby
+ Copyright (C) 2006, 2007 Jan Wedekind
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifndef HORNETSEYE_RUBYINC_HH
+#define HORNETSEYE_RUBYINC_HH
+
+#ifdef RSHIFT
+#undef RSHIFT
+#endif
+
+#define gettimeofday rubygettimeofday
+#define timezone rubygettimezone
+#include <ruby.h>
+// #include <version.h>
+#undef timezone
+#undef gettimeofday
+#ifdef read
+#undef read
+#endif
+#ifdef write
+#undef write
+#endif
+#ifdef RGB
+#undef RGB
+#endif
+
+#ifndef RUBY_VERSION_NUMBER
+#define RUBY_VERSION_NUMBER ( RUBY_VERSION_MAJOR * 10000 + \
+ RUBY_VERSION_MINOR * 100 + \
+ RUBY_VERSION_TEENY )
+#endif
+
+#ifndef RUBY_METHOD_FUNC
+#define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))func)
+#endif
+
+#ifndef xfree
+#define xfree free
+#endif
+
+#endif
+
View
17 lib/hornetseye_alsa_ext.rb
@@ -0,0 +1,17 @@
+# hornetseye-xorg - Graphical output under X.Org
+# Copyright (C) 2010 Jan Wedekind
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.