author | unc0rr |
Mon, 04 May 2015 17:48:57 +0300 | |
branch | qmlfrontend |
changeset 10908 | 1bd7a3a28b18 |
parent 7813 | 7ac83d79b897 |
permissions | -rw-r--r-- |
7813
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
1 |
/* |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
2 |
* copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
3 |
* |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
4 |
* This file is part of Libav. |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
5 |
* |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
6 |
* Libav is free software; you can redistribute it and/or |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
7 |
* modify it under the terms of the GNU Lesser General Public |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
8 |
* License as published by the Free Software Foundation; either |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
9 |
* version 2.1 of the License, or (at your option) any later version. |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
10 |
* |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
11 |
* Libav is distributed in the hope that it will be useful, |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
14 |
* Lesser General Public License for more details. |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
15 |
* |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
16 |
* You should have received a copy of the GNU Lesser General Public |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
17 |
* License along with Libav; if not, write to the Free Software |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
19 |
*/ |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
20 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
21 |
/** |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
22 |
* @file |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
23 |
* Macro definitions for various function/variable attributes |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
24 |
*/ |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
25 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
26 |
#ifndef AVUTIL_ATTRIBUTES_H |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
27 |
#define AVUTIL_ATTRIBUTES_H |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
28 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
29 |
#ifdef __GNUC__ |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
30 |
# define AV_GCC_VERSION_AT_LEAST(x,y) (__GNUC__ > x || __GNUC__ == x && __GNUC_MINOR__ >= y) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
31 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
32 |
# define AV_GCC_VERSION_AT_LEAST(x,y) 0 |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
33 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
34 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
35 |
#if AV_GCC_VERSION_AT_LEAST(3,1) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
36 |
# define av_always_inline __attribute__((always_inline)) inline |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
37 |
#elif defined(_MSC_VER) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
38 |
# define av_always_inline __forceinline |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
39 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
40 |
# define av_always_inline inline |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
41 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
42 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
43 |
#if AV_GCC_VERSION_AT_LEAST(3,1) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
44 |
# define av_noinline __attribute__((noinline)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
45 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
46 |
# define av_noinline |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
47 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
48 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
49 |
#if AV_GCC_VERSION_AT_LEAST(3,1) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
50 |
# define av_pure __attribute__((pure)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
51 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
52 |
# define av_pure |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
53 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
54 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
55 |
#if AV_GCC_VERSION_AT_LEAST(2,6) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
56 |
# define av_const __attribute__((const)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
57 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
58 |
# define av_const |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
59 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
60 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
61 |
#if AV_GCC_VERSION_AT_LEAST(4,3) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
62 |
# define av_cold __attribute__((cold)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
63 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
64 |
# define av_cold |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
65 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
66 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
67 |
#if AV_GCC_VERSION_AT_LEAST(4,1) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
68 |
# define av_flatten __attribute__((flatten)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
69 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
70 |
# define av_flatten |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
71 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
72 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
73 |
#if AV_GCC_VERSION_AT_LEAST(3,1) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
74 |
# define attribute_deprecated __attribute__((deprecated)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
75 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
76 |
# define attribute_deprecated |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
77 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
78 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
79 |
#if defined(__GNUC__) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
80 |
# define av_unused __attribute__((unused)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
81 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
82 |
# define av_unused |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
83 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
84 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
85 |
/** |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
86 |
* Mark a variable as used and prevent the compiler from optimizing it |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
87 |
* away. This is useful for variables accessed only from inline |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
88 |
* assembler without the compiler being aware. |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
89 |
*/ |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
90 |
#if AV_GCC_VERSION_AT_LEAST(3,1) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
91 |
# define av_used __attribute__((used)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
92 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
93 |
# define av_used |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
94 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
95 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
96 |
#if AV_GCC_VERSION_AT_LEAST(3,3) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
97 |
# define av_alias __attribute__((may_alias)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
98 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
99 |
# define av_alias |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
100 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
101 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
102 |
#if defined(__GNUC__) && !defined(__ICC) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
103 |
# define av_uninit(x) x=x |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
104 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
105 |
# define av_uninit(x) x |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
106 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
107 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
108 |
#ifdef __GNUC__ |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
109 |
# define av_builtin_constant_p __builtin_constant_p |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
110 |
# define av_printf_format(fmtpos, attrpos) __attribute__((__format__(__printf__, fmtpos, attrpos))) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
111 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
112 |
# define av_builtin_constant_p(x) 0 |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
113 |
# define av_printf_format(fmtpos, attrpos) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
114 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
115 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
116 |
#if AV_GCC_VERSION_AT_LEAST(2,5) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
117 |
# define av_noreturn __attribute__((noreturn)) |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
118 |
#else |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
119 |
# define av_noreturn |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
120 |
#endif |
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
121 |
|
7ac83d79b897
support video recording on windows with automation and headers
koda
parents:
diff
changeset
|
122 |
#endif /* AVUTIL_ATTRIBUTES_H */ |