aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtMultimedia
diff options
context:
space:
mode:
authorCarlos Goncalves <mail@cgoncalves.info>2010-03-09 12:48:41 +0000
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-12 17:30:01 -0300
commit3ddaabdefe113406be50447515fcf39cc058554a (patch)
treeb1dd7dfb0121d3bcf1bdbe30e3e082f3c492c370 /PySide/QtMultimedia
parent542095e1ee72e32e5b935fb20c52d17d54903f79 (diff)
Initial QtMultimedia bindings
Diffstat (limited to 'PySide/QtMultimedia')
-rw-r--r--PySide/QtMultimedia/CMakeLists.txt64
-rw-r--r--PySide/QtMultimedia/typesystem_multimedia.xml65
2 files changed, 129 insertions, 0 deletions
diff --git a/PySide/QtMultimedia/CMakeLists.txt b/PySide/QtMultimedia/CMakeLists.txt
new file mode 100644
index 000000000..223485480
--- /dev/null
+++ b/PySide/QtMultimedia/CMakeLists.txt
@@ -0,0 +1,64 @@
+project(QtMultimedia)
+
+if(Q_WS_X11)
+ set(MODULE_NAME multimedia_x11)
+ set(SPECIFIC_OS_FILES
+ )
+elseif(Q_WS_MAC)
+ set(MODULE_NAME multimedia_mac)
+ set(SPECIFIC_OS_FILES
+ )
+else()
+ message(FATAL_ERROR "OS not supported")
+endif(Q_WS_X11)
+
+if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
+ set (QtMultimedia_46_SRC )
+else ()
+ set(QtMultimedia_46_SRC
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudio_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qabstractvideobuffer_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qabstractvideosurface_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudiodeviceinfo_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudioformat_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudioinput_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qaudiooutput_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qvideoframe_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qvideosurfaceformat_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/qtmultimedia_module_wrapper.cpp
+ )
+endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
+
+set(QtMultimedia_SRC
+${SPECIFIC_OS_FILES}
+${QtMultimedia_46_SRC}
+)
+
+execute_generator(multimedia QtMultimedia_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}")
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtMultimedia/
+ ${QT_INCLUDE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${QT_QTGUI_INCLUDE_DIR}
+ ${QT_QTMULTIMEDIA_INCLUDE_DIR}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${PYTHON_INCLUDE_PATH}
+ ${QtCore_BINARY_DIR}/PySide/QtCore/
+ ${QtGui_BINARY_DIR}/PySide/QtGui/
+ )
+
+add_library(QtMultimedia MODULE ${QtMultimedia_SRC})
+set_property(TARGET QtMultimedia PROPERTY PREFIX "")
+target_link_libraries(QtMultimedia
+ pyside
+ ${PYTHON_LIBRARIES}
+ ${SHIBOKEN_LIBRARY}
+ ${QT_QTMULTIMEDIA_LIBRARY}
+ )
+add_dependencies(QtMultimedia QtGui)
+
+# install
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtMultimedia.so
+ DESTINATION ${SITE_PACKAGE}/PySide)
diff --git a/PySide/QtMultimedia/typesystem_multimedia.xml b/PySide/QtMultimedia/typesystem_multimedia.xml
new file mode 100644
index 000000000..d523dba97
--- /dev/null
+++ b/PySide/QtMultimedia/typesystem_multimedia.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<typesystem package="PySide.QtMultimedia">
+ <load-typesystem name="typesystem_gui.xml.in" generate="no" />
+
+ <rejection class="" function-name="qobject_cast&lt;QAudioEngineFactoryInterface*&gt;"/>
+ <rejection class="" function-name="qobject_interface_iid&lt;QAudioEngineFactoryInterface*&gt;"/>
+
+ <namespace-type name="QAudio"/>
+ <enum-type name="QAudio::Error"/>
+ <enum-type name="QAudio::Mode"/>
+ <enum-type name="QAudio::State"/>
+ <enum-type name="QAbstractVideoBuffer::HandleType"/>
+ <enum-type name="QAbstractVideoBuffer::MapMode"/>
+ <enum-type name="QAbstractVideoSurface::Error"/>
+ <enum-type name="QAudioFormat::Endian"/>
+ <enum-type name="QAudioFormat::SampleType"/>
+ <enum-type name="QVideoFrame::FieldType"/>
+ <enum-type name="QVideoFrame::PixelFormat"/>
+ <enum-type name="QVideoSurfaceFormat::Direction"/>
+ <enum-type name="QVideoSurfaceFormat::YCbCrColorSpace"/>
+
+ <object-type name="QAbstractVideoBuffer">
+ <modify-function signature="map(QAbstractVideoBuffer::MapMode, int*, int*)">
+ <modify-argument index="0">
+ <replace-type modified-type="PyObject *"/>
+ </modify-argument>
+ <modify-argument index="2">
+ <remove-argument/>
+ </modify-argument>
+ <modify-argument index="3">
+ <remove-argument/>
+ </modify-argument>
+ <inject-code class="target" position="beginning">
+ <insert-template name="fix_arg,int*,int*"/>
+ </inject-code>
+ </modify-function>
+ </object-type>
+
+ <object-type name="QVideoSurfaceFormat"/>
+ <object-type name="QAbstractVideoSurface">
+ <modify-function signature="nearestFormat(const QVideoSurfaceFormat&amp;)const" remove="all"/>
+ <modify-function signature="surfaceFormat()const" remove="all"/>
+ </object-type>
+ <object-type name="QAudioDeviceInfo">
+ <modify-function signature="defaultInputDevice()" remove="all"/>
+ <modify-function signature="defaultOutputDevice()" remove="all"/>
+ <modify-function signature="nearestFormat(const QAudioFormat&amp;)const" remove="all"/>
+ <modify-function signature="preferredFormat()const" remove="all"/>
+ <modify-function signature="availableDevices(QAudio::Mode)" remove="all"/>
+ </object-type>
+ <object-type name="QAudioFormat"/>
+ <!-- DONE TODO TESTCASE check ctor setParent() -->
+ <!-- TODO TESTCASE start() check reference-count -->
+ <object-type name="QAudioInput">
+ <modify-function signature="format()const" remove="all"/>
+ </object-type>
+ <!-- DONE TODO TESTCASE check ctor setParent() -->
+ <!-- TODO TESTCASE start() check reference-count -->
+ <object-type name="QAudioOutput">
+ <modify-function signature="format()const" remove="all"/>
+ </object-type>
+ <!-- TODO TESTCASE don't increment the reference count of the video buffer -->
+ <object-type name="QVideoFrame"/>
+
+</typesystem>