MCPcopy Create free account
hub / github.com/IENT/YUView / AVCodecWrapper

Class AVCodecWrapper

YUViewLib/src/ffmpeg/AVCodecWrapper.h:42–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40{
41
42class AVCodecWrapper
43{
44public:
45 AVCodecWrapper() {}
46 AVCodecWrapper(AVCodec *codec, LibraryVersion libVer) : codec(codec), libVer(libVer) {}
47 explicit operator bool() const { return this->codec != nullptr; }
48 AVCodec * getAVCodec() { return this->codec; }
49 AVCodecID getCodecID()
50 {
51 update();
52 return this->id;
53 }
54 QString getName()
55 {
56 update();
57 return this->name;
58 }
59 QString getLongName()
60 {
61 update();
62 return this->long_name;
63 }
64
65private:
66 void update();
67
68 QString name{};
69 QString long_name{};
70 AVMediaType type;
71 AVCodecID id{AV_CODEC_ID_NONE};
72 int capabilities{0};
73 std::vector<AVRational> supported_framerates;
74 std::vector<AVPixelFormat> pix_fmts;
75 std::vector<int> supported_samplerates;
76 std::vector<AVSampleFormat> sample_fmts;
77 std::vector<uint64_t> channel_layouts;
78 uint8_t max_lowres{0};
79
80 AVCodec * codec{nullptr};
81 LibraryVersion libVer;
82};
83
84} // namespace FFmpeg

Callers 1

findDecoderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected