Audacity 3.2.0
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
FFmpegAPIResolver Class Referencefinal

#include <FFmpegAPIResolver.h>

Collaboration diagram for FFmpegAPIResolver:
[legend]

Public Member Functions

bool GetAVCodecIDResolver (int avCodecVersion, AVCodecIDResolver &resolver) const
 
bool GetAVCodecFactories (int avCodecVersion, AVCodecFactories &factories) const
 
bool GetAVFormatFactories (int avFormatVersion, AVFormatFactories &factories) const
 
bool GetAVUtilFactories (int avUtilVersion, AVUtilFactories &factories) const
 
void AddAVCodecIDResolver (int avCodecVersion, const AVCodecIDResolver &resolver)
 
void AddAVCodecFactories (int avCodecVersion, const AVCodecFactories &factories)
 
void AddAVFormatFactories (int avFormatVersion, const AVFormatFactories &factories)
 
void AddAVUtilFactories (int avUtilVersion, const AVUtilFactories &factories)
 
std::vector< int > GetSuportedAVFormatVersions () const
 

Static Public Member Functions

static FFmpegAPIResolverGet ()
 

Private Member Functions

 FFmpegAPIResolver ()=default
 

Private Attributes

std::map< int, AVCodecIDResolvermAVCodecIDResolvers
 
std::map< int, AVCodecFactoriesmAVCodecFactories
 
std::map< int, AVFormatFactoriesmAVFormatFactories
 
std::map< int, AVUtilFactoriesmAVUtilFactories
 

Detailed Description

Definition at line 71 of file FFmpegAPIResolver.h.

Constructor & Destructor Documentation

◆ FFmpegAPIResolver()

FFmpegAPIResolver::FFmpegAPIResolver ( )
privatedefault

Member Function Documentation

◆ AddAVCodecFactories()

void FFmpegAPIResolver::AddAVCodecFactories ( int  avCodecVersion,
const AVCodecFactories factories 
)

Definition at line 72 of file FFmpegAPIResolver.cpp.

73{
74 mAVCodecFactories.emplace(avCodecVersion, factories);
75}
std::map< int, AVCodecFactories > mAVCodecFactories

References mAVCodecFactories.

◆ AddAVCodecIDResolver()

void FFmpegAPIResolver::AddAVCodecIDResolver ( int  avCodecVersion,
const AVCodecIDResolver resolver 
)

Definition at line 67 of file FFmpegAPIResolver.cpp.

68{
69 mAVCodecIDResolvers.emplace(avCodecVersion, resolver);
70}
std::map< int, AVCodecIDResolver > mAVCodecIDResolvers

References mAVCodecIDResolvers.

◆ AddAVFormatFactories()

void FFmpegAPIResolver::AddAVFormatFactories ( int  avFormatVersion,
const AVFormatFactories factories 
)

Definition at line 77 of file FFmpegAPIResolver.cpp.

78{
79 mAVFormatFactories.emplace(avFormatVersion, factories);
80}
std::map< int, AVFormatFactories > mAVFormatFactories

References mAVFormatFactories.

◆ AddAVUtilFactories()

void FFmpegAPIResolver::AddAVUtilFactories ( int  avUtilVersion,
const AVUtilFactories factories 
)

Definition at line 82 of file FFmpegAPIResolver.cpp.

83{
84 mAVUtilFactories.emplace(avUtilVersion, factories);
85}
std::map< int, AVUtilFactories > mAVUtilFactories

References mAVUtilFactories.

◆ Get()

FFmpegAPIResolver & FFmpegAPIResolver::Get ( )
static

Definition at line 13 of file FFmpegAPIResolver.cpp.

14{
15 static FFmpegAPIResolver instance;
16 return instance;
17}

Referenced by FFmpegFunctions::Load(), and FFmpegFunctions::Private::Load().

Here is the caller graph for this function:

◆ GetAVCodecFactories()

bool FFmpegAPIResolver::GetAVCodecFactories ( int  avCodecVersion,
AVCodecFactories factories 
) const

Definition at line 31 of file FFmpegAPIResolver.cpp.

32{
33 const auto it = mAVCodecFactories.find(avCodecVersion);
34
35 if (it == mAVCodecFactories.end())
36 return false;
37
38 factories = it->second;
39
40 return true;
41}

References mAVCodecFactories.

◆ GetAVCodecIDResolver()

bool FFmpegAPIResolver::GetAVCodecIDResolver ( int  avCodecVersion,
AVCodecIDResolver resolver 
) const

Definition at line 19 of file FFmpegAPIResolver.cpp.

20{
21 const auto it = mAVCodecIDResolvers.find(avCodecVersion);
22
23 if (it == mAVCodecIDResolvers.end())
24 return false;
25
26 resolver = it->second;
27
28 return true;
29}

References mAVCodecIDResolvers.

◆ GetAVFormatFactories()

bool FFmpegAPIResolver::GetAVFormatFactories ( int  avFormatVersion,
AVFormatFactories factories 
) const

Definition at line 43 of file FFmpegAPIResolver.cpp.

44{
45 const auto it = mAVFormatFactories.find(avFormatVersion);
46
47 if (it == mAVFormatFactories.end())
48 return false;
49
50 factories = it->second;
51
52 return true;
53}

References mAVFormatFactories.

◆ GetAVUtilFactories()

bool FFmpegAPIResolver::GetAVUtilFactories ( int  avUtilVersion,
AVUtilFactories factories 
) const

Definition at line 55 of file FFmpegAPIResolver.cpp.

56{
57 const auto it = mAVUtilFactories.find(avUtilVersion);
58
59 if (it == mAVUtilFactories.end())
60 return false;
61
62 factories = it->second;
63
64 return true;
65}

References mAVUtilFactories.

◆ GetSuportedAVFormatVersions()

std::vector< int > FFmpegAPIResolver::GetSuportedAVFormatVersions ( ) const

Compatible library versions to be sought at load time, ordered by decreasing preference (that is, newest version first)

Definition at line 87 of file FFmpegAPIResolver.cpp.

88{
89 std::vector<int> result;
90 result.reserve(mAVFormatFactories.size());
91
92 for (auto it = mAVFormatFactories.rbegin(), end = mAVFormatFactories.rend();
93 it != end; ++it)
94 {
95 result.emplace_back(it->first);
96 }
97
98 return result;
99}
const char * end(const char *str) noexcept
Definition: StringUtils.h:106

References details::end(), and mAVFormatFactories.

Referenced by FFmpegFunctions::Load().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mAVCodecFactories

std::map<int, AVCodecFactories> FFmpegAPIResolver::mAVCodecFactories
private

Definition at line 94 of file FFmpegAPIResolver.h.

Referenced by AddAVCodecFactories(), and GetAVCodecFactories().

◆ mAVCodecIDResolvers

std::map<int, AVCodecIDResolver> FFmpegAPIResolver::mAVCodecIDResolvers
private

Definition at line 93 of file FFmpegAPIResolver.h.

Referenced by AddAVCodecIDResolver(), and GetAVCodecIDResolver().

◆ mAVFormatFactories

std::map<int, AVFormatFactories> FFmpegAPIResolver::mAVFormatFactories
private

◆ mAVUtilFactories

std::map<int, AVUtilFactories> FFmpegAPIResolver::mAVUtilFactories
private

Definition at line 96 of file FFmpegAPIResolver.h.

Referenced by AddAVUtilFactories(), and GetAVUtilFactories().


The documentation for this class was generated from the following files: