diff --git a/include/ReaderBase.h b/include/ReaderBase.h index 4251de48..5a2ac7d0 100644 --- a/include/ReaderBase.h +++ b/include/ReaderBase.h @@ -35,6 +35,11 @@ #include "Fraction.h" #include "Frame.h" #include "Json.h" +#include +#include +#include +#include +#include using namespace std; @@ -101,6 +106,9 @@ namespace openshot /// @param[in] number The frame number that is requested. virtual tr1::shared_ptr GetFrame(int number) = 0; + /// Test method to draw a bitmap on a Qt QGraphicsScene + void DrawFrameOnScene(string path, long _graphics_scene_address); + /// Initialize the values of the ReaderInfo struct. It is important for derived classes to call /// this method, or the ReaderInfo struct values will not be initialized. void InitFileInfo(); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8ff59222..65132254 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -243,7 +243,7 @@ ENDIF (BLACKMAGIC_FOUND) FIND_PACKAGE(SWIG 2.0 REQUIRED) INCLUDE(${SWIG_USE_FILE}) -FIND_PACKAGE(PythonLibs) +FIND_PACKAGE(PythonLibs REQUIRED) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) @@ -261,6 +261,7 @@ INSTALL(TARGETS openshot DESTINATION lib) # Install Swig python library INSTALL(TARGETS _openshot DESTINATION share/pyshared/libopenshot) +INSTALL(TARGETS openshot DESTINATION share/pyshared/libopenshot) # Install Python bindings INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/openshot.py DESTINATION share/pyshared/libopenshot) diff --git a/src/ReaderBase.cpp b/src/ReaderBase.cpp index fbb38be4..ba84a21a 100644 --- a/src/ReaderBase.cpp +++ b/src/ReaderBase.cpp @@ -204,3 +204,16 @@ void ReaderBase::SetJsonValue(Json::Value root) { info.audio_timebase.den = root["audio_timebase"]["den"].asInt(); } } + +// Test method to draw a bitmap on a Qt QGraphicsScene +void ReaderBase::DrawFrameOnScene(string path, long _graphics_scene_address) { + + // Get pixmap + QGraphicsScene *scene = reinterpret_cast(_graphics_scene_address); + QGraphicsPixmapItem *item = new QGraphicsPixmapItem(QPixmap(QString(path.c_str()))); + scene->addItem(item); + +} + + +