Audacity 3.2.0
AVCodecWrapper.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 AVCodecWrapper.h
6
7 Dmitry Vedenko
8
9**********************************************************************/
10
11#pragma once
12
13#include <cstdint>
14#include "FFmpegTypes.h"
15
16struct FFmpegFunctions;
17typedef struct AVCodec AVCodec;
18typedef struct AVRational AVRational;
19
20class FFMPEG_SUPPORT_API AVCodecWrapper
21{
22public:
25
28
29 explicit AVCodecWrapper(const AVCodec* wrapped) noexcept;
30
31 const AVCodec* GetWrappedValue() const noexcept;
32
33 virtual ~AVCodecWrapper() = default;
34
35 virtual const char* GetName() const noexcept = 0;
36 virtual const char* GetLongName() const noexcept = 0;
37 virtual AVMediaTypeFwd GetType() const noexcept = 0;
38 virtual AVCodecIDFwd GetId() const noexcept = 0;
39 virtual int GetCapabilities() const noexcept = 0;
40 virtual const AVRational* GetSupportedFramerates() const noexcept = 0;
41 virtual const AVMediaTypeFwd* GetPixFmts() const noexcept = 0;
42 virtual const int* GetSupportedSamplerates() const noexcept = 0;
43 virtual const AVSampleFormatFwd* GetSampleFmts() const noexcept = 0;
44 virtual uint8_t GetMaxLowres() const noexcept = 0;
45
46 virtual bool IsAudio() const noexcept = 0;
47
48protected:
49 const AVCodec* mAVCodec { nullptr };
50};
int AVCodecIDFwd
Definition: AVCodecID.h:407
int AVMediaTypeFwd
Definition: FFmpegTypes.h:130
int AVSampleFormatFwd
Definition: FFmpegTypes.h:132
AVCodecWrapper & operator=(AVCodecWrapper &)=delete
AVCodecWrapper(AVCodecWrapper &&)=delete
AVCodecWrapper & operator=(AVCodecWrapper &&)=delete
AVCodecWrapper(const AVCodecWrapper &)=delete