@@ -68,49 +68,49 @@ ReaderBase::ReaderBase()
6868
6969// Display file information
7070void ReaderBase::DisplayInfo () {
71- cout << fixed << setprecision (2 ) << boolalpha;
72- cout << " ----------------------------" << endl;
73- cout << " ----- File Information -----" << endl;
74- cout << " ----------------------------" << endl;
75- cout << " --> Has Video: " << info.has_video << endl;
76- cout << " --> Has Audio: " << info.has_audio << endl;
77- cout << " --> Has Single Image: " << info.has_single_image << endl;
78- cout << " --> Duration: " << info.duration << " Seconds" << endl;
79- cout << " --> File Size: " << double (info.file_size ) / 1024 / 1024 << " MB" << endl;
80- cout << " ----------------------------" << endl;
81- cout << " ----- Video Attributes -----" << endl;
82- cout << " ----------------------------" << endl;
83- cout << " --> Width: " << info.width << endl;
84- cout << " --> Height: " << info.height << endl;
85- cout << " --> Pixel Format: " << info.pixel_format << endl;
86- cout << " --> Frames Per Second: " << info.fps .ToDouble () << " (" << info.fps .num << " /" << info.fps .den << " )" << endl;
87- cout << " --> Video Bit Rate: " << info.video_bit_rate /1000 << " kb/s" << endl;
88- cout << " --> Pixel Ratio: " << info.pixel_ratio .ToDouble () << " (" << info.pixel_ratio .num << " /" << info.pixel_ratio .den << " )" << endl;
89- cout << " --> Display Aspect Ratio: " << info.display_ratio .ToDouble () << " (" << info.display_ratio .num << " /" << info.display_ratio .den << " )" << endl;
90- cout << " --> Video Codec: " << info.vcodec << endl;
91- cout << " --> Video Length: " << info.video_length << " Frames" << endl;
92- cout << " --> Video Stream Index: " << info.video_stream_index << endl;
93- cout << " --> Video Timebase: " << info.video_timebase .ToDouble () << " (" << info.video_timebase .num << " /" << info.video_timebase .den << " )" << endl;
94- cout << " --> Interlaced: " << info.interlaced_frame << endl;
95- cout << " --> Interlaced: Top Field First: " << info.top_field_first << endl;
96- cout << " ----------------------------" << endl;
97- cout << " ----- Audio Attributes -----" << endl;
98- cout << " ----------------------------" << endl;
99- cout << " --> Audio Codec: " << info.acodec << endl;
100- cout << " --> Audio Bit Rate: " << info.audio_bit_rate /1000 << " kb/s" << endl;
101- cout << " --> Sample Rate: " << info.sample_rate << " Hz" << endl;
102- cout << " --> # of Channels: " << info.channels << endl;
103- cout << " --> Channel Layout: " << info.channel_layout << endl;
104- cout << " --> Audio Stream Index: " << info.audio_stream_index << endl;
105- cout << " --> Audio Timebase: " << info.audio_timebase .ToDouble () << " (" << info.audio_timebase .num << " /" << info.audio_timebase .den << " )" << endl;
106- cout << " ----------------------------" << endl;
107- cout << " --------- Metadata ---------" << endl;
108- cout << " ----------------------------" << endl;
71+ std:: cout << std:: fixed << std:: setprecision (2 ) << std:: boolalpha;
72+ std:: cout << " ----------------------------" << std:: endl;
73+ std:: cout << " ----- File Information -----" << std:: endl;
74+ std:: cout << " ----------------------------" << std:: endl;
75+ std:: cout << " --> Has Video: " << info.has_video << std:: endl;
76+ std:: cout << " --> Has Audio: " << info.has_audio << std:: endl;
77+ std:: cout << " --> Has Single Image: " << info.has_single_image << std:: endl;
78+ std:: cout << " --> Duration: " << info.duration << " Seconds" << std:: endl;
79+ std:: cout << " --> File Size: " << double (info.file_size ) / 1024 / 1024 << " MB" << std:: endl;
80+ std:: cout << " ----------------------------" << std:: endl;
81+ std:: cout << " ----- Video Attributes -----" << std:: endl;
82+ std:: cout << " ----------------------------" << std:: endl;
83+ std:: cout << " --> Width: " << info.width << std:: endl;
84+ std:: cout << " --> Height: " << info.height << std:: endl;
85+ std:: cout << " --> Pixel Format: " << info.pixel_format << std:: endl;
86+ std:: cout << " --> Frames Per Second: " << info.fps .ToDouble () << " (" << info.fps .num << " /" << info.fps .den << " )" << std:: endl;
87+ std:: cout << " --> Video Bit Rate: " << info.video_bit_rate /1000 << " kb/s" << std:: endl;
88+ std:: cout << " --> Pixel Ratio: " << info.pixel_ratio .ToDouble () << " (" << info.pixel_ratio .num << " /" << info.pixel_ratio .den << " )" << std:: endl;
89+ std:: cout << " --> Display Aspect Ratio: " << info.display_ratio .ToDouble () << " (" << info.display_ratio .num << " /" << info.display_ratio .den << " )" << std:: endl;
90+ std:: cout << " --> Video Codec: " << info.vcodec << std:: endl;
91+ std:: cout << " --> Video Length: " << info.video_length << " Frames" << std:: endl;
92+ std:: cout << " --> Video Stream Index: " << info.video_stream_index << std:: endl;
93+ std:: cout << " --> Video Timebase: " << info.video_timebase .ToDouble () << " (" << info.video_timebase .num << " /" << info.video_timebase .den << " )" << std:: endl;
94+ std:: cout << " --> Interlaced: " << info.interlaced_frame << std:: endl;
95+ std:: cout << " --> Interlaced: Top Field First: " << info.top_field_first << std:: endl;
96+ std:: cout << " ----------------------------" << std:: endl;
97+ std:: cout << " ----- Audio Attributes -----" << std:: endl;
98+ std:: cout << " ----------------------------" << std:: endl;
99+ std:: cout << " --> Audio Codec: " << info.acodec << std:: endl;
100+ std:: cout << " --> Audio Bit Rate: " << info.audio_bit_rate /1000 << " kb/s" << std:: endl;
101+ std:: cout << " --> Sample Rate: " << info.sample_rate << " Hz" << std:: endl;
102+ std:: cout << " --> # of Channels: " << info.channels << std:: endl;
103+ std:: cout << " --> Channel Layout: " << info.channel_layout << std:: endl;
104+ std:: cout << " --> Audio Stream Index: " << info.audio_stream_index << std:: endl;
105+ std:: cout << " --> Audio Timebase: " << info.audio_timebase .ToDouble () << " (" << info.audio_timebase .num << " /" << info.audio_timebase .den << " )" << std:: endl;
106+ std:: cout << " ----------------------------" << std:: endl;
107+ std:: cout << " --------- Metadata ---------" << std:: endl;
108+ std:: cout << " ----------------------------" << std:: endl;
109109
110110 // Iterate through metadata
111111 std::map<std::string, std::string>::iterator it;
112112 for (it = info.metadata .begin (); it != info.metadata .end (); it++)
113- cout << " --> " << it->first << " : " << it->second << endl;
113+ std:: cout << " --> " << it->first << " : " << it->second << std:: endl;
114114}
115115
116116// Generate Json::JsonValue for this object
0 commit comments