10 using VideoCodec = QMediaFormat::VideoCodec;
11 std::set<VideoCodec> codecs;
13 const int firstCodec = qToUnderlying(VideoCodec::Unspecified) + (includeUnspecified ? 0 : 1);
14 constexpr int lastCodec = qToUnderlying(VideoCodec::LastVideoCodec);
16 for (
int i = firstCodec; i <= lastCodec; ++i)
17 codecs.insert(
static_cast<VideoCodec>(i));
24 using AudioCodec = QMediaFormat::AudioCodec;
25 std::set<AudioCodec> codecs;
27 const int firstCodec = qToUnderlying(AudioCodec::Unspecified) + (includeUnspecified ? 0 : 1);
28 constexpr int lastCodec = qToUnderlying(AudioCodec::LastAudioCodec);
30 for (
int i = firstCodec; i <= lastCodec; ++i)
31 codecs.insert(
static_cast<AudioCodec>(i));
38 using FileFormat = QMediaFormat::FileFormat;
40 std::set<FileFormat> videoFormats;
41 const int firstFormat = FileFormat::UnspecifiedFormat + (includeUnspecified ? 0 : 1);
42 for (
int i = firstFormat; i <= FileFormat::LastFileFormat; ++i) {
43 const FileFormat format =
static_cast<FileFormat>(i);
44 videoFormats.insert(format);
51 std::vector<QMediaFormat> formats;
52 for (
const auto &fileFormat : allFileFormats(includeUnspecified)) {
53 for (
const auto &audioCodec : allAudioCodecs(includeUnspecified)) {
54 for (
const auto &videoCodec : allVideoCodecs(includeUnspecified)) {
55 QMediaFormat format{ fileFormat };
56 format.setAudioCodec(audioCodec);
57 format.setVideoCodec(videoCodec);
58 formats.push_back(format);