From 28164968c8154c461f8825bb1ca8048423050111 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Thu, 31 Jul 2014 11:21:57 +0200 Subject: [PATCH 1/2] Print: overload operator << for MetadatasStructures * Remove displayMetadatas function. * Update avMeta. * Update AvReader. --- app/avMeta/avMeta.cpp | 2 +- app/avplay/AvReader.hpp | 2 +- src/AvTranscoder/Metadatas/Print.hpp | 232 ++++++++++++++++----------- 3 files changed, 136 insertions(+), 100 deletions(-) diff --git a/app/avMeta/avMeta.cpp b/app/avMeta/avMeta.cpp index 097b6d1d..28736169 100644 --- a/app/avMeta/avMeta.cpp +++ b/app/avMeta/avMeta.cpp @@ -17,5 +17,5 @@ int main( int argc, char** argv ) input.analyse( p, avtranscoder::InputFile::eAnalyseLevelFull ); // a simply metadata display - displayMetadatas( input ); + std::cout << input << std::endl; } diff --git a/app/avplay/AvReader.hpp b/app/avplay/AvReader.hpp index ed1c159e..b88c0c09 100644 --- a/app/avplay/AvReader.hpp +++ b/app/avplay/AvReader.hpp @@ -98,7 +98,7 @@ class AvReader : public Reader void printMetadatas() { - displayMetadatas( m_inputFile ); + std::cout << m_inputFile << std::endl; } private: diff --git a/src/AvTranscoder/Metadatas/Print.hpp b/src/AvTranscoder/Metadatas/Print.hpp index 7efa251f..690a52ca 100644 --- a/src/AvTranscoder/Metadatas/Print.hpp +++ b/src/AvTranscoder/Metadatas/Print.hpp @@ -5,121 +5,157 @@ #include #include +#include namespace avtranscoder { -void displayMetadatas( InputFile& input ) +static const size_t keyWidth = 32; +static const std::string separator = "===================="; + +std::ostream& operator<<( std::ostream& flux, const Properties& properties ) { - std::string separator( "====================" ); - size_t keyWidth = 32; - - std::cout << std::left; - std::cout << separator << " Wrapper " << separator << std::endl; - std::cout << std::setw( keyWidth ) << "filename" << ": " << input.getProperties().filename << std::endl; - std::cout << std::setw( keyWidth ) << "format name" << ": " << input.getProperties().formatName << std::endl; - std::cout << std::setw( keyWidth ) << "format long name" << ": " << input.getProperties().formatLongName << std::endl; - std::cout << std::setw( keyWidth ) << "start time" << ": " << input.getProperties().startTime << std::endl; - std::cout << std::setw( keyWidth ) << "duration" << ": " << input.getProperties().duration << std::endl; - std::cout << std::setw( keyWidth ) << "bitrate" << ": " << input.getProperties().bitRate << std::endl; - std::cout << std::setw( keyWidth ) << "number of streams" << ": " << input.getProperties().streamsCount << std::endl; - std::cout << std::setw( keyWidth ) << "number of programs" << ": " << input.getProperties().programsCount << std::endl; - std::cout << std::setw( keyWidth ) << "number of video streams" << ": " << input.getProperties().videoStreams.size() << std::endl; - std::cout << std::setw( keyWidth ) << "number of audio streams" << ": " << input.getProperties().audioStreams.size() << std::endl; - std::cout << std::setw( keyWidth ) << "number of data streams" << ": " << input.getProperties().dataStreams.size() << std::endl; - std::cout << std::setw( keyWidth ) << "number of subtitle streams" << ": " << input.getProperties().subtitleStreams.size() << std::endl; - std::cout << std::setw( keyWidth ) << "number of attachement streams" << ": " << input.getProperties().attachementStreams.size() << std::endl; - std::cout << std::setw( keyWidth ) << "number of unknown streams" << ": " << input.getProperties().unknownStreams.size() << std::endl; - - - // std::vector< std::pair< std::string, std::string > > metadatas - std::cout << separator << " Metadatas " << separator << std::endl; - for( size_t metadataIndex = 0; metadataIndex < input.getProperties().metadatas.size(); ++metadataIndex ) + flux << std::left; + flux << separator << " Wrapper " << separator << std::endl; + flux << std::setw( keyWidth ) << "filename" << ": " << properties.filename << std::endl; + flux << std::setw( keyWidth ) << "format name" << ": " << properties.formatName << std::endl; + flux << std::setw( keyWidth ) << "format long name" << ": " << properties.formatLongName << std::endl; + flux << std::setw( keyWidth ) << "start time" << ": " << properties.startTime << std::endl; + flux << std::setw( keyWidth ) << "duration" << ": " << properties.duration << std::endl; + flux << std::setw( keyWidth ) << "bitrate" << ": " << properties.bitRate << std::endl; + flux << std::setw( keyWidth ) << "number of streams" << ": " << properties.streamsCount << std::endl; + flux << std::setw( keyWidth ) << "number of programs" << ": " << properties.programsCount << std::endl; + flux << std::setw( keyWidth ) << "number of video streams" << ": " << properties.videoStreams.size() << std::endl; + flux << std::setw( keyWidth ) << "number of audio streams" << ": " << properties.audioStreams.size() << std::endl; + flux << std::setw( keyWidth ) << "number of data streams" << ": " << properties.dataStreams.size() << std::endl; + flux << std::setw( keyWidth ) << "number of subtitle streams" << ": " << properties.subtitleStreams.size() << std::endl; + flux << std::setw( keyWidth ) << "number of attachement streams" << ": " << properties.attachementStreams.size() << std::endl; + flux << std::setw( keyWidth ) << "number of unknown streams" << ": " << properties.unknownStreams.size() << std::endl; + + flux << separator << " Metadatas " << separator << std::endl; + for( size_t metadataIndex = 0; metadataIndex < properties.metadatas.size(); ++metadataIndex ) { - std::cout << std::setw( keyWidth ) << input.getProperties().metadatas.at(metadataIndex).first << ": " << input.getProperties().metadatas.at(metadataIndex).second << std::endl; + flux << std::setw( keyWidth ) << properties.metadatas.at( metadataIndex ).first << ": " << properties.metadatas.at( metadataIndex ).second << std::endl; } + + return flux; +} - for( size_t videoStreamIndex = 0; videoStreamIndex < input.getProperties().videoStreams.size(); ++videoStreamIndex ) +std::ostream& operator<<( std::ostream& flux, const VideoProperties& videoProperties ) +{ + flux << std::left; + flux << separator << " Video stream " << separator << std::endl; + flux << std::setw( keyWidth ) << "codec name" << ": " << videoProperties.codecName << std::endl; + flux << std::setw( keyWidth ) << "codec long name" << ": " << videoProperties.codecLongName << std::endl; + flux << std::setw( keyWidth ) << "codec id" << ": " << videoProperties.codecId << std::endl; + flux << std::setw( keyWidth ) << "stream id" << ": " << videoProperties.streamId << std::endl; + flux << std::setw( keyWidth ) << "profile name" << ": " << videoProperties.profileName << std::endl; + flux << std::setw( keyWidth ) << "profile" << ": " << videoProperties.profile << std::endl; + flux << std::setw( keyWidth ) << "level" << ": " << videoProperties.level << std::endl; + flux << std::setw( keyWidth ) << "width" << ": " << videoProperties.width << std::endl; + flux << std::setw( keyWidth ) << "height" << ": " << videoProperties.height << std::endl; + flux << std::setw( keyWidth ) << "dtgActiveFormat" << ": " << videoProperties.dtgActiveFormat << std::endl; + + + flux << std::setw( keyWidth ) << "start timecode" << ": " << videoProperties.startTimecode << std::endl; + flux << std::setw( keyWidth ) << "timeBase" << ": " << videoProperties.timeBase.num << "/" << + videoProperties.timeBase.den << std::endl; + flux << std::setw( keyWidth ) << "fps" << ": " << videoProperties.fps << std::endl; + flux << std::setw( keyWidth ) << "ticksPerFrame" << ": " << videoProperties.ticksPerFrame << std::endl; + + flux << std::setw( keyWidth ) << "pixel aspect ratio" << ": " << videoProperties.sar.num << "/" << + videoProperties.sar.den << std::endl; + flux << std::setw( keyWidth ) << "display aspect ratio" << ": " << videoProperties.dar.num << "/" << + videoProperties.dar.den << std::endl; + flux << std::setw( keyWidth ) << "pixel type" << ": " << videoProperties.pixelName << std::endl; + flux << std::setw( keyWidth ) << "bit wise acked" << ": " << ( videoProperties.bitWisePacked ? "True" : "False" ) << std::endl; + flux << std::setw( keyWidth ) << "rgb pixel" << ": " << ( videoProperties.rgbPixelData ? "True" : "False" ) << std::endl; + flux << std::setw( keyWidth ) << "as alpha" << ": " << ( videoProperties.asAlpha ? "True" : "False" ) << std::endl; + flux << std::setw( keyWidth ) << "endianess" << ": " << videoProperties.endianess << std::endl; + + flux << std::setw( keyWidth ) << "bit rate" << ": " << videoProperties.bitRate << std::endl; + flux << std::setw( keyWidth ) << "max bit rate" << ": " << videoProperties.maxBitRate << std::endl; + flux << std::setw( keyWidth ) << "min bit rate" << ": " << videoProperties.minBitRate << std::endl; + + flux << std::setw( keyWidth ) << "color transfert" << ": " << videoProperties.colorTransfert << std::endl; + flux << std::setw( keyWidth ) << "colorspace" << ": " << videoProperties.colorspace << std::endl; + flux << std::setw( keyWidth ) << "color range" << ": " << videoProperties.colorRange << std::endl; + flux << std::setw( keyWidth ) << "color primaries" << ": " << videoProperties.colorPrimaries << std::endl; + flux << std::setw( keyWidth ) << "indexed colors" << ": " << ( videoProperties.indexedColors ? "True" : "False" ) << std::endl; + flux << std::setw( keyWidth ) << "pseudo paletted" << ": " << ( videoProperties.pseudoPaletted ? "True" : "False" ) << std::endl; + flux << std::setw( keyWidth ) << "components count" << ": " << videoProperties.componentsCount << std::endl; + flux << std::setw( keyWidth ) << "chroma width" << ": " << videoProperties.chromaWidth << std::endl; + flux << std::setw( keyWidth ) << "chroma height" << ": " << videoProperties.chromaHeight << std::endl; + flux << std::setw( keyWidth ) << "chroma sample location" << ": " << videoProperties.chromaSampleLocation << std::endl; + flux << std::setw( keyWidth ) << "interlaced " << ": " << ( videoProperties.isInterlaced ? "True" : "False" ) << std::endl; + flux << std::setw( keyWidth ) << "top field first" << ": " << ( videoProperties.topFieldFirst ? "True" : "False" ) << std::endl; + flux << std::setw( keyWidth ) << "field order" << ": " << videoProperties.fieldOrder << std::endl; + flux << std::setw( keyWidth ) << "gop size" << ": " << videoProperties.gopSize << std::endl; + flux << std::setw( keyWidth ) << "has B frames" << ": " << ( videoProperties.hasBFrames ? "True" : "False" ) << std::endl; + + flux << std::setw( keyWidth ) << "gop" << ": "; + for( size_t frameIndex = 0; frameIndex < videoProperties.gopStructure.size(); ++frameIndex ) { - std::cout << separator << " Video stream " << videoStreamIndex << " " << separator << std::endl; - std::cout << std::setw( keyWidth ) << "codec name" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).codecName << std::endl; - std::cout << std::setw( keyWidth ) << "codec long name" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).codecLongName << std::endl; - std::cout << std::setw( keyWidth ) << "codec id" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).codecId << std::endl; - std::cout << std::setw( keyWidth ) << "stream id" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).streamId << std::endl; - std::cout << std::setw( keyWidth ) << "profile name" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).profileName << std::endl; - std::cout << std::setw( keyWidth ) << "profile" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).profile << std::endl; - std::cout << std::setw( keyWidth ) << "level" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).level << std::endl; - std::cout << std::setw( keyWidth ) << "width" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).width << std::endl; - std::cout << std::setw( keyWidth ) << "height" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).height << std::endl; - std::cout << std::setw( keyWidth ) << "dtgActiveFormat" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).dtgActiveFormat << std::endl; - - - std::cout << std::setw( keyWidth ) << "start timecode" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).startTimecode << std::endl; - std::cout << std::setw( keyWidth ) << "timeBase" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).timeBase.num << "/" << - input.getProperties().videoStreams.at(videoStreamIndex).timeBase.den << std::endl; - std::cout << std::setw( keyWidth ) << "fps" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).fps << std::endl; - std::cout << std::setw( keyWidth ) << "ticksPerFrame" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).ticksPerFrame << std::endl; - - std::cout << std::setw( keyWidth ) << "pixel aspect ratio" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).sar.num << "/" << - input.getProperties().videoStreams.at(videoStreamIndex).sar.den << std::endl; - std::cout << std::setw( keyWidth ) << "display aspect ratio" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).dar.num << "/" << - input.getProperties().videoStreams.at(videoStreamIndex).dar.den << std::endl; - std::cout << std::setw( keyWidth ) << "pixel type" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).pixelName << std::endl; - std::cout << std::setw( keyWidth ) << "bit wise acked" << ": " << ( input.getProperties().videoStreams.at(videoStreamIndex).bitWisePacked ? "True" : "False" ) << std::endl; - std::cout << std::setw( keyWidth ) << "rgb pixel" << ": " << ( input.getProperties().videoStreams.at(videoStreamIndex).rgbPixelData ? "True" : "False" ) << std::endl; - std::cout << std::setw( keyWidth ) << "as alpha" << ": " << ( input.getProperties().videoStreams.at(videoStreamIndex).asAlpha ? "True" : "False" ) << std::endl; - std::cout << std::setw( keyWidth ) << "endianess" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).endianess << std::endl; - - std::cout << std::setw( keyWidth ) << "bit rate" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).bitRate << std::endl; - std::cout << std::setw( keyWidth ) << "max bit rate" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).maxBitRate << std::endl; - std::cout << std::setw( keyWidth ) << "min bit rate" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).minBitRate << std::endl; - - std::cout << std::setw( keyWidth ) << "color transfert" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).colorTransfert << std::endl; - std::cout << std::setw( keyWidth ) << "colorspace" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).colorspace << std::endl; - std::cout << std::setw( keyWidth ) << "color range" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).colorRange << std::endl; - std::cout << std::setw( keyWidth ) << "color primaries" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).colorPrimaries << std::endl; - std::cout << std::setw( keyWidth ) << "indexed colors" << ": " << ( input.getProperties().videoStreams.at(videoStreamIndex).indexedColors ? "True" : "False" ) << std::endl; - std::cout << std::setw( keyWidth ) << "pseudo paletted" << ": " << ( input.getProperties().videoStreams.at(videoStreamIndex).pseudoPaletted ? "True" : "False" ) << std::endl; - std::cout << std::setw( keyWidth ) << "components count" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).componentsCount << std::endl; - std::cout << std::setw( keyWidth ) << "chroma width" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).chromaWidth << std::endl; - std::cout << std::setw( keyWidth ) << "chroma height" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).chromaHeight << std::endl; - std::cout << std::setw( keyWidth ) << "chroma sample location" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).chromaSampleLocation << std::endl; - std::cout << std::setw( keyWidth ) << "interlaced " << ": " << ( input.getProperties().videoStreams.at(videoStreamIndex).isInterlaced ? "True" : "False" ) << std::endl; - std::cout << std::setw( keyWidth ) << "top field first" << ": " << ( input.getProperties().videoStreams.at(videoStreamIndex).topFieldFirst ? "True" : "False" ) << std::endl; - std::cout << std::setw( keyWidth ) << "field order" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).fieldOrder << std::endl; - std::cout << std::setw( keyWidth ) << "gop size" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).gopSize << std::endl; - std::cout << std::setw( keyWidth ) << "has B frames" << ": " << ( input.getProperties().videoStreams.at(videoStreamIndex).hasBFrames ? "True" : "False" ) << std::endl; - - std::cout << std::setw( keyWidth ) << "gop" << ": "; - for( size_t frameIndex = 0; frameIndex < input.getProperties().videoStreams.at(videoStreamIndex).gopStructure.size(); ++frameIndex ) - { - std::cout << input.getProperties().videoStreams.at(videoStreamIndex).gopStructure.at( frameIndex ).first; - std::cout << ( input.getProperties().videoStreams.at(videoStreamIndex).gopStructure.at( frameIndex ).second ? "*" : " " ); - } - std::cout << std::endl; - std::cout << std::setw( keyWidth ) << "references frames" << ": " << input.getProperties().videoStreams.at(videoStreamIndex).referencesFrames << std::endl; + flux << videoProperties.gopStructure.at( frameIndex ).first; + flux << ( videoProperties.gopStructure.at( frameIndex ).second ? "*" : " " ); + } + flux << std::endl; + flux << std::setw( keyWidth ) << "references frames" << ": " << videoProperties.referencesFrames << std::endl; + + return flux; +} + +std::ostream& operator<<( std::ostream& flux, const AudioProperties& audioProperties ) +{ + flux << std::left; + flux << separator << " Audio stream " << separator << std::endl; + flux << std::setw( keyWidth ) << "codec name" << ": " << audioProperties.codecName << std::endl; + flux << std::setw( keyWidth ) << "codec long name" << ": " << audioProperties.codecLongName << std::endl; + flux << std::setw( keyWidth ) << "sample format" << ": " << audioProperties.sampleFormat << std::endl; + flux << std::setw( keyWidth ) << "codec id" << ": " << audioProperties.codecId << std::endl; + flux << std::setw( keyWidth ) << "stream id" << ": " << audioProperties.streamId << std::endl; + flux << std::setw( keyWidth ) << "sample rate" << ": " << audioProperties.sampleRate << std::endl; + flux << std::setw( keyWidth ) << "channels" << ": " << audioProperties.channels << std::endl; + flux << std::setw( keyWidth ) << "channel layout" << ": " << audioProperties.channelLayout << std::endl; + flux << std::setw( keyWidth ) << "channel name" << ": " << audioProperties.channelName << std::endl; + flux << std::setw( keyWidth ) << "channel description" << ": " << audioProperties.channelDescription << std::endl; + flux << std::setw( keyWidth ) << "bit rate" << ": " << audioProperties.bit_rate << std::endl; + + return flux; +} +std::ostream& operator<<( std::ostream& flux, const DataProperties& dataProperties ) +{ + flux << separator << " Data stream " << separator << std::endl; + flux << std::setw( keyWidth ) << "stream id" << ": " << dataProperties.streamId << std::endl; + + return flux; +} + +std::ostream& operator<<( std::ostream& flux, const InputFile& input ) +{ + // wrapper + flux << input.getProperties() << std::endl; + + // video streams + for( size_t videoStreamIndex = 0; videoStreamIndex < input.getProperties().videoStreams.size(); ++videoStreamIndex ) + { + flux << input.getProperties().videoStreams.at( videoStreamIndex ) << std::endl; } + + // audio streams for( size_t audioStreamIndex = 0; audioStreamIndex < input.getProperties().audioStreams.size(); ++audioStreamIndex ) { - std::cout << separator << " Audio stream " << audioStreamIndex << " " << separator << std::endl; - std::cout << std::setw( keyWidth ) << "codec name" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).codecName << std::endl; - std::cout << std::setw( keyWidth ) << "codec long name" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).codecLongName << std::endl; - std::cout << std::setw( keyWidth ) << "sample format" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).sampleFormat << std::endl; - std::cout << std::setw( keyWidth ) << "codec id" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).codecId << std::endl; - std::cout << std::setw( keyWidth ) << "stream id" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).streamId << std::endl; - std::cout << std::setw( keyWidth ) << "sample rate" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).sampleRate << std::endl; - std::cout << std::setw( keyWidth ) << "channels" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).channels << std::endl; - std::cout << std::setw( keyWidth ) << "channel layout" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).channelLayout << std::endl; - std::cout << std::setw( keyWidth ) << "channel name" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).channelName << std::endl; - std::cout << std::setw( keyWidth ) << "channel description" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).channelDescription << std::endl; - std::cout << std::setw( keyWidth ) << "bit rate" << ": " << input.getProperties().audioStreams.at(audioStreamIndex).bit_rate << std::endl; + flux << input.getProperties().audioStreams.at( audioStreamIndex ) << std::endl; } + + // data streams for( size_t dataStreamIndex = 0; dataStreamIndex < input.getProperties().dataStreams.size(); ++dataStreamIndex ) { - std::cout << separator << " Data stream " << dataStreamIndex << " " << separator << std::endl; - std::cout << std::setw( keyWidth ) << "stream id" << ": " << input.getProperties().dataStreams.at(dataStreamIndex).streamId << std::endl; + flux << input.getProperties().dataStreams.at( dataStreamIndex ) << std::endl; } + + return flux; } } From 08e53ac90f9ae8aa20f15ae433e9dbd55632363c Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Thu, 31 Jul 2014 15:14:20 +0200 Subject: [PATCH 2/2] Print: overload operator << for subtitle, attachement and unknown * Use them in the overload operator << of InputFile. --- src/AvTranscoder/Metadatas/Print.hpp | 44 +++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/AvTranscoder/Metadatas/Print.hpp b/src/AvTranscoder/Metadatas/Print.hpp index 690a52ca..2dbaa8f6 100644 --- a/src/AvTranscoder/Metadatas/Print.hpp +++ b/src/AvTranscoder/Metadatas/Print.hpp @@ -132,6 +132,30 @@ std::ostream& operator<<( std::ostream& flux, const DataProperties& dataProperti return flux; } +std::ostream& operator<<( std::ostream& flux, const SubtitleProperties& subtitleProperties ) +{ + flux << separator << " Subtitle stream " << separator << std::endl; + flux << std::setw( keyWidth ) << "stream id" << ": " << subtitleProperties.streamId << std::endl; + + return flux; +} + +std::ostream& operator<<( std::ostream& flux, const AttachementProperties& attachementProperties ) +{ + flux << separator << " Attachement stream " << separator << std::endl; + flux << std::setw( keyWidth ) << "stream id" << ": " << attachementProperties.streamId << std::endl; + + return flux; +} + +std::ostream& operator<<( std::ostream& flux, const UnknownProperties& unknownProperties ) +{ + flux << separator << " Unknown stream " << separator << std::endl; + flux << std::setw( keyWidth ) << "stream id" << ": " << unknownProperties.streamId << std::endl; + + return flux; +} + std::ostream& operator<<( std::ostream& flux, const InputFile& input ) { // wrapper @@ -154,7 +178,25 @@ std::ostream& operator<<( std::ostream& flux, const InputFile& input ) { flux << input.getProperties().dataStreams.at( dataStreamIndex ) << std::endl; } - + + // subtitle streams + for( size_t subtitleStreamIndex = 0; subtitleStreamIndex < input.getProperties().subtitleStreams.size(); ++subtitleStreamIndex ) + { + flux << input.getProperties().subtitleStreams.at( subtitleStreamIndex ) << std::endl; + } + + // attachement streams + for( size_t attachementStreamIndex = 0; attachementStreamIndex < input.getProperties().attachementStreams.size(); ++attachementStreamIndex ) + { + flux << input.getProperties().attachementStreams.at( attachementStreamIndex ) << std::endl; + } + + // unknown streams + for( size_t unknownStreamIndex = 0; unknownStreamIndex < input.getProperties().unknownStreams.size(); ++unknownStreamIndex ) + { + flux << input.getProperties().unknownStreams.at( unknownStreamIndex ) << std::endl; + } + return flux; }