Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 865b5e6

Browse files
author
Valentin Noel
committedJun 24, 2014
Merge remote-tracking branch 'remotes/mrn/master'
Conflicts: src/AvTranscoder/OutputStreamAudio.hpp src/AvTranscoder/OutputStreamVideo.hpp src/AvTranscoder/avTranscoder.i
2 parents 708c1f9 + b92a264 commit 865b5e6

22 files changed

+3111
-39
lines changed
 

‎app/SConscript

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,20 @@ if platform.system() != 'Windows':
111111
],
112112
)
113113

114+
avprofiles = env.Program(
115+
'avoptions',
116+
Glob( 'optionChecker/*.cpp' ),
117+
LIBS = [
118+
sAvTranscoder,
119+
'avutil',
120+
'avformat',
121+
'avcodec'
122+
],
123+
CXXFLAGS = [
124+
'-std=c++0x'
125+
],
126+
)
127+
114128
env.Depends( avmeta, sAvTranscoder )
115129
env.Depends( audioRewrapper, sAvTranscoder )
116130

‎app/avInfo/avInfo.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
#include <iostream>
2-
#include <iomanip>
32

43
#include <AvTranscoder/Description.hpp>
54

65
int main( int argc, char** argv )
76
{
87
// std::cout << "avinfo" << std::endl;
9-
std::vector<std::string> inputExtension = getInputExtensions();
10-
std::vector<std::string> outputExtension = getOutputExtensions();
8+
std::vector<std::string> inputExtension = avtranscoder::getInputExtensions();
9+
std::vector<std::string> outputExtension = avtranscoder::getOutputExtensions();
10+
11+
std::cout << "----- inputExtension -----" << std::endl;
12+
std::cout << "nb inputExtension: " << inputExtension.size() << std::endl;
13+
for( std::vector<std::string>::iterator it = inputExtension.begin(); it != inputExtension.end(); ++it )
14+
std::cout << *it << std::endl;
15+
16+
std::cout << "----- outputExtension -----" << std::endl;
17+
std::cout << "nb outputExtension: " << outputExtension.size() << std::endl;
18+
for( std::vector<std::string>::iterator it = outputExtension.begin(); it != outputExtension.end(); ++it )
19+
std::cout << *it << std::endl;
20+
1121
return 0;
1222
}

‎app/avplay/AvReader.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ class AvReader : public Reader
9393
// /std::cout << "seek at " << frame << std::endl;
9494
m_inputFile.seekAtFrame( frame );
9595
m_inputStreamVideo->flushDecoder();
96-
m_inputStreamVideo->readNextFrame( *m_sourceImage );
97-
m_colorTransform.convert( *m_sourceImage, *m_imageToDisplay );
98-
return (const char*)m_imageToDisplay->getPtr();
96+
return readNextFrame();
9997
}
10098

10199
void printMetadatas()

‎app/optionChecker/optionChecker.cpp

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#include <AvTranscoder/OptionLoader.hpp>
2+
#include <AvTranscoder/Option.hpp>
3+
4+
#include <string>
5+
#include <iostream>
6+
#include <utility> //pair
7+
8+
int optionChecker( const std::string& inputfilename )
9+
{
10+
avtranscoder::OptionLoader optionLoader;
11+
optionLoader.loadOptions( 0, 0 );
12+
13+
// display Options
14+
for( auto option : optionLoader.getOptions() )
15+
{
16+
std::cout << std::left;
17+
std::cout << "****************************" << std::endl;
18+
std::cout << "Name: " << option.getName() << std::endl;
19+
std::cout << "Unit : " << option.getUnit() << std::endl;
20+
std::cout << "Help: " << option.getHelp() << std::endl;
21+
std::cout << "Type: " << option.getType() << std::endl;
22+
23+
// get default value
24+
25+
if( option.getType() == avtranscoder::TypeInt )
26+
{
27+
std::cout << "DefaultValue: " << option.getDefaultValueInt() << std::endl;
28+
}
29+
else if( option.getType() == avtranscoder::TypeBool )
30+
{
31+
std::cout << "DefaultValue: " << option.getDefaultValueBool() << std::endl;
32+
}
33+
else if( option.getType() == avtranscoder::TypeDouble )
34+
{
35+
std::cout << "DefaultValue: " << option.getDefaultValueDouble() << std::endl;
36+
}
37+
else if( option.getType() == avtranscoder::TypeRatio )
38+
{
39+
std::cout << "DefaultValue: " << option.getDefaultValueRatio().first << ", " << option.getDefaultValueRatio().second << std::endl;
40+
}
41+
else if( option.getType() == avtranscoder::TypeString )
42+
{
43+
std::cout << "DefaultValue: " << option.getDefaultValueString() << std::endl;
44+
}
45+
else if( option.getType() == avtranscoder::TypeChoice )
46+
{
47+
std::cout << "Nb choices: " << option.getNbChilds() << std::endl;
48+
std::cout << "Default choice index: " << option.getDefaultChildIndex() << std::endl;
49+
for(size_t i = 0; i < option.getNbChilds(); ++i )
50+
std::cout << "Choice " << i << ": " <<
51+
option.getChild( i ).getName() << " // " <<
52+
option.getChild( i ).getHelp() << std::endl;
53+
}
54+
else if( option.getType() == avtranscoder::TypeGroup )
55+
{
56+
std::cout << "Nb choices: " << option.getNbChilds() << std::endl;
57+
for(size_t i = 0; i < option.getNbChilds(); ++i )
58+
std::cout << "Element " << i << ": " <<
59+
option.getChild( i ).getName() << " // " <<
60+
option.getChild( i ).getDefaultValueBool() << std::endl;
61+
}
62+
}
63+
}
64+
65+
int main( int argc, char** argv )
66+
{
67+
if( argc <= 1 )
68+
{
69+
std::cout << "audiorewrapper require a media filename" << std::endl;
70+
std::cout << "example: audioWrap file.ext" << std::endl;
71+
return( -1 );
72+
}
73+
74+
std::cout << "start ..." << std::endl;
75+
76+
try
77+
{
78+
optionChecker( argv[1] );
79+
}
80+
catch( std::exception &e )
81+
{
82+
std::cout << "[ERROR] " << e.what() << std::endl;
83+
}
84+
85+
std::cout << "end ..." << std::endl;
86+
}
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.