File: AVCodecFunctionsLoader.cpp

package info (click to toggle)
audacity 3.7.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 125,252 kB
  • sloc: cpp: 358,238; ansic: 75,458; lisp: 7,761; sh: 3,410; python: 1,503; xml: 1,385; perl: 854; makefile: 122
file content (54 lines) | stat: -rw-r--r-- 1,519 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/**********************************************************************

  Audacity: A Digital Audio Editor

  AVCodecFunctionsLoaders.cpp

  Dmitry Vedenko

**********************************************************************/

#include "AVCodecFunctionsLoader.h"

#include <wx/dynlib.h>

#include "AVCodecFunctions.h"
#include "impl/DynamicLibraryHelpers.h"


bool LoadAVCodecFunctions(
   const wxDynamicLibrary& lib, AVCodecFunctions& functions)
{
   RESOLVE(av_packet_ref);
   RESOLVE(av_packet_unref);
   RESOLVE(av_init_packet);
   RESOLVE(avcodec_find_encoder);
   RESOLVE(avcodec_find_encoder_by_name);
   RESOLVE(avcodec_find_decoder);
   RESOLVE(avcodec_get_name);
   RESOLVE(avcodec_open2);
   RESOLVE(avcodec_is_open);
   RESOLVE(avcodec_close);  
   RESOLVE(avcodec_alloc_context3);
   RESOLVE(av_codec_is_encoder);
   RESOLVE(avcodec_fill_audio_frame);

   GET_SYMBOL(av_packet_alloc);
   GET_SYMBOL(av_packet_free);
   GET_SYMBOL(avcodec_free_context);
   GET_SYMBOL(avcodec_parameters_to_context);
   GET_SYMBOL(avcodec_parameters_from_context);
   // Missing in FFmpeg 59
   GET_SYMBOL(avcodec_decode_audio4);
   GET_SYMBOL(avcodec_encode_audio2);
   GET_SYMBOL(avcodec_register_all);
   GET_SYMBOL(av_codec_next);
   GET_SYMBOL(av_codec_iterate);
   // New decoding API
   GET_SYMBOL(avcodec_send_packet);
   GET_SYMBOL(avcodec_receive_frame);
   GET_SYMBOL(avcodec_send_frame);
   GET_SYMBOL(avcodec_receive_packet);
   
   return GetAVVersion(lib, "avcodec_version", functions.AVCodecVersion);
}