diff options
author | Sven Gothel <[email protected]> | 2013-08-26 13:38:40 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-08-26 13:38:40 +0200 |
commit | b5876b598ecf3eb32ceb183ecbd5d29b8885a304 (patch) | |
tree | 9b63eb4a58e12e1df27e1406e0c041218b7fe2c5 /make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h | |
parent | ee64b0b3e47cc5d52fb3679c582d3ad0134adb9e (diff) |
libav/ffmpeg: Compile/Link 2 versions of native FFMPEGMediaPlayer methods FFMPEGNatives -> FFMPEGv08Natives + FFMPEGv09Natives
Enables FFMPEGMediaPlayer to work w/ either ffmpeg/libav version 8 or 9 w/ same JOGL binary
Same C source code is compiled against
1: version 0.8 FFMPEGv08Natives lavc53.lavf53.lavu51
2: version 0.9 FFMPEGv09Natives lavc54.lavf54.lavu52.lavr01
FFMPEGv08Natives and FFMPEGv09Natives implements FFMPEGNatives,
native C code uses CPP '##' macro concatenation to produce unique function names.
To enable 'cpp' to find the libav* header files matching the desired version,
we have placed them in the c-file's folder, issued '#include "path/file.h"
and added symbolic links to allow finding same module and 'sister modules':
ls -l libavformat/
..
lrwxrwxrwx 1 sven sven 13 Aug 26 12:56 libavcodec -> ../libavcodec
lrwxrwxrwx 1 sven sven 14 Aug 26 12:56 libavformat -> ../libavformat
lrwxrwxrwx 1 sven sven 12 Aug 26 12:57 libavutil -> ../libavutil
..
At static init FFMPEGDynamicLibraryBundleInfo, determines the runtime version
and instantiates the matching FFMPEGNatives, or null if non matches.
FFMPEGMediaPlayer still compares the compile-time and runtime versions.
FFMPEGMediaPlayer passes it's own instance to FFMPEGNatives for callbacks.
Diffstat (limited to 'make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h')
-rw-r--r-- | make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h b/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h deleted file mode 100644 index 043dd0faf..000000000 --- a/make/stub_includes/libav/lavc54.lavf54.lavu52.lavr01/libavutil/mathematics.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * copyright (c) 2005 Michael Niedermayer <[email protected]> - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVUTIL_MATHEMATICS_H -#define AVUTIL_MATHEMATICS_H - -#include <stdint.h> -#include <math.h> -#include "attributes.h" -#include "rational.h" -#include "intfloat.h" - -#ifndef M_LOG2_10 -#define M_LOG2_10 3.32192809488736234787 /* log_2 10 */ -#endif -#ifndef M_PHI -#define M_PHI 1.61803398874989484820 /* phi / golden ratio */ -#endif -#ifndef NAN -#define NAN av_int2float(0x7fc00000) -#endif -#ifndef INFINITY -#define INFINITY av_int2float(0x7f800000) -#endif - -/** - * @addtogroup lavu_math - * @{ - */ - - -enum AVRounding { - AV_ROUND_ZERO = 0, ///< Round toward zero. - AV_ROUND_INF = 1, ///< Round away from zero. - AV_ROUND_DOWN = 2, ///< Round toward -infinity. - AV_ROUND_UP = 3, ///< Round toward +infinity. - AV_ROUND_NEAR_INF = 5, ///< Round to nearest and halfway cases away from zero. -}; - -/** - * Return the greatest common divisor of a and b. - * If both a and b are 0 or either or both are <0 then behavior is - * undefined. - */ -int64_t av_const av_gcd(int64_t a, int64_t b); - -/** - * Rescale a 64-bit integer with rounding to nearest. - * A simple a*b/c isn't possible as it can overflow. - */ -int64_t av_rescale(int64_t a, int64_t b, int64_t c) av_const; - -/** - * Rescale a 64-bit integer with specified rounding. - * A simple a*b/c isn't possible as it can overflow. - */ -int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) av_const; - -/** - * Rescale a 64-bit integer by 2 rational numbers. - */ -int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) av_const; - -/** - * Rescale a 64-bit integer by 2 rational numbers with specified rounding. - */ -int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq, - enum AVRounding) av_const; - -/** - * Compare 2 timestamps each in its own timebases. - * The result of the function is undefined if one of the timestamps - * is outside the int64_t range when represented in the others timebase. - * @return -1 if ts_a is before ts_b, 1 if ts_a is after ts_b or 0 if they represent the same position - */ -int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b); - -/** - * Compare 2 integers modulo mod. - * That is we compare integers a and b for which only the least - * significant log2(mod) bits are known. - * - * @param mod must be a power of 2 - * @return a negative value if a is smaller than b - * a positive value if a is greater than b - * 0 if a equals b - */ -int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod); - -/** - * @} - */ - -#endif /* AVUTIL_MATHEMATICS_H */ |