diff --git a/CMakeLists.txt b/CMakeLists.txt index 30e6d7e3..51e14270 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,8 +17,11 @@ add_definitions(-DAVTRANSCODER_VERSION_MICRO=${AVTRANSCODER_VERSION_MICRO}) set(CMAKE_VERBOSE_MAKEFILE OFF) # CPP flags on debug / release mode -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -pg -g") -set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC -O3") +if(NOT WIN32) + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -pg -g") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fPIC -O3") +endif() + add_subdirectory(src) add_subdirectory(app) diff --git a/app/avInfo/CMakeLists.txt b/app/avInfo/CMakeLists.txt index d18f6218..cf437fa1 100644 --- a/app/avInfo/CMakeLists.txt +++ b/app/avInfo/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) include(AvTranscoderMacros) # Build app -include_directories(${AVTRANSCODER_SRC_PATH}) +include_directories(${AVTRANSCODER_SRC_PATH} ${FFMPEG_INCLUDE_DIR}) add_executable(avinfo avInfo.cpp) set_target_properties(avinfo PROPERTIES VERSION ${AVTRANSCODER_VERSION}) target_link_libraries(avinfo avtranscoder-shared) diff --git a/cmake/FindFFmpeg.cmake b/cmake/FindFFmpeg.cmake index b45dadf7..5698a708 100644 --- a/cmake/FindFFmpeg.cmake +++ b/cmake/FindFFmpeg.cmake @@ -79,7 +79,11 @@ endmacro() # Get FFmpeg from custom install if(FFMPEG_LIBRARY_DIR AND FFMPEG_INCLUDE_DIR) set(FFMPEG_FOUND TRUE) - file(GLOB FFMPEG_LIBRARIES "${FFMPEG_LIBRARY_DIR}/*.so") + if(WIN32) + file(GLOB FFMPEG_LIBRARIES "${FFMPEG_LIBRARY_DIR}/*.lib") + else() + file(GLOB FFMPEG_LIBRARIES "${FFMPEG_LIBRARY_DIR}/*.so") + endif() # Get FFmpeg from system install else() # Check FFmpeg version diff --git a/src/AvTranscoder/Profile.hpp b/src/AvTranscoder/Profile.hpp index 5c47f0c6..3e5b62b8 100644 --- a/src/AvTranscoder/Profile.hpp +++ b/src/AvTranscoder/Profile.hpp @@ -1,6 +1,8 @@ #ifndef _AV_TRANSCODER_PROFILE_HPP_ #define _AV_TRANSCODER_PROFILE_HPP_ +#include "common.hpp" + #include #include #include @@ -9,7 +11,7 @@ namespace avtranscoder { -class Profile +class AvExport Profile { public: static const std::string avProfileIdentificator; diff --git a/src/AvTranscoder/avTranscoder.i b/src/AvTranscoder/avTranscoder.i index 0cd8911a..0be7699e 100644 --- a/src/AvTranscoder/avTranscoder.i +++ b/src/AvTranscoder/avTranscoder.i @@ -7,7 +7,6 @@ %include "std_pair.i" %include "std_map.i" - %include "AvTranscoder/swig/avException.i" %include "AvTranscoder/swig/avExport.i" @@ -50,11 +49,28 @@ #include #include -%} -%include "AvTranscoder/progress/progress.i" +/* initialize static const members for binding */ +namespace avtranscoder { +const std::string Profile::avProfileIdentificator = "avProfile"; +const std::string Profile::avProfileIdentificatorHuman = "avProfileLong"; + +const std::string Profile::avProfileType = "avProfileType"; +const std::string Profile::avProfileTypeFormat = "avProfileTypeFormat"; +const std::string Profile::avProfileTypeVideo = "avProfileTypeVideo"; +const std::string Profile::avProfileTypeAudio = "avProfileTypeAudio"; + +const std::string Profile::avProfileFormat = "format"; +const std::string Profile::avProfileCodec = "codec"; +const std::string Profile::avProfilePixelFormat = "pix_fmt"; +const std::string Profile::avProfileSampleFormat = "sample_fmt"; +const std::string Profile::avProfileFrameRate = "r"; +const std::string Profile::avProfileSampleRate = "ar"; +const std::string Profile::avProfileChannel = "ac"; +} +%} -namespace std { +namespace std { %template(IntPair) pair< size_t, size_t >; %template(VideoVector) vector< avtranscoder::VideoProperties >; %template(AudioVector) vector< avtranscoder::AudioProperties >; @@ -69,6 +85,8 @@ namespace std { %include +%include "AvTranscoder/progress/progress.i" + %include %include diff --git a/src/AvTranscoder/common.hpp b/src/AvTranscoder/common.hpp index 51f4f922..973d4dc0 100644 --- a/src/AvTranscoder/common.hpp +++ b/src/AvTranscoder/common.hpp @@ -64,7 +64,7 @@ struct Ratio size_t den; }; -class ParamSet +class AvExport ParamSet { public: ParamSet( void* obj ) @@ -82,11 +82,11 @@ class ParamSet void* _objContext; }; -void split( std::vector< std::string >& splitedString, const std::string& inputString, const std::string& splitChars = ";" ); -int getFilesInDir( const std::string& dir, std::vector< std::string >& files ); +void AvExport split( std::vector< std::string >& splitedString, const std::string& inputString, const std::string& splitChars = ";" ); +int AvExport getFilesInDir( const std::string& dir, std::vector< std::string >& files ); -std::string getFormat( const std::string& filename ); -bool matchFormat( const std::string& format, const std::string& filename ); +std::string AvExport getFormat( const std::string& filename ); +bool AvExport matchFormat( const std::string& format, const std::string& filename ); } diff --git a/src/AvTranscoder/essenceStream/AvOutputAudio.hpp b/src/AvTranscoder/essenceStream/AvOutputAudio.hpp index 6bf89731..985310c2 100644 --- a/src/AvTranscoder/essenceStream/AvOutputAudio.hpp +++ b/src/AvTranscoder/essenceStream/AvOutputAudio.hpp @@ -12,7 +12,7 @@ namespace avtranscoder { -class AvOutputAudio : public IOutputEssence +class AvExport AvOutputAudio : public IOutputEssence { public: AvOutputAudio(); diff --git a/src/AvTranscoder/essenceStructures/Pixel.hpp b/src/AvTranscoder/essenceStructures/Pixel.hpp index 252d4a08..c5545591 100644 --- a/src/AvTranscoder/essenceStructures/Pixel.hpp +++ b/src/AvTranscoder/essenceStructures/Pixel.hpp @@ -31,7 +31,7 @@ enum ESubsamplingType eSubsampling420 // 4:2:0 }; -class Pixel +class AvExport Pixel { public: Pixel() diff --git a/src/AvTranscoder/mediaProperty/mediaProperty.hpp b/src/AvTranscoder/mediaProperty/mediaProperty.hpp index 41a95771..a578d7dc 100644 --- a/src/AvTranscoder/mediaProperty/mediaProperty.hpp +++ b/src/AvTranscoder/mediaProperty/mediaProperty.hpp @@ -20,17 +20,17 @@ namespace detail /** * @brief Fill metadata parameter with the given AVDictionary. */ - void fillMetadataDictionnary( AVDictionary* avdictionnary, MetadatasMap& metadata ); + void AvExport fillMetadataDictionnary( AVDictionary* avdictionnary, MetadatasMap& metadata ); } -struct Channel +struct AvExport Channel { size_t id; size_t chromaHeight; size_t bitStep; }; -struct VideoProperties +struct AvExport VideoProperties { std::string codecName; std::string codecLongName; @@ -91,7 +91,7 @@ struct VideoProperties MetadatasMap getDataMap() const; }; -struct AudioProperties +struct AvExport AudioProperties { std::string codecName; std::string codecLongName; @@ -111,7 +111,7 @@ struct AudioProperties MetadatasMap getDataMap() const; }; -struct DataProperties +struct AvExport DataProperties { size_t streamId; MetadatasMap metadatas; @@ -120,7 +120,7 @@ struct DataProperties MetadatasMap getDataMap() const; }; -struct SubtitleProperties +struct AvExport SubtitleProperties { size_t streamId; MetadatasMap metadatas; @@ -129,7 +129,7 @@ struct SubtitleProperties MetadatasMap getDataMap() const; }; -struct AttachementProperties +struct AvExport AttachementProperties { size_t streamId; MetadatasMap metadatas; @@ -138,7 +138,7 @@ struct AttachementProperties MetadatasMap getDataMap() const; }; -struct UnknownProperties +struct AvExport UnknownProperties { size_t streamId; MetadatasMap metadatas; @@ -147,7 +147,7 @@ struct UnknownProperties MetadatasMap getDataMap() const; }; -struct Properties +struct AvExport Properties { std::string filename; std::string formatName; diff --git a/src/AvTranscoder/progress/ConsoleProgress.hpp b/src/AvTranscoder/progress/ConsoleProgress.hpp index 6ce2e2ee..5b1cadac 100644 --- a/src/AvTranscoder/progress/ConsoleProgress.hpp +++ b/src/AvTranscoder/progress/ConsoleProgress.hpp @@ -9,7 +9,7 @@ namespace avtranscoder /** * @brief Implementation of IProgress, to display a progress bar in console. */ -class ConsoleProgress : public IProgress +class AvExport ConsoleProgress : public IProgress { public: ~ConsoleProgress(); diff --git a/src/AvTranscoder/progress/IProgress.hpp b/src/AvTranscoder/progress/IProgress.hpp index 9cf905dc..b26729ec 100644 --- a/src/AvTranscoder/progress/IProgress.hpp +++ b/src/AvTranscoder/progress/IProgress.hpp @@ -22,7 +22,7 @@ enum EJobStatus * Inherit this class to have your own way to manage a progress bar. * You can inherit this class in C++, but also in python / Java binding. */ -class IProgress +class AvExport IProgress { public: virtual ~IProgress() {}; diff --git a/src/AvTranscoder/progress/NoDisplayProgress.hpp b/src/AvTranscoder/progress/NoDisplayProgress.hpp index 2a4d684c..834ba853 100644 --- a/src/AvTranscoder/progress/NoDisplayProgress.hpp +++ b/src/AvTranscoder/progress/NoDisplayProgress.hpp @@ -9,7 +9,7 @@ namespace avtranscoder /** * @brief Implementation of IProgress, to manage cases when we need an IProgress but don't care of a progress bar. */ -class NoDisplayProgress : public IProgress +class AvExport NoDisplayProgress : public IProgress { public: ~NoDisplayProgress() diff --git a/src/AvTranscoder/transcoder/StreamTranscoder.hpp b/src/AvTranscoder/transcoder/StreamTranscoder.hpp index d2dde04c..6bc439d5 100644 --- a/src/AvTranscoder/transcoder/StreamTranscoder.hpp +++ b/src/AvTranscoder/transcoder/StreamTranscoder.hpp @@ -17,7 +17,7 @@ namespace avtranscoder class IEssenceTransform; -class StreamTranscoder +class AvExport StreamTranscoder { public: /** diff --git a/src/AvTranscoder/transcoder/Transcoder.cpp b/src/AvTranscoder/transcoder/Transcoder.cpp index 54407c2c..76ab5858 100644 --- a/src/AvTranscoder/transcoder/Transcoder.cpp +++ b/src/AvTranscoder/transcoder/Transcoder.cpp @@ -2,6 +2,7 @@ #include #include +#include namespace avtranscoder { diff --git a/src/AvTranscoder/transcoder/Transcoder.hpp b/src/AvTranscoder/transcoder/Transcoder.hpp index 574ba615..83cd7140 100644 --- a/src/AvTranscoder/transcoder/Transcoder.hpp +++ b/src/AvTranscoder/transcoder/Transcoder.hpp @@ -38,7 +38,7 @@ enum EProcessMethod eProcessMethodInfinity, }; -class Transcoder +class AvExport Transcoder { public: diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 456d9bbc..518d273d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,7 +71,7 @@ if(SWIG_FOUND) # Create 'avtranscoder-py' shared lib swig_add_module(avtranscoder-py python ${AVTRANSCODER_BINDING_FILE}) - if(NOT APPLE) + if(NOT APPLE AND NOT WIN32) set_target_properties(${SWIG_MODULE_avtranscoder-py_REAL_NAME} PROPERTIES SOVERSION ${AVTRANSCODER_VERSION_MAJOR}) set_target_properties(${SWIG_MODULE_avtranscoder-py_REAL_NAME} PROPERTIES VERSION ${AVTRANSCODER_VERSION}) endif() @@ -101,7 +101,7 @@ if(SWIG_FOUND) # Create 'avtranscoder-java' shared lib swig_add_module(avtranscoder-java java ${AVTRANSCODER_BINDING_FILE}) - if(NOT APPLE) + if(NOT APPLE AND NOT WIN32) set_target_properties(${SWIG_MODULE_avtranscoder-java_REAL_NAME} PROPERTIES SOVERSION ${AVTRANSCODER_VERSION_MAJOR}) set_target_properties(${SWIG_MODULE_avtranscoder-java_REAL_NAME} PROPERTIES VERSION ${AVTRANSCODER_VERSION}) endif() pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy