diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/CMakeLists.txt | 37 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/CMakeLists.txt | 27 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoder_ffmpeg.h | 13 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp | 13 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/detailsdialog.cpp | 17 | ||||
| -rw-r--r-- | src/plugins/Input/ffmpeg/ffmpeg.pro | 3 | ||||
| -rw-r--r-- | src/plugins/Output/CMakeLists.txt | 2 |
7 files changed, 73 insertions, 39 deletions
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 38f2629ee..9ab96dd16 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -1,32 +1,5 @@ -SET(USE_ALSA TRUE CACHE BOOL "enable/disable alsa plugin") -SET(USE_JACK TRUE CACHE BOOL "enable/disable jack plugin") -SET(USE_OSS TRUE CACHE BOOL "enable/disable oss plugin") -SET(USE_PULSE TRUE CACHE BOOL "enable/disable pulse audio plugin") - -IF(USE_ALSA) -MESSAGE( STATUS "ALSA ON") -add_subdirectory(alsa) -ELSE(USE_ALSA) -MESSAGE( STATUS "ALSA OFF") -ENDIF(USE_ALSA) - -IF(USE_JACK) -MESSAGE( STATUS "JACK ON") -add_subdirectory(jack) -ELSE(USE_JACK) -MESSAGE( STATUS "JACK OFF") -ENDIF(USE_JACK) - -IF(USE_OSS) -MESSAGE( STATUS "OSS ON") -add_subdirectory(oss) -ELSE(USE_OSS) -MESSAGE( STATUS "OSS OFF") -ENDIF(USE_OSS) - -IF(USE_PULSE) -MESSAGE( STATUS "PULSE AUDIO ON") -add_subdirectory(pulseaudio) -ELSE(USE_PULSE) -MESSAGE( STATUS "PULSE AUDIO OFF") -ENDIF(USE_PULSE) +add_subdirectory(Input) +add_subdirectory(Output) +add_subdirectory(Visual) +add_subdirectory(Effect) +add_subdirectory(General) diff --git a/src/plugins/Input/ffmpeg/CMakeLists.txt b/src/plugins/Input/ffmpeg/CMakeLists.txt index dd10aa2c7..973e481bd 100644 --- a/src/plugins/Input/ffmpeg/CMakeLists.txt +++ b/src/plugins/Input/ffmpeg/CMakeLists.txt @@ -26,20 +26,41 @@ SET(QT_INCLUDES include_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../) link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmp) -# libffmpeg and taglib +# libffmpeg PKGCONFIG(libavcodec LIBAVCODEC_INCLUDE_DIR LIBAVCODEC_LINK_DIR LIBAVCODEC_LINK_FLAGS LIBAVCODEC_CFLAGS) PKGCONFIG(libavformat LIBAVFORMAT_INCLUDE_DIR LIBAVFORMAT_LINK_DIR LIBAVFORMAT_LINK_FLAGS LIBAVFORMAT_CFLAGS) IF(NOT LIBAVCODEC_LINK_FLAGS) SET(LIBAVCODEC_LINK_FLAGS -lavcodec) - SET(LIBAVCODEC_INCLUDE_DIR /usr/include/ffmpeg) + SET(LIBAVCODEC_INCLUDE_DIR /usr/include) ENDIF(NOT LIBAVCODEC_LINK_FLAGS) IF(NOT LIBAVFORMAT_LINK_FLAGS) SET(LIBAVFORMAT_LINK_FLAGS -lavformat) - SET(LIBAVFORMAT_INCLUDE_DIR /usr/include/ffmpeg) + SET(LIBAVFORMAT_INCLUDE_DIR /usr/include) ENDIF(NOT LIBAVFORMAT_LINK_FLAGS) +# old ffmpeg support +IF(EXISTS ${LIBAVFORMAT_INCLUDE_DIR}/ffmpeg/avformat.h) + ADD_DEFINITIONS(-DHAVE_FFMPEG_AVFORMAT_H) +ELSEIF(EXISTS ${LIBAVFORMAT_INCLUDE_DIR}/libavformat/avformat.h) + ADD_DEFINITIONS(-DHAVE_LIBAVFORMAT_AVFORMAT_H) +ELSE(EXISTS ${LIBAVFORMAT_INCLUDE_DIR}/ffmpeg/avformat.h) + include_directories(/usr/local/include/ffmpeg + /usr/local/include/libavformat +) +ENDIF(EXISTS ${LIBAVFORMAT_INCLUDE_DIR}/ffmpeg/avformat.h) + +IF(EXISTS ${LIBAVCODEC_INCLUDE_DIR}/ffmpeg/avcodec.h) + ADD_DEFINITIONS(-DHAVE_FFMPEG_AVCODEC_H) +ELSEIF(EXISTS ${LIBAVCODEC_INCLUDE_DIR}/libavcodec/avcodec.h) + ADD_DEFINITIONS(-DHAVE_LIBAVCODEC_AVCODEC_H) +ELSE(EXISTS ${LIBAVCODEC_INCLUDE_DIR}/ffmpeg/avcodec.h) + include_directories(/usr/local/include/ffmpeg + /usr/local/include/libavcodec +) +ENDIF(EXISTS ${LIBAVCODEC_INCLUDE_DIR}/ffmpeg/avcodec.h) + include_directories(${LIBAVCODEC_INCLUDE_DIR} ${LIBAVFORMAT_INCLUDE_DIR}) link_directories(${LIBAVCODEC_LINK_DIR} ${LIBAVFORMAT_LINK_DIR}) diff --git a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h index ec0364af4..37265e31f 100644 --- a/src/plugins/Input/ffmpeg/decoder_ffmpeg.h +++ b/src/plugins/Input/ffmpeg/decoder_ffmpeg.h @@ -22,8 +22,21 @@ #define __decoder_ffmeg_h extern "C"{ +#if defined HAVE_FFMPEG_AVFORMAT_H +#include <ffmpeg/avformat.h> +#elif defined HAVE_LIBAVFORMAT_AVFORMAT_H +#include <libavformat/avformat.h> +#else #include <avformat.h> +#endif + +#if defined HAVE_FFMPEG_AVCODEC_H +#include <ffmpeg/avcodec.h> +#elif defined HAVE_LIBAVCODEC_AVCODEC_H +#include <libavcodec/avcodec.h> +#else #include <avcodec.h> +#endif } #include <qmmp/decoder.h> diff --git a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp index 064c9774f..77d4088d8 100644 --- a/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp +++ b/src/plugins/Input/ffmpeg/decoderffmpegfactory.cpp @@ -1,8 +1,21 @@ #include <QtGui> extern "C"{ +#if defined HAVE_FFMPEG_AVFORMAT_H +#include <ffmpeg/avformat.h> +#elif defined HAVE_LIBAVFORMAT_AVFORMAT_H +#include <libavformat/avformat.h> +#else #include <avformat.h> +#endif + +#if defined HAVE_FFMPEG_AVCODEC_H +#include <ffmpeg/avcodec.h> +#elif defined HAVE_LIBAVCODEC_AVCODEC_H +#include <libavcodec/avcodec.h> +#else #include <avcodec.h> +#endif } #include "detailsdialog.h" diff --git a/src/plugins/Input/ffmpeg/detailsdialog.cpp b/src/plugins/Input/ffmpeg/detailsdialog.cpp index 8b9994347..cf75e2e80 100644 --- a/src/plugins/Input/ffmpeg/detailsdialog.cpp +++ b/src/plugins/Input/ffmpeg/detailsdialog.cpp @@ -18,11 +18,24 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -extern "C" -{ +extern "C"{ +#if defined HAVE_FFMPEG_AVFORMAT_H +#include <ffmpeg/avformat.h> +#elif defined HAVE_LIBAVFORMAT_AVFORMAT_H +#include <libavformat/avformat.h> +#else #include <avformat.h> +#endif + +#if defined HAVE_FFMPEG_AVCODEC_H +#include <ffmpeg/avcodec.h> +#elif defined HAVE_LIBAVCODEC_AVCODEC_H +#include <libavcodec/avcodec.h> +#else #include <avcodec.h> +#endif } + #include <QFile> #include "detailsdialog.h" diff --git a/src/plugins/Input/ffmpeg/ffmpeg.pro b/src/plugins/Input/ffmpeg/ffmpeg.pro index 6fd2a77e3..dd0103075 100644 --- a/src/plugins/Input/ffmpeg/ffmpeg.pro +++ b/src/plugins/Input/ffmpeg/ffmpeg.pro @@ -22,7 +22,8 @@ plugin \ link_pkgconfig TEMPLATE = lib QMAKE_LIBDIR += ../../../../lib -LIBS += -lqmmp -L/usr/lib -I/usr/include +LIBS += -lqmmp -L/usr/lib -I/usr/include -I/usr/include/ffmpeg \ + -I/usr/include/libavcodec -I/usr/include/libavformat DEFINES += __STDC_CONSTANT_MACROS PKGCONFIG += libavcodec libavformat TRANSLATIONS = translations/ffmpeg_plugin_ru.ts \ diff --git a/src/plugins/Output/CMakeLists.txt b/src/plugins/Output/CMakeLists.txt index 5f13e4477..38f2629ee 100644 --- a/src/plugins/Output/CMakeLists.txt +++ b/src/plugins/Output/CMakeLists.txt @@ -28,5 +28,5 @@ IF(USE_PULSE) MESSAGE( STATUS "PULSE AUDIO ON") add_subdirectory(pulseaudio) ELSE(USE_PULSE) -MESSAGE( STATUS "PULSE AUDIO ON") +MESSAGE( STATUS "PULSE AUDIO OFF") ENDIF(USE_PULSE) |
