Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qffmpeg.cpp
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qffmpeg_p.h"
5
6#include <QtCore/qdebug.h>
7#include <QtCore/qloggingcategory.h>
8#include <QtCore/qscopeguard.h>
9
10extern "C" {
11#include <libavutil/pixdesc.h>
12#include <libavutil/samplefmt.h>
13#include <libavutil/error.h>
14
15#ifdef Q_OS_DARWIN
16#include <libavutil/hwcontext_videotoolbox.h>
17#endif
18}
19
21
22Q_STATIC_LOGGING_CATEGORY(qLcFFmpegUtils, "qt.multimedia.ffmpeg.utils");
23
24namespace QFFmpeg {
25
26namespace {
27bool isAVFormatSupported(const Codec &codec, AVPixelFormat format)
28{
29 if (codec.type() == AVMEDIA_TYPE_VIDEO) {
30 auto checkFormat = [format](AVPixelFormat f) {
31 return f == format;
32 };
33 return findAVPixelFormat(codec, checkFormat).has_value();
34 }
35 return false;
36}
37
38bool isAVFormatSupported(const Codec &codec, AVSampleFormat format)
39{
40 if (codec.type() == AVMEDIA_TYPE_AUDIO) {
41 const auto sampleFormats = codec.sampleFormats();
42 return ranges::contains(sampleFormats, format);
43 }
44 return false;
45}
46} // namespace
47
48bool isAVFormatSupported(const Codec &codec, const PixelOrSampleFormat &format)
49{
50 return std::visit([&](auto fmt) {
51 return isAVFormatSupported(codec, fmt);
52 }, format);
53}
54
55bool isHwPixelFormat(AVPixelFormat format)
56{
57 const auto desc = av_pix_fmt_desc_get(format);
58 return desc && (desc->flags & AV_PIX_FMT_FLAG_HWACCEL) != 0;
59}
60
61void applyExperimentalCodecOptions(const Codec &codec, AVDictionary **opts)
62{
63 if (codec.isExperimental()) {
64 qCWarning(qLcFFmpegUtils) << "Applying the option 'strict -2' for the experimental codec"
65 << codec.name() << ". it's unlikely to work properly";
66 av_dict_set(opts, "strict", "-2", 0);
67 }
68}
69
70AVPixelFormat pixelFormatForHwDevice(AVHWDeviceType deviceType)
71{
72 switch (deviceType) {
73 case AV_HWDEVICE_TYPE_VIDEOTOOLBOX:
74 return AV_PIX_FMT_VIDEOTOOLBOX;
75 case AV_HWDEVICE_TYPE_VAAPI:
76 return AV_PIX_FMT_VAAPI;
77 case AV_HWDEVICE_TYPE_MEDIACODEC:
78 return AV_PIX_FMT_MEDIACODEC;
79 case AV_HWDEVICE_TYPE_CUDA:
80 return AV_PIX_FMT_CUDA;
81 case AV_HWDEVICE_TYPE_VDPAU:
82 return AV_PIX_FMT_VDPAU;
83 case AV_HWDEVICE_TYPE_OPENCL:
84 return AV_PIX_FMT_OPENCL;
85 case AV_HWDEVICE_TYPE_QSV:
86 return AV_PIX_FMT_QSV;
87 case AV_HWDEVICE_TYPE_D3D11VA:
88 return AV_PIX_FMT_D3D11;
89#if QT_FFMPEG_HAS_D3D12VA
90 case AV_HWDEVICE_TYPE_D3D12VA:
91 return AV_PIX_FMT_D3D12;
92#endif
93 case AV_HWDEVICE_TYPE_DXVA2:
94 return AV_PIX_FMT_DXVA2_VLD;
95 case AV_HWDEVICE_TYPE_DRM:
96 return AV_PIX_FMT_DRM_PRIME;
97 case AV_HWDEVICE_TYPE_VULKAN:
98 return AV_PIX_FMT_VULKAN;
99 default:
100 return AV_PIX_FMT_NONE;
101 }
102}
103
104AVPacketSideData *addStreamSideData(AVStream *stream, AVPacketSideData sideData)
105{
106 QScopeGuard freeData([&sideData]() { av_free(sideData.data); });
107#if QT_FFMPEG_STREAM_SIDE_DATA_DEPRECATED
108 AVPacketSideData *result = av_packet_side_data_add(
109 &stream->codecpar->coded_side_data,
110 &stream->codecpar->nb_coded_side_data,
111 sideData.type,
112 sideData.data,
113 sideData.size,
114 0);
115 if (result) {
116 // If the result is not null, the ownership is taken by AVStream,
117 // otherwise the data must be deleted.
118 freeData.dismiss();
119 return result;
120 }
121#else
122 Q_UNUSED(stream);
123 // TODO: implement for older FFmpeg versions
124 qWarning() << "Adding stream side data is not supported for FFmpeg < 6.1";
125#endif
126
127 return nullptr;
128}
129
130const AVPacketSideData *streamSideData(const AVStream *stream, AVPacketSideDataType type)
131{
132 Q_ASSERT(stream);
133
134#if QT_FFMPEG_STREAM_SIDE_DATA_DEPRECATED
135 return av_packet_side_data_get(stream->codecpar->coded_side_data,
136 stream->codecpar->nb_coded_side_data, type);
137#else
138 const auto end = stream->side_data + stream->nb_side_data;
139 const auto found = std::find_if(stream->side_data, end, [&](const auto &item) {
140 return item.type == type;
141 });
142 return found == end ? nullptr : found;
143#endif
144}
145
146SwrContextUPtr createResampleContext(const AVAudioFormat &inputFormat,
147 const AVAudioFormat &outputFormat)
148{
149 SwrContext *resampler = nullptr;
150#if QT_FFMPEG_HAS_AV_CHANNEL_LAYOUT
151
152#if QT_FFMPEG_SWR_CONST_CH_LAYOUT
153 using AVChannelLayoutPrm = const AVChannelLayout*;
154#else
155 using AVChannelLayoutPrm = AVChannelLayout*;
156#endif
157
158 swr_alloc_set_opts2(&resampler,
159 const_cast<AVChannelLayoutPrm>(&outputFormat.channelLayout),
160 outputFormat.sampleFormat,
161 outputFormat.sampleRate,
162 const_cast<AVChannelLayoutPrm>(&inputFormat.channelLayout),
163 inputFormat.sampleFormat,
164 inputFormat.sampleRate,
165 0,
166 nullptr);
167
168#else
169
170 resampler = swr_alloc_set_opts(nullptr,
171 outputFormat.channelLayoutMask,
172 outputFormat.sampleFormat,
173 outputFormat.sampleRate,
174 inputFormat.channelLayoutMask,
175 inputFormat.sampleFormat,
176 inputFormat.sampleRate,
177 0,
178 nullptr);
179
180#endif
181
182 auto error = QFFmpeg::AVError{
183 swr_init(resampler),
184 };
185 if (error != QFFmpeg::AVError::Success) {
186 qCWarning(qLcFFmpegUtils) << "Failed to initialize audio resampler:" << error;
187 return nullptr;
188 }
189 return SwrContextUPtr(resampler);
190}
191
192QVideoFrameFormat::ColorTransfer fromAvColorTransfer(AVColorTransferCharacteristic colorTrc) {
193 switch (colorTrc) {
194 case AVCOL_TRC_BT709:
195 // The following three cases have transfer characteristics identical to BT709
196 case AVCOL_TRC_BT1361_ECG:
197 case AVCOL_TRC_BT2020_10:
198 case AVCOL_TRC_BT2020_12:
199 case AVCOL_TRC_SMPTE240M: // almost identical to bt709
200 return QVideoFrameFormat::ColorTransfer_BT709;
201 case AVCOL_TRC_GAMMA22:
202 case AVCOL_TRC_SMPTE428: // No idea, let's hope for the best...
203 case AVCOL_TRC_IEC61966_2_1: // sRGB, close enough to 2.2...
204 case AVCOL_TRC_IEC61966_2_4: // not quite, but probably close enough
205 return QVideoFrameFormat::ColorTransfer_Gamma22;
206 case AVCOL_TRC_GAMMA28:
207 return QVideoFrameFormat::ColorTransfer_Gamma28;
208 case AVCOL_TRC_SMPTE170M:
209 return QVideoFrameFormat::ColorTransfer_BT601;
210 case AVCOL_TRC_LINEAR:
211 return QVideoFrameFormat::ColorTransfer_Linear;
212 case AVCOL_TRC_SMPTE2084:
213 return QVideoFrameFormat::ColorTransfer_ST2084;
214 case AVCOL_TRC_ARIB_STD_B67:
215 return QVideoFrameFormat::ColorTransfer_STD_B67;
216 default:
217 break;
218 }
219 return QVideoFrameFormat::ColorTransfer_Unknown;
220}
221
222AVColorTransferCharacteristic toAvColorTransfer(QVideoFrameFormat::ColorTransfer colorTrc)
223{
224 switch (colorTrc) {
225 case QVideoFrameFormat::ColorTransfer_BT709:
226 return AVCOL_TRC_BT709;
227 case QVideoFrameFormat::ColorTransfer_BT601:
228 return AVCOL_TRC_BT709; // which one is the best?
229 case QVideoFrameFormat::ColorTransfer_Linear:
230 return AVCOL_TRC_SMPTE2084;
231 case QVideoFrameFormat::ColorTransfer_Gamma22:
232 return AVCOL_TRC_GAMMA22;
233 case QVideoFrameFormat::ColorTransfer_Gamma28:
234 return AVCOL_TRC_GAMMA28;
235 case QVideoFrameFormat::ColorTransfer_ST2084:
236 return AVCOL_TRC_SMPTE2084;
237 case QVideoFrameFormat::ColorTransfer_STD_B67:
238 return AVCOL_TRC_ARIB_STD_B67;
239 default:
240 return AVCOL_TRC_UNSPECIFIED;
241 }
242}
243
245{
246 switch (colorSpace) {
247 default:
248 case AVCOL_SPC_UNSPECIFIED:
249 case AVCOL_SPC_RESERVED:
250 case AVCOL_SPC_FCC:
251 case AVCOL_SPC_SMPTE240M:
252 case AVCOL_SPC_YCGCO:
253 case AVCOL_SPC_SMPTE2085:
254 case AVCOL_SPC_CHROMA_DERIVED_NCL:
255 case AVCOL_SPC_CHROMA_DERIVED_CL:
256 case AVCOL_SPC_ICTCP: // BT.2100 ICtCp
257 return QVideoFrameFormat::ColorSpace_Undefined;
258 case AVCOL_SPC_RGB:
259 return QVideoFrameFormat::ColorSpace_AdobeRgb;
260 case AVCOL_SPC_BT709:
261 return QVideoFrameFormat::ColorSpace_BT709;
262 case AVCOL_SPC_BT470BG: // BT601
263 case AVCOL_SPC_SMPTE170M: // Also BT601
264 return QVideoFrameFormat::ColorSpace_BT601;
265 case AVCOL_SPC_BT2020_NCL: // Non constant luminence
266 case AVCOL_SPC_BT2020_CL: // Constant luminence
267 return QVideoFrameFormat::ColorSpace_BT2020;
268 }
269}
270
271AVColorSpace toAvColorSpace(QVideoFrameFormat::ColorSpace colorSpace)
272{
273 switch (colorSpace) {
274 case QVideoFrameFormat::ColorSpace_BT601:
275 return AVCOL_SPC_BT470BG;
276 case QVideoFrameFormat::ColorSpace_BT709:
277 return AVCOL_SPC_BT709;
278 case QVideoFrameFormat::ColorSpace_AdobeRgb:
279 return AVCOL_SPC_RGB;
280 case QVideoFrameFormat::ColorSpace_BT2020:
281 return AVCOL_SPC_BT2020_CL;
282 default:
283 return AVCOL_SPC_UNSPECIFIED;
284 }
285}
286
288{
289 switch (colorRange) {
290 case AVCOL_RANGE_MPEG:
291 return QVideoFrameFormat::ColorRange_Video;
292 case AVCOL_RANGE_JPEG:
293 return QVideoFrameFormat::ColorRange_Full;
294 default:
295 return QVideoFrameFormat::ColorRange_Unknown;
296 }
297}
298
299AVColorRange toAvColorRange(QVideoFrameFormat::ColorRange colorRange)
300{
301 switch (colorRange) {
302 case QVideoFrameFormat::ColorRange_Video:
303 return AVCOL_RANGE_MPEG;
304 case QVideoFrameFormat::ColorRange_Full:
305 return AVCOL_RANGE_JPEG;
306 default:
307 return AVCOL_RANGE_UNSPECIFIED;
308 }
309}
310
312 if (!frame)
313 return {};
314 if (!frame->hw_frames_ctx)
315 return {};
316
317 const auto *frameCtx = reinterpret_cast<AVHWFramesContext *>(frame->hw_frames_ctx->data);
318 if (!frameCtx)
319 return {};
320
321 return frameCtx->device_ctx;
322}
323
324SwsContextUPtr createSwsContext(const QSize &srcSize, AVPixelFormat srcPixFmt, const QSize &dstSize,
325 AVPixelFormat dstPixFmt, SwsFlags conversionType)
326{
327
328 SwsContext *result =
329 sws_getContext(srcSize.width(), srcSize.height(), srcPixFmt, dstSize.width(),
330 dstSize.height(), dstPixFmt, conversionType, nullptr, nullptr, nullptr);
331
332 if (!result)
333 qCWarning(qLcFFmpegUtils) << "Cannot create sws context for:\n"
334 << "srcSize:" << srcSize
335 << "srcPixFmt:" << srcPixFmt
336 << "dstSize:" << dstSize
337 << "dstPixFmt:" << dstPixFmt
338 << "conversionType:" << conversionType;
339
340 return SwsContextUPtr(result);
341}
342
343#ifdef Q_OS_DARWIN
345{
347}
348
350{
351 auto formatDescIt = std::make_reverse_iterator(reinterpret_cast<const char *>(&cvFormat));
352 return std::string(formatDescIt - 4, formatDescIt);
353}
354
355#endif
356
357} // namespace QFFmpeg
358
359QDebug operator<<(QDebug dbg, const AVRational &value)
360{
361 dbg << value.num << "/" << value.den;
362 return dbg;
363}
364
365QDebug operator<<(QDebug dbg, const AVDictionary &dict)
366{
367 char *buffer = 0;
368 auto freeBuffer = QScopeGuard([&] {
369 av_free(buffer);
370 });
371
372 int status = av_dict_get_string(&dict, &buffer, '=', ',');
373 if (status < 0 || !buffer)
374 return dbg << "Failed to print AVDictionary";
375
376 dbg << buffer;
377 return dbg;
378}
379
380QDebug operator<<(QDebug dbg, const QFFmpeg::AVDictionaryHolder &dict)
381{
382 const AVDictionary *rawDict = dict.opts;
383 if (rawDict)
384 return dbg << *rawDict;
385 else
386 return dbg << "Empty AVDictionaryHolder";
387}
388
389QDebug operator<<(QDebug dbg, QFFmpeg::AVError error)
390{
391 if (error == QFFmpeg::AVError::Success) {
392 dbg << "Success";
393 return dbg;
394 }
395
396 char errBuf[AV_ERROR_MAX_STRING_SIZE];
397 dbg << av_make_error_string(errBuf, AV_ERROR_MAX_STRING_SIZE, qToUnderlying(error));
398 return dbg;
399}
400
401QDebug operator<<(QDebug dbg, AVPixelFormat fmt)
402{
403 const char *str = av_get_pix_fmt_name(fmt);
404 if (str)
405 dbg << str;
406 else
407 dbg << "<unknown pixel format>";
408 return dbg;
409}
410
411QDebug operator<<(QDebug dbg, AVHWDeviceType type)
412{
413 const char *str = av_hwdevice_get_type_name(type);
414 if (str)
415 dbg << str;
416 else
417 dbg << "<unknown hw device type>";
418 return dbg;
419}
420
421QDebug operator<<(QDebug dbg, AVMediaType type)
422{
423 const char *str = av_get_media_type_string(type);
424 if (str)
425 dbg << str;
426 else
427 dbg << "<unknown hw media type>";
428 return dbg;
429}
430
431QDebug operator<<(QDebug dbg, AVCodecID id)
432{
433 const char *str = avcodec_get_name(id);
434 if (str)
435 dbg << str;
436 else
437 dbg << "<unknown codec id>";
438 return dbg;
439}
440
441QDebug operator<<(QDebug dbg, const AVOutputFormat *fmt)
442{
443 if (fmt == nullptr) {
444 dbg << "<null>";
445 return dbg;
446 }
447
448 const char *str = fmt->name;
449 if (str)
450 dbg << str;
451 else
452 dbg << "<unknown output format>";
453 return dbg;
454}
455
456QDebug operator<<(QDebug dbg, const AVInputFormat *fmt)
457{
458 if (fmt == nullptr) {
459 dbg << "<null>";
460 return dbg;
461 }
462
463 const char *str = fmt->name;
464 if (str)
465 dbg << str;
466 else
467 dbg << "<unknown input format>";
468 return dbg;
469}
470
471#if QT_FFMPEG_HAS_AV_CHANNEL_LAYOUT
472QDebug operator<<(QDebug dbg, const AVChannelLayout &layout)
473{
474 dbg << '[';
475 dbg << "nb_channels:" << layout.nb_channels;
476 dbg << ", order:" << layout.order;
477
478 if (layout.order == AV_CHANNEL_ORDER_NATIVE || layout.order == AV_CHANNEL_ORDER_AMBISONIC)
479 dbg << ", mask:" << Qt::bin << layout.u.mask << Qt::dec;
480 else if (layout.order == AV_CHANNEL_ORDER_CUSTOM && layout.u.map)
481 dbg << ", id: " << layout.u.map->id;
482
483 dbg << ']';
484
485 return dbg;
486}
487#endif
488
489#if QT_FFMPEG_HAS_AVCODEC_GET_SUPPORTED_CONFIG
490QDebug operator<<(QDebug dbg, const AVCodecConfig value)
491{
492 switch (value) {
493 case AV_CODEC_CONFIG_CHANNEL_LAYOUT:
494 dbg << "AV_CODEC_CONFIG_CHANNEL_LAYOUT";
495 break;
496 case AV_CODEC_CONFIG_COLOR_RANGE:
497 dbg << "AV_CODEC_CONFIG_COLOR_RANGE";
498 break;
499 case AV_CODEC_CONFIG_COLOR_SPACE:
500 dbg << "AV_CODEC_CONFIG_COLOR_SPACE";
501 break;
502 case AV_CODEC_CONFIG_FRAME_RATE:
503 dbg << "AV_CODEC_CONFIG_FRAME_RATE";
504 break;
505 case AV_CODEC_CONFIG_PIX_FORMAT:
506 dbg << "AV_CODEC_CONFIG_PIX_FORMAT";
507 break;
508 case AV_CODEC_CONFIG_SAMPLE_FORMAT:
509 dbg << "AV_CODEC_CONFIG_SAMPLE_FORMAT";
510 break;
511 case AV_CODEC_CONFIG_SAMPLE_RATE:
512 dbg << "AV_CODEC_CONFIG_SAMPLE_RATE";
513 break;
514 default:
515 dbg << "<UNKNOWN_CODEC_CONFIG>";
516 break;
517 }
518
519 return dbg;
520}
521#endif
522
523namespace {
524
525struct FlagName {
526 int value;
527 const char *name;
528};
529
530QString flagsToString(int flags, const QSpan<const FlagName> &flagNames)
531{
532 QString result;
533 int leftover = flags;
534 for (const auto &flagAndName : flagNames)
535 if ((flags & flagAndName.value) != 0) {
536 leftover &= ~flagAndName.value;
537 if (!result.isEmpty())
538 result += u", ";
539 result += QLatin1StringView(flagAndName.name);
540 }
541
542 if (leftover) {
543 if (!result.isEmpty())
544 result += u", ";
545 result += QString::number(leftover, 16);
546 }
547 return result;
548}
549
550} // namespace
551
553{
554 static constexpr std::array<FlagName, 21> flagNames = {{
555 { AV_CODEC_CAP_DRAW_HORIZ_BAND, "DRAW_HORIZ_BAND" },
556 { AV_CODEC_CAP_DR1, "DR1" },
557 { AV_CODEC_CAP_DELAY, "DELAY" },
558 { AV_CODEC_CAP_SMALL_LAST_FRAME, "SMALL_LAST_FRAME" },
559#ifdef AV_CODEC_CAP_SUBFRAMES
560 { AV_CODEC_CAP_SUBFRAMES, "SUBFRAMES" },
561#endif
562 { AV_CODEC_CAP_EXPERIMENTAL, "EXPERIMENTAL" },
563 { AV_CODEC_CAP_CHANNEL_CONF, "CHANNEL_CONF" },
564 { AV_CODEC_CAP_FRAME_THREADS, "FRAME_THREADS" },
565 { AV_CODEC_CAP_SLICE_THREADS, "SLICE_THREADS" },
566 { AV_CODEC_CAP_PARAM_CHANGE, "PARAM_CHANGE" },
567 { AV_CODEC_CAP_OTHER_THREADS, "OTHER_THREADS" },
568 { AV_CODEC_CAP_VARIABLE_FRAME_SIZE, "VARIABLE_FRAME_SIZE" },
569 { AV_CODEC_CAP_AVOID_PROBING, "AVOID_PROBING" },
570 { AV_CODEC_CAP_HARDWARE, "HARDWARE" },
571 { AV_CODEC_CAP_HYBRID, "HYBRID" },
572 { AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, "ENCODER_REORDERED_OPAQUE" },
573 { AV_CODEC_CAP_ENCODER_FLUSH, "ENCODER_FLUSH" },
574 }};
575 return flagsToString(qToUnderlying(capabilities), QSpan(flagNames));
576}
577
579{
580 static constexpr std::array<FlagName, 9> flagNames = {{
581 { AV_PIX_FMT_FLAG_BE, "BE" },
582 { AV_PIX_FMT_FLAG_PAL, "PAL" },
583 { AV_PIX_FMT_FLAG_BITSTREAM, "BITSTREAM" },
584 { AV_PIX_FMT_FLAG_HWACCEL, "HWACCEL" },
585 { AV_PIX_FMT_FLAG_PLANAR, "PLANAR" },
586 { AV_PIX_FMT_FLAG_RGB, "RGB" },
587 { AV_PIX_FMT_FLAG_ALPHA, "ALPHA" },
588 { AV_PIX_FMT_FLAG_BAYER, "BAYER" },
589 { AV_PIX_FMT_FLAG_FLOAT, "FLOAT" },
590 }};
591 return flagsToString(qToUnderlying(flags), QSpan(flagNames));
592}
593
595{
596 static constexpr std::array<FlagName, 4> flagNames = {{
597 { AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX, "HW_DEVICE_CTX" },
598 { AV_CODEC_HW_CONFIG_METHOD_HW_FRAMES_CTX, "HW_FRAMES_CTX" },
599 { AV_CODEC_HW_CONFIG_METHOD_INTERNAL, "INTERNAL" },
600 { AV_CODEC_HW_CONFIG_METHOD_AD_HOC, "AD_HOC" }
601 }};
602 return flagsToString(qToUnderlying(methods), QSpan(flagNames));
603}
604
606{
607 return dbg << QFFmpeg::toString(caps);
608}
609
611{
612 return dbg << QFFmpeg::toString(flags);
613}
614
616{
617 return dbg << QFFmpeg::toString(methods);
618}
619
620QT_END_NAMESPACE
AVColorSpace toAvColorSpace(QVideoFrameFormat::ColorSpace colorSpace)
Definition qffmpeg.cpp:271
SwsContextUPtr createSwsContext(const QSize &srcSize, AVPixelFormat srcPixFmt, const QSize &dstSize, AVPixelFormat dstPixFmt, SwsFlags conversionType)
Definition qffmpeg.cpp:324
void applyExperimentalCodecOptions(const Codec &codec, AVDictionary **opts)
Definition qffmpeg.cpp:61
bool isHwPixelFormat(AVPixelFormat format)
Definition qffmpeg.cpp:55
AVPacketSideData * addStreamSideData(AVStream *stream, AVPacketSideData sideData)
Definition qffmpeg.cpp:104
AVHWDeviceContext * avFrameDeviceContext(const AVFrame *frame)
Definition qffmpeg.cpp:311
AVColorTransferCharacteristic toAvColorTransfer(QVideoFrameFormat::ColorTransfer colorTrc)
Definition qffmpeg.cpp:222
AVCodecCapabilities
Definition qffmpeg_p.h:315
QT_MANGLE_NAMESPACE(QMacScreenCaptureStreamDelegate) QMacScreenCaptureStreamDelegate
QString toString(AVPixelFormatFlags flags)
Definition qffmpeg.cpp:578
QVideoFrameFormat::ColorSpace fromAvColorSpace(AVColorSpace colorSpace)
Definition qffmpeg.cpp:244
QVideoFrameFormat::ColorTransfer fromAvColorTransfer(AVColorTransferCharacteristic colorTrc)
Definition qffmpeg.cpp:192
AVPixelFormatFlags
Definition qffmpeg_p.h:316
QVideoFrameFormat::ColorRange fromAvColorRange(AVColorRange colorRange)
Definition qffmpeg.cpp:287
SwrContextUPtr createResampleContext(const AVAudioFormat &inputFormat, const AVAudioFormat &outputFormat)
Definition qffmpeg.cpp:146
AVPixelFormat pixelFormatForHwDevice(AVHWDeviceType deviceType)
Definition qffmpeg.cpp:70
AVHwConfigMethods
Definition qffmpeg_p.h:317
QString toString(AVCodecCapabilities capabilities)
Definition qffmpeg.cpp:552
bool isAVFormatSupported(const Codec &codec, const PixelOrSampleFormat &format)
Definition qffmpeg.cpp:48
const AVPacketSideData * streamSideData(const AVStream *stream, AVPacketSideDataType type)
Definition qffmpeg.cpp:130
AVColorRange toAvColorRange(QVideoFrameFormat::ColorRange colorRange)
Definition qffmpeg.cpp:299
QString toString(AVHwConfigMethods methods)
Definition qffmpeg.cpp:594
QDebug operator<<(QDebug dbg, const NSObject *nsObject)
Definition qcore_mac.mm:209
QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2618
QDebug operator<<(QDebug dbg, const QFFmpeg::AVDictionaryHolder &dict)
Definition qffmpeg.cpp:380
QDebug operator<<(QDebug dbg, QFFmpeg::AVCodecCapabilities caps)
Definition qffmpeg.cpp:605
QDebug operator<<(QDebug dbg, QFFmpeg::AVPixelFormatFlags flags)
Definition qffmpeg.cpp:610
QDebug operator<<(QDebug dbg, QFFmpeg::AVHwConfigMethods methods)
Definition qffmpeg.cpp:615
QDebug operator<<(QDebug dbg, QFFmpeg::AVError error)
Definition qffmpeg.cpp:389
QDebug operator<<(QDebug dbg, const QFileInfo &fi)
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)