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(AVCodec* wrapped) noexcept;
30
31 AVCodec* GetWrappedValue() noexcept;
32 const AVCodec* GetWrappedValue() const noexcept;
33
34 virtual ~AVCodecWrapper() = default;
35
36 virtual const char* GetName() const noexcept = 0;
37 virtual const char* GetLongName() const noexcept = 0;
38 virtual AVMediaTypeFwd GetType() const noexcept = 0;
39 virtual AVCodecIDFwd GetId() const noexcept = 0;
40 virtual int GetCapabilities() const noexcept = 0;
41 virtual const AVRational* GetSupportedFramerates() const noexcept = 0;
42 virtual const AVMediaTypeFwd* GetPixFmts() const noexcept = 0;
43 virtual const int* GetSupportedSamplerates() const noexcept = 0;
44 virtual const AVSampleFormatFwd* GetSampleFmts() const noexcept = 0;
45 virtual const uint64_t* GetChannelLayouts() const noexcept = 0;
46 virtual uint8_t GetMaxLowres() const noexcept = 0;
47
48 virtual bool IsAudio() const noexcept = 0;
49
50protected:
51 AVCodec* mAVCodec { nullptr };
52};
int AVCodecIDFwd
Definition: AVCodecID.h:407
int AVMediaTypeFwd
Definition: FFmpegTypes.h:125
int AVSampleFormatFwd
Definition: FFmpegTypes.h:127
AVCodecWrapper & operator=(AVCodecWrapper &)=delete
AVCodecWrapper(AVCodecWrapper &&)=delete
AVCodecWrapper & operator=(AVCodecWrapper &&)=delete
AVCodecWrapper(const AVCodecWrapper &)=delete