Skip to content

Commit ab93bdd

Browse files
Merge remote-tracking branch 'van/dev_transcoder' into dev_streamsProcessor
Conflicts: app/audioRewrapper/audioRewrapper.cpp
2 parents 9a9cd36 + 74ae8bf commit ab93bdd

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

app/audioRewrapper/audioRewrapper.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,15 @@ void rewrapAudio( const char* inputfilename, const char* outputFilename )
2121

2222
InputFile inputFile( inputfilename );
2323
inputFile.analyse( p );
24+
inputFile.readStream( 0 );
2425

2526
OutputFile outputFile( outputFilename );
2627

2728
outputFile.setup();
2829

2930
outputFile.addAudioStream( inputFile.getStream( 0 ).getAudioDesc() );
31+
32+
outputFile.beginWrap();
3033

3134
DataStream data;
3235

@@ -43,6 +46,7 @@ void rewrapAudio( const char* inputfilename, const char* outputFilename )
4346

4447
++frame;
4548
}
49+
outputFile.endWrap();
4650
std::cout << std::endl;
4751
}
4852

@@ -133,8 +137,8 @@ int main( int argc, char** argv )
133137

134138
try
135139
{
136-
//rewrapAudio( argv[1], argv[2] );
137-
transcodeAudio( argv[1], argv[2] );
140+
rewrapAudio( argv[1], argv[2] );
141+
// transcodeAudio( argv[1], argv[2] );
138142
}
139143
catch( std::exception &e )
140144
{

src/AvTranscoder/Profile.cpp

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,24 @@ void Profile::loadProfiles()
3434
{
3535
std::vector< std::string > paths;
3636
split( paths, envAvProfiles, ":" );
37-
for( std::vector< std::string >::iterator it = paths.begin(); it != paths.end(); ++it )
37+
for( std::vector< std::string >::iterator dirIt = paths.begin(); dirIt != paths.end(); ++dirIt )
3838
{
39-
std::cout << "search profile in path " << *it << std::endl;
39+
//std::cout << "search profile in path " << *dirIt << std::endl;
40+
std::vector< std::string > files;
41+
if( getFilesInDir( *dirIt, files ) != 0 )
42+
continue;
43+
44+
for( std::vector< std::string >::iterator fileIt = files.begin(); fileIt != files.end(); ++fileIt )
45+
{
46+
if( ( *fileIt == "." ) || ( *fileIt == ".." ) )
47+
continue;
48+
49+
std::ifstream ifs;
50+
51+
ifs.open( ( *dirIt ) + ( *fileIt ), std::ifstream::in );
52+
53+
std::cout << "file " << *dirIt << *fileIt << std::endl;
54+
}
4055
}
4156
}
4257
}

src/AvTranscoder/common.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ struct Ratio
6161

6262
void split( std::vector< std::string >& splitedString, const std::string& inputString, const std::string& splitChars = ";" );
6363

64+
int getFilesInDir( std::string dir, std::vector< std::string > &files );
65+
6466
}
6567

6668
#endif

0 commit comments

Comments
 (0)