Skip to content

Build: separate apps in cpp/java/(python) examples #66

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

Closed
wants to merge 4 commits into from
Closed
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
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ if mymode == "debug":
Export( "env" )
Export( "envJava" )
Export( "envPy" )
Export( "mymode" )
Export( "installPrefix" )
Export( "resampleLibraryName" )

Expand All @@ -180,4 +181,3 @@ sconscripts = [

SConscript('src/SConscript', variant_dir='build/'+mymode+'/src')
SConscript('app/SConscript', variant_dir='build/'+mymode+'/app')

139 changes: 23 additions & 116 deletions app/SConscript
Original file line number Diff line number Diff line change
@@ -1,121 +1,28 @@
import os
import platform

Import( 'env' )
Import( 'envJava' )
Import( 'envPy' )
Import( 'mymode' )
Import( 'AvTranscoder' )
Import( 'sAvTranscoder' )
#Import( 'AvTranscoder_jar' )
Import( 'installPrefix' )
Import( "resampleLibraryName" )

env = Environment().Clone()

Import( 'env' )

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

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

avtransform = env.Program(
'av++',
Glob( 'avTranscoder/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
]
)

avprocessor = env.Program(
'avprocessor',
Glob( 'genericProcessor/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
],
CXXFLAGS = [
'-std=c++0x'
],
)

if platform.system() != 'Windows':
avplayer = env.Program(
'avplayer',
Glob( 'avplay/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
'GL',
'glut',
]
)

avprofiles = env.Program(
'avprofiles',
Glob( 'presetChecker/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
],
CXXFLAGS = [
'-std=c++0x'
],
)

avprofiles = env.Program(
'avoptions',
Glob( 'optionChecker/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
],
CXXFLAGS = [
'-std=c++0x'
],
)

env.Depends( avmeta, 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 ) )
Import( 'jAvTranscoder' )
Import( 'jAvTranscoderClass' )
Import( 'pyAvTranscoder' )
Import( 'resampleLibraryName' )

Export( 'env' )
Export( 'envJava' )
Export( 'envPy' )
Export( 'mymode' )
Export( 'AvTranscoder' )
Export( 'sAvTranscoder' )
Export( 'jAvTranscoder' )
Export( 'jAvTranscoderClass' )
Export( 'pyAvTranscoder' )
Export( 'resampleLibraryName' )

SConscript('cpp/SConscript')
SConscript('java/SConscript')
SConscript('python/SConscript')
119 changes: 119 additions & 0 deletions app/cpp/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import os
import platform

Import( 'env' )
Import( 'AvTranscoder' )
Import( 'sAvTranscoder' )
Import( 'installPrefix' )
Import( "resampleLibraryName" )

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

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

avtransform = env.Program(
'av++',
Glob( 'avTranscoder/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
]
)

avprocessor = env.Program(
'avprocessor',
Glob( 'genericProcessor/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
],
CXXFLAGS = [
'-std=c++0x'
],
)

if platform.system() != 'Windows':
avplayer = env.Program(
'avplayer',
Glob( 'avplay/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
'GL',
'glut',
]
)

avprofiles = env.Program(
'avprofiles',
Glob( 'presetChecker/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
],
CXXFLAGS = [
'-std=c++0x'
],
)

avprofiles = env.Program(
'avoptions',
Glob( 'optionChecker/*.cpp' ),
LIBS = [
sAvTranscoder,
'avutil',
'avformat',
'avcodec',
'swscale',
resampleLibraryName,
],
CXXFLAGS = [
'-std=c++0x'
],
)

env.Depends( avmeta, sAvTranscoder )
env.Depends( avprocessor, sAvTranscoder )
env.Depends( avtransform, 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 ) )
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#include <AvTranscoder/Transcoder/Transcoder.hpp>

#include <iostream>
Expand All @@ -10,8 +9,12 @@

static const size_t dummyWidth = 1920;
static const size_t dummyHeight = 1080;
static const std::string dummyPixelFormat = "yuv420p";
static const std::string dummyVideoCodec = "mpeg2video";
static const std::string dummyPixelFormat = "rgb24";
static const std::string dummyVideoCodec = "png";

static const size_t dummyChannel = 1;
static const size_t dummySampleRate = 48000;
static const std::string dummySampleFormat = "s16";
static const std::string dummyAudioCodec = "pcm_s16le";

// bool verbose = false;
Expand Down Expand Up @@ -69,6 +72,17 @@ void parseConfigFile( const std::string& configFilename, avtranscoder::Transcode
inputVideoDesc.setImageParameters( imageDesc );

transcoder.add( filename, streamIndex, subStreamIndex, transcodeProfile, inputVideoDesc );

// audio
// avtranscoder::AudioFrameDesc audioDesc;
// audioDesc.setChannels( dummyChannel );
// audioDesc.setSampleRate( dummySampleRate );
// audioDesc.setSampleFormat( dummySampleFormat );
//
// avtranscoder::AudioDesc inputAudioDesc( dummyAudioCodec );
// inputAudioDesc.setAudioParameters( audioDesc );
//
// transcoder.add( filename, streamIndex, subStreamIndex, transcodeProfile, inputAudioDesc );
}
else
{
Expand Down Expand Up @@ -115,8 +129,7 @@ int main( int argc, char** argv )

// set verbose of all stream
transcoder.setVerbose( verbose );
transcoder.setProcessMethod( avtranscoder::eProcessMethodInfinity );
//transcoder.setOutputFps( 12 );
transcoder.setProcessMethod( avtranscoder::eProcessMethodLongest );
transcoder.init();

if( verbose )
Expand Down
11 changes: 0 additions & 11 deletions app/jTranscoder/jTranscoder.java

This file was deleted.

20 changes: 20 additions & 0 deletions app/java/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os
import platform

Import( 'env' )
Import( 'envJava' )
Import( 'mymode' )
Import( 'jAvTranscoder' )
Import( 'jAvTranscoderClass' )
Import( 'installPrefix' )

if jAvTranscoderClass:
envJava.Append(
JAVACLASSPATH = '.:build/'+mymode+'/src/jAvTranscoderClass/'
)

#javtest_class = envJava.Java(
# target = 'javtestclass',
# source = Glob( 'jTranscoder/*.java')
#)
#env.Depends( javtest_class, jAvTranscoder )
7 changes: 7 additions & 0 deletions app/java/jTranscoder/jTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import org.AvTranscoder.InputFile;

public class jTest {
public static void main( String[] args ){
InputFile file = new InputFile( "Test.mxf" );
}
}
6 changes: 6 additions & 0 deletions app/python/SConscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import glob, re
import os

Import( "env" )
Import( "envPy" )

Loading