File: FFmpegHeaders.h

package info (click to toggle)
freespace2 24.2.0%2Brepack-1
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 43,716 kB
  • sloc: cpp: 595,001; ansic: 21,741; python: 1,174; sh: 457; makefile: 248; xml: 181
file content (44 lines) | stat: -rw-r--r-- 1,079 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
#pragma once

// Disable a few warnings that happen in the ffmpeg headers
// TODO: Also do this for other compilers
#pragma warning(push)
#pragma warning(disable: 4244) // conversion from 'int' to '*'

extern "C" {
#include <libavcodec/avcodec.h>
#include <libavcodec/version.h>
#include <libavformat/avformat.h>
#include <libswscale/swscale.h>

#ifdef WITH_LIBAV
#include <libavresample/avresample.h>
#else
#include <libswresample/swresample.h>
#endif

#include <libavutil/imgutils.h>
#include <libavutil/error.h>
#include <libavutil/opt.h>
}

#ifdef WITH_LIBAV
	#include "LibAVCompatibility.h"
#endif

#pragma warning(pop)

/**
 * Extract version components from the full ::AV_VERSION_INT int as returned
 * by functions like ::avformat_version() and ::avcodec_version()
 * Brought in from a newer FFMpeg for compat with older library versions
 */
#ifndef AV_VERSION_MAJOR
#define AV_VERSION_MAJOR(a) ((a) >> 16)
#endif
#ifndef AV_VERSION_MINOR
#define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8)
#endif
#ifndef AV_VERSION_MICRO
#define AV_VERSION_MICRO(a) ((a) & 0xFF)
#endif