AvTranscoder  0.9.4
C++APIforLibav/FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
common.hpp
Go to the documentation of this file.
1 #ifndef _AV_TRANSCODER_COMMON_HPP_
2 #define _AV_TRANSCODER_COMMON_HPP_
3 
4 #define AVTRANSCODER_VERSION_MAJOR 0
5 #define AVTRANSCODER_VERSION_MINOR 9
6 #define AVTRANSCODER_VERSION_MICRO 4
7 
9 
10 extern "C" {
11 #ifndef __STDC_CONSTANT_MACROS
12 #define __STDC_CONSTANT_MACROS
13 #endif
14 #ifndef INT64_C
15 #define INT64_C(c) (c##LL)
16 #define UINT64_C(c) (c##ULL)
17 #endif
18 #include <libavcodec/version.h>
19 #include <libavutil/rational.h>
20 }
21 
22 #include <string>
23 
24 #ifdef SWIG
25 #define AvExport
26 #else
27 #if defined(__WINDOWS__)
28 #define AvExport __declspec(dllexport)
29 #elif defined(__GNUC__) // Add compiler definition here...
30 #if __GNUC__ - 0 > 3 || (__GNUC__ - 0 == 3 && __GNUC_MINOR__ - 0 > 2)
31 #define AvExport __attribute__((visibility("default")))
32 #else
33 #define AvExport
34 #warning "AvExport not set because of a too old gcc version. The plug-in may not compile with the option -fvisible=hidden."
35 #endif
36 #else
37 #error "AvExport not defined for this compiler..."
38 #endif
39 #endif
40 
41 #ifndef SWIG
42 #if LIBAVCODEC_VERSION_MAJOR < 54
43 #define AVPixelFormat PixelFormat
44 #define AV_PIX_FMT_NONE PIX_FMT_NONE
45 #define AVCodecID CodecID
46 #define AV_CODEC_ID_NONE CODEC_ID_NONE
47 #endif
48 #endif
49 
50 #include <AvTranscoder/log.hpp>
51 
52 namespace avtranscoder
53 {
54 
55 typedef AVRational Rational;
56 
57 /// Register all the codecs and formats which are enabled at configuration time.
58 void AvExport preloadCodecsAndFormats();
59 
60 /// Get the string description corresponding to the error code provided by ffmpeg/libav
61 std::string AvExport getDescriptionFromErrorCode(const int code);
62 }
63 
64 #endif
std::string getDescriptionFromErrorCode(const int code)
Get the string description corresponding to the error code provided by ffmpeg/libav.
Definition: common.cpp:22
void preloadCodecsAndFormats()
Register all the codecs and formats which are enabled at configuration time.
Definition: common.cpp:16
AVRational Rational
Definition: common.hpp:55
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy