Skip to content

Adding EssenceTransformation and some minor changes #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 3, 2014
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
15 changes: 0 additions & 15 deletions app/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,6 @@ avprocessor = env.Program(
],
)

audioRewrapper = env.Program(
'audioWrap',
Glob( 'audioRewrapper/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
]
)

if platform.system() != 'Windows':
avplayer = env.Program(
'avplayer',
Expand Down Expand Up @@ -128,9 +115,7 @@ avprofiles = env.Program(
)

env.Depends( avmeta, sAvTranscoder )
env.Depends( audioRewrapper, sAvTranscoder )

env.Alias( "install", env.Install(os.path.join( installPrefix, "bin" ), avmeta ) )
env.Alias( "install", env.Install(os.path.join( installPrefix, "bin" ), avprocessor ) )
env.Alias( "install", env.Install(os.path.join( installPrefix, "bin" ), avtransform ) )
env.Alias( "install", env.Install(os.path.join( installPrefix, "bin" ), audioRewrapper ) )
151 changes: 0 additions & 151 deletions app/audioRewrapper/audioRewrapper.cpp

This file was deleted.

18 changes: 7 additions & 11 deletions app/avInfo/avInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@

int main( int argc, char** argv )
{
avtranscoder::AvVersions versions( avtranscoder::getVersion() );
avtranscoder::Libraries libs( avtranscoder::getLibraries() );

for( avtranscoder::AvVersions::iterator libVersion = versions.begin(); libVersion != versions.end(); ++libVersion )
for( avtranscoder::Libraries::iterator library = libs.begin(); library != libs.end(); ++library )
{
std::cout << std::left << std::setw( 15 ) << (*libVersion).first;
std::cout << std::left << std::setw( 30 ) << avtranscoder::getLicence();

std::stringstream completeVersion;
for( std::vector<size_t>::iterator version = (*libVersion).second.begin(); version != (*libVersion).second.end(); ++version )
{
completeVersion << *version << ".";
}
std::cout << completeVersion.str() << std::endl;
std::cout << std::left;
std::cout << std::setw( 15 ) << (*library).getName();
std::cout << std::setw( 10 ) << (*library).getStringVersion();
std::cout << std::setw( 30 ) << (*library).getLicence();
std::cout << std::endl;
}

// std::cout << "avinfo" << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion app/optionChecker/optionChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void displayOptions( avtranscoder::OptionLoader::OptionArray& options )
}
}

int optionChecker( const std::string& inputfilename )
void optionChecker( const std::string& inputfilename )
{
avtranscoder::OptionLoader optionLoader;

Expand Down
101 changes: 58 additions & 43 deletions src/AvTranscoder/Description.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,64 +16,79 @@ extern "C" {
}

#include <cstring>
#include <algorithm> //sort, unique
#include <sstream>
#include <algorithm>

namespace avtranscoder
{

std::map< std::string, std::vector<size_t> > getVersion()
Library::Library( const std::string& name, const std::string& licence, const size_t major, const size_t minor, const size_t release )
: _name( name )
, _licence( licence )
, _major( major )
, _minor( minor )
, _release( release )
{
std::map< std::string, std::vector<size_t> > version;
}

std::vector<size_t> avutilVersion;
avutilVersion.push_back( LIBAVUTIL_VERSION_MAJOR );
avutilVersion.push_back( LIBAVUTIL_VERSION_MINOR );
avutilVersion.push_back( LIBAVUTIL_VERSION_MICRO );
std::string Library::getName()
{
return _name;
}

std::vector<size_t> avformatVersion;
avformatVersion.push_back( LIBAVFORMAT_VERSION_MAJOR );
avformatVersion.push_back( LIBAVFORMAT_VERSION_MINOR );
avformatVersion.push_back( LIBAVFORMAT_VERSION_MICRO );
std::vector<size_t> Library::getVersion()
{
std::vector<size_t> version;
version.push_back( _major );
version.push_back( _minor );
version.push_back( _release );
return version;
}

std::vector<size_t> avcodecVersion;
avcodecVersion.push_back( LIBAVCODEC_VERSION_MAJOR );
avcodecVersion.push_back( LIBAVCODEC_VERSION_MINOR );
avcodecVersion.push_back( LIBAVCODEC_VERSION_MICRO );
std::string Library::getStringVersion()
{
std::stringstream version;
version << _major << ".";
version << _minor << ".";
version << _release;
return version.str();
}

std::vector<size_t> swscaleVersion;
swscaleVersion.push_back( LIBSWSCALE_VERSION_MAJOR );
swscaleVersion.push_back( LIBSWSCALE_VERSION_MINOR );
swscaleVersion.push_back( LIBSWSCALE_VERSION_MICRO );
size_t Library::getMajorVersion()
{
return _major;
}

#ifdef AV_RESAMPLE_LIBRARY
std::vector<size_t> avresampleVersion;
avresampleVersion.push_back( LIBAVRESAMPLE_VERSION_MAJOR );
avresampleVersion.push_back( LIBAVRESAMPLE_VERSION_MINOR );
avresampleVersion.push_back( LIBAVRESAMPLE_VERSION_MICRO );
#else
std::vector<size_t> swresampleVersion;
swresampleVersion.push_back( LIBSWRESAMPLE_VERSION_MAJOR );
swresampleVersion.push_back( LIBSWRESAMPLE_VERSION_MINOR );
swresampleVersion.push_back( LIBSWRESAMPLE_VERSION_MICRO );
#endif
size_t Library::getMinorVersion()
{
return _minor;
}

version[ "avutil" ] = avutilVersion;
version[ "avformat" ] = avformatVersion;
version[ "avcodec" ] = avcodecVersion;
version[ "swscale" ] = swscaleVersion;
#ifdef AV_RESAMPLE_LIBRARY
version[ "avresample" ] = avresampleVersion;
#else
version[ "swresample" ] = swresampleVersion;
#endif
size_t Library::getReleaseVersion()
{
return _release;
}

return version;
std::string Library::getLicence()
{
return _licence;
}

std::string getLicence()
Libraries getLibraries()
{
std::string licence( avutil_license() );
return licence;
Libraries libs;

libs.push_back( Library( "avutil", avutil_license(), LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO ) );
libs.push_back( Library( "avformat", avformat_license(), LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO ) );
libs.push_back( Library( "avcodec", avcodec_license(), LIBAVCODEC_VERSION_MAJOR, LIBAVCODEC_VERSION_MINOR, LIBAVCODEC_VERSION_MICRO ) );
#ifdef AV_RESAMPLE_LIBRARY
libs.push_back( Library( "avresample", avutil_license(), LIBAVRESAMPLE_VERSION_MAJOR, LIBAVRESAMPLE_VERSION_MINOR, LIBAVRESAMPLE_VERSION_MICRO ) );
#else
libs.push_back( Library( "swresample", avutil_license(), LIBSWRESAMPLE_VERSION_MAJOR, LIBSWRESAMPLE_VERSION_MINOR, LIBSWRESAMPLE_VERSION_MICRO ) );
#endif
libs.push_back( Library( "swscale", avutil_license(), LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO ) );

return libs;
}

std::vector<std::string> getInputExtensions()
Expand Down
27 changes: 24 additions & 3 deletions src/AvTranscoder/Description.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,31 @@
namespace avtranscoder
{

typedef std::map< std::string, std::vector<size_t> > AvVersions;
class Library
{
public:
Library( const std::string& name, const std::string& licence, const size_t major, const size_t minor, const size_t release );

std::string getName();

std::vector<size_t> getVersion();
std::string getStringVersion();
size_t getMajorVersion();
size_t getMinorVersion();
size_t getReleaseVersion();

std::string getLicence();
private:
std::string _name;
std::string _licence;
size_t _major;
size_t _minor;
size_t _release;
};

typedef std::vector< Library > Libraries;

AvVersions getVersion();
std::string getLicence();
Libraries getLibraries();

std::vector<std::string> getInputExtensions();

Expand Down
Loading