Skip to content

Commit f73db27

Browse files
remove metadata display and minor clean
1 parent 537c247 commit f73db27

File tree

1 file changed

+0
-92
lines changed

1 file changed

+0
-92
lines changed

app/avTranscoder/avTranscoder.cpp

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -16,78 +16,6 @@
1616
#include <AvTranscoder/DatasStructures/VideoDesc.hpp>
1717
#include <AvTranscoder/DatasStructures/Image.hpp>
1818

19-
void displayMetadatas( const char* filename )
20-
{
21-
using namespace avtranscoder;
22-
23-
Media input( filename );
24-
input.analyse();
25-
std::cout << "format name : " << input.getProperties().formatName << std::endl;
26-
std::cout << "format long name : " << input.getProperties().formatLongName << std::endl;
27-
std::cout << "start time : " << input.getProperties().startTime << std::endl;
28-
std::cout << "duration : " << input.getProperties().duration << std::endl;
29-
std::cout << "bitrate : " << input.getProperties().bitRate << std::endl;
30-
std::cout << "number of streams : " << input.getProperties().streamsCount << std::endl;
31-
std::cout << "number of programs : " << input.getProperties().programsCount << std::endl;
32-
std::cout << "number of video streams : " << input.getProperties().videoStreams.size() << std::endl;
33-
std::cout << "number of audio streams : " << input.getProperties().audioStreams.size() << std::endl;
34-
35-
// std::vector< std::pair< std::string, std::string > > metadatas
36-
std::cout << "---------- Metadatas ----------" << std::endl;
37-
for( size_t metadataIndex = 0; metadataIndex < input.getProperties().metadatas.size(); ++metadataIndex )
38-
{
39-
std::cout << std::left << std::setw( 24 ) << input.getProperties().metadatas.at(metadataIndex).first <<" : " << input.getProperties().metadatas.at(metadataIndex).second << std::endl;
40-
}
41-
42-
for( size_t videoStreamIndex = 0; videoStreamIndex < input.getProperties().videoStreams.size(); ++videoStreamIndex )
43-
{
44-
std::cout << "---------- Video stream " << videoStreamIndex << " ----------" << std::endl;
45-
std::cout << "codec name : " << input.getProperties().videoStreams.at(videoStreamIndex).codecName << std::endl;
46-
std::cout << "codec long name : " << input.getProperties().videoStreams.at(videoStreamIndex).codecLongName << std::endl;
47-
std::cout << "profile name : " << input.getProperties().videoStreams.at(videoStreamIndex).profileName << std::endl;
48-
std::cout << "profile : " << input.getProperties().videoStreams.at(videoStreamIndex).profile << std::endl;
49-
std::cout << "level : " << input.getProperties().videoStreams.at(videoStreamIndex).level << std::endl;
50-
std::cout << "width : " << input.getProperties().videoStreams.at(videoStreamIndex).width << std::endl;
51-
std::cout << "height : " << input.getProperties().videoStreams.at(videoStreamIndex).height << std::endl;
52-
std::cout << "pixel aspect ratio : " << input.getProperties().videoStreams.at(videoStreamIndex).sar.num << "/" <<
53-
input.getProperties().videoStreams.at(videoStreamIndex).sar.den << std::endl;
54-
std::cout << "display aspect ratio : " << input.getProperties().videoStreams.at(videoStreamIndex).dar.num << "/" <<
55-
input.getProperties().videoStreams.at(videoStreamIndex).dar.den << std::endl;
56-
std::cout << "pixel type : " << input.getProperties().videoStreams.at(videoStreamIndex).pixelName << std::endl;
57-
58-
std::cout << "bit rate : " << input.getProperties().videoStreams.at(videoStreamIndex).bitRate << std::endl;
59-
60-
std::cout << "color transfert : " << input.getProperties().videoStreams.at(videoStreamIndex).colorTransfert << std::endl;
61-
std::cout << "colorspace : " << input.getProperties().videoStreams.at(videoStreamIndex).colorspace << std::endl;
62-
std::cout << "color range : " << input.getProperties().videoStreams.at(videoStreamIndex).colorRange << std::endl;
63-
std::cout << "color primaries : " << input.getProperties().videoStreams.at(videoStreamIndex).colorPrimaries << std::endl;
64-
std::cout << "chroma sample location : " << input.getProperties().videoStreams.at(videoStreamIndex).chromaSampleLocation << std::endl;
65-
std::cout << "interlaced : " << ( input.getProperties().videoStreams.at(videoStreamIndex).isInterlaced ? "True" : "False" ) << std::endl;
66-
std::cout << "top field first : " << ( input.getProperties().videoStreams.at(videoStreamIndex).topFieldFirst ? "True" : "False" ) << std::endl;
67-
std::cout << "field order : " << input.getProperties().videoStreams.at(videoStreamIndex).fieldOrder << std::endl;
68-
69-
std::cout << "gop : ";
70-
for( size_t frameIndex = 0; frameIndex < input.getProperties().videoStreams.at(videoStreamIndex).gopStructure.size(); ++frameIndex )
71-
{
72-
std::cout << input.getProperties().videoStreams.at(videoStreamIndex).gopStructure.at( frameIndex ).first;
73-
std::cout << ( input.getProperties().videoStreams.at(videoStreamIndex).gopStructure.at( frameIndex ).second ? "*" : " " );
74-
}
75-
std::cout << std::endl;
76-
}
77-
for( size_t audioStreamIndex = 0; audioStreamIndex < input.getProperties().audioStreams.size(); ++audioStreamIndex )
78-
{
79-
std::cout << "---------- Audio stream " << audioStreamIndex << " ----------" << std::endl;
80-
std::cout << "codec name : " << input.getProperties().audioStreams.at(audioStreamIndex).codecName << std::endl;
81-
std::cout << "codec long name : " << input.getProperties().audioStreams.at(audioStreamIndex).codecLongName << std::endl;
82-
std::cout << "sample format : " << input.getProperties().audioStreams.at(audioStreamIndex).sampleFormat << std::endl;
83-
std::cout << "codec id : " << input.getProperties().audioStreams.at(audioStreamIndex).codecId << std::endl;
84-
std::cout << "stream id : " << input.getProperties().audioStreams.at(audioStreamIndex).streamId << std::endl;
85-
std::cout << "sample rate : " << input.getProperties().audioStreams.at(audioStreamIndex).sampleRate << std::endl;
86-
std::cout << "channels : " << input.getProperties().audioStreams.at(audioStreamIndex).channels << std::endl;
87-
std::cout << "bit rate : " << input.getProperties().audioStreams.at(audioStreamIndex).bit_rate << std::endl;
88-
}
89-
}
90-
9119
void transcodeVideo( const char* inputfilename, const char* outputFilename )
9220
{
9321
using namespace avtranscoder;
@@ -224,28 +152,8 @@ int main( int argc, char** argv )
224152

225153
std::cout << "start ..." << std::endl;
226154

227-
// a simply metadata getter
228-
displayMetadatas( argv[1] );
229-
230155
// example of video Transcoding
231156
transcodeVideo( argv[1], "transcodedVideo.mxf" );
232157

233158
std::cout << "end ..." << std::endl;
234-
235-
236-
// TESTS TO DO
237-
238-
// audio -> audio
239-
240-
// video -> video
241-
242-
// Audio + video -> Audio + video
243-
244-
// Audio // Video -> Audio + video
245-
246-
// Audio * N // Video -> Audio *N + video
247-
248-
// Audio * N // Video * N -> Audio *N + video * N
249-
250-
251159
}

0 commit comments

Comments
 (0)