Permalink
Browse files

Trying to make XVideo optional

  • Loading branch information...
1 parent 4f44e8a commit e8fdb19277de3dc5cb26d54738f6e3ab748a2e97 @wedesoft committed Nov 9, 2011
Showing with 13 additions and 1 deletion.
  1. +6 −1 Rakefile
  2. +7 −0 ext/init.cc
View
@@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
require 'rbconfig'
PKG_NAME = 'hornetseye-xorg'
-PKG_VERSION = '0.7.0'
+PKG_VERSION = '0.7.1'
CFG = RbConfig::CONFIG
CXX = ENV[ 'CXX' ] || 'g++'
RB_FILES = FileList[ 'lib/**/*.rb' ]
@@ -109,6 +109,11 @@ file 'ext/config.h' do |t|
end
s << "#undef HAVE_LIBSWSCALE_INCDIR\n"
end
+ if check_c_header 'X11/extensions/Xv.h'
+ s << "#define HAVE_XV 1\n"
+ else
+ s << "#undef HAVE_XV\n"
+ end
File.open( t.name, 'w' ) { |f| f.puts s }
end
View
@@ -13,11 +13,16 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "rubyinc.hh"
#include "x11output.hh"
#include "ximagepainter.hh"
#include "openglimagepainter.hh"
+#ifdef HAVE_XV
#include "xvideoimagepainter.hh"
+#endif
#include "x11display.hh"
#include "x11window.hh"
@@ -41,7 +46,9 @@ extern "C" {
X11Output::registerRubyClass( rbHornetseye );
XImagePainter::registerRubyClass( rbHornetseye, X11Output::cRubyClass );
OpenGLImagePainter::registerRubyClass( rbHornetseye, X11Output::cRubyClass );
+#ifdef HAVE_XV
XVideoImagePainter::registerRubyClass( rbHornetseye, X11Output::cRubyClass );
+#endif
X11Display::registerRubyClass( rbHornetseye );
X11Window::registerRubyClass( rbHornetseye );
rb_require( "hornetseye_xorg_ext.rb" );

0 comments on commit e8fdb19

Please sign in to comment.