Added option to list available pixfmts

This commit is contained in:
Martin Pulec
2019-06-05 10:33:29 +02:00
parent 6ae4c6e1ca
commit 863cf1111e
3 changed files with 21 additions and 2 deletions

View File

@@ -39,6 +39,7 @@
#include <mcheck.h>
#endif
using rang::style;
using namespace std;
unsigned int audio_capture_channels = DEFAULT_AUDIO_CAPTURE_CHANNELS;
@@ -388,6 +389,18 @@ void print_param_doc()
}
}
void print_pixel_formats(void) {
for (codec_t c = static_cast<codec_t>(1); c != VIDEO_CODEC_COUNT; c = static_cast<codec_t>(static_cast<int>(c) + 1)) {
char tag;
if (is_codec_opaque(c)) {
continue;
}
tag = codec_is_a_rgb(c) ? 'R' : 'Y';
cout << " " << style::bold << left << setw(12) << get_codec_name(c) << style::reset << setw(0) << " " << tag << " " << setw(2) << get_bits_per_component(c) << setw(0) << " " << get_codec_name_long(c) << "\n";
}
}
bool register_mainloop(mainloop_t m, void *u)
{
if (mainloop) {