├── .gitignore ├── AUTHORS ├── CMakeLists.txt ├── COPYING ├── HACKING ├── INSTALL ├── INSTALL.win32 ├── NEWS ├── README ├── TRANSLATORS ├── bin └── .keep ├── cmake ├── FindLIBVLC.cmake ├── config.h.cmake ├── toolchain-win32.cmake └── vlmc.sh ├── doc ├── .keep ├── Doxyfile └── README ├── fortunes.txt ├── include └── .keep ├── modules ├── effects │ └── squeleton │ │ ├── Skeleton.cpp │ │ └── Skeleton.h └── sample_module │ ├── libsample_module.so.1 │ ├── libsample_module.so.1.0 │ └── main.cpp ├── resources ├── .keep ├── images │ ├── add.png │ ├── audio.png │ ├── back.png │ ├── clear.png │ ├── configure.png │ ├── editcut.png │ ├── error.png │ ├── forward.png │ ├── hpoff.png │ ├── hpon.png │ ├── keyboard.png │ ├── marker_left.png │ ├── marker_right.png │ ├── marker_start.png │ ├── marker_stop.png │ ├── mouse.png │ ├── next_frame.png │ ├── pause.png │ ├── play.png │ ├── previous_frame.png │ ├── redo.png │ ├── remove.png │ ├── scalable │ │ ├── audio.svg │ │ ├── image.svg │ │ └── video.svg │ ├── stop.png │ ├── trackoff.png │ ├── trackon.png │ ├── undo.png │ ├── up.png │ ├── video.png │ ├── vlmc.ico │ ├── vlmc.png │ ├── wizard_watermark.png │ ├── zoom_in.png │ └── zoom_out.png ├── styleSheets │ └── Style.qss └── styles.qrc ├── ressources.qrc ├── share ├── vlmc.desktop └── vlmc.png ├── src ├── .keep ├── CMakeLists.txt ├── Commands │ ├── Commands.cpp │ ├── Commands.h │ ├── KeyboardShortcutHelper.cpp │ ├── KeyboardShortcutHelper.h │ └── commands.pri ├── Configuration │ ├── SettingValue.cpp │ ├── SettingValue.h │ ├── SettingsManager.cpp │ ├── SettingsManager.h │ └── configuration.pri ├── EffectsEngine │ ├── EffectNode.cpp │ ├── EffectNode.h │ ├── EffectNodeFactory.cpp │ ├── EffectNodeFactory.h │ ├── EffectPluginTypeLoader.cpp │ ├── EffectPluginTypeLoader.h │ ├── EffectPluginTypeManager.cpp │ ├── EffectPluginTypeManager.h │ ├── EffectsEngine.cpp │ ├── EffectsEngine.h │ ├── Plugins │ │ ├── lib │ │ │ └── .keep │ │ └── src │ │ │ ├── BlitInRectangle │ │ │ ├── BlitInRectangleEffectPlugin.cpp │ │ │ ├── BlitInRectangleEffectPlugin.h │ │ │ ├── BlitInRectangleEffectPluginCreator.cpp │ │ │ ├── BlitInRectangleEffectPluginCreator.h │ │ │ └── CMakeLists.txt │ │ │ ├── CMakeLists.txt │ │ │ ├── GreenFilterEffect │ │ │ ├── CMakeLists.txt │ │ │ ├── GreenFilterEffectPlugin.cpp │ │ │ ├── GreenFilterEffectPlugin.h │ │ │ ├── GreenFilterEffectPluginCreator.cpp │ │ │ └── GreenFilterEffectPluginCreator.h │ │ │ ├── InvertRNBEffect │ │ │ ├── CMakeLists.txt │ │ │ ├── InvertRNBEffectPlugin.cpp │ │ │ ├── InvertRNBEffectPlugin.h │ │ │ ├── InvertRNBEffectPluginCreator.cpp │ │ │ └── InvertRNBEffectPluginCreator.h │ │ │ └── MixerEffect │ │ │ ├── CMakeLists.txt │ │ │ ├── MixerEffectPlugin.cpp │ │ │ ├── MixerEffectPlugin.h │ │ │ ├── MixerEffectPluginCreator.cpp │ │ │ └── MixerEffectPluginCreator.h │ ├── PluginsAPI │ │ ├── IEffectNode.h │ │ ├── IEffectPlugin.h │ │ ├── IEffectPluginCreator.h │ │ ├── InSlot.hpp │ │ ├── LightVideoFrame.cpp │ │ ├── LightVideoFrame.h │ │ ├── OutSlot.hpp │ │ └── PluginsAPI.pri │ ├── SemanticObjectManager.hpp │ └── SimpleObjectsReferencer.hpp ├── Gui │ ├── About.cpp │ ├── About.h │ ├── AudioSpectrumDrawer.cpp │ ├── AudioSpectrumDrawer.h │ ├── ClickableLabel.cpp │ ├── ClickableLabel.h │ ├── ClipProperty.cpp │ ├── ClipProperty.h │ ├── DockWidgetManager.cpp │ ├── DockWidgetManager.h │ ├── FileInfoListModel.cpp │ ├── FileInfoListModel.h │ ├── Gui.pri │ ├── LCDTimecode.cpp │ ├── LCDTimecode.h │ ├── LanguageHelper.cpp │ ├── LanguageHelper.h │ ├── MainWindow.cpp │ ├── MainWindow.h │ ├── PreviewRuler.cpp │ ├── PreviewRuler.h │ ├── PreviewWidget.cpp │ ├── PreviewWidget.h │ ├── TagWidget.cpp │ ├── TagWidget.h │ ├── Transcode.cpp │ ├── Transcode.h │ ├── UndoStack.cpp │ ├── UndoStack.h │ ├── WorkflowFileRendererDialog.cpp │ ├── WorkflowFileRendererDialog.h │ ├── export │ │ ├── RendererSettings.cpp │ │ ├── RendererSettings.h │ │ └── RendererSettings.ui │ ├── import │ │ ├── ImportController.cpp │ │ ├── ImportController.h │ │ ├── ImportMediaCellView.cpp │ │ ├── ImportMediaCellView.h │ │ ├── ImportMediaListController.cpp │ │ ├── ImportMediaListController.h │ │ └── ui │ │ │ └── ImportController.ui │ ├── library │ │ ├── ClipListViewController.cpp │ │ ├── ClipListViewController.h │ │ ├── ListViewController.cpp │ │ ├── ListViewController.h │ │ ├── MediaCellView.cpp │ │ ├── MediaCellView.h │ │ ├── MediaLibraryWidget.cpp │ │ ├── MediaLibraryWidget.h │ │ ├── MediaListViewController.cpp │ │ ├── MediaListViewController.h │ │ ├── StackViewController.cpp │ │ ├── StackViewController.h │ │ ├── StackViewNavController.cpp │ │ ├── StackViewNavController.h │ │ ├── StackViewNavController.ui │ │ ├── ViewController.h │ │ └── ui │ │ │ ├── MediaCellView.ui │ │ │ └── StackViewNavController.ui │ ├── settings │ │ ├── BoolWidget.cpp │ │ ├── BoolWidget.h │ │ ├── DoubleWidget.cpp │ │ ├── DoubleWidget.h │ │ ├── ISettingsCategorieWidget.h │ │ ├── IntWidget.cpp │ │ ├── IntWidget.h │ │ ├── KeyboardShortcut.cpp │ │ ├── KeyboardShortcut.h │ │ ├── KeyboardShortcutInput.cpp │ │ ├── KeyboardShortcutInput.h │ │ ├── LanguageWidget.cpp │ │ ├── LanguageWidget.h │ │ ├── Panel.cpp │ │ ├── Panel.h │ │ ├── PreferenceWidget.cpp │ │ ├── PreferenceWidget.h │ │ ├── Settings.cpp │ │ ├── Settings.h │ │ ├── StringWidget.cpp │ │ └── StringWidget.h │ ├── timeline │ │ ├── AbstractGraphicsMediaItem.cpp │ │ ├── AbstractGraphicsMediaItem.h │ │ ├── GraphicsAudioItem.cpp │ │ ├── GraphicsAudioItem.h │ │ ├── GraphicsCursorItem.cpp │ │ ├── GraphicsCursorItem.h │ │ ├── GraphicsMovieItem.cpp │ │ ├── GraphicsMovieItem.h │ │ ├── GraphicsTrack.cpp │ │ ├── GraphicsTrack.h │ │ ├── Timeline.cpp │ │ ├── Timeline.h │ │ ├── TracksControls.cpp │ │ ├── TracksControls.h │ │ ├── TracksRuler.cpp │ │ ├── TracksRuler.h │ │ ├── TracksScene.cpp │ │ ├── TracksScene.h │ │ ├── TracksView.cpp │ │ └── TracksView.h │ ├── ui │ │ ├── About.ui │ │ ├── ClipProperty.ui │ │ ├── FileBrowser.ui │ │ ├── LibraryWidget.ui │ │ ├── MainWindow.ui │ │ ├── PreviewWidget.ui │ │ ├── TagWidget.ui │ │ ├── Timeline.ui │ │ ├── WorkflowFileRendererDialog.ui │ │ └── transcode.ui │ ├── widgets │ │ ├── CrashHandler.cpp │ │ ├── CrashHandler.h │ │ ├── CrashHandler.ui │ │ ├── TrackControls.cpp │ │ ├── TrackControls.h │ │ └── TrackControls.ui │ └── wizard │ │ ├── GeneralPage.cpp │ │ ├── GeneralPage.h │ │ ├── OpenPage.cpp │ │ ├── OpenPage.h │ │ ├── PageFactory.h │ │ ├── ProjectWizard.cpp │ │ ├── ProjectWizard.h │ │ ├── VideoPage.cpp │ │ ├── VideoPage.h │ │ ├── WelcomePage.cpp │ │ ├── WelcomePage.h │ │ └── ui │ │ ├── GeneralPage.ui │ │ ├── OpenPage.ui │ │ ├── VideoPage.ui │ │ └── WelcomePage.ui ├── LibVLCpp │ ├── LibVLCpp.pri │ ├── VLCInstance.cpp │ ├── VLCInstance.h │ ├── VLCMedia.cpp │ ├── VLCMedia.h │ ├── VLCMediaPlayer.cpp │ ├── VLCMediaPlayer.h │ └── VLCpp.hpp ├── Library │ ├── Library.cpp │ ├── Library.h │ └── Library.pri ├── Media │ ├── Clip.cpp │ ├── Clip.h │ ├── Media.cpp │ ├── Media.h │ └── Media.pri ├── Metadata │ ├── MetaDataManager.cpp │ ├── MetaDataManager.h │ ├── MetaDataWorker.cpp │ ├── MetaDataWorker.h │ └── Metadata.pri ├── Project │ ├── ProjectManager.cpp │ ├── ProjectManager.h │ └── projectManager.pri ├── Renderer │ ├── ClipRenderer.cpp │ ├── ClipRenderer.h │ ├── GenericRenderer.cpp │ ├── GenericRenderer.h │ ├── Renderer.pri │ ├── WorkflowFileRenderer.cpp │ ├── WorkflowFileRenderer.h │ ├── WorkflowRenderer.cpp │ └── WorkflowRenderer.h ├── Tools │ ├── BacktraceGenerator.h │ ├── MemoryPool.hpp │ ├── Pool.hpp │ ├── QSingleton.hpp │ ├── Singleton.hpp │ ├── Toggleable.hpp │ ├── Tools.pri │ ├── UnixBacktraceGenerator.cpp │ ├── VlmcDebug.cpp │ ├── VlmcDebug.h │ ├── WaitCondition.hpp │ ├── Win32BacktraceGenerator.cpp │ └── mdate.h ├── Workflow │ ├── AudioClipWorkflow.cpp │ ├── AudioClipWorkflow.h │ ├── ClipWorkflow.cpp │ ├── ClipWorkflow.h │ ├── ImageClipWorkflow.cpp │ ├── ImageClipWorkflow.h │ ├── MainWorkflow.cpp │ ├── MainWorkflow.h │ ├── StackedBuffer.hpp │ ├── TrackHandler.cpp │ ├── TrackHandler.h │ ├── TrackWorkflow.cpp │ ├── TrackWorkflow.h │ ├── VideoClipWorkflow.cpp │ ├── VideoClipWorkflow.h │ └── Workflow.pri ├── main.cpp ├── vlmc.cpp ├── vlmc.h └── winvlmc.cpp └── ts ├── .gitignore ├── CMakeLists.txt ├── vlmc_ca_ES.ts ├── vlmc_cs_CZ.ts ├── vlmc_es_ES.ts ├── vlmc_fr_FR.ts ├── vlmc_it_IT.ts ├── vlmc_ja_JP.ts ├── vlmc_nl.ts ├── vlmc_pl_PL.ts ├── vlmc_pt_BR.ts ├── vlmc_ro_RO.ts ├── vlmc_ru_RU.ts ├── vlmc_sk_SK.ts ├── vlmc_sv.ts ├── vlmc_uk.ts └── vlmc_zh_CN.ts /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /bin 3 | /debug 4 | /qtc-gdbmacros 5 | Makefile* 6 | /include 7 | 8 | *.pro.user 9 | moc_*.cpp 10 | moc_*.cxx* 11 | ui_*.h 12 | .*.swp 13 | *~ 14 | *.o 15 | *.so* 16 | qrc_ressources.cpp 17 | CMakeCache.txt 18 | CMakeFiles 19 | cmake_install.cmake 20 | CPack*.cmake 21 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Hugo Beauzée-Luyssen 2 | Vincent Carrubba 3 | Clément Chavance 4 | Christophe Courtaut 5 | Ludovic Fauvet 6 | Geoffroy Lacarriere 7 | 8 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | INSTALL file for VLMC 2 | 3 | For now we don't use autotools to build the project. 4 | If you have any experiences with autotools and want to help, please contact us 5 | on . 6 | 7 | Dependencies 8 | ============ 9 | 10 | - Latest version of VLC installed (from the git repository) 11 | - Qt framework >= 4.5.0 12 | 13 | Get the sources 14 | =============== 15 | 16 | git clone git://github.com/VLMC/vlmc.git 17 | 18 | Building VLMC 19 | ============= 20 | 21 | A typical way to build VLMC is: 22 | 23 | cmake . 24 | make 25 | 26 | Running VLMC 27 | ============ 28 | 29 | ./vlmc 30 | 31 | Issues 32 | ====== 33 | 34 | If you run into problems, you can ask for help on and 35 | IRC channel #vlmc on Freenode. 36 | 37 | -------------------------------------------------------------------------------- /INSTALL.win32: -------------------------------------------------------------------------------- 1 | 2 | Cross-compilation (from Unix) 3 | ============================= 4 | 5 | Download contribs from: 6 | http://vlmc.org/~etix/contribs/ 7 | 8 | To be continued... 9 | 10 | ---------------------------------------------------------- 11 | cmake -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-win32.cmake . 12 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | One day this file will contain a changelog. 2 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | **** IMPORTANT **** 2 | 3 | Our git repository has moved, please update! 4 | 5 | $ git remote set-url origin https://code.videolan.org/videolan/vlmc.git 6 | $ git pull origin master 7 | -------------------------------------------------------------------------------- /TRANSLATORS: -------------------------------------------------------------------------------- 1 | Many thanks to our translators! 2 | 3 | Brazilian Portuguese: 4 | Sidney Doria 5 | 6 | Catalan: 7 | Ángel Macías 8 | 9 | Chinese (simplified): 10 | Dean Lee 11 | 12 | Czech: 13 | Mailo Svetel 14 | 15 | Dutch: 16 | Steven Van Assche 17 | 18 | French: 19 | Clément CHAVANCE 20 | Christophe Courtaut 21 | 22 | Italian: 23 | Massimo Fierro 24 | 25 | Japanese: 26 | wwwcfe 27 | 28 | Romanian: 29 | Constantin Romulus 30 | 31 | Russian: 32 | Андрей Васильевич Шарапов 33 | 34 | Spanish: 35 | Christophe Courtaut 36 | 37 | Slovak: 38 | Marián Hikaník 39 | 40 | Swedish: 41 | Daniel Nylander 42 | 43 | Ukrainian: 44 | Коростіль Данило 45 | 46 | -------------------------------------------------------------------------------- /bin/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/bin/.keep -------------------------------------------------------------------------------- /cmake/FindLIBVLC.cmake: -------------------------------------------------------------------------------- 1 | 2 | # CMake module to search for LIBVLC (VLC library) 3 | # Author: Rohit Yadav 4 | # 5 | # If it's found it sets LIBVLC_FOUND to TRUE 6 | # and following variables are set: 7 | # LIBVLC_INCLUDE_DIR 8 | # LIBVLC_LIBRARY 9 | 10 | 11 | # FIND_PATH and FIND_LIBRARY normally search standard locations 12 | # before the specified paths. To search non-standard paths first, 13 | # FIND_* is invoked first with specified paths and NO_DEFAULT_PATH 14 | # and then again with no specified paths to search the default 15 | # locations. When an earlier FIND_* succeeds, subsequent FIND_*s 16 | # searching for the same item do nothing. 17 | 18 | #Put here path to custom location 19 | #example: /home/user/vlc/include etc.. 20 | FIND_PATH(LIBVLC_INCLUDE_DIR vlc/vlc.h 21 | "$ENV{LIBVLC_INCLUDE_PATH}" 22 | "$ENV{LIB_DIR}/include" 23 | "$ENV{LIB_DIR}/include/vlc" 24 | "/usr/include" 25 | "/usr/include/vlc" 26 | "/usr/local/include" 27 | "/usr/local/include/vlc" 28 | #mingw 29 | c:/msys/local/include 30 | NO_DEFAULT_PATH 31 | ) 32 | FIND_PATH(LIBVLC_INCLUDE_DIR vlc.h) 33 | 34 | #Put here path to custom location 35 | #example: /home/user/vlc/lib etc.. 36 | FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc PATHS 37 | "$ENV{LIBVLC_LIBRARY_PATH}" 38 | "$ENV{LIB_DIR}/lib" 39 | #mingw 40 | c:/msys/local/lib 41 | NO_DEFAULT_PATH 42 | ) 43 | FIND_LIBRARY(LIBVLC_LIBRARY NAMES vlc) 44 | FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore PATHS 45 | "$ENV{LIBVLC_LIBRARY_PATH}" 46 | "$ENV{LIB_DIR}/lib" 47 | #mingw 48 | c:/msys/local/lib 49 | NO_DEFAULT_PATH 50 | ) 51 | FIND_LIBRARY(LIBVLCCORE_LIBRARY NAMES vlccore) 52 | 53 | IF (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY) 54 | SET(LIBVLC_FOUND TRUE) 55 | ENDIF (LIBVLC_INCLUDE_DIR AND LIBVLC_LIBRARY AND LIBVLCCORE_LIBRARY) 56 | 57 | IF (LIBVLC_FOUND) 58 | IF (NOT LIBVLC_FIND_QUIETLY) 59 | MESSAGE(STATUS "Found LibVLC include-dir path: ${LIBVLC_INCLUDE_DIR}") 60 | MESSAGE(STATUS "Found LibVLC library path:${LIBVLC_LIBRARY}") 61 | MESSAGE(STATUS "Found LibVLCcore library path:${LIBVLCCORE_LIBRARY}") 62 | ENDIF (NOT LIBVLC_FIND_QUIETLY) 63 | ELSE (LIBVLC_FOUND) 64 | IF (LIBVLC_FIND_REQUIRED) 65 | MESSAGE(FATAL_ERROR "Could not find LibVLC") 66 | ENDIF (LIBVLC_FIND_REQUIRED) 67 | ENDIF (LIBVLC_FOUND) 68 | -------------------------------------------------------------------------------- /cmake/config.h.cmake: -------------------------------------------------------------------------------- 1 | #ifndef CONFIG_H 2 | #define CONFIG_H 3 | 4 | /* With crash button (tools->crash) */ 5 | #cmakedefine WITH_CRASHBUTTON 6 | 7 | /* With crash handler */ 8 | #cmakedefine WITH_CRASHHANDLER 9 | 10 | /* With crash handler GUI */ 11 | #cmakedefine WITH_CRASHHANDLER_GUI 12 | 13 | /* Absolute path to plugins */ 14 | #cmakedefine VLMC_EFFECTS_DIR "@VLMC_EFFECTS_DIR@" 15 | 16 | /* Host computer name */ 17 | #cmakedefine HOSTNAME "@HOSTNAME@" 18 | 19 | /* VLMC's version */ 20 | #cmakedefine PROJECT_VERSION "@PROJECT_VERSION@" 21 | 22 | #endif //CONFIG_H 23 | -------------------------------------------------------------------------------- /cmake/toolchain-win32.cmake: -------------------------------------------------------------------------------- 1 | # this one is important 2 | SET(CMAKE_SYSTEM_NAME Windows) 3 | #this one not so much 4 | SET(CMAKE_SYSTEM_VERSION 1) 5 | 6 | # specify the cross compiler 7 | SET(CMAKE_C_COMPILER /usr/bin/i486-mingw32-gcc) 8 | SET(CMAKE_CXX_COMPILER /usr/bin/i486-mingw32-g++) 9 | 10 | # where is the target environment 11 | SET(CMAKE_FIND_ROOT_PATH ${CMAKE_SOURCE_DIR}/contribs) 12 | 13 | # search for programs in the build host directories 14 | SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 15 | # for libraries and headers in the target directories 16 | SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 17 | SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 18 | -------------------------------------------------------------------------------- /cmake/vlmc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BIN="bin/vlmc" 4 | if [ -f $BIN ]; then 5 | exec $BIN "$@" 6 | else 7 | echo "VLMC not build, read INSTALL first" 8 | fi 9 | -------------------------------------------------------------------------------- /doc/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/doc/.keep -------------------------------------------------------------------------------- /doc/README: -------------------------------------------------------------------------------- 1 | Requirements: 2 | ------------- 3 | 4 | - doxygen 5 | - graphviz 6 | 7 | 8 | Generate the documentation: 9 | --------------------------- 10 | 11 | Run doxygen from the doc/ directory: 12 | # doxygen 13 | 14 | The documentation will be generated into the html/ directory. 15 | -------------------------------------------------------------------------------- /fortunes.txt: -------------------------------------------------------------------------------- 1 | 16:19 < chouquette> hey boubak ? /quit et /quat sont dans un bateau. /quat 2 | tombe a l'eau. Qui reste-t-il ? 3 | 16:19 < chouquette> boubak: pour vendredi je sais pas faudra quej e confirme 4 | 16:20 -!- boubak [n=boubak@cowdy.vlmc.org] has quit ["leaving"] 5 | 16:20 < chouquette> putain il a marche la dedans ?! 6 | 16:20 < etix> j'y crois pas... 7 | 8 | --- 9 | 10 | 09:37 < JakeSays> i believe python was designed by someone missing his right 11 | little finger. 12 | 09:38 < chouquette> JakeSays: I've a screwed up right little finger and I 13 | wouldn't dare come up with something like python 14 | 09:38 < chouquette> I still have some kind of self esteem 15 | 16 | --- 17 | 18 | 23:57:50 < Apocalypse_555> sorry my english is execrable 19 | 20 | --- 21 | 22 | < boubak > Tu veux casser l'ABI? 23 | < boubak > Et ils vont dormir ou les moines? 24 | 25 | -------------------------------------------------------------------------------- /include/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/include/.keep -------------------------------------------------------------------------------- /modules/effects/squeleton/Skeleton.cpp: -------------------------------------------------------------------------------- 1 | #include "Skeleton.h" 2 | 3 | Skeleton::Skeleton() 4 | : GenericEffect() //Call ctor when refactored 5 | { 6 | //Nothing to do 7 | } 8 | 9 | Skeleton::~Skeleton() 10 | { 11 | //Nothing to do 12 | } 13 | 14 | void Skeleton::render( void ) 15 | { 16 | return ; 17 | } 18 | -------------------------------------------------------------------------------- /modules/effects/squeleton/Skeleton.h: -------------------------------------------------------------------------------- 1 | #ifndef SKELETON_H 2 | #define SKELETON_H 3 | 4 | #include "GenericEffect.h" 5 | 6 | class Skeleton : public GenericEffect 7 | { 8 | Q_CLASSINFO("authors", "Clement CHAVANCE") 9 | Q_CLASSINFO("mail", "kinder@vlmc.org") 10 | Q_CLASSINFO("name", "Skeleton") 11 | Q_CLASSINFO("www", "www.vlmc.org") 12 | Q_CLASSINFO("version", "0.1") 13 | Q_CLASSINFO("description", "Exemple of a skeleton plugin") 14 | Q_CLASSINFO("category", "Exemples") 15 | public: 16 | Skeleton(); 17 | ~Skeleton(); 18 | 19 | void render( void ); 20 | }; 21 | 22 | extern "C" 23 | { 24 | Skeleton* 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /modules/sample_module/libsample_module.so.1: -------------------------------------------------------------------------------- 1 | libsample_module.so.1.0.0 -------------------------------------------------------------------------------- /modules/sample_module/libsample_module.so.1.0: -------------------------------------------------------------------------------- 1 | libsample_module.so.1.0.0 -------------------------------------------------------------------------------- /modules/sample_module/main.cpp: -------------------------------------------------------------------------------- 1 | #include "../../src/API/vlmc_module.h" 2 | 3 | #include 4 | 5 | vlmc_module_begin() 6 | printf("Initializing sample_module\n"); 7 | vlmc_module_end() 8 | 9 | static vlmc_return_type_t Open( void* pv_module ) 10 | { 11 | create_p_module( pv_module ); 12 | 13 | vlmc_add_variable_int( p_module, "test_var", 0 ); 14 | return VLMC_SUCCESS; 15 | } 16 | 17 | -------------------------------------------------------------------------------- /resources/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/.keep -------------------------------------------------------------------------------- /resources/images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/add.png -------------------------------------------------------------------------------- /resources/images/audio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/audio.png -------------------------------------------------------------------------------- /resources/images/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/back.png -------------------------------------------------------------------------------- /resources/images/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/clear.png -------------------------------------------------------------------------------- /resources/images/configure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/configure.png -------------------------------------------------------------------------------- /resources/images/editcut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/editcut.png -------------------------------------------------------------------------------- /resources/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/error.png -------------------------------------------------------------------------------- /resources/images/forward.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/forward.png -------------------------------------------------------------------------------- /resources/images/hpoff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/hpoff.png -------------------------------------------------------------------------------- /resources/images/hpon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/hpon.png -------------------------------------------------------------------------------- /resources/images/keyboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/keyboard.png -------------------------------------------------------------------------------- /resources/images/marker_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/marker_left.png -------------------------------------------------------------------------------- /resources/images/marker_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/marker_right.png -------------------------------------------------------------------------------- /resources/images/marker_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/marker_start.png -------------------------------------------------------------------------------- /resources/images/marker_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/marker_stop.png -------------------------------------------------------------------------------- /resources/images/mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/mouse.png -------------------------------------------------------------------------------- /resources/images/next_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/next_frame.png -------------------------------------------------------------------------------- /resources/images/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/pause.png -------------------------------------------------------------------------------- /resources/images/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/play.png -------------------------------------------------------------------------------- /resources/images/previous_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/previous_frame.png -------------------------------------------------------------------------------- /resources/images/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/redo.png -------------------------------------------------------------------------------- /resources/images/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/remove.png -------------------------------------------------------------------------------- /resources/images/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/stop.png -------------------------------------------------------------------------------- /resources/images/trackoff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/trackoff.png -------------------------------------------------------------------------------- /resources/images/trackon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/trackon.png -------------------------------------------------------------------------------- /resources/images/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/undo.png -------------------------------------------------------------------------------- /resources/images/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/up.png -------------------------------------------------------------------------------- /resources/images/video.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/video.png -------------------------------------------------------------------------------- /resources/images/vlmc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/vlmc.ico -------------------------------------------------------------------------------- /resources/images/vlmc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/vlmc.png -------------------------------------------------------------------------------- /resources/images/wizard_watermark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/wizard_watermark.png -------------------------------------------------------------------------------- /resources/images/zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/zoom_in.png -------------------------------------------------------------------------------- /resources/images/zoom_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/resources/images/zoom_out.png -------------------------------------------------------------------------------- /resources/styleSheets/Style.qss: -------------------------------------------------------------------------------- 1 | 2 | QMenu 3 | { 4 | background: transparent; 5 | margin: 2px; 6 | } 7 | 8 | QMenu::item 9 | { 10 | background: rgba( 104, 103, 103, 255 ); 11 | padding: 2px 30 2px 30px; 12 | border: 1px solid transparent; 13 | } 14 | 15 | QMenu::item:selected 16 | { 17 | background: rgba( 174, 174, 175, 175 ); 18 | border: 1px; 19 | margin: 1px; 20 | } 21 | 22 | QMenu::icon:checked 23 | { 24 | background: gray; 25 | border: 1px inset gray; 26 | position: absolute; 27 | top: 1px; 28 | right: 1px; 29 | bottom: 1px; 30 | left: 1px; 31 | } 32 | 33 | QMenu::separator 34 | { 35 | height: 1px; 36 | background: transparent; 37 | margin-left: 10px; 38 | margin-right: 5px; 39 | border: 2px; 40 | } 41 | 42 | QMenuBar { background: rgba( 104, 103, 103, 255 ); spacing: 5; } 43 | 44 | QMenuBar::item { background: rgba( 104, 103, 103, 255 ) } 45 | 46 | QAbstractButton 47 | { 48 | background: rgba( 104, 103, 103, 255 ); 49 | } 50 | 51 | QMessageBox{ background: rgba( 73, 72, 72, 255 ) } 52 | QComboBox{ background: rgba( 104, 103, 103, 255 ) } 53 | QLineEdit{ background: rgba( 104, 103, 103, 255 ) } 54 | QSpinBox{ background: rgba( 104, 103, 103, 255 ) } 55 | QDoubleSpinBox{ background: rgba( 104, 103, 103, 255 ) } 56 | 57 | QTabWidget::pane 58 | { /* The tab widget frame */ 59 | border-top: 2px solid #C2C7CB; 60 | } 61 | 62 | QTabWidget::tab-bar 63 | { 64 | left: 5px; /* move to the right by 5px */ 65 | } 66 | 67 | /* Style the tab using the tab sub-control. Note that 68 | it reads QTabBar _not_ QTabWidget */ 69 | QTabBar::tab 70 | { 71 | background: rgba( 104, 103, 103, 255 ); 72 | border: 2px solid #C4C4C3; 73 | border-bottom-color: #C2C7CB; /* same as the pane color */ 74 | border-top-left-radius: 4px; 75 | border-top-right-radius: 4px; 76 | min-width: 8ex; 77 | padding: 2px; 78 | } 79 | 80 | QTabBar::tab:selected, QTabBar::tab:hover 81 | { 82 | background: rgba( 73, 72, 72, 255 ); 83 | } 84 | 85 | QTabBar::tab:selected 86 | { 87 | border-color: #9B9B9B; 88 | border-bottom-color: #C2C7CB; /* same as pane color */ 89 | } 90 | 91 | QTabBar::tab:!selected 92 | { 93 | margin-top: 2px; /* make non-selected tabs look smaller */ 94 | } 95 | -------------------------------------------------------------------------------- /resources/styles.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | styleSheets/Style.qss 4 | 5 | 6 | -------------------------------------------------------------------------------- /share/vlmc.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=0.1 3 | Name=VideoLAN Movie Creator 4 | Comment=Non-Linear Video Editor 5 | Exec=vlmc %U 6 | Icon=vlmc 7 | Terminal=false 8 | Type=Application 9 | Categories=AudioVideoEditing;AudioVideo;Qt 10 | -------------------------------------------------------------------------------- /share/vlmc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/share/vlmc.png -------------------------------------------------------------------------------- /src/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/src/.keep -------------------------------------------------------------------------------- /src/Commands/KeyboardShortcutHelper.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * KeyboardShortcutHelper.h: An helper to catch keyboard shortcut modifications 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef KEYBOARDSHORTCUTHELPER_H 24 | #define KEYBOARDSHORTCUTHELPER_H 25 | 26 | #include 27 | #include 28 | 29 | class QAction; 30 | 31 | class KeyboardShortcutHelper : public QShortcut 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | KeyboardShortcutHelper( const QString &name, QWidget* parent = NULL ); 37 | KeyboardShortcutHelper( const QString &name, QAction *action, 38 | QWidget *parent = NULL ); 39 | virtual ~KeyboardShortcutHelper() 40 | { 41 | } 42 | 43 | private: 44 | QString m_name; 45 | QAction *m_action; 46 | private slots: 47 | void shortcutUpdated( const QVariant& value ); 48 | }; 49 | 50 | #endif // KEYBOARDSHORTCUTHELPER_H 51 | -------------------------------------------------------------------------------- /src/Commands/commands.pri: -------------------------------------------------------------------------------- 1 | HEADERS += Commands.h \ 2 | KeyboardShortcutHelper.h 3 | SOURCES += Commands.cpp \ 4 | KeyboardShortcutHelper.cpp 5 | -------------------------------------------------------------------------------- /src/Configuration/SettingValue.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * SettingValue.cpp: A setting value that can broadcast its changes 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "SettingValue.h" 24 | #include 25 | 26 | SettingValue::SettingValue( SettingValue::Type type, const QVariant& defaultValue, 27 | const QString &name, const QString& desc ) : 28 | m_val( defaultValue ), 29 | m_defaultVal( defaultValue ), 30 | m_name( name ), 31 | m_desc( desc ), 32 | m_type( type ) 33 | { 34 | } 35 | 36 | void 37 | SettingValue::set( const QVariant& val ) 38 | { 39 | if ( val != m_val ) 40 | { 41 | m_val = val; 42 | emit changed( m_val ); 43 | } 44 | } 45 | 46 | const QVariant& 47 | SettingValue::get() const 48 | { 49 | return m_val; 50 | } 51 | 52 | const QString& 53 | SettingValue::description() const 54 | { 55 | return m_desc; 56 | } 57 | 58 | void 59 | SettingValue::restoreDefault() 60 | { 61 | set( m_defaultVal ); 62 | } 63 | 64 | const QString& 65 | SettingValue::name() const 66 | { 67 | return m_name; 68 | } 69 | 70 | SettingValue::Type 71 | SettingValue::type() const 72 | { 73 | return m_type; 74 | } 75 | -------------------------------------------------------------------------------- /src/Configuration/configuration.pri: -------------------------------------------------------------------------------- 1 | HEADERS += ProjectSettingsDefault.h \ 2 | SettingsManager.h \ 3 | VLMCSettingsDefault.h \ 4 | SettingValue.h 5 | SOURCES += ProjectSettingsDefault.cpp \ 6 | SettingsManager.cpp \ 7 | VLMCSettingsDefault.cpp \ 8 | SettingValue.cpp 9 | -------------------------------------------------------------------------------- /src/EffectsEngine/EffectPluginTypeLoader.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * EffectPluginTypeLoader.cpp: this class is used to load a .so and instantiate 3 | * the IEffectPluginCreator from this 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef EFFECTPLUGINTYPELOADER_H_ 25 | #define EFFECTPLUGINTYPELOADER_H_ 26 | 27 | #include 28 | 29 | class IEffectPlugin; 30 | class IEffectPluginCreator; 31 | 32 | class QPluginLoader; 33 | 34 | class EffectPluginTypeLoader 35 | { 36 | public: 37 | 38 | EffectPluginTypeLoader( void ); 39 | ~EffectPluginTypeLoader(); 40 | 41 | QString pluginName( void ) const; 42 | IEffectPlugin* createIEffectPluginInstance( void ) const; 43 | bool load( const QString & fileName ); 44 | 45 | private: 46 | 47 | QPluginLoader m_qpl; 48 | IEffectPluginCreator* m_iepc; 49 | QString m_pluginName; 50 | }; 51 | 52 | #endif // EFFECTPLUGINTYPELOADER_H_ 53 | -------------------------------------------------------------------------------- /src/EffectsEngine/EffectPluginTypeManager.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * EffectPluginTypeManager.h: this class is used to instantiate one 3 | * EffectPluginTypeLoader by .so 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef EFFECTPLUGINTYPEMANAGER_H_ 25 | #define EFFECTPLUGINTYPEMANAGER_H_ 26 | 27 | #include 28 | 29 | class EffectPluginTypeLoader; 30 | class IEffectPlugin; 31 | 32 | class EffectPluginTypeManager 33 | { 34 | 35 | public: 36 | 37 | EffectPluginTypeManager( void ); 38 | ~EffectPluginTypeManager(); 39 | 40 | qint32 loadPlugins( const QString &path ); 41 | 42 | IEffectPlugin* createIEffectPluginInstance( quint32 typeId ) const; 43 | IEffectPlugin* createIEffectPluginInstance( const QString & typeName ) const; 44 | 45 | QList getEffectPluginTypesNamesList( void ) const; 46 | QList getEffectPluginTypesIdsList( void ) const; 47 | 48 | const QString getEffectPluginTypeNameByTypeId( quint32 typeId ) const; 49 | quint32 getEffectPluginTypeIdByTypeName( const QString & typeName ) const; 50 | 51 | private: 52 | 53 | QMap m_eptlByName; 54 | QMap m_eptlById; 55 | QMap m_nameById; 56 | quint32 m_higherFreeId; 57 | 58 | }; 59 | 60 | #endif // EFFECTPLUGINTYPEMANAGER_H_ 61 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/lib/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/VLMC/vlmc/e564f61b37b286458e240ccf440ad6d6295be283/src/EffectsEngine/Plugins/lib/.keep -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/BlitInRectangle/BlitInRectangleEffectPlugin.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * BlitInRectangleEffectPlugin.cpp: blit src video input in a rectangle on dst 3 | * video input and output the result 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #include "BlitInRectangleEffectPlugin.h" 25 | #include 26 | 27 | 28 | BlitInRectangleEffectPlugin::BlitInRectangleEffectPlugin() 29 | { 30 | } 31 | 32 | BlitInRectangleEffectPlugin::~BlitInRectangleEffectPlugin() 33 | { 34 | } 35 | 36 | void BlitInRectangleEffectPlugin::init(IEffectNode* ien) 37 | { 38 | m_ien = ien; 39 | m_ien->createStaticVideoInput("src"); 40 | m_ien->createStaticVideoInput("dst"); 41 | m_ien->createStaticVideoOutput("aux"); 42 | m_ien->createStaticVideoOutput("res"); 43 | return ; 44 | } 45 | 46 | void BlitInRectangleEffectPlugin::render( void ) 47 | { 48 | LightVideoFrame lvf1; 49 | LightVideoFrame lvf2; 50 | 51 | (*m_ien->getStaticVideoInput("src")) >> lvf1; 52 | (*m_ien->getStaticVideoInput("dst")) >> lvf2; 53 | 54 | QImage src( lvf1->frame.octets, lvf1->width, lvf1->height, QImage::Format_RGB888 ); 55 | QImage dst( lvf2->frame.octets, lvf2->width, lvf2->height, QImage::Format_RGB888 ); 56 | QPainter p( &dst ); 57 | 58 | p.drawImage( 100, 100, src); 59 | (*m_ien->getStaticVideoOutput("aux")) << lvf2; 60 | (*m_ien->getStaticVideoOutput("res")) << lvf2; 61 | return ; 62 | } 63 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/BlitInRectangle/BlitInRectangleEffectPlugin.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * BlitInRectangleEffectPlugin.h: blit src video input in a rectangle on dst 3 | * video input and output the result 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef BLITINRECTANGLEEFFECTPLUGIN_H_ 25 | #define BLITINRECTANGLEEFFECTPLUGIN_H_ 26 | 27 | #include 28 | #include 29 | #include "IEffectNode.h" 30 | #include "IEffectPlugin.h" 31 | 32 | class BlitInRectangleEffectPlugin : public QObject, public IEffectPlugin 33 | { 34 | public: 35 | 36 | // CTOR & DTOR 37 | 38 | BlitInRectangleEffectPlugin(); 39 | ~BlitInRectangleEffectPlugin(); 40 | 41 | // INIT 42 | 43 | void init( IEffectNode* ien ); 44 | 45 | // RENDER METHOD 46 | 47 | void render( void ); 48 | 49 | private: 50 | 51 | IEffectNode* m_ien; 52 | }; 53 | 54 | #endif // BLITINRECTANGLEEFFECTPLUGIN_H_ 55 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/BlitInRectangle/BlitInRectangleEffectPluginCreator.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * BlitInRectangleEffectPluginCreator.cpp: this class is used to instantiate 3 | * an BlitInRectangleEffectPlugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #include "BlitInRectangleEffectPluginCreator.h" 25 | 26 | IEffectPlugin* BlitInRectangleEffectPluginCreator::createIEffectPluginInstance( void ) 27 | { 28 | return (new BlitInRectangleEffectPlugin()); 29 | } 30 | 31 | Q_EXPORT_PLUGIN2( BlitInRectangleEffectPluginCreator, BlitInRectangleEffectPluginCreator ); 32 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/BlitInRectangle/BlitInRectangleEffectPluginCreator.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * BlitInRectangleEffectPluginCreator.h: this class is used to instantiate 3 | * an BlitInRectangleEffectPlugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef BLITINRECTANGLEEFFECTPLUGINCREATOR_H_ 25 | #define BLITINRECTANGLEEFFECTPLUGINCREATOR_H_ 26 | 27 | #include 28 | #include 29 | #include "IEffectPluginCreator.h" 30 | #include "IEffectPlugin.h" 31 | #include "BlitInRectangleEffectPlugin.h" 32 | 33 | class BlitInRectangleEffectPluginCreator : public QObject, public IEffectPluginCreator 34 | { 35 | Q_OBJECT; 36 | Q_INTERFACES( IEffectPluginCreator ); 37 | Q_CLASSINFO( "PLUGINNAME", "BlitInRectangle" ); 38 | public: 39 | IEffectPlugin* createIEffectPluginInstance( void ); 40 | }; 41 | 42 | #endif // BLITINRECTANGLEEFFECTPLUGINCREATOR_H_ 43 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/BlitInRectangle/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(BlitInRectangleEffectPlugin) 2 | 3 | INCLUDE(${QT_USE_FILE}) 4 | INCLUDE_DIRECTORIES( 5 | ${QT_INCLUDE_DIR} 6 | ../../../PluginsAPI 7 | ) 8 | 9 | SET(SOURCES_CPP 10 | BlitInRectangleEffectPlugin.cpp 11 | BlitInRectangleEffectPluginCreator.cpp 12 | ../../../PluginsAPI/LightVideoFrame.cpp 13 | ) 14 | 15 | SET(SOURCES_H 16 | BlitInRectangleEffectPluginCreator.h 17 | ) 18 | 19 | QT4_WRAP_CPP(SOURCES_H_MOC ${SOURCES_H}) 20 | 21 | ADD_DEFINITIONS(${QT_DEFINITIONS}) 22 | ADD_DEFINITIONS(-DQT_PLUGIN) 23 | ADD_DEFINITIONS(-DQT_NO_DEBUG) 24 | ADD_DEFINITIONS(-DQT_SHARED) 25 | 26 | ADD_LIBRARY(BlitInRectangleEffectPlugin SHARED ${SOURCES_CPP} ${SOURCES_H_MOC}) 27 | ADD_DEPENDENCIES(BlitInRectangleEffectPlugin vlmc) 28 | 29 | TARGET_LINK_LIBRARIES(BlitInRectangleEffectPlugin ${QT_LIBRARIES}) 30 | 31 | IF(NOT WIN32) 32 | INSTALL(TARGETS BlitInRectangleEffectPlugin LIBRARY DESTINATION ${VLMC_EFFECTS_DIR}) 33 | ENDIF(NOT WIN32) 34 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | SUBDIRS(BlitInRectangle) 3 | SUBDIRS(GreenFilterEffect) 4 | SUBDIRS(InvertRNBEffect) 5 | SUBDIRS(MixerEffect) 6 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/GreenFilterEffect/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(GreenFilterEffectPlugin) 2 | 3 | INCLUDE(${QT_USE_FILE}) 4 | INCLUDE_DIRECTORIES( 5 | ${QT_INCLUDE_DIR} 6 | ../../../PluginsAPI 7 | ) 8 | 9 | SET(SOURCES_CPP 10 | GreenFilterEffectPlugin.cpp 11 | GreenFilterEffectPluginCreator.cpp 12 | ../../../PluginsAPI/LightVideoFrame.cpp 13 | ) 14 | 15 | SET(SOURCES_H 16 | GreenFilterEffectPluginCreator.h 17 | ) 18 | 19 | QT4_WRAP_CPP(SOURCES_H_MOC ${SOURCES_H}) 20 | 21 | ADD_DEFINITIONS(${QT_DEFINITIONS}) 22 | ADD_DEFINITIONS(-DQT_PLUGIN) 23 | ADD_DEFINITIONS(-DQT_NO_DEBUG) 24 | ADD_DEFINITIONS(-DQT_SHARED) 25 | 26 | ADD_LIBRARY(GreenFilterEffectPlugin SHARED ${SOURCES_CPP} ${SOURCES_H_MOC}) 27 | ADD_DEPENDENCIES(GreenFilterEffectPlugin vlmc) 28 | 29 | TARGET_LINK_LIBRARIES(GreenFilterEffectPlugin ${QT_LIBRARIES}) 30 | 31 | IF(NOT WIN32) 32 | INSTALL(TARGETS GreenFilterEffectPlugin LIBRARY DESTINATION ${VLMC_EFFECTS_DIR}) 33 | ENDIF(NOT WIN32) 34 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/GreenFilterEffect/GreenFilterEffectPlugin.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GreenFilterEffectPlugin.cpp: test effect module, just for apply a green filter 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Vincent Carrubba 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "GreenFilterEffectPlugin.h" 24 | #include 25 | 26 | 27 | GreenFilterEffectPlugin::GreenFilterEffectPlugin() 28 | { 29 | } 30 | 31 | GreenFilterEffectPlugin::~GreenFilterEffectPlugin() 32 | { 33 | } 34 | 35 | void GreenFilterEffectPlugin::init(IEffectNode* ien) 36 | { 37 | m_ien = ien; 38 | m_ien->createStaticVideoInput(); 39 | m_ien->createStaticVideoOutput(); 40 | return ; 41 | } 42 | 43 | void GreenFilterEffectPlugin::render( void ) 44 | { 45 | quint32 i; 46 | LightVideoFrame tmp; 47 | (*m_ien->getStaticVideoInput(1)) >> tmp; 48 | if (tmp->frame.octets != NULL) 49 | { 50 | for ( i = 0; i < tmp->nbpixels; ++i ) 51 | { 52 | tmp->frame.pixels[i].Red = 0; 53 | tmp->frame.pixels[i].Blue = 0; 54 | } 55 | (*m_ien->getStaticVideoOutput(1)) << tmp; 56 | } 57 | return ; 58 | } 59 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/GreenFilterEffect/GreenFilterEffectPlugin.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GreenFilterEffectPlugin.h: test effect module, just for apply a green filter 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Vincent Carrubba 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef GREENFILTEREFFECTPLUGIN_H_ 24 | #define GREENFILTEREFFECTPLUGIN_H_ 25 | 26 | #include "IEffectNode.h" 27 | #include "IEffectPlugin.h" 28 | 29 | class GreenFilterEffectPlugin : public QObject, public IEffectPlugin 30 | { 31 | public: 32 | 33 | // CTOR & DTOR 34 | 35 | GreenFilterEffectPlugin(); 36 | ~GreenFilterEffectPlugin(); 37 | 38 | // INIT 39 | 40 | void init( IEffectNode* ien ); 41 | 42 | // RENDER METHOD 43 | 44 | void render( void ); 45 | 46 | private: 47 | 48 | IEffectNode* m_ien; 49 | }; 50 | 51 | #endif // GREENFILTEREFFECTPLUGIN_H_ 52 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/GreenFilterEffect/GreenFilterEffectPluginCreator.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GreenFilterEffectPluginCreator.cpp: this class is used to instantiate 3 | * a GreenFilterEffectPlugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #include "GreenFilterEffectPluginCreator.h" 25 | 26 | IEffectPlugin* GreenFilterEffectPluginCreator::createIEffectPluginInstance( void ) 27 | { 28 | return (new GreenFilterEffectPlugin()); 29 | } 30 | 31 | Q_EXPORT_PLUGIN2( GreenFilterEffectPluginCreator, GreenFilterEffectPluginCreator ); 32 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/GreenFilterEffect/GreenFilterEffectPluginCreator.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GreenFilterEffectPluginCreator.h: this class is used to instantiate 3 | * a GreenFilterEffectPlugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef GREENFILTEREFFECTPLUGINCREATOR_H_ 25 | #define GREENFILTEREFFECTPLUGINCREATOR_H_ 26 | 27 | #include 28 | #include 29 | #include "IEffectPluginCreator.h" 30 | #include "IEffectPlugin.h" 31 | #include "GreenFilterEffectPlugin.h" 32 | 33 | class GreenFilterEffectPluginCreator : public QObject, public IEffectPluginCreator 34 | { 35 | Q_OBJECT; 36 | Q_INTERFACES( IEffectPluginCreator ); 37 | Q_CLASSINFO( "PLUGINNAME", "GreenFilter" ); 38 | public: 39 | IEffectPlugin* createIEffectPluginInstance( void ); 40 | }; 41 | 42 | #endif // GREENFILTEREFFECTPLUGINCREATOR_H_ 43 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/InvertRNBEffect/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(InvertRNBEffectPlugin) 2 | 3 | INCLUDE(${QT_USE_FILE}) 4 | INCLUDE_DIRECTORIES( 5 | ${QT_INCLUDE_DIR} 6 | ../../../PluginsAPI 7 | ) 8 | 9 | SET(SOURCES_CPP 10 | InvertRNBEffectPlugin.cpp 11 | InvertRNBEffectPluginCreator.cpp 12 | ../../../PluginsAPI/LightVideoFrame.cpp 13 | ) 14 | 15 | SET(SOURCES_H 16 | InvertRNBEffectPluginCreator.h 17 | ) 18 | 19 | QT4_WRAP_CPP(SOURCES_H_MOC ${SOURCES_H}) 20 | 21 | ADD_DEFINITIONS(${QT_DEFINITIONS}) 22 | ADD_DEFINITIONS(-DQT_PLUGIN) 23 | ADD_DEFINITIONS(-DQT_NO_DEBUG) 24 | ADD_DEFINITIONS(-DQT_SHARED) 25 | 26 | ADD_LIBRARY(InvertRNBEffectPlugin SHARED ${SOURCES_CPP} ${SOURCES_H_MOC}) 27 | ADD_DEPENDENCIES(InvertRNBEffectPlugin vlmc) 28 | 29 | TARGET_LINK_LIBRARIES(InvertRNBEffectPlugin ${QT_LIBRARIES}) 30 | 31 | IF(NOT WIN32) 32 | INSTALL(TARGETS InvertRNBEffectPlugin LIBRARY DESTINATION ${VLMC_EFFECTS_DIR}) 33 | ENDIF(NOT WIN32) 34 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/InvertRNBEffect/InvertRNBEffectPlugin.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * InvertRNBEffectPlugin.cpp: invert red and blue picture composantes 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Vincent Carrubba 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "InvertRNBEffectPlugin.h" 24 | #include 25 | 26 | InvertRNBEffectPlugin::InvertRNBEffectPlugin() 27 | { 28 | } 29 | 30 | InvertRNBEffectPlugin::~InvertRNBEffectPlugin() 31 | { 32 | } 33 | 34 | void InvertRNBEffectPlugin::init(IEffectNode* ien) 35 | { 36 | m_ien = ien; 37 | m_ien->createStaticVideoInput(); 38 | m_ien->createStaticVideoOutput(); 39 | return ; 40 | } 41 | 42 | void InvertRNBEffectPlugin::render( void ) 43 | { 44 | quint32 i; 45 | LightVideoFrame tmp; 46 | quint8 tmpay; 47 | 48 | (*m_ien->getStaticVideoInput(1)) >> tmp; 49 | if (tmp->frame.octets != NULL) 50 | { 51 | for ( i = 0; i < tmp->nbpixels; ++i ) 52 | { 53 | tmpay = tmp->frame.pixels[i].Red; 54 | tmp->frame.pixels[i].Red = tmp->frame.pixels[i].Blue; 55 | tmp->frame.pixels[i].Blue = tmpay; 56 | } 57 | (*m_ien->getStaticVideoOutput(1)) << tmp; 58 | } 59 | return ; 60 | } 61 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/InvertRNBEffect/InvertRNBEffectPlugin.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * InvertRNBEffectPlugin.h: test effect module, just for apply a green filter 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Vincent Carrubba 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef INVERTRNBEFFECTPLUGIN_H_ 24 | #define INVERTRNBEFFECTPLUGIN_H_ 25 | 26 | #include "IEffectNode.h" 27 | #include "IEffectPlugin.h" 28 | 29 | class InvertRNBEffectPlugin : public QObject, public IEffectPlugin 30 | { 31 | public: 32 | 33 | // CTOR & DTOR 34 | 35 | InvertRNBEffectPlugin(); 36 | ~InvertRNBEffectPlugin(); 37 | 38 | // INIT 39 | 40 | void init( IEffectNode* ien ); 41 | 42 | // RENDER METHOD 43 | 44 | void render( void ); 45 | 46 | private: 47 | 48 | IEffectNode* m_ien; 49 | }; 50 | 51 | #endif // INVERTRNBEFFECTPLUGIN_H_ 52 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/InvertRNBEffect/InvertRNBEffectPluginCreator.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * InvertRNBEffectPluginCreator.cpp: this class is used to instantiate 3 | * an InvertRNBEffectPlugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #include "InvertRNBEffectPluginCreator.h" 25 | 26 | IEffectPlugin* InvertRNBEffectPluginCreator::createIEffectPluginInstance( void ) 27 | { 28 | return (new InvertRNBEffectPlugin()); 29 | } 30 | 31 | Q_EXPORT_PLUGIN2( InvertRNBEffectPluginCreator, InvertRNBEffectPluginCreator ); 32 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/InvertRNBEffect/InvertRNBEffectPluginCreator.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * InvertRNBEffectPluginCreator.h: this class is used to instantiate 3 | * an InvertRNBEffectPlugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef INVERTRNBEFFECTPLUGINCREATOR_H_ 25 | #define INVERTRNBEFFECTPLUGINCREATOR_H_ 26 | 27 | #include 28 | #include 29 | #include "IEffectPluginCreator.h" 30 | #include "IEffectPlugin.h" 31 | #include "InvertRNBEffectPlugin.h" 32 | 33 | class InvertRNBEffectPluginCreator : public QObject, public IEffectPluginCreator 34 | { 35 | Q_OBJECT; 36 | Q_INTERFACES( IEffectPluginCreator ); 37 | Q_CLASSINFO( "PLUGINNAME", "InvertRNB" ); 38 | public: 39 | IEffectPlugin* createIEffectPluginInstance( void ); 40 | }; 41 | 42 | #endif // INVERTRNBEFFECTPLUGINCREATOR_H_ 43 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/MixerEffect/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | PROJECT(MixerEffectPlugin) 2 | 3 | INCLUDE(${QT_USE_FILE}) 4 | INCLUDE_DIRECTORIES( 5 | ${QT_INCLUDE_DIR} 6 | ../../../PluginsAPI 7 | ) 8 | 9 | SET(SOURCES_CPP 10 | MixerEffectPlugin.cpp 11 | MixerEffectPluginCreator.cpp 12 | ../../../PluginsAPI/LightVideoFrame.cpp 13 | ) 14 | 15 | SET(SOURCES_H 16 | MixerEffectPluginCreator.h 17 | ) 18 | 19 | QT4_WRAP_CPP(SOURCES_H_MOC ${SOURCES_H}) 20 | 21 | ADD_DEFINITIONS(${QT_DEFINITIONS}) 22 | ADD_DEFINITIONS(-DQT_PLUGIN) 23 | ADD_DEFINITIONS(-DQT_NO_DEBUG) 24 | ADD_DEFINITIONS(-DQT_SHARED) 25 | 26 | ADD_LIBRARY(MixerEffectPlugin SHARED ${SOURCES_CPP} ${SOURCES_H_MOC}) 27 | ADD_DEPENDENCIES(MixerEffectPlugin vlmc) 28 | 29 | TARGET_LINK_LIBRARIES(MixerEffectPlugin ${QT_LIBRARIES}) 30 | 31 | IF(NOT WIN32) 32 | INSTALL(TARGETS MixerEffectPlugin LIBRARY DESTINATION ${VLMC_EFFECTS_DIR}) 33 | ENDIF(NOT WIN32) 34 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/MixerEffect/MixerEffectPlugin.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * MixerEffectPlugin.cpp: Effect module to mix multiple frame in one 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Vincent Carrubba 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "MixerEffectPlugin.h" 24 | 25 | //#include "VlmcPlugin.h" 26 | 27 | #include 28 | 29 | MixerEffectPlugin::MixerEffectPlugin() 30 | { 31 | } 32 | 33 | MixerEffectPlugin::~MixerEffectPlugin() 34 | { 35 | } 36 | 37 | void MixerEffectPlugin::init( IEffectNode* ien ) 38 | { 39 | m_ien = ien; 40 | for ( unsigned int i = 0; i < 64; ++i ) 41 | m_ien->createStaticVideoInput(); 42 | m_ien->createStaticVideoOutput(); 43 | return ; 44 | } 45 | 46 | void MixerEffectPlugin::render( void ) 47 | { 48 | quint32 i; 49 | quint32 nbIns; 50 | static LightVideoFrame nullFrame; 51 | 52 | nbIns = m_ien->getNBStaticsVideosInputs(); 53 | for ( i = nbIns; i > 0; --i ) 54 | { 55 | const LightVideoFrame& lvf = (*m_ien->getStaticVideoInput( i )); 56 | if ( lvf->frame.octets != NULL ) 57 | { 58 | (*m_ien->getStaticVideoOutput( 1 )) << lvf; 59 | return ; 60 | } 61 | } 62 | (*m_ien->getStaticVideoOutput( 1 )) << nullFrame; 63 | return ; 64 | } 65 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/MixerEffect/MixerEffectPlugin.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * MixerEffectPlugin.h: Effect module to mix multiple frame in one 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Vincent Carrubba 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef MIXEREFFECTPLUGIN_H_ 24 | #define MIXEREFFECTPLUGIN_H_ 25 | 26 | #include "IEffectNode.h" 27 | #include "IEffectPlugin.h" 28 | 29 | class MixerEffectPlugin : public IEffectPlugin 30 | { 31 | public: 32 | 33 | // CTOR & DTOR 34 | 35 | MixerEffectPlugin(); 36 | ~MixerEffectPlugin(); 37 | 38 | // INIT 39 | 40 | void init( IEffectNode* ien ); 41 | 42 | // RENDER METHOD 43 | 44 | void render( void ); 45 | 46 | private: 47 | 48 | IEffectNode* m_ien; 49 | }; 50 | 51 | #endif // MIXEREFFECTPLUGIN_H_ 52 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/MixerEffect/MixerEffectPluginCreator.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * MixerEffectPluginCreator.cpp: this class is used to instantiate 3 | * a MixerEffectPlugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #include "MixerEffectPluginCreator.h" 25 | 26 | IEffectPlugin* 27 | MixerEffectPluginCreator::createIEffectPluginInstance( void ) 28 | { 29 | return new MixerEffectPlugin(); 30 | } 31 | 32 | Q_EXPORT_PLUGIN2( MixerEffectPluginCreator, MixerEffectPluginCreator ) 33 | -------------------------------------------------------------------------------- /src/EffectsEngine/Plugins/src/MixerEffect/MixerEffectPluginCreator.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * MixerEffectPluginCreator.h: this class is used to instantiate 3 | * a MixerEffectPlugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef MIXEREFFECTPLUGINCREATOR_H_ 25 | #define MIXEREFFECTPLUGINCREATOR_H_ 26 | 27 | #include 28 | #include 29 | #include "IEffectPluginCreator.h" 30 | #include "IEffectPlugin.h" 31 | #include "MixerEffectPlugin.h" 32 | 33 | class MixerEffectPluginCreator : public QObject, public IEffectPluginCreator 34 | { 35 | Q_OBJECT; 36 | Q_INTERFACES( IEffectPluginCreator ); 37 | Q_CLASSINFO("PLUGINNAME", "Mixer"); 38 | 39 | public: 40 | IEffectPlugin* createIEffectPluginInstance( void ); 41 | }; 42 | 43 | #endif // MIXEREFFECTPLUGINCREATOR_H_ 44 | -------------------------------------------------------------------------------- /src/EffectsEngine/PluginsAPI/IEffectPlugin.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * IEffectPlugin.h: interface that must inherit a plugin effect to work into 3 | * the effects engine 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef IEFFECTPLUGIN_H_ 25 | #define IEFFECTPLUGIN_H_ 26 | 27 | //#include "IEffectNode.h" 28 | 29 | class IEffectNode; 30 | 31 | class IEffectPlugin 32 | { 33 | public: 34 | 35 | // VIRTUAL DTOR 36 | 37 | virtual ~IEffectPlugin() {}; 38 | 39 | // RENDER METHOD 40 | 41 | virtual void render( void ) = 0; 42 | virtual void init( IEffectNode* ien ) = 0; 43 | 44 | }; 45 | 46 | #endif // IEFFECTPLUGIN_H_ 47 | -------------------------------------------------------------------------------- /src/EffectsEngine/PluginsAPI/IEffectPluginCreator.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * IEffectPluginCreator.cpp: Interface that must inherit the class who can 3 | * instantiate an effect plugin 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Vincent Carrubba 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef IEFFECTPLUGINFACTORY_H_ 25 | #define IEFFECTPLUGINFACTORY_H_ 26 | 27 | #include 28 | 29 | class IEffectPlugin; 30 | 31 | class IEffectPluginCreator 32 | { 33 | public: 34 | virtual ~IEffectPluginCreator() {}; 35 | virtual IEffectPlugin* createIEffectPluginInstance( void ) = 0; 36 | }; 37 | 38 | Q_DECLARE_INTERFACE(IEffectPluginCreator, "IEffectPluginCreator/0.1") 39 | 40 | #endif // IEFFECTPLUGINFACTORY_H_ 41 | -------------------------------------------------------------------------------- /src/EffectsEngine/PluginsAPI/PluginsAPI.pri: -------------------------------------------------------------------------------- 1 | HEADERS += InSlot.hpp \ 2 | OutSlot.hpp \ 3 | LightVideoFrame.h \ 4 | IEffectNode.h \ 5 | IEffectPluginCreator.h \ 6 | IEffectPlugin.h 7 | 8 | SOURCES += LightVideoFrame.cpp 9 | -------------------------------------------------------------------------------- /src/Gui/About.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * About.h: About dialog 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Christophe Courtaut 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef ABOUT_H 24 | #define ABOUT_H 25 | 26 | #include 27 | #include "ui_About.h" 28 | 29 | class QPlainTextEdit; 30 | 31 | class About : public QDialog 32 | { 33 | Q_OBJECT 34 | Q_DISABLE_COPY( About ) 35 | public: 36 | static About* instance(); 37 | 38 | protected: 39 | virtual void changeEvent( QEvent *e ); 40 | 41 | private: 42 | explicit About( QWidget *parent = 0 ); 43 | void setText( const QString& filename, QPlainTextEdit* widget ); 44 | Ui::AboutVLMC m_ui; 45 | static About* m_instance; 46 | }; 47 | 48 | #endif // ABOUT_H 49 | -------------------------------------------------------------------------------- /src/Gui/AudioSpectrumDrawer.cpp: -------------------------------------------------------------------------------- 1 | #include "AudioSpectrumDrawer.h" 2 | 3 | AudioSpectrumDrawer::AudioSpectrumDrawer( QPainter* painter, int height, int width, QList* audioValueList ) 4 | : m_painter( painter ), m_height( height ), m_width( width ), m_audioValueList( audioValueList ) 5 | { 6 | m_painter->setRenderHint( QPainter::Antialiasing, true ); 7 | m_painter->setPen( QPen( QColor( 79, 106, 25 ), 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin ) ); 8 | } 9 | 10 | void AudioSpectrumDrawer::run() 11 | { 12 | qreal max = 0; 13 | for( int i = 0; i < m_audioValueList->count(); i++ ) 14 | if ( m_audioValueList->at(i) > max ) 15 | max = m_audioValueList->at(i); 16 | 17 | for( int x = 0; x < m_audioValueList->count(); x++ ) 18 | { 19 | if ( x <= m_height ) 20 | { 21 | qreal y = ( (qreal)m_audioValueList->at(x) / max ) * 500; 22 | y -= 365; 23 | m_path.lineTo( x, y ); 24 | } 25 | } 26 | m_painter->drawPath( m_path ); 27 | } 28 | -------------------------------------------------------------------------------- /src/Gui/AudioSpectrumDrawer.h: -------------------------------------------------------------------------------- 1 | #ifndef AUDIOSPECTRUMDRAWER_H 2 | #define AUDIOSPECTRUMDRAWER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class AudioSpectrumDrawer : public QRunnable 9 | { 10 | private: 11 | QPainter* m_painter; 12 | int m_height; 13 | int m_width; 14 | QList* m_audioValueList; 15 | QPainterPath m_path; 16 | 17 | public: 18 | AudioSpectrumDrawer( QPainter* painter, int height, int width, QList* audioValueList ); 19 | void run(); 20 | }; 21 | 22 | #endif // AUDIOSPECTRUMDRAWER_H 23 | -------------------------------------------------------------------------------- /src/Gui/ClickableLabel.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ClickableLabel.cpp 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Geoffroy Lacarriere 7 | * Thomas Boquet 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #include "ClickableLabel.h" 25 | 26 | ClickableLabel::ClickableLabel( QWidget* parent ) : QLabel( parent ) 27 | { 28 | } 29 | 30 | void ClickableLabel::mousePressEvent( QMouseEvent* ev ) 31 | { 32 | emit clicked( this, ev ); 33 | } 34 | -------------------------------------------------------------------------------- /src/Gui/ClickableLabel.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ClickableLabel.h 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Geoffroy Lacarriere 7 | * Thomas Boquet 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef CLICKABLELABEL_H 25 | #define CLICKABLELABEL_H 26 | 27 | #include 28 | 29 | class ClickableLabel : public QLabel 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | ClickableLabel( QWidget* parent = NULL ); 35 | void mousePressEvent( QMouseEvent* ev ); 36 | 37 | signals: 38 | void clicked( QWidget* sender, QMouseEvent* ev ); 39 | }; 40 | 41 | #endif // CLICKABLELABEL_H 42 | -------------------------------------------------------------------------------- /src/Gui/ClipProperty.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ClipProperty.h: Handle the clip properties and meta tags edition 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef CLIPPROPERTY_H 24 | #define CLIPPROPERTY_H 25 | 26 | #include 27 | #include 28 | 29 | #include "Clip.h" 30 | #include 31 | 32 | namespace Ui { 33 | class ClipProperty; 34 | } 35 | 36 | class ClipProperty : public QDialog 37 | { 38 | Q_OBJECT 39 | public: 40 | ClipProperty( Clip* clip, QWidget *parent = 0 ); 41 | ~ClipProperty(); 42 | 43 | protected: 44 | void changeEvent(QEvent *e); 45 | 46 | private slots: 47 | void apply(); 48 | void addTagsRequired(); 49 | void removeTagsRequired(); 50 | 51 | private: 52 | Ui::ClipProperty* ui; 53 | Clip* m_clip; 54 | QStringListModel* m_model; 55 | }; 56 | 57 | #endif // CLIPPROPERTY_H 58 | -------------------------------------------------------------------------------- /src/Gui/DockWidgetManager.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * DockWidgetManager.h: Object managing the application docked widget 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Clement CHAVANCE 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef DOCKWIDGETMANAGER_H 24 | #define DOCKWIDGETMANAGER_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | class MainWindow; 33 | 34 | class DockWidgetManager : public QObject 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | static DockWidgetManager *instance( QObject *parent = 0 ); 40 | void setMainWindow( MainWindow *mainWin ); 41 | QDockWidget* addDockedWidget( QWidget *widget, 42 | const QString &qs_name, 43 | Qt::DockWidgetAreas areas, 44 | QDockWidget::DockWidgetFeature features, 45 | Qt::DockWidgetArea startArea ); 46 | 47 | protected: 48 | //virtual void changeEvent( QEvent *e ); 49 | 50 | private: 51 | explicit DockWidgetManager( QObject *parent = 0 ); 52 | virtual ~DockWidgetManager(); 53 | DockWidgetManager(const DockWidgetManager &); 54 | DockWidgetManager & operator = ( const DockWidgetManager & ); 55 | 56 | MainWindow *m_mainWin; 57 | QMap m_dockWidgets; 58 | static DockWidgetManager *m_instance; 59 | 60 | public slots: 61 | void transLateWidgetTitle(); 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /src/Gui/FileInfoListModel.cpp: -------------------------------------------------------------------------------- 1 | #include "FileInfoListModel.h" 2 | #include "QDebug" 3 | FileInfoListModel::FileInfoListModel( QObject* parent ) 4 | : QAbstractListModel( parent ) 5 | { } 6 | 7 | FileInfoListModel::FileInfoListModel(const QFileInfoList& fileInfoList, QObject* parent ) 8 | : QAbstractListModel( parent ), m_fileInfoList( fileInfoList ) 9 | { } 10 | 11 | int FileInfoListModel::rowCount( const QModelIndex& ) const 12 | { 13 | return m_fileInfoList.count(); 14 | } 15 | 16 | QVariant FileInfoListModel::data( const QModelIndex& index, int role ) const 17 | { 18 | if ( !index.isValid() ) 19 | return QVariant(); 20 | if ( index.row() >= m_fileInfoList.size() ) 21 | return QVariant(); 22 | if ( role == Qt::DisplayRole ) 23 | { 24 | // TODO: It's a hack that needs to be fixed 25 | QFileInfo fileInfo = m_fileInfoList.at( index.row() ); 26 | return static_cast( fileInfo.fileName() ); 27 | } 28 | else 29 | return QVariant(); 30 | } 31 | 32 | QVariant FileInfoListModel::headerData( int section, Qt::Orientation orientation, int role ) const 33 | { 34 | if ( role != Qt::DisplayRole ) 35 | return QVariant(); 36 | if ( orientation == Qt::Horizontal ) 37 | return QString( "Column %1" ).arg( section ); 38 | else 39 | return QString( "Row %1" ).arg( section ); 40 | } 41 | 42 | Qt::ItemFlags FileInfoListModel::flags( const QModelIndex& index ) const 43 | { 44 | if ( !index.isValid() ) 45 | return Qt::ItemIsEnabled; 46 | return QAbstractItemModel::flags( index ) | Qt::ItemIsEditable; 47 | } 48 | 49 | bool FileInfoListModel::setData( const QModelIndex& index, const QVariant& value, int role ) 50 | { 51 | if ( index.isValid() && role == Qt::DisplayRole ) 52 | { 53 | m_fileInfoList.replace( index.row(), value.toString() ); 54 | emit dataChanged( index, index ); 55 | return true; 56 | } 57 | return false; 58 | } 59 | 60 | void FileInfoListModel::setFileInfoList( const QFileInfoList& fileInfoList ) 61 | { 62 | m_fileInfoList = fileInfoList; 63 | reset(); 64 | } 65 | 66 | QFileInfo FileInfoListModel::fileInfo( const QModelIndex& index ) const 67 | { 68 | if ( index.isValid() ) 69 | { 70 | return m_fileInfoList[ index.row() ]; 71 | } 72 | return QFileInfo(); 73 | } 74 | -------------------------------------------------------------------------------- /src/Gui/FileInfoListModel.h: -------------------------------------------------------------------------------- 1 | #ifndef FILEINFOLISTMODEL_H 2 | #define FILEINFOLISTMODEL_H 3 | 4 | #include 5 | #include 6 | 7 | class FileInfoListModel : public QAbstractListModel 8 | { 9 | Q_OBJECT 10 | 11 | public: 12 | FileInfoListModel( QObject* parent = 0 ); 13 | FileInfoListModel(const QFileInfoList& fileInfoList, QObject* parent = 0 ); 14 | int rowCount( const QModelIndex& parent = QModelIndex() ) const; 15 | QVariant data( const QModelIndex& index, int role ) const; 16 | QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const; 17 | Qt::ItemFlags flags( const QModelIndex& index ) const; 18 | bool setData( const QModelIndex& index, const QVariant& value, int role = Qt::EditRole ); 19 | void setFileInfoList( const QFileInfoList& fileInfosList ); 20 | QFileInfo fileInfo( const QModelIndex& index ) const; 21 | 22 | private: 23 | QFileInfoList m_fileInfoList; 24 | }; 25 | 26 | #endif // FILEINFOLISTMODEL_H 27 | -------------------------------------------------------------------------------- /src/Gui/Gui.pri: -------------------------------------------------------------------------------- 1 | FORMS += ui/About.ui \ 2 | ui/ClipProperty.ui \ 3 | ui/MainWindow.ui \ 4 | ui/PreviewWidget.ui \ 5 | ui/TagWidget.ui \ 6 | ui/Timeline.ui \ 7 | ui/transcode.ui \ 8 | ui/WorkflowFileRendererDialog.ui 9 | HEADERS += About.h \ 10 | timeline/AbstractGraphicsMediaItem.h \ 11 | ClickableLabel.h \ 12 | ClipProperty.h \ 13 | DockWidgetManager.h \ 14 | FileInfoListModel.h \ 15 | timeline/GraphicsAudioItem.h \ 16 | timeline/GraphicsCursorItem.h \ 17 | timeline/GraphicsMovieItem.h \ 18 | timeline/GraphicsTrack.hpp \ 19 | import/ImportMediaCellView.h \ 20 | import/ImportMediaListController.h \ 21 | LanguagePreferences.h \ 22 | LCDTimecode.h \ 23 | MainWindow.h \ 24 | PreviewRuler.h \ 25 | PreviewWidget.h \ 26 | TagWidget.h \ 27 | timeline/Timeline.h \ 28 | timeline/TracksControls.h \ 29 | timeline/TracksRuler.h \ 30 | timeline/TracksScene.h \ 31 | timeline/TracksView.h \ 32 | UndoStack.h \ 33 | WorkflowFileRendererDialog.h \ 34 | AudioSpectrumDrawer.h 35 | SOURCES += About.cpp \ 36 | timeline/AbstractGraphicsMediaItem.cpp \ 37 | ClickableLabel.cpp \ 38 | ClipProperty.cpp \ 39 | DockWidgetManager.cpp \ 40 | FileInfoListModel.cpp \ 41 | timeline/GraphicsAudioItem.cpp \ 42 | timeline/GraphicsCursorItem.cpp \ 43 | timeline/GraphicsMovieItem.cpp \ 44 | import/ImportMediaCellView.cpp \ 45 | import/ImportMediaListController.cpp \ 46 | LanguagePreferences.cpp \ 47 | LCDTimecode.cpp \ 48 | MainWindow.cpp \ 49 | PreviewRuler.cpp \ 50 | PreviewWidget.cpp \ 51 | TagWidget.cpp \ 52 | timeline/Timeline.cpp \ 53 | timeline/TracksControls.cpp \ 54 | timeline/TracksRuler.cpp \ 55 | timeline/TracksScene.cpp \ 56 | timeline/TracksView.cpp \ 57 | UndoStack.cpp \ 58 | WorkflowFileRendererDialog.cpp \ 59 | AudioSpectrumDrawer.cpp 60 | -------------------------------------------------------------------------------- /src/Gui/LCDTimecode.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * LCDTimecode.cpp: Widget that displays an LCD-like timecode 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include 24 | #include "LCDTimecode.h" 25 | 26 | LCDTimecode::LCDTimecode( QWidget* parent ) 27 | : QLCDNumber( parent ) 28 | { 29 | setNumDigits( 11 ); 30 | setTime( 0, 0, 0, 0 ); 31 | } 32 | 33 | void LCDTimecode::setTime( int hours, int minutes, int seconds, int frames ) 34 | { 35 | QString s = QString("%1:%2:%3.%4") 36 | .arg( QString::number( hours ), 2, '0' ) 37 | .arg( QString::number( minutes ), 2, '0' ) 38 | .arg( QString::number( seconds), 2, '0' ) 39 | .arg( QString::number( frames ), 2, '0' ); 40 | display( s ); 41 | } 42 | -------------------------------------------------------------------------------- /src/Gui/LCDTimecode.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * LCDTimecode.h: Widget that displays an LCD-like timecode 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef LCDTIMECODE_H 24 | #define LCDTIMECODE_H 25 | 26 | #include 27 | 28 | class LCDTimecode : public QLCDNumber 29 | { 30 | Q_OBJECT 31 | public: 32 | LCDTimecode( QWidget* parent = 0 ); 33 | 34 | public slots: 35 | void setTime( int hours, int minutes = 0, int seconds = 0, int frames = 0 ); 36 | }; 37 | 38 | #endif // LCDTIMECODE_H 39 | -------------------------------------------------------------------------------- /src/Gui/LanguageHelper.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Languagehelper.cpp: Watch for language changes 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "LanguageHelper.h" 24 | 25 | #include 26 | #include 27 | #include 28 | 29 | #define TS_PREFIX "vlmc_" 30 | 31 | LanguageHelper::LanguageHelper() : m_translator( NULL ) 32 | { 33 | connect( qApp, SIGNAL( aboutToQuit() ), this, SLOT( deleteLater() ) ); 34 | } 35 | 36 | LanguageHelper::~LanguageHelper() 37 | { 38 | if ( m_translator ) 39 | delete m_translator; 40 | } 41 | 42 | void 43 | LanguageHelper::languageChanged( const QVariant &vLang ) 44 | { 45 | QString lang = vLang.toString(); 46 | if ( !lang.isEmpty() ) 47 | { 48 | if ( m_translator != NULL ) 49 | { 50 | qApp->removeTranslator( m_translator ); 51 | delete m_translator; 52 | m_translator = NULL; 53 | } 54 | m_translator = new QTranslator(); 55 | m_translator->load( TS_PREFIX + lang, ":/ts/" ); 56 | qApp->installTranslator( m_translator ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Gui/LanguageHelper.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Languagehelper.h: Watch for language changes 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef LANGUAGEHELPER_H 24 | #define LANGUAGEHELPER_H 25 | 26 | #include "Singleton.hpp" 27 | 28 | #include 29 | 30 | class QTranslator; 31 | 32 | class LanguageHelper : public QObject, public Singleton 33 | { 34 | Q_OBJECT 35 | Q_DISABLE_COPY( LanguageHelper ); 36 | 37 | public slots: 38 | void languageChanged( const QVariant& lang ); 39 | private: 40 | LanguageHelper(); 41 | ~LanguageHelper(); 42 | QTranslator *m_translator; 43 | 44 | friend class Singleton; 45 | 46 | }; 47 | 48 | #endif // LANGUAGEHELPER_H 49 | -------------------------------------------------------------------------------- /src/Gui/TagWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * TagWidget.h : Widget for tagging media 3 | * Render preview 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Geoffroy Lacarriere 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef TAGWIDGET_H 25 | #define TAGWIDGET_H 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include "Clip.h" 32 | 33 | namespace Ui 34 | { 35 | class TagWidget; 36 | } 37 | 38 | class TagWidget : public QWidget 39 | { 40 | Q_OBJECT 41 | public: 42 | TagWidget( QWidget *parent = 0, int nbButton = 0, QStringList tagList = QStringList() ); 43 | ~TagWidget(); 44 | void setNbButton( int nbButton ) { m_nbButton = nbButton; } 45 | void setTagList( QStringList tagList ) { m_defaultTagList = tagList; } 46 | 47 | protected: 48 | void changeEvent( QEvent *e ); 49 | void setTagTextEdit(); 50 | void setButtonList( QStringList tagList ); 51 | bool isButtonExist(); 52 | 53 | private: 54 | Ui::TagWidget* m_ui; 55 | int m_nbButton; 56 | QStringList m_defaultTagList; 57 | QWidgetList m_buttonList; 58 | Media* m_currentMedia; 59 | 60 | public slots: 61 | void mediaSelected( Media* media ); 62 | void buttonTagClicked(); 63 | void setMetaTags(); 64 | }; 65 | 66 | #endif // TAGWIDGET_H 67 | -------------------------------------------------------------------------------- /src/Gui/UndoStack.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * UndoStack.h: UndoStack For Undo/Redo Purposes 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Christophe Courtaut 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef UNDOSTACK_H 24 | #define UNDOSTACK_H 25 | 26 | #include 27 | 28 | #include "KeyboardShortcutHelper.h" 29 | #include "QSingleton.hpp" 30 | 31 | class QUndoStack; 32 | class QUndoCommand; 33 | 34 | class UndoStack : public QUndoView, public QSingleton 35 | { 36 | Q_OBJECT 37 | Q_DISABLE_COPY( UndoStack ); 38 | 39 | public: 40 | void push( QUndoCommand* command ); 41 | void beginMacro( const QString& text ); 42 | void endMacro(); 43 | bool canUndo(); 44 | bool canRedo(); 45 | 46 | private: 47 | UndoStack( QWidget* parent ); 48 | 49 | QUndoStack* m_undoStack; 50 | 51 | public slots: 52 | void clear(); 53 | void undo(); 54 | void redo(); 55 | 56 | signals: 57 | void cleanChanged( bool val ); 58 | void canRedoChanged( bool canRedo ); 59 | void canUndoChanged( bool canUndo ); 60 | 61 | friend class QSingleton; 62 | }; 63 | 64 | #endif // UNDOSTACK_H 65 | -------------------------------------------------------------------------------- /src/Gui/WorkflowFileRendererDialog.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * WorkflowFileRenderer.h: Output the workflow to a file 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef WORKFLOWFILERENDERERDIALOG_H 24 | #define WORKFLOWFILERENDERERDIALOG_H 25 | 26 | #include 27 | #include "ui_WorkflowFileRendererDialog.h" 28 | 29 | #include "MainWorkflow.h" 30 | 31 | class WorkflowFileRendererDialog : public QDialog 32 | { 33 | Q_OBJECT 34 | Q_DISABLE_COPY( WorkflowFileRendererDialog ); 35 | public: 36 | WorkflowFileRendererDialog( quint32 width, quint32 height ); 37 | void setOutputFileName( const QString& filename ); 38 | void setProgressBarValue( int val ); 39 | 40 | private: 41 | Ui::WorkflowFileRendererDialog m_ui; 42 | MainWorkflow* m_workflow; 43 | quint32 m_width; 44 | quint32 m_height; 45 | 46 | public slots: 47 | void updatePreview( const uchar* buff ); 48 | 49 | private slots: 50 | void frameChanged( qint64, MainWorkflow::FrameChangedReason ); 51 | 52 | friend class WorkflowFileRenderer; 53 | }; 54 | 55 | #endif // WORKFLOWFILERENDERERDIALOG_H 56 | -------------------------------------------------------------------------------- /src/Gui/export/RendererSettings.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * RendererSettings.h: Edit the output file parameters 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef RENDERERSETTINGS_H 24 | #define RENDERERSETTINGS_H 25 | 26 | #include 27 | #include "ui_RendererSettings.h" 28 | 29 | class RendererSettings : public QDialog 30 | { 31 | Q_OBJECT 32 | 33 | public: 34 | RendererSettings(); 35 | quint32 width() const; 36 | quint32 height() const; 37 | double fps() const; 38 | quint32 videoBitrate() const; 39 | quint32 audioBitrate() const; 40 | QString outputFileName() const; 41 | 42 | private slots: 43 | void selectOutputFileName(); 44 | virtual void accept(); 45 | 46 | private: 47 | Ui::RendererSettings m_ui; 48 | }; 49 | 50 | #endif // RENDERERSETTINGS_H 51 | -------------------------------------------------------------------------------- /src/Gui/import/ImportMediaCellView.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ImportMediaCellView.cpp: Inherited class of the MediaCellView 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Geoffroy Lacarriere 7 | * Thomas Boquet 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #include "ImportMediaCellView.h" 25 | 26 | ImportMediaCellView::ImportMediaCellView( const QUuid& uuid, QWidget *parent ) : MediaCellView( uuid, parent ) 27 | { 28 | } 29 | 30 | void ImportMediaCellView::mouseDoubleClickEvent( QMouseEvent* ) 31 | { 32 | } 33 | 34 | void ImportMediaCellView::mousePressEvent( QMouseEvent* ) 35 | { 36 | emit cellSelected( uuid() ); 37 | this->focusWidget(); 38 | } 39 | 40 | void ImportMediaCellView::mouseMoveEvent( QMouseEvent* ) 41 | { 42 | } 43 | 44 | -------------------------------------------------------------------------------- /src/Gui/import/ImportMediaCellView.h: -------------------------------------------------------------------------------- 1 | #ifndef IMPORTMEDIACELLVIEW_H 2 | #define IMPORTMEDIACELLVIEW_H 3 | 4 | #include "MediaCellView.h" 5 | 6 | class ImportMediaCellView : public MediaCellView 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | ImportMediaCellView( const QUuid& uuid, QWidget *parent = 0 ); 12 | 13 | protected: 14 | void mouseDoubleClickEvent( QMouseEvent* ); 15 | void mousePressEvent( QMouseEvent* ); 16 | void mouseMoveEvent( QMouseEvent* ); 17 | }; 18 | 19 | #endif // IMPORTMEDIACELLVIEW_H 20 | -------------------------------------------------------------------------------- /src/Gui/library/ClipListViewController.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ClipListViewController.h: controller for the library clip list 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Clement CHAVANCE 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef CLIPLISTVIEWCONTROLLER_H 24 | #define CLIPLISTVIEWCONTROLLER_H 25 | 26 | #include "ListViewController.h" 27 | #include "Media.h" 28 | #include "Clip.h" 29 | 30 | class ClipListViewController : public ListViewController 31 | { 32 | Q_OBJECT 33 | public: 34 | explicit ClipListViewController( StackViewController* nav, const QUuid& uuid); 35 | ~ClipListViewController(); 36 | 37 | void addClipsFromMedia( Media* media ); 38 | int getNbDeletion() const; 39 | void resetNbDeletion(); 40 | 41 | private: 42 | void addClip( Clip* clip ); 43 | void clean(); 44 | StackViewController* m_nav; 45 | QHash m_cells; 46 | QUuid m_mediaId; 47 | QUuid m_currentUuid; 48 | int m_deletion; 49 | 50 | public slots: 51 | void cellSelection( const QUuid& uuid ); 52 | void clipDeletion( const QUuid& uuid ); 53 | 54 | signals: 55 | void clipSelected( const QUuid& uuid ); 56 | void clipDeleted( const QUuid& mediaId, const QUuid& clipId ); 57 | }; 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /src/Gui/library/ListViewController.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ListViewController.h: 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Thomas Boquet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include 24 | #include 25 | 26 | #include "ListViewController.h" 27 | #include "MediaCellView.h" 28 | #include "Library.h" 29 | 30 | ListViewController::ListViewController( StackViewController* nav ) : m_nav( nav ) 31 | { 32 | m_title = new QString( "Media List" ); 33 | m_scrollArea = new QScrollArea(); 34 | m_layout = new QVBoxLayout(); 35 | m_container = new QWidget(); 36 | 37 | m_layout->setAlignment( Qt::AlignTop ); 38 | m_layout->setSpacing( 0 ); 39 | m_layout->setContentsMargins( 0, 0, 0, 0 ); 40 | m_container->setLayout( m_layout ); 41 | m_scrollArea->setWidget( m_container ); 42 | m_scrollArea->setWidgetResizable( true ); 43 | m_scrollArea->setAcceptDrops( true ); 44 | 45 | } 46 | 47 | ListViewController::~ListViewController() 48 | { 49 | delete m_scrollArea; 50 | delete m_title; 51 | } 52 | 53 | // ViewController method implementation 54 | 55 | const QString& ListViewController::title() const 56 | { 57 | return *m_title; 58 | } 59 | 60 | QWidget* ListViewController::view() const 61 | { 62 | return m_scrollArea; 63 | } 64 | 65 | void ListViewController::addCell( QWidget* cell ) 66 | { 67 | m_layout->addWidget( cell ); 68 | } 69 | 70 | void ListViewController::removeCell( QWidget* cell ) 71 | { 72 | m_layout->removeWidget( cell ); 73 | delete cell; 74 | } 75 | -------------------------------------------------------------------------------- /src/Gui/library/ListViewController.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ListViewController.h: 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Thomas Boquet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef LISTVIEWCONTROLLER_H 24 | #define LISTVIEWCONTROLLER_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #include "ViewController.h" 33 | #include "StackViewController.h" 34 | #include "Clip.h" 35 | 36 | 37 | class ListViewController : public ViewController 38 | { 39 | Q_OBJECT 40 | 41 | public: 42 | ListViewController() {} 43 | ListViewController( StackViewController* nav ); 44 | ~ListViewController(); 45 | 46 | QWidget* view() const; 47 | const QString& title() const; 48 | void addCell( QWidget* cell ); 49 | void removeCell( QWidget* cell ); 50 | 51 | protected: 52 | QVBoxLayout* m_layout; 53 | 54 | private: 55 | QString* m_title; 56 | QScrollArea* m_scrollArea; 57 | QWidget* m_container; 58 | 59 | StackViewController* m_nav; 60 | }; 61 | 62 | #endif // LISTVIEWCONTROLLER_H 63 | -------------------------------------------------------------------------------- /src/Gui/library/MediaLibraryWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * MediaLibraryWidget.h 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Thomas Boquet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef MEDIALIBRARYWIDGET_H 24 | #define MEDIALIBRARYWIDGET_H 25 | 26 | #include 27 | 28 | class StackViewController; 29 | class ViewController; 30 | class Media; 31 | class Clip; 32 | 33 | class MediaLibraryWidget : public QWidget 34 | { 35 | Q_OBJECT 36 | 37 | public: 38 | MediaLibraryWidget( QWidget* parent = 0 ); 39 | virtual ~MediaLibraryWidget(); 40 | 41 | const ViewController* getCurrentViewController(); 42 | 43 | private: 44 | StackViewController* m_nav; 45 | 46 | public slots: 47 | void clipAdded( Clip* clip ); 48 | private slots: 49 | void mediaSelection( Media* media ); 50 | void clipSelection( Clip* clip ); 51 | 52 | signals: 53 | void mediaSelected( Media* media ); 54 | void previewClipSetted( Clip* clip ); 55 | void importRequired(); 56 | void addClipToViewController( Clip* clip ); 57 | }; 58 | 59 | #endif // MEDIALIBRARYWIDGET_H 60 | -------------------------------------------------------------------------------- /src/Gui/library/MediaListViewController.h: -------------------------------------------------------------------------------- 1 | #ifndef MEDIALISTVIEWCONTROLLER_H 2 | #define MEDIALISTVIEWCONTROLLER_H 3 | 4 | #include "StackViewController.h" 5 | #include "ListViewController.h" 6 | #include "MediaCellView.h" 7 | #include "ClipListViewController.h" 8 | #include "Library.h" 9 | #include "Media.h" 10 | 11 | class MediaListViewController : public ListViewController 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | MediaListViewController( StackViewController* nav ); 17 | virtual ~MediaListViewController(); 18 | 19 | private: 20 | void updateClipCount(); 21 | StackViewController* m_nav; 22 | QUuid m_currentUuid; 23 | QHash* m_cells; 24 | ClipListViewController* m_clipsListView; 25 | QUuid m_lastUuidClipListAsked; 26 | 27 | public slots: 28 | //void newMediaLoaded( Media* ); 29 | void newMediaLoaded( Media* media ); 30 | void cellSelection( const QUuid& uuid ); 31 | void mediaRemoved( const QUuid& uuid ); 32 | void updateCell( const Media* media ); 33 | void showClipList( const QUuid& uuid ); 34 | void newClipAdded( Clip* clip ); 35 | void clipSelection( const QUuid& uuid ); 36 | 37 | private slots: 38 | void restoreContext(); 39 | signals: 40 | void mediaSelected( Media* media ); 41 | void mediaDeleted( const QUuid& uuid ); 42 | void clipSelected( Clip* clip ); 43 | 44 | }; 45 | #endif // MEDIALISTVIEWCONTROLLER_H 46 | -------------------------------------------------------------------------------- /src/Gui/library/StackViewController.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * StackViewController.h 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Thomas Boquet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef STACKVIEWCONTROLLER_H 24 | #define STACKVIEWCONTROLLER_H 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "StackViewNavController.h" 34 | #include "ViewController.h" 35 | 36 | class ImportController; 37 | 38 | class StackViewController : public QWidget 39 | { 40 | Q_OBJECT 41 | 42 | public: 43 | StackViewController( QWidget* parent = 0, bool enableImport = true ); 44 | ~StackViewController(); 45 | 46 | void pushViewController( ViewController* viewController, 47 | bool animated = false ); 48 | void popViewController( bool animated = false ); 49 | const ViewController* getCurrentViewController() const; 50 | 51 | private: 52 | StackViewNavController* m_nav; 53 | QPushButton* m_importButton; 54 | QVBoxLayout* m_layout; 55 | ViewController* m_current; 56 | QStack* m_controllerStack; 57 | 58 | public slots: 59 | void previous(); 60 | 61 | signals: 62 | void importRequired(); 63 | void previousButtonPushed(); 64 | 65 | }; 66 | 67 | #endif // STACKVIEWCONTROLLER_H 68 | -------------------------------------------------------------------------------- /src/Gui/library/StackViewNavController.cpp: -------------------------------------------------------------------------------- 1 | #include "StackViewNavController.h" 2 | #include "ui_StackViewNavController.h" 3 | 4 | StackViewNavController::StackViewNavController( QWidget *parent ) : 5 | QWidget( parent ), 6 | m_ui(new Ui::StackViewNavController) 7 | { 8 | m_ui->setupUi(this); 9 | m_ui->previousButton->setHidden(true); 10 | } 11 | 12 | StackViewNavController::~StackViewNavController() 13 | { 14 | delete m_ui; 15 | } 16 | 17 | void StackViewNavController::changeEvent( QEvent *e ) 18 | { 19 | QWidget::changeEvent( e ); 20 | switch ( e->type() ) 21 | { 22 | case QEvent::LanguageChange: 23 | m_ui->retranslateUi( this ); 24 | break; 25 | default: 26 | break; 27 | } 28 | } 29 | 30 | void StackViewNavController::setTitle( const QString& title ) 31 | { 32 | m_ui->title->setText( title ); 33 | } 34 | 35 | QPushButton* StackViewNavController::previousButton() const 36 | { 37 | return m_ui->previousButton; 38 | } 39 | -------------------------------------------------------------------------------- /src/Gui/library/StackViewNavController.h: -------------------------------------------------------------------------------- 1 | #ifndef STACKVIEWNAVCONTROLLER_H 2 | #define STACKVIEWNAVCONTROLLER_H 3 | 4 | #include 5 | #include 6 | 7 | namespace Ui 8 | { 9 | class StackViewNavController; 10 | } 11 | 12 | class StackViewNavController : public QWidget 13 | { 14 | Q_OBJECT 15 | public: 16 | StackViewNavController( QWidget *parent = 0 ); 17 | ~StackViewNavController(); 18 | 19 | void setTitle( const QString& title ); 20 | QPushButton* previousButton() const; 21 | 22 | protected: 23 | void changeEvent( QEvent *e ); 24 | 25 | private: 26 | Ui::StackViewNavController *m_ui; 27 | }; 28 | 29 | #endif // STACKVIEWNAVCONTROLLER_H 30 | -------------------------------------------------------------------------------- /src/Gui/library/StackViewNavController.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | StackViewNavController 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 46 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | Previous 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 0 29 | 0 30 | 31 | 32 | 33 | TextLabel 34 | 35 | 36 | Qt::AlignCenter 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/Gui/library/ViewController.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ViewController.h 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Thomas Boquet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef VIEWCONTROLLER_H 24 | #define VIEWCONTROLLER_H 25 | 26 | #include 27 | 28 | class ViewController : public QObject 29 | { 30 | Q_OBJECT 31 | 32 | public: 33 | //ViewController() {} 34 | virtual ~ViewController() {} 35 | 36 | 37 | virtual QWidget* view() const = 0; 38 | virtual const QString &title() const = 0; 39 | }; 40 | 41 | #endif // VIEWCONTROLLER_H 42 | -------------------------------------------------------------------------------- /src/Gui/library/ui/StackViewNavController.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | StackViewNavController 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 46 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | Previous 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 0 29 | 0 30 | 31 | 32 | 33 | TextLabel 34 | 35 | 36 | Qt::AlignCenter 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /src/Gui/settings/BoolWidget.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * BoolWidget.cpp Handle boolean settings. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "BoolWidget.h" 24 | #include "SettingValue.h" 25 | 26 | #include 27 | 28 | BoolWidget::BoolWidget( SettingValue *s, QWidget *parent /*= NULL*/ ) : 29 | m_setting( s ) 30 | { 31 | m_checkbox = new QCheckBox( parent ); 32 | m_checkbox->setChecked( s->get().toBool() ); 33 | } 34 | 35 | QWidget* 36 | BoolWidget::widget() 37 | { 38 | return m_checkbox; 39 | } 40 | 41 | void 42 | BoolWidget::save() 43 | { 44 | m_setting->set( m_checkbox->isChecked() ); 45 | } 46 | -------------------------------------------------------------------------------- /src/Gui/settings/BoolWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * BoolWidget.h Handle boolean settings. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef BOOLWIDGET_H 24 | #define BOOLWIDGET_H 25 | 26 | #include "ISettingsCategorieWidget.h" 27 | #include 28 | 29 | class SettingValue; 30 | 31 | class QCheckBox; 32 | 33 | class BoolWidget : public ISettingsCategorieWidget 34 | { 35 | public: 36 | BoolWidget( SettingValue *s, QWidget *parent = NULL ); 37 | QWidget* widget(); 38 | void save(); 39 | 40 | private: 41 | SettingValue *m_setting; 42 | QCheckBox *m_checkbox; 43 | }; 44 | 45 | 46 | #endif // BOOLWIDGET_H 47 | -------------------------------------------------------------------------------- /src/Gui/settings/DoubleWidget.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * DoubleWidget.cpp Handle double and float settings. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "DoubleWidget.h" 24 | #include "SettingValue.h" 25 | 26 | #include 27 | 28 | DoubleWidget::DoubleWidget( SettingValue *s, QWidget *parent /*= NULL*/ ) : 29 | m_setting( s ) 30 | { 31 | m_spinbox = new QDoubleSpinBox( parent ); 32 | m_spinbox->setValue( s->get().toDouble() ); 33 | } 34 | 35 | QWidget* 36 | DoubleWidget::widget() 37 | { 38 | return m_spinbox; 39 | } 40 | 41 | void 42 | DoubleWidget::save() 43 | { 44 | m_setting->set( m_spinbox->value() ); 45 | } 46 | -------------------------------------------------------------------------------- /src/Gui/settings/DoubleWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * DoubleWidget.cpp Handle double and float settings. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef DOUBLEWIDGET_H 24 | #define DOUBLEWIDGET_H 25 | 26 | #include "ISettingsCategorieWidget.h" 27 | #include 28 | 29 | class SettingValue; 30 | 31 | class QDoubleSpinBox; 32 | 33 | class DoubleWidget : public ISettingsCategorieWidget 34 | { 35 | public: 36 | DoubleWidget( SettingValue *s, QWidget *parent = NULL ); 37 | QWidget* widget(); 38 | void save(); 39 | 40 | private: 41 | SettingValue *m_setting; 42 | QDoubleSpinBox *m_spinbox; 43 | }; 44 | 45 | #endif // DOUBLEWIDGET_H 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/Gui/settings/ISettingsCategorieWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ISettingsCategorieWidget.h: Common interface for settings widgets. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | 24 | #ifndef ISETTINGSCATEGORIEWIDGET_H 25 | #define ISETTINGSCATEGORIEWIDGET_H 26 | 27 | class QVariant; 28 | class QWidget; 29 | 30 | class ISettingsCategorieWidget 31 | { 32 | public: 33 | virtual QWidget* widget() = 0; 34 | virtual void save() = 0; 35 | }; 36 | 37 | #endif // ISETTINGSCATEGORIEWIDGET_H 38 | -------------------------------------------------------------------------------- /src/Gui/settings/IntWidget.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * IntWidget.cpp Handle integer settings. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "IntWidget.h" 24 | #include "SettingValue.h" 25 | 26 | #include 27 | 28 | IntWidget::IntWidget( SettingValue *s, QWidget *parent /*= NULL*/ ) : 29 | m_setting( s ) 30 | { 31 | m_spinbox = new QSpinBox( parent ); 32 | m_spinbox->setValue( s->get().toInt() ); 33 | } 34 | 35 | QWidget* 36 | IntWidget::widget() 37 | { 38 | return m_spinbox; 39 | } 40 | 41 | void 42 | IntWidget::save() 43 | { 44 | m_setting->set( m_spinbox->value() ); 45 | } 46 | -------------------------------------------------------------------------------- /src/Gui/settings/IntWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * IntWidget.h Handle integer settings. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef INTWIDGET_H 24 | #define INTWIDGET_H 25 | 26 | #include "ISettingsCategorieWidget.h" 27 | #include 28 | 29 | class SettingValue; 30 | 31 | class QSpinBox; 32 | 33 | class IntWidget : public ISettingsCategorieWidget 34 | { 35 | public: 36 | IntWidget( SettingValue *s, QWidget *parent = NULL ); 37 | QWidget* widget(); 38 | void save(); 39 | 40 | private: 41 | SettingValue *m_setting; 42 | QSpinBox *m_spinbox; 43 | }; 44 | 45 | #endif // INTWIDGET_H 46 | -------------------------------------------------------------------------------- /src/Gui/settings/KeyboardShortcut.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * KeyboardShortcut.h: Handle KeyboardShortcut setting type. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "KeyboardShortcut.h" 24 | #include "KeyboardShortcutInput.h" 25 | #include "SettingValue.h" 26 | 27 | KeyboardShortcut::KeyboardShortcut( SettingValue *s, QWidget *parent /*= NULL*/ ) : 28 | m_setting( s ) 29 | { 30 | m_input = new KeyboardShortcutInput( s->name(), s->get().toString(), parent ); 31 | } 32 | 33 | QWidget* 34 | KeyboardShortcut::widget() 35 | { 36 | return m_input; 37 | } 38 | 39 | void 40 | KeyboardShortcut::save() 41 | { 42 | m_setting->set( m_input->shortcut() ); 43 | } 44 | -------------------------------------------------------------------------------- /src/Gui/settings/KeyboardShortcut.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * KeyboardShortcut.cpp: Handle KeyboardShortcut setting type. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef KEYBOARDSHORTCUT_H 24 | #define KEYBOARDSHORTCUT_H 25 | 26 | #include "ISettingsCategorieWidget.h" 27 | #include 28 | 29 | class KeyboardShortcutInput; 30 | class SettingValue; 31 | 32 | class KeyboardShortcut : public ISettingsCategorieWidget 33 | { 34 | public: 35 | KeyboardShortcut( SettingValue *s, QWidget *parent = NULL ); 36 | QWidget* widget(); 37 | void save(); 38 | 39 | private: 40 | SettingValue *m_setting; 41 | KeyboardShortcutInput *m_input; 42 | }; 43 | 44 | #endif // KEYBOARDSHORTCUT_H 45 | -------------------------------------------------------------------------------- /src/Gui/settings/KeyboardShortcutInput.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * KeyboardShortcutInput.h: Input widget for keybard shortcut 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef KEYBOARDSHORTCUTINPUT_H 24 | #define KEYBOARDSHORTCUTINPUT_H 25 | 26 | #include 27 | 28 | class QTimer; 29 | 30 | class KeyboardShortcutInput : public QPushButton 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | KeyboardShortcutInput( const QString& name, const QString& initialValue = QString(), QWidget* parent = NULL ); 36 | QString shortcut() const; 37 | 38 | protected: 39 | virtual void keyPressEvent( QKeyEvent* e ); 40 | virtual void mousePressEvent( QMouseEvent* e ); 41 | virtual void mouseReleaseEvent( QMouseEvent* e ); 42 | void release(); 43 | void cancel(); 44 | 45 | protected slots: 46 | void timeout(); 47 | 48 | private: 49 | QString m_name; 50 | bool m_capturing; 51 | QTimer* m_timer; 52 | unsigned int m_current; 53 | int m_shortcuts[4]; 54 | int m_initialValue[4]; 55 | }; 56 | 57 | #endif // KEYBOARDSHORTCUTINPUT_H 58 | -------------------------------------------------------------------------------- /src/Gui/settings/LanguageWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * LanguageWidget.h: Handle languge settings 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef LANGUAGEWIDGET_H 24 | #define LANGUAGEWIDGET_H 25 | 26 | #include "ISettingsCategorieWidget.h" 27 | #include 28 | 29 | class SettingValue; 30 | 31 | class QComboBox; 32 | 33 | class LanguageWidget : public ISettingsCategorieWidget 34 | { 35 | public: 36 | LanguageWidget( SettingValue *s, QWidget *parent = NULL ); 37 | QWidget* widget(); 38 | void save(); 39 | 40 | private: 41 | SettingValue *m_setting; 42 | QComboBox *m_list; 43 | }; 44 | 45 | #endif // LANGUAGEWIDGET_H 46 | -------------------------------------------------------------------------------- /src/Gui/settings/Panel.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Panel.h: a simple panel with buttons 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Clement CHAVANCE 7 | * Ludovic Fauvet 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef PANEL_H 25 | #define PANEL_H 26 | 27 | #include 28 | #include 29 | 30 | class QVBoxLayout; 31 | class QButtonGroup; 32 | 33 | class QButtonGroup; 34 | 35 | class Panel : public QWidget 36 | { 37 | Q_OBJECT 38 | Q_DISABLE_COPY( Panel ) 39 | 40 | public: 41 | Panel( QWidget* parent = 0 ); 42 | virtual ~Panel() { } 43 | 44 | void addButton( const QString& label, 45 | const QIcon& icon, 46 | int index ); 47 | 48 | private: 49 | virtual void showEvent( QShowEvent * ); 50 | QVBoxLayout* m_layout; 51 | QButtonGroup* m_buttons; 52 | static const int M_ICON_HEIGHT; 53 | 54 | signals: 55 | void changePanel( int index ); 56 | }; 57 | 58 | 59 | #endif /* !PANEL_H */ 60 | -------------------------------------------------------------------------------- /src/Gui/settings/PreferenceWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * PreferenceWidget.h: Abstract class that will be used to save load / preferences 3 | * values. 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Clement CHAVANCE 8 | * Hugo Beauzée-Luyssen 9 | * 10 | * This program is free software; you can redistribute it and/or 11 | * modify it under the terms of the GNU General Public License 12 | * as published by the Free Software Foundation; either version 2 13 | * of the License, or (at your option) any later version. 14 | * 15 | * This program is distributed in the hope that it will be useful, 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | * GNU General Public License for more details. 19 | * 20 | * You should have received a copy of the GNU General Public License 21 | * along with this program; if not, write to the Free Software 22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 23 | *****************************************************************************/ 24 | 25 | #ifndef PREFERENCEWIDGET_H 26 | #define PREFERENCEWIDGET_H 27 | 28 | #include 29 | #include 30 | #include "SettingsManager.h" 31 | 32 | class ISettingsCategorieWidget; 33 | class SettingValue; 34 | 35 | class PreferenceWidget : public QWidget 36 | { 37 | Q_OBJECT 38 | public: 39 | typedef QList SettingsList; 40 | PreferenceWidget( const QString& categorie, SettingsManager::Type type, 41 | QWidget* parent = 0 ); 42 | virtual ~PreferenceWidget() {} 43 | 44 | virtual void load(); 45 | virtual void save(); 46 | private: 47 | ISettingsCategorieWidget *widgetFactory( SettingValue* s ); 48 | 49 | private: 50 | QString m_categorie; 51 | SettingsList m_settings; 52 | }; 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/Gui/settings/StringWidget.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * StringWidget.h: Handle text settings. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "StringWidget.h" 24 | #include "SettingValue.h" 25 | 26 | #include 27 | 28 | StringWidget::StringWidget( SettingValue *s, QWidget *parent /*= NULL*/ ) : 29 | m_setting( s ) 30 | { 31 | m_lineEdit = new QLineEdit( parent ); 32 | m_lineEdit->setText( s->get().toString() ); 33 | } 34 | 35 | QWidget* 36 | StringWidget::widget() 37 | { 38 | return m_lineEdit; 39 | } 40 | 41 | void 42 | StringWidget::save() 43 | { 44 | m_setting->set( m_lineEdit->text() ); 45 | } 46 | -------------------------------------------------------------------------------- /src/Gui/settings/StringWidget.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * StringWidget: Handle text settings. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzée-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef STRINGWIDGET_H 24 | #define STRINGWIDGET_H 25 | 26 | #include "ISettingsCategorieWidget.h" 27 | #include 28 | 29 | class SettingValue; 30 | 31 | class QLineEdit; 32 | 33 | class StringWidget : public ISettingsCategorieWidget 34 | { 35 | public: 36 | StringWidget( SettingValue *s, QWidget *parent = NULL ); 37 | QWidget* widget(); 38 | void save(); 39 | 40 | private: 41 | SettingValue *m_setting; 42 | QLineEdit *m_lineEdit; 43 | }; 44 | 45 | #endif // STRINGWIDGET_H 46 | -------------------------------------------------------------------------------- /src/Gui/timeline/GraphicsTrack.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GraphicsTrack.h: Graphically represent a track in the timeline 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef GRAPHICSTRACK_H 24 | #define GRAPHICSTRACK_H 25 | 26 | #include 27 | #include 28 | #include "MainWorkflow.h" 29 | 30 | class AbstractGraphicsMediaItem; 31 | 32 | class GraphicsTrack : public QGraphicsWidget 33 | { 34 | Q_OBJECT 35 | 36 | public: 37 | enum { Type = UserType + 2 }; 38 | 39 | GraphicsTrack( MainWorkflow::TrackType type, quint32 trackNumber, 40 | QGraphicsItem *parent = 0 ); 41 | 42 | void setHeight( int height ); 43 | int height(); 44 | void setTrackEnabled( bool enabled ); 45 | bool isEnabled(); 46 | quint32 trackNumber(); 47 | MainWorkflow::TrackType mediaType(); 48 | virtual int type() const { return Type; } 49 | 50 | QList childs(); 51 | 52 | private: 53 | MainWorkflow::TrackType m_type; 54 | quint32 m_trackNumber; 55 | bool m_enabled; 56 | }; 57 | 58 | #endif // GRAPHICSTRACK_H 59 | -------------------------------------------------------------------------------- /src/Gui/timeline/TracksControls.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * TracksControls.cpp: Left panel of the timeline 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef TRACKSCONTROLS_H 24 | #define TRACKSCONTROLS_H 25 | 26 | #include 27 | #include 28 | #include "TrackControls.h" 29 | 30 | class GraphicsTrack; 31 | 32 | /** 33 | * \brief Tracks controller widget 34 | */ 35 | class TracksControls : public QScrollArea 36 | { 37 | Q_OBJECT 38 | public: 39 | TracksControls( QWidget* parent = 0 ); 40 | 41 | public slots: 42 | /** 43 | * \brief Add a new controller for a video track. 44 | * \param track Pointer to the newly added track. 45 | */ 46 | void addVideoTrack( GraphicsTrack* track ); 47 | /** 48 | * \brief Add a new controller for an audio track. 49 | * \param track Pointer to the newly added track. 50 | */ 51 | void addAudioTrack( GraphicsTrack* track ); 52 | /** 53 | * \brief DOCUMENT ME 54 | */ 55 | void removeVideoTrack(); 56 | /** 57 | * \brief DOCUMENT ME 58 | */ 59 | void removeAudioTrack(); 60 | /** 61 | * \brief Remove all controllers from the widget. 62 | */ 63 | void clear(); 64 | 65 | private: 66 | QWidget* m_centralWidget; 67 | QWidget* m_separator; 68 | QVBoxLayout* m_layout; 69 | }; 70 | 71 | #endif // TRACKSCONTROLS_H 72 | -------------------------------------------------------------------------------- /src/Gui/timeline/TracksScene.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * TracksScene.h: QGraphicsScene that contains the tracks 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef TRACKSSCENE_H 24 | #define TRACKSSCENE_H 25 | 26 | #include 27 | 28 | class TracksView; 29 | 30 | class TracksScene : public QGraphicsScene 31 | { 32 | Q_OBJECT 33 | 34 | public: 35 | TracksScene( QObject* parent = 0 ); 36 | virtual ~TracksScene() { } 37 | 38 | void askRemoveSelectedItems(); 39 | 40 | protected: 41 | virtual void keyPressEvent( QKeyEvent* keyevent ); 42 | virtual void contextMenuEvent( QGraphicsSceneContextMenuEvent* event ); 43 | }; 44 | 45 | #endif // TRACKSSCENE_H 46 | -------------------------------------------------------------------------------- /src/Gui/ui/TagWidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | TagWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 328 10 | 190 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | 21 | 328 22 | 190 23 | 24 | 25 | 26 | Form 27 | 28 | 29 | 30 | 31 | 32 | Keyword Tags 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 0 41 | 0 42 | 43 | 44 | 45 | 46 | 0 47 | 40 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/Gui/widgets/CrashHandler.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * CrashHandler.h: Display the backtrace and some other information when a 3 | * crash occurs 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Hugo Beauzee-Luyssen 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef CRASHHANDLER_H 25 | #define CRASHHANDLER_H 26 | 27 | #include 28 | 29 | namespace Ui 30 | { 31 | class CrashHandler; 32 | } 33 | 34 | class CrashHandler : public QDialog 35 | { 36 | Q_OBJECT 37 | public: 38 | CrashHandler( int sig, QWidget *parent = 0 ); 39 | ~CrashHandler(); 40 | 41 | protected: 42 | void changeEvent(QEvent *e); 43 | 44 | private slots: 45 | void close(); 46 | void restart(); 47 | 48 | private: 49 | Ui::CrashHandler* ui; 50 | }; 51 | 52 | #endif // CRASHHANDLER_H 53 | -------------------------------------------------------------------------------- /src/Gui/widgets/TrackControls.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * TrackControls.h: Widget used to configure a track 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef TRACKCONTROLS_H 24 | #define TRACKCONTROLS_H 25 | 26 | #include 27 | 28 | class GraphicsTrack; 29 | 30 | namespace Ui { 31 | class TrackControls; 32 | } 33 | 34 | class TrackControls : public QWidget 35 | { 36 | Q_OBJECT 37 | public: 38 | TrackControls( GraphicsTrack* track, QWidget *parent = 0 ); 39 | ~TrackControls(); 40 | 41 | protected: 42 | void changeEvent( QEvent *e ); 43 | 44 | private slots: 45 | void setTrackDisabled( bool disable ); 46 | 47 | private: 48 | void updateTextLabels(); 49 | Ui::TrackControls *m_ui; 50 | GraphicsTrack* m_track; 51 | }; 52 | 53 | #endif // TRACKCONTROLS_H 54 | -------------------------------------------------------------------------------- /src/Gui/widgets/TrackControls.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | TrackControls 4 | 5 | 6 | 7 | 0 8 | 0 9 | 104 10 | 19 11 | 12 | 13 | 14 | 15 | 0 16 | 0 17 | 18 | 19 | 20 | Form 21 | 22 | 23 | 24 | 1 25 | 26 | 27 | 0 28 | 29 | 30 | 31 | 32 | 33 | 22 34 | 22 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 20 43 | 20 44 | 45 | 46 | 47 | true 48 | 49 | 50 | true 51 | 52 | 53 | 54 | 55 | 56 | 57 | TextLabel 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/Gui/wizard/GeneralPage.h: -------------------------------------------------------------------------------- 1 | #ifndef GENERALPAGE_H 2 | #define GENERALPAGE_H 3 | 4 | #include "ui_GeneralPage.h" 5 | 6 | class GeneralPage : public QWizardPage 7 | { 8 | Q_OBJECT 9 | public: 10 | GeneralPage( QWidget *parent = 0 ); 11 | 12 | protected: 13 | virtual void changeEvent( QEvent *e ); 14 | virtual int nextId() const; 15 | virtual void initializePage(); 16 | virtual bool validatePage(); 17 | virtual void cleanupPage(); 18 | 19 | private slots: 20 | void openWorkspaceDirectory(); 21 | void updateProjectLocation(); 22 | void setWorkspaceStatus( bool valid ); 23 | 24 | private: 25 | Ui::GeneralPage ui; 26 | QPalette pValid; 27 | QPalette pInvalid; 28 | }; 29 | 30 | #endif // GENERALPAGE_H 31 | -------------------------------------------------------------------------------- /src/Gui/wizard/OpenPage.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * OpenPage.cpp: Wizard project openning page 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include 24 | #include "OpenPage.h" 25 | #include "ProjectManager.h" 26 | #include "ProjectWizard.h" 27 | #include "WelcomePage.h" 28 | 29 | OpenPage::OpenPage( QWidget *parent ) : 30 | QWizardPage(parent) 31 | { 32 | ui.setupUi( this ); 33 | 34 | setTitle( tr( "Project wizard" ) ); 35 | setSubTitle( tr( "Ready to load this project" ) ); 36 | 37 | setFinalPage( true ); 38 | } 39 | 40 | void OpenPage::changeEvent( QEvent *e ) 41 | { 42 | QWizardPage::changeEvent( e ); 43 | switch ( e->type() ) { 44 | case QEvent::LanguageChange: 45 | ui.retranslateUi( this ); 46 | break; 47 | default: 48 | break; 49 | } 50 | } 51 | 52 | bool OpenPage::validatePage() 53 | { 54 | ProjectManager* pm = ProjectManager::getInstance(); 55 | 56 | if ( !WelcomePage::projectPath().isEmpty() ) 57 | pm->loadProject( WelcomePage::projectPath() ); 58 | 59 | return true; 60 | } 61 | 62 | int OpenPage::nextId() const 63 | { 64 | // This an ending page 65 | return -1; 66 | } 67 | -------------------------------------------------------------------------------- /src/Gui/wizard/OpenPage.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * OpenPage.h: Wizard project openning page 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef OPENPAGE_H 24 | #define OPENPAGE_H 25 | 26 | #include "ui_OpenPage.h" 27 | 28 | class OpenPage : public QWizardPage 29 | { 30 | Q_OBJECT 31 | public: 32 | OpenPage( QWidget *parent = 0 ); 33 | 34 | protected: 35 | void changeEvent( QEvent *e ); 36 | virtual bool validatePage(); 37 | virtual int nextId() const; 38 | 39 | private: 40 | Ui::OpenPage ui; 41 | }; 42 | 43 | #endif // OPENPAGE_H 44 | -------------------------------------------------------------------------------- /src/Gui/wizard/PageFactory.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * PageFactory.cpp: Factory wich will generate CustomWizardPage 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Clement CHAVANCE 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef PAGEFACTORY_H 24 | #define PAGEFACTORY_H 25 | 26 | #include 27 | #include "CustomWizardPage.h" 28 | 29 | class PageFactory 30 | { 31 | public: 32 | template < typename widgetType > 33 | static QWizardPage* generateWizardPage( const char* title, QWidget* parent = 0 ) 34 | { 35 | CustomWizardPage* page = new CustomWizardPage( title, parent ); 36 | page->setInternalWidget( new widgetType( page ) ); 37 | 38 | return page; 39 | } 40 | 41 | private: 42 | PageFactory(); 43 | ~PageFactory(); 44 | PageFactory( const PageFactory& ); 45 | PageFactory& operator = ( const PageFactory& ); 46 | }; 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /src/Gui/wizard/ProjectWizard.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ProjectWizard.h: Project wizard 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Clement CHAVANCE 7 | * Ludovic Fauvet 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef PROJECTWIZARD_H 25 | #define PROJECTWIZARD_H 26 | 27 | #include 28 | 29 | class WelcomePage; 30 | 31 | class ProjectWizard : public QWizard 32 | { 33 | Q_OBJECT 34 | 35 | public: 36 | enum { Page_Welcome, 37 | Page_Open, 38 | Page_General, Page_Video }; 39 | 40 | ProjectWizard( QWidget* parent = 0 ); 41 | ~ProjectWizard(); 42 | 43 | protected slots: 44 | virtual void accept(); 45 | virtual void reject(); 46 | 47 | private slots: 48 | void showHelp(); 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /src/Gui/wizard/WelcomePage.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * WelcomePage.h: Wizard welcome page 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Ludovic Fauvet 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef WELCOMEPAGE_H 24 | #define WELCOMEPAGE_H 25 | 26 | #include 27 | #include "ProjectWizard.h" 28 | #include "ProjectManager.h" 29 | #include "ui_WelcomePage.h" 30 | 31 | class QWizard; 32 | 33 | class WelcomePage : public QWizardPage 34 | { 35 | Q_OBJECT 36 | public: 37 | enum { FilePath = Qt::UserRole + 1 }; 38 | 39 | WelcomePage( QWidget* parent = 0 ); 40 | ~WelcomePage(); 41 | 42 | int nextId() const; 43 | static QString projectPath(); 44 | static void setProjectPath( const QString& path ); 45 | 46 | protected: 47 | virtual void changeEvent( QEvent *e ); 48 | virtual void initializePage(); 49 | virtual bool validatePage(); 50 | virtual void cleanupPage(); 51 | 52 | private slots: 53 | void loadProject(); 54 | void loadRecentsProjects(); 55 | void projectDoubleClicked( QListWidgetItem* item ); 56 | void selectOpenRadio(); 57 | void hideWizardAtStartup( bool hidden ); 58 | 59 | private: 60 | Ui::WelcomePage m_ui; 61 | static QString* m_projectPath; 62 | }; 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /src/Gui/wizard/ui/OpenPage.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | OpenPage 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | WizardPage 15 | 16 | 17 | 18 | 19 | 20 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 21 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 22 | p, li { white-space: pre-wrap; } 23 | </style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> 24 | <table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;"> 25 | <tr> 26 | <td style="border: none;"> 27 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">We have now enough informations to load this project.</p> 28 | <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Press <span style=" font-weight:600;">finish</span> to close this wizard and start editing your videos!</p></td></tr></table></body></html> 29 | 30 | 31 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/LibVLCpp/LibVLCpp.pri: -------------------------------------------------------------------------------- 1 | HEADERS += VLCException.h \ 2 | VLCInstance.h \ 3 | VLCMedia.h \ 4 | VLCMediaPlayer.h \ 5 | VLCpp.hpp 6 | 7 | SOURCES += VLCException.cpp \ 8 | VLCInstance.cpp \ 9 | VLCMedia.cpp \ 10 | VLCMediaPlayer.cpp 11 | 12 | -------------------------------------------------------------------------------- /src/LibVLCpp/VLCInstance.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCInstance.cpp: Binding for libvlc instances 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "VLCInstance.h" 24 | #include "vlc/vlc.h" 25 | 26 | using namespace LibVLCpp; 27 | 28 | Instance::Instance( QObject* parent /*= NULL*/ ) : QObject( parent ) 29 | { 30 | char const *argv[] = 31 | { 32 | // "-vvvvv", 33 | "--no-skip-frames", 34 | // "--intf", "dummy", 35 | "--text-renderer", "dummy", 36 | //"--no-audio", 37 | //"--plugin-path", VLC_TREE "/modules", 38 | "--disable-screensaver", 39 | "--ignore-config", //Don't use VLC's config files 40 | "--no-overlay", 41 | }; 42 | int argc = sizeof( argv ) / sizeof( *argv ); 43 | 44 | m_internalPtr = libvlc_new( argc, argv ); 45 | } 46 | 47 | Instance::~Instance() 48 | { 49 | libvlc_release( m_internalPtr ); 50 | } 51 | -------------------------------------------------------------------------------- /src/LibVLCpp/VLCInstance.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCInstance.h: Binding for libvlc instance 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef VLCINSTANCE_H 24 | #define VLCINSTANCE_H 25 | 26 | #include "VLCpp.hpp" 27 | #include "QSingleton.hpp" 28 | 29 | #include 30 | 31 | struct libvlc_instance_t; 32 | 33 | namespace LibVLCpp 34 | { 35 | /** 36 | * \warning This class should be released after every other LibVLCpp classes. 37 | */ 38 | class Instance : public QObject, 39 | public Internal< libvlc_instance_t >, 40 | public QSingleton 41 | { 42 | Q_OBJECT 43 | private: 44 | Instance( QObject* parent = NULL ); 45 | Instance( int argc, const char** argv ); 46 | 47 | ~Instance(); 48 | 49 | private: 50 | friend class QSingleton; 51 | }; 52 | } 53 | 54 | #endif // VLCINSTANCE_H 55 | -------------------------------------------------------------------------------- /src/LibVLCpp/VLCMedia.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCMedia.h: Binding for libvlc_media 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef VLCMEDIA_H 24 | #define VLCMEDIA_H 25 | 26 | #include "vlc/vlc.h" 27 | 28 | #include 29 | #include 30 | 31 | #include "VLCpp.hpp" 32 | 33 | namespace LibVLCpp 34 | { 35 | class Media : public Internal< libvlc_media_t > 36 | { 37 | public: 38 | 39 | Media( const QString& filename ); 40 | ~Media(); 41 | void addOption( const char* opt ); 42 | void setVideoLockCallback( void* ); 43 | void setVideoUnlockCallback( void* ); 44 | void setAudioLockCallback( void* ); 45 | void setAudioUnlockCallback( void* ); 46 | void setVideoDataCtx( void* dataCtx ); 47 | void setAudioDataCtx( void* dataCtx ); 48 | const QString& getFileName() const; 49 | 50 | private: 51 | QString m_fileName; 52 | }; 53 | } 54 | 55 | #endif // VLCMEDIA_H 56 | -------------------------------------------------------------------------------- /src/LibVLCpp/VLCpp.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VLCpp.hpp: Generic class to handle an internal vlc type almost transparently. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef VLCPP_H 24 | #define VLCPP_H 25 | 26 | #include 27 | #include 28 | 29 | namespace LibVLCpp 30 | { 31 | template < typename T > 32 | class Internal 33 | { 34 | public: 35 | typedef T* internalPtr; 36 | T* getInternalPtr() 37 | { 38 | assert( m_internalPtr != NULL ); 39 | return m_internalPtr; 40 | } 41 | operator T*() { return m_internalPtr; } 42 | protected: 43 | Internal() : m_internalPtr( NULL ) {} 44 | ~Internal(){} 45 | 46 | T* m_internalPtr; 47 | }; 48 | } 49 | 50 | #endif // VLCPP_H 51 | -------------------------------------------------------------------------------- /src/Library/Library.pri: -------------------------------------------------------------------------------- 1 | HEADERS += Library.h 2 | 3 | SOURCES += Library.cpp 4 | 5 | -------------------------------------------------------------------------------- /src/Media/Media.pri: -------------------------------------------------------------------------------- 1 | HEADERS += Clip.h \ 2 | Media.h 3 | 4 | SOURCES += Clip.cpp \ 5 | Media.cpp 6 | 7 | -------------------------------------------------------------------------------- /src/Metadata/MetaDataManager.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * MetaDataWorker.h: MetaDataManager 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef METADATAMANAGER_H 24 | #define METADATAMANAGER_H 25 | 26 | #include "Singleton.hpp" 27 | 28 | #include 29 | #include 30 | class QMutex; 31 | class Media; 32 | namespace LibVLCpp 33 | { 34 | class MediaPlayer; 35 | } 36 | 37 | class MetaDataManager : public QObject, public Singleton 38 | { 39 | Q_OBJECT 40 | Q_DISABLE_COPY( MetaDataManager ); 41 | 42 | public: 43 | void computeMediaMetadata( Media* media ); 44 | private: 45 | MetaDataManager(); 46 | ~MetaDataManager(); 47 | 48 | void launchComputing( Media *media ); 49 | 50 | private: 51 | QMutex *m_computingMutex; 52 | QQueue m_mediaToCompute; 53 | bool m_computeInProgress; 54 | LibVLCpp::MediaPlayer *m_mediaPlayer; 55 | friend class Singleton; 56 | 57 | private slots: 58 | void computingCompleted(); 59 | void computingFailed( Media* media ); 60 | 61 | signals: 62 | void failedToCompute( Media* ); 63 | }; 64 | 65 | #endif //METADATAMANAGER_H 66 | -------------------------------------------------------------------------------- /src/Metadata/Metadata.pri: -------------------------------------------------------------------------------- 1 | HEADERS += MetaDataManager.h \ 2 | MetaDataWorker.h 3 | 4 | SOURCES += MetaDataManager.cpp \ 5 | MetaDataWorker.cpp 6 | 7 | -------------------------------------------------------------------------------- /src/Project/projectManager.pri: -------------------------------------------------------------------------------- 1 | #INPUT 2 | HEADERS += ProjectManager.h 3 | 4 | SOURCES += ProjectManager.cpp 5 | -------------------------------------------------------------------------------- /src/Renderer/GenericRenderer.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * GenericRenderer.cpp: Describe a common behavior for every renderers 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "GenericRenderer.h" 24 | #include "VLCMediaPlayer.h" 25 | 26 | GenericRenderer::GenericRenderer() : 27 | m_paused( false ), 28 | m_isRendering( false ) 29 | { 30 | m_mediaPlayer = new LibVLCpp::MediaPlayer(); 31 | } 32 | 33 | GenericRenderer::~GenericRenderer() 34 | { 35 | delete m_mediaPlayer; 36 | } 37 | 38 | void 39 | GenericRenderer::setRenderWidget(QWidget *renderWidget) 40 | { 41 | m_mediaPlayer->setDrawable( renderWidget->winId() ); 42 | m_renderWidget = renderWidget; 43 | } 44 | -------------------------------------------------------------------------------- /src/Renderer/Renderer.pri: -------------------------------------------------------------------------------- 1 | HEADERS += ClipRenderer.h \ 2 | GenericRenderer.h \ 3 | WorkflowFileRenderer.h \ 4 | WorkflowRenderer.h 5 | 6 | SOURCES += ClipRenderer.cpp \ 7 | WorkflowFileRenderer.cpp \ 8 | WorkflowRenderer.cpp 9 | 10 | -------------------------------------------------------------------------------- /src/Tools/BacktraceGenerator.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * BacktraceGenerator.h: Prototypes for backtrace generation. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef BACKTRACEGENERATOR_H 24 | #define BACKTRACEGENERATOR_H 25 | 26 | class QStringList; 27 | 28 | namespace Tools 29 | { 30 | QStringList generateBacktrace( int levelsToSkip ); 31 | static const int backtraceSize = 256; 32 | } 33 | 34 | #endif // BACKTRACEGENERATOR_H 35 | -------------------------------------------------------------------------------- /src/Tools/Singleton.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Singleton.hpp : Generic singleton pattern implementation 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | 24 | /** \file 25 | * This file contain the templated singleton. 26 | * Class/struct to be singletonized just have to 27 | * iherit from this classe with the class/struct type in template 28 | * parameter.You have to do few other things, but you know your job, 29 | * don't you :) ? 30 | */ 31 | 32 | #ifndef SINGLETON_HPP 33 | #define SINGLETON_HPP 34 | 35 | #include 36 | 37 | template 38 | class Singleton 39 | { 40 | public: 41 | static T* getInstance() 42 | { 43 | if ( m_instance == NULL ) 44 | m_instance = new T; 45 | return m_instance; 46 | } 47 | 48 | static void destroyInstance() 49 | { 50 | if ( m_instance != NULL ) 51 | { 52 | delete m_instance; 53 | m_instance = NULL; 54 | } 55 | } 56 | protected: 57 | Singleton(){} 58 | virtual ~Singleton(){} 59 | //Not implemented since these methods should *NEVER* been called. If they do, it probably won't compile :) 60 | Singleton(const Singleton&); 61 | Singleton& operator=(const Singleton&); 62 | 63 | private: 64 | static T* m_instance; 65 | }; 66 | 67 | template 68 | T* Singleton::m_instance = NULL; 69 | 70 | #endif // SINGLETON_HPP 71 | -------------------------------------------------------------------------------- /src/Tools/Tools.pri: -------------------------------------------------------------------------------- 1 | HEADERS += MemoryPool.hpp \ 2 | QSingleton.hpp \ 3 | Singleton.hpp \ 4 | Toggleable.hpp \ 5 | WaitCondition.hpp \ 6 | VlmcDebug.h \ 7 | Pool.hpp \ 8 | mdate.h \ 9 | SynchronisationHelper.hpp 10 | SOURCES += VlmcDebug.cpp 11 | -------------------------------------------------------------------------------- /src/Tools/UnixBacktraceGenerator.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * UnixBacktraceGenerator.cpp: Unix backtrace generation 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "BacktraceGenerator.h" 24 | 25 | #include 26 | #include 27 | #include //free() 28 | 29 | #include 30 | 31 | QStringList Tools::generateBacktrace( int levelsToSkip ) 32 | { 33 | void *buff[backtraceSize]; 34 | QStringList res; 35 | 36 | int nbSymb = backtrace( buff, backtraceSize ); 37 | char** backtraceStr = backtrace_symbols( buff, nbSymb ); 38 | char* symbName; 39 | char* mangledName; 40 | int status; 41 | int pos; 42 | for ( int i = levelsToSkip; i < nbSymb; ++i ) 43 | { 44 | mangledName = strchr( backtraceStr[i], '(' ); 45 | char* endPos = strchr( mangledName, '+' ); 46 | if ( endPos != NULL && endPos != NULL ) 47 | { 48 | pos = endPos - mangledName; 49 | char *copy = strdup( mangledName + 1 ); //Skipping the parenthesis 50 | copy[pos - 1] = 0; 51 | symbName = abi::__cxa_demangle( copy, NULL, 0, &status); 52 | if ( status == 0 ) 53 | { 54 | res.append( QString( symbName ) ); 55 | free( symbName ); 56 | continue ; 57 | } 58 | free(symbName); 59 | free(copy); 60 | } 61 | res.append( backtraceStr[i] ); 62 | } 63 | free(backtraceStr); 64 | return res; 65 | } 66 | -------------------------------------------------------------------------------- /src/Tools/VlmcDebug.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * VlmcDebug.h: Debug tools for VLMC 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef VLMCDEBUG_H 24 | #define VLMCDEBUG_H 25 | 26 | #include 27 | #include 28 | #include 29 | 30 | #include "Singleton.hpp" 31 | 32 | /** 33 | * \warning Do not use qDebug() qWarning() etc... from here, unless you know exactly what you're doing 34 | * Chances are very high that you end up with a stack overflow !! 35 | */ 36 | class VlmcDebug : public QObject, public Singleton 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | static void vlmcMessageHandler( QtMsgType type, const char* msg ); 42 | void setup(); 43 | private: 44 | VlmcDebug(); 45 | virtual ~VlmcDebug(); 46 | 47 | QFile* m_logFile; 48 | 49 | private slots: 50 | void logFileChanged( const QVariant& logFile ); 51 | 52 | friend class Singleton; 53 | }; 54 | 55 | #endif // VLMCDEBUG_H 56 | -------------------------------------------------------------------------------- /src/Tools/WaitCondition.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * WaitCondition.hpp: Small helper to ease thread synchronisation 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef WAITCONDITION_HPP 24 | #define WAITCONDITION_HPP 25 | 26 | #include 27 | #include 28 | 29 | class WaitCondition 30 | { 31 | public: 32 | WaitCondition() 33 | { 34 | m_mutex = new QMutex; 35 | m_waitCond = new QWaitCondition; 36 | } 37 | ~WaitCondition() 38 | { 39 | delete m_waitCond; 40 | delete m_mutex; 41 | } 42 | void waitLocked() 43 | { 44 | m_waitCond->wait( m_mutex ); 45 | } 46 | void wake() 47 | { 48 | m_waitCond->wakeAll(); 49 | } 50 | QMutex* getMutex() 51 | { 52 | return m_mutex; 53 | } 54 | private: 55 | QMutex* m_mutex; 56 | QWaitCondition* m_waitCond; 57 | }; 58 | 59 | #endif // WAITCONDITION_HPP 60 | -------------------------------------------------------------------------------- /src/Tools/Win32BacktraceGenerator.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * Win32BacktraceGenerator.cpp: Win32 implementation for backtrace generation 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "BacktraceGenerator.h" 24 | 25 | #include 26 | 27 | QStringList Tools::generateBacktrace( int ) 28 | { 29 | QStringList res; 30 | 31 | res.append( QObject::tr( "Unable to get backtrace" ) ); 32 | return res; 33 | } 34 | -------------------------------------------------------------------------------- /src/Tools/mdate.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * mdate.h: high resolution time management functions 3 | * Extracted from vlc mtime.c 4 | ***************************************************************************** 5 | * Copyright (C) 1998-2007 the VideoLAN team 6 | * Copyright © 2006-2007 Rémi Denis-Courmont 7 | * $Id: 454e99fb27a5ac3b415d92ab98d2f39245dbea2b $ 8 | * 9 | * Authors: Vincent Seguin 10 | * Rémi Denis-Courmont 11 | * Gisle Vanem 12 | * 13 | * This program is free software; you can redistribute it and/or modify 14 | * it under the terms of the GNU General Public License as published by 15 | * the Free Software Foundation; either version 2 of the License, or 16 | * (at your option) any later version. 17 | * 18 | * This program is distributed in the hope that it will be useful, 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | * GNU General Public License for more details. 22 | * 23 | * You should have received a copy of the GNU General Public License 24 | * along with this program; if not, write to the Free Software 25 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 26 | *****************************************************************************/ 27 | 28 | #ifndef MDATE_H 29 | #define MDATE_H 30 | 31 | #include 32 | typedef qint64 mtime_t; 33 | 34 | extern "C" mtime_t mdate( void ); 35 | 36 | #endif // MDATE_H 37 | -------------------------------------------------------------------------------- /src/Workflow/StackedBuffer.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * StackedBuffer.hpp: A buffer that's must can be released and pushed back on a Pool. 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #ifndef STACKEDBUFFER_HPP 24 | #define STACKEDBUFFER_HPP 25 | 26 | #include 27 | #include "Pool.hpp" 28 | 29 | template 30 | class StackedBuffer 31 | { 32 | public: 33 | StackedBuffer( T buff, bool mustBeReleased = true ) : 34 | m_buff( buff ), 35 | m_mustRelease( mustBeReleased ) 36 | { 37 | } 38 | virtual ~StackedBuffer() 39 | { 40 | } 41 | 42 | /// \warning Calling this method will definitely invalidate the pointer; 43 | virtual void release() = 0; 44 | 45 | const T& get() const 46 | { 47 | return m_buff; 48 | } 49 | T get() 50 | { 51 | return m_buff; 52 | } 53 | operator const T&() const 54 | { 55 | return get(); 56 | } 57 | operator T() 58 | { 59 | return get(); 60 | } 61 | 62 | protected: 63 | T m_buff; 64 | bool m_mustRelease; 65 | }; 66 | 67 | #endif // STACKEDBUFFER_HPP 68 | -------------------------------------------------------------------------------- /src/Workflow/Workflow.pri: -------------------------------------------------------------------------------- 1 | HEADERS += AudioClipWorkflow.h \ 2 | ClipWorkflow.h \ 3 | MainWorkflow.h \ 4 | TrackHandler.h \ 5 | TrackWorkflow.h \ 6 | VideoClipWorkflow.h \ 7 | ImageClipWorkflow.h \ 8 | StackedBuffer.hpp 9 | SOURCES += AudioClipWorkflow.cpp \ 10 | ClipWorkflow.cpp \ 11 | MainWorkflow.cpp \ 12 | TrackHandler.cpp \ 13 | TrackWorkflow.cpp \ 14 | VideoClipWorkflow.cpp \ 15 | ImageClipWorkflow.cpp 16 | -------------------------------------------------------------------------------- /src/vlmc.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * vlmc.cpp: VLMC launcher for unix 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include "config.h" 24 | 25 | #include 26 | 27 | #include 28 | #include 29 | 30 | int VLMCmain( int , char** ); 31 | 32 | int main( int argc, char **argv ) 33 | { 34 | #ifdef WITH_CRASHHANDLER 35 | while ( true ) 36 | { 37 | pid_t pid = fork(); 38 | if ( pid < 0 ) 39 | qFatal("Can't fork to launch VLMC. Exiting."); 40 | if ( pid == 0 ) 41 | return VLMCmain( argc, argv ); 42 | else 43 | { 44 | int status; 45 | 46 | wait( &status ); 47 | if ( WIFEXITED(status) ) 48 | { 49 | int ret = WEXITSTATUS( status ); 50 | if ( ret == 2 ) 51 | continue ; 52 | else 53 | break ; 54 | } 55 | else 56 | { 57 | qCritical() << "Unhandled crash."; 58 | break ; 59 | } 60 | } 61 | } 62 | #else 63 | return VLMCmain( argc, argv ); 64 | #endif 65 | } 66 | -------------------------------------------------------------------------------- /src/vlmc.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * vlmc.h : contains the definition for every macro and prototypes used 3 | * used program wide. 4 | ***************************************************************************** 5 | * Copyright (C) 2008-2010 VideoLAN 6 | * 7 | * Authors: Hugo Beauzee-Luyssen 8 | * 9 | * This program is free software; you can redistribute it and/or 10 | * modify it under the terms of the GNU General Public License 11 | * as published by the Free Software Foundation; either version 2 12 | * of the License, or (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 22 | *****************************************************************************/ 23 | 24 | #ifndef VLMC_H 25 | #define VLMC_H 26 | 27 | #include 28 | 29 | #ifdef Q_OS_WIN 30 | #include 31 | #endif 32 | 33 | #ifdef Q_OS_UNIX 34 | #define SleepMS( x ) usleep( (x) * 1000 ) 35 | #else 36 | #define SleepMS( x ) Sleep( x ) 37 | #endif 38 | 39 | enum ToolButtons 40 | { 41 | TOOL_DEFAULT, 42 | TOOL_CUT, 43 | }; 44 | 45 | #endif // VLMC_H 46 | -------------------------------------------------------------------------------- /src/winvlmc.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * winvlmc.cpp: VLMC launcher for win32 3 | ***************************************************************************** 4 | * Copyright (C) 2008-2010 VideoLAN 5 | * 6 | * Authors: Hugo Beauzee-Luyssen 7 | * 8 | * This program is free software; you can redistribute it and/or 9 | * modify it under the terms of the GNU General Public License 10 | * as published by the Free Software Foundation; either version 2 11 | * of the License, or (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU General Public License 19 | * along with this program; if not, write to the Free Software 20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 21 | *****************************************************************************/ 22 | 23 | #include 24 | 25 | int VLMCmain( int, char** ); 26 | 27 | LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo) 28 | { 29 | if(IsDebuggerPresent()) 30 | { 31 | //If a debugger is present, pass the exception to the debugger with EXCEPTION_CONTINUE_SEARCH 32 | return EXCEPTION_CONTINUE_SEARCH; 33 | } 34 | //TODO: get backtrace 35 | //TODO: relaunch ? 36 | return 0; 37 | } 38 | 39 | int main( int argc, char **argv ) 40 | { 41 | return VLMCmain( argc, argv ); 42 | } 43 | -------------------------------------------------------------------------------- /ts/.gitignore: -------------------------------------------------------------------------------- 1 | *.qm 2 | ressources-ts.qrc 3 | -------------------------------------------------------------------------------- /ts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | ## RCC file 3 | SET(TS_QRC ${CMAKE_SOURCE_DIR}/ts/ressources-ts.qrc) 4 | 5 | IF(NOT QT_LUPDATE_EXECUTABLE) 6 | MESSAGE(WARNING "VLMC could not find lupdate. You won't be able to update translations.") 7 | ENDIF(NOT QT_LUPDATE_EXECUTABLE) 8 | 9 | IF(NOT QT_LRELEASE_EXECUTABLE) 10 | MESSAGE(WARNING "VLMC could not find lrelease. Your build won't contain translations.") 11 | ## Create an empty RCC file 12 | FILE(WRITE ${TS_QRC} "") 13 | ENDIF(NOT QT_LRELEASE_EXECUTABLE) 14 | 15 | 16 | ## Wraps the supplied .ts files in lrelease commands 17 | MACRO(QT4_ADD_TRANSLATIONS outfiles) 18 | FILE(WRITE ${TS_QRC} "\n") 19 | FOREACH (it ${ARGN}) 20 | GET_FILENAME_COMPONENT(it ${it} ABSOLUTE) 21 | GET_FILENAME_COMPONENT(outfile ${it} NAME_WE) 22 | 23 | FILE(APPEND ${TS_QRC} "${outfile}.qm\n") 24 | 25 | SET(outfile ${CMAKE_SOURCE_DIR}/ts/${outfile}.qm) 26 | 27 | ADD_CUSTOM_COMMAND( 28 | OUTPUT ${outfile} 29 | COMMAND ${QT_LRELEASE_EXECUTABLE} 30 | ARGS -compress -silent -nounfinished ${it} -qm ${outfile} 31 | MAIN_DEPENDENCY ${it} 32 | ) 33 | 34 | SET(${outfiles} ${${outfiles}} ${outfile}) 35 | ENDFOREACH(it) 36 | FILE(APPEND ${TS_QRC} "") 37 | ENDMACRO(QT4_ADD_TRANSLATIONS) 38 | 39 | ## Collect all translations files 40 | FILE (GLOB vlmc_TS ${CMAKE_SOURCE_DIR}/ts/*.ts) 41 | 42 | IF(QT_LRELEASE_EXECUTABLE) 43 | ## Wraps the collected translations 44 | QT4_ADD_TRANSLATIONS(vlmc_QMS ${vlmc_TS}) 45 | 46 | ## Create a target that runs lrelease for all the .ts files 47 | ## "ALL" means that it will be run by default. 48 | ADD_CUSTOM_TARGET(translations ALL DEPENDS ${vlmc_QMS}) 49 | ENDIF(QT_LRELEASE_EXECUTABLE) 50 | 51 | IF(QT_LUPDATE_EXECUTABLE) 52 | ## Search for all translatable strings in the sources directory 53 | FILE(GLOB_RECURSE translate_SRCS ${CMAKE_SOURCE_DIR}/src/*.cpp 54 | ${CMAKE_SOURCE_DIR}/src/*.hpp) 55 | FILE(GLOB_RECURSE translate_HDRS ${CMAKE_SOURCE_DIR}/src/*.h) 56 | FILE(GLOB_RECURSE translate_UIS ${CMAKE_SOURCE_DIR}/src/*.ui) 57 | 58 | SET(translate_SRCS ${translate_SRCS} ${translate_HDRS} ${translate_UIS}) 59 | 60 | ## Create a target that runs lupdate for all the sources and UI files 61 | ADD_CUSTOM_TARGET(lupdate 62 | COMMAND ${QT_LUPDATE_EXECUTABLE} -noobsolete ${translate_SRCS} -ts ${vlmc_TS} 63 | ) 64 | ENDIF(QT_LUPDATE_EXECUTABLE) 65 | 66 | --------------------------------------------------------------------------------