[xiph-commits] r10591 - experimental/dholth/oggpy

dholth at svn.xiph.org dholth at svn.xiph.org
Wed Dec 14 13:14:57 PST 2005


Author: dholth
Date: 2005-12-14 13:14:54 -0800 (Wed, 14 Dec 2005)
New Revision: 10591

Modified:
   experimental/dholth/oggpy/Jamfile
   experimental/dholth/oggpy/oggpy.cpp
   experimental/dholth/oggpy/setup.py
   experimental/dholth/oggpy/theora_wrappers.cc
   experimental/dholth/oggpy/theorapy.cpp
   experimental/dholth/oggpy/vorbispy.cpp
Log:
Removed some properties, added theora to Jamfile, try to compile with g++-4.0
Theora still depends on public variables which do not work correctly in Ubuntu, unsure whether Ubuntu's fault or not.


Modified: experimental/dholth/oggpy/Jamfile
===================================================================
--- experimental/dholth/oggpy/Jamfile	2005-12-14 21:14:41 UTC (rev 10590)
+++ experimental/dholth/oggpy/Jamfile	2005-12-14 21:14:54 UTC (rev 10591)
@@ -1,5 +1,10 @@
 # Daniel Holth <dholth at fastmail.fm>, 2004
 # based on David Abraham's example from Boost.Python
+#
+# ChangeLog:
+# 14 Dec 2005:  dwh <dholth at fastmail.fm>
+#   Add theora module to this, as Python setup.py does not build correctly for
+#   gcc-4.0.
 
 # This is the top of our own project tree
 project-root ;
@@ -37,13 +42,29 @@
 : # depends	
   <find-library>ogg
   <find-library>vorbis
+  <find-library>vorbisenc
   <find-library>boost_python
   
   <library-path>/usr/lib
   ;
 
+extension theorapy
+: # sources
+	oggcc.cc 
+	theorapy.cpp
+	theoracc.cc
+	theora_wrappers.cc
+: # depends	
+  <find-library>ogg
+  <find-library>theora
+  <find-library>boost_python
+  
+  <library-path>/usr/lib
+  ;
 
 
+
+
 #extension flacpy
 #: # sources
 #  flacpy.cpp

Modified: experimental/dholth/oggpy/oggpy.cpp
===================================================================
--- experimental/dholth/oggpy/oggpy.cpp	2005-12-14 21:14:41 UTC (rev 10590)
+++ experimental/dholth/oggpy/oggpy.cpp	2005-12-14 21:14:54 UTC (rev 10591)
@@ -111,6 +111,5 @@
         .def("reset", &ogg::stream::reset)
         .def("reset_serialno", &ogg::stream::reset_serialno)
     ;
-
 }
 

Modified: experimental/dholth/oggpy/setup.py
===================================================================
--- experimental/dholth/oggpy/setup.py	2005-12-14 21:14:41 UTC (rev 10590)
+++ experimental/dholth/oggpy/setup.py	2005-12-14 21:14:54 UTC (rev 10591)
@@ -1,6 +1,10 @@
 #!/usr/bin/env python
 # oggpy, by Daniel Holth <dholth at fastmail.fm>, 2004
 
+# May be necessary options for gcc version 4 (bjam uses these)
+# "g++"   -c -Wall -ftemplate-depth-255  -DBOOST_PYTHON_DYNAMIC_LIB  -g -O0 -f no-inline -fPIC   -I"bin/oggpy"   -I "/usr/include/python2.4" -I "/home/dholth/s rc/boost"  -o "bin/oggpy/oggpy.so/gcc/debug/shared-linkable-true/oggpy.o"  "oggp y.cpp"
+
+
 from distutils.core import setup
 from distutils.extension import Extension
 import os.path

Modified: experimental/dholth/oggpy/theora_wrappers.cc
===================================================================
--- experimental/dholth/oggpy/theora_wrappers.cc	2005-12-14 21:14:41 UTC (rev 10590)
+++ experimental/dholth/oggpy/theora_wrappers.cc	2005-12-14 21:14:54 UTC (rev 10591)
@@ -31,6 +31,9 @@
 
 PyObject* tostrings (ogg::theora::yuv_image *yuv, ogg::theora::info *theora_info)
 { 
+    // u is Cb
+    // v is Cr
+   
     int crop_offset=0;
     int i;
 

Modified: experimental/dholth/oggpy/theorapy.cpp
===================================================================
--- experimental/dholth/oggpy/theorapy.cpp	2005-12-14 21:14:41 UTC (rev 10590)
+++ experimental/dholth/oggpy/theorapy.cpp	2005-12-14 21:14:54 UTC (rev 10591)
@@ -5,7 +5,7 @@
 
 // Includes ====================================================================
 #include <theora/theora.h>
-#include <theoracc.h>
+#include "theoracc.h"
 #include "theora_wrappers.h"
 
 // Using =======================================================================

Modified: experimental/dholth/oggpy/vorbispy.cpp
===================================================================
--- experimental/dholth/oggpy/vorbispy.cpp	2005-12-14 21:14:41 UTC (rev 10590)
+++ experimental/dholth/oggpy/vorbispy.cpp	2005-12-14 21:14:54 UTC (rev 10591)
@@ -4,7 +4,7 @@
 #include <boost/cstdint.hpp>
 
 // Includes ====================================================================
-#include <vorbispy_wrappers.h>
+#include "vorbispy_wrappers.h"
 
 // Using =======================================================================
 using namespace boost::python;
@@ -14,7 +14,7 @@
 {
     class_< ogg::vorbis::comment >("comment", init<  >())
         .def(init< const ogg::vorbis::comment& >())
-        .def_readwrite("data", &ogg::vorbis::comment::data)
+        // .def_readwrite("data", &ogg::vorbis::comment::data)
         .def("query", &ogg::vorbis::comment::query)
         .def("query_count", &ogg::vorbis::comment::query_count)
         .def("add", &ogg::vorbis::comment::add)
@@ -27,7 +27,7 @@
 
     class_< ogg::vorbis::info >("info", init<  >())
         .def(init< const ogg::vorbis::info& >())
-        .def_readwrite("data", &ogg::vorbis::info::data)
+        // .def_readwrite("data", &ogg::vorbis::info::data)
         .def("encode_init", &ogg::vorbis::info::encode_init)
         .def("encode_setup_managed", &ogg::vorbis::info::encode_setup_managed)
         .def("encode_setup_vbr", &ogg::vorbis::info::encode_setup_vbr)
@@ -46,7 +46,7 @@
 
     class_< ogg::vorbis::block >("block", init<  >())
         .def(init< const ogg::vorbis::block& >())
-        .def_readwrite("data", &ogg::vorbis::block::data)
+        // .def_readwrite("data", &ogg::vorbis::block::data)
         .def("analysis", (int (ogg::vorbis::block::*)(ogg::packet*) )&ogg::vorbis::block::analysis)
         .def("bitrate_addblock", &ogg::vorbis::block::bitrate_addblock)
         .def("block_clear", &ogg::vorbis::block::block_clear)
@@ -56,7 +56,7 @@
 
     class_< ogg::vorbis::dsp >("dsp", init<  >())
         .def(init< const ogg::vorbis::dsp& >())
-        .def_readwrite("data", &ogg::vorbis::dsp::data)
+        // .def_readwrite("data", &ogg::vorbis::dsp::data)
         .def("block_init", (int (ogg::vorbis::dsp::*)(ogg::vorbis::block*) )&ogg::vorbis::dsp::block_init)
         .def("granule_time", &ogg::vorbis::dsp::granule_time)
         .def("bitrate_flushpacket", (int (ogg::vorbis::dsp::*)(ogg::packet*) )&ogg::vorbis::dsp::bitrate_flushpacket)



More information about the commits mailing list