Audacity 3.2.0
Typedefs | Functions
DynamicLibraryHelpers.cpp File Reference
#include "DynamicLibraryHelpers.h"
#include <wx/dynlib.h>
#include "FFmpegTypes.h"
Include dependency graph for DynamicLibraryHelpers.cpp:

Go to the source code of this file.

Typedefs

using GetVersionFn = unsigned(*)()
 

Functions

bool GetAVVersion (const wxDynamicLibrary &lib, const char *name, FFMPegVersion &version)
 

Typedef Documentation

◆ GetVersionFn

using GetVersionFn = unsigned (*)()

Definition at line 17 of file DynamicLibraryHelpers.cpp.

Function Documentation

◆ GetAVVersion()

bool GetAVVersion ( const wxDynamicLibrary &  lib,
const char *  name,
FFMPegVersion version 
)

Definition at line 19 of file DynamicLibraryHelpers.cpp.

21{
22 GetVersionFn versionFn = reinterpret_cast<GetVersionFn>(lib.GetSymbol(name));
23
24 if (nullptr == versionFn)
25 return false;
26
27 const unsigned fullVersion = versionFn();
28
29 version.Major = (fullVersion >> 16) & 0xFF;
30 version.Minor = (fullVersion >> 8) & 0xFF;
31 version.Micro = fullVersion & 0xFF;
32
33 return true;
34}
unsigned(*)() GetVersionFn
wxString name
Definition: TagsEditor.cpp:166
unsigned Major
Definition: FFmpegTypes.h:169
unsigned Micro
Definition: FFmpegTypes.h:171
unsigned Minor
Definition: FFmpegTypes.h:170

References FFMPegVersion::Major, FFMPegVersion::Micro, FFMPegVersion::Minor, and name.

Referenced by LoadAVCodecFunctions(), LoadAVFormatFunctions(), and LoadAVUtilFunctions().

Here is the caller graph for this function: