Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion app/avInfo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 5 additions & 1 deletion cmake/FindFFmpeg.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/AvTranscoder/Profile.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef _AV_TRANSCODER_PROFILE_HPP_
#define _AV_TRANSCODER_PROFILE_HPP_

#include "common.hpp"

#include <string>
#include <cstring>
#include <vector>
Expand All @@ -9,7 +11,7 @@
namespace avtranscoder
{

class Profile
class AvExport Profile
{
public:
static const std::string avProfileIdentificator;
Expand Down
26 changes: 22 additions & 4 deletions src/AvTranscoder/avTranscoder.i
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
%include "std_pair.i"
%include "std_map.i"


%include "AvTranscoder/swig/avException.i"
%include "AvTranscoder/swig/avExport.i"

Expand Down Expand Up @@ -50,11 +49,28 @@

#include <AvTranscoder/transcoder/StreamTranscoder.hpp>
#include <AvTranscoder/transcoder/Transcoder.hpp>
%}

%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 >;
Expand All @@ -69,6 +85,8 @@ namespace std {

%include <AvTranscoder/common.hpp>

%include "AvTranscoder/progress/progress.i"

%include <AvTranscoder/Profile.hpp>

%include <AvTranscoder/essenceStructures/Pixel.hpp>
Expand Down
10 changes: 5 additions & 5 deletions src/AvTranscoder/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct Ratio
size_t den;
};

class ParamSet
class AvExport ParamSet
{
public:
ParamSet( void* obj )
Expand All @@ -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 );

}

Expand Down
2 changes: 1 addition & 1 deletion src/AvTranscoder/essenceStream/AvOutputAudio.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace avtranscoder
{

class AvOutputAudio : public IOutputEssence
class AvExport AvOutputAudio : public IOutputEssence
{
public:
AvOutputAudio();
Expand Down
2 changes: 1 addition & 1 deletion src/AvTranscoder/essenceStructures/Pixel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ enum ESubsamplingType
eSubsampling420 // 4:2:0
};

class Pixel
class AvExport Pixel
{
public:
Pixel()
Expand Down
18 changes: 9 additions & 9 deletions src/AvTranscoder/mediaProperty/mediaProperty.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -91,7 +91,7 @@ struct VideoProperties
MetadatasMap getDataMap() const;
};

struct AudioProperties
struct AvExport AudioProperties
{
std::string codecName;
std::string codecLongName;
Expand All @@ -111,7 +111,7 @@ struct AudioProperties
MetadatasMap getDataMap() const;
};

struct DataProperties
struct AvExport DataProperties
{
size_t streamId;
MetadatasMap metadatas;
Expand All @@ -120,7 +120,7 @@ struct DataProperties
MetadatasMap getDataMap() const;
};

struct SubtitleProperties
struct AvExport SubtitleProperties
{
size_t streamId;
MetadatasMap metadatas;
Expand All @@ -129,7 +129,7 @@ struct SubtitleProperties
MetadatasMap getDataMap() const;
};

struct AttachementProperties
struct AvExport AttachementProperties
{
size_t streamId;
MetadatasMap metadatas;
Expand All @@ -138,7 +138,7 @@ struct AttachementProperties
MetadatasMap getDataMap() const;
};

struct UnknownProperties
struct AvExport UnknownProperties
{
size_t streamId;
MetadatasMap metadatas;
Expand All @@ -147,7 +147,7 @@ struct UnknownProperties
MetadatasMap getDataMap() const;
};

struct Properties
struct AvExport Properties
{
std::string filename;
std::string formatName;
Expand Down
2 changes: 1 addition & 1 deletion src/AvTranscoder/progress/ConsoleProgress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/AvTranscoder/progress/IProgress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {};
Expand Down
2 changes: 1 addition & 1 deletion src/AvTranscoder/progress/NoDisplayProgress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/AvTranscoder/transcoder/StreamTranscoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace avtranscoder

class IEssenceTransform;

class StreamTranscoder
class AvExport StreamTranscoder
{
public:
/**
Expand Down
1 change: 1 addition & 0 deletions src/AvTranscoder/transcoder/Transcoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <limits>
#include <iostream>
#include <algorithm>

namespace avtranscoder
{
Expand Down
2 changes: 1 addition & 1 deletion src/AvTranscoder/transcoder/Transcoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum EProcessMethod
eProcessMethodInfinity,
};

class Transcoder
class AvExport Transcoder
{
public:

Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down
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