MCPcopy Create free account
hub / github.com/davisking/dlib / main

Function main

examples/ffmpeg_info_ex.cpp:18–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using namespace dlib;
17
18int main()
19{
20 // List all codecs supported by this installation of ffmpeg libraries
21 const auto codecs = ffmpeg::list_codecs();
22
23 cout << "Supported codecs:\n";
24 for (const auto& codec : codecs)
25 cout << " name : " << left << setw(20) << codec.codec_name << " id : " << codec.codec_id << " : encoding supported " << codec.supports_encoding << " decoding supported " << codec.supports_decoding << '\n';
26 cout << '\n';
27
28 // List all demuxers supported by this installation of ffmpeg libraries
29 const auto demuxers = ffmpeg::list_demuxers();
30
31 cout << "Supported demuxers:\n";
32 for (const auto& demuxer : demuxers)
33 cout << " name : " << demuxer << '\n';
34 cout << '\n';
35
36 // List all muxers supported by this installation of ffmpeg libraries
37 cout << "Supported muxers:\n";
38 for (const auto& muxer : ffmpeg::list_muxers())
39 {
40 cout << " name : " << muxer.name << '\n';
41 if (!muxer.supported_codecs.empty())
42 {
43 cout << " supported codecs:\n";
44 for (const auto& codec : muxer.supported_codecs)
45 cout << " " << codec.codec_name << '\n';
46 }
47 }
48 cout << '\n';
49
50 // List all input devices supported by this installation of ffmpeg libraries
51 cout << "Supported input devices:\n";
52 for (const auto& device : ffmpeg::list_input_device_types())
53 {
54 cout << " device type : `" << device.device_type << "` is audio " << device.is_audio_type << " is video " << device.is_video_type << '\n';
55
56 const auto instances = ffmpeg::list_input_device_instances(device.device_type);
57 if (!instances.empty())
58 {
59 cout << " instances :\n";
60 for (const auto& instance : instances)
61 cout << " name : " << left << setw(32) << instance.name << ", description : " << instance.description << '\n';
62 }
63 }
64
65 cout << '\n';
66
67 // List all input devices supported by this installation of ffmpeg libraries
68 cout << "Supported output devices:\n";
69 for (const auto& device : ffmpeg::list_output_device_types())
70 {
71 cout << " device type : `" << device.device_type << "` is audio " << device.is_audio_type << " is video " << device.is_video_type << '\n';
72
73 const auto instances = ffmpeg::list_output_device_instances(device.device_type);
74 if (!instances.empty())
75 {

Callers

nothing calls this directly

Calls 5

emptyMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected