diff options
author | Alexis Ballier <aballier@gentoo.org> | 2013-08-02 09:39:04 -0400 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2013-08-06 10:18:36 -0400 |
commit | b54ee93865e463cf995d90d878ad7ed4c1e747ce (patch) | |
tree | 1e87018645438e976d0e0fa2e9c53d8af03c1420 /lib | |
parent | 9441222993e58e1ba71fb12faac31fbfe78bdd3f (diff) |
DllAvFormat: map av_stream_get_r_frame_rate when available.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/DllAvFormat.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/DllAvFormat.h b/lib/DllAvFormat.h index ee41fa8ff4..fbdd7dd867 100644 --- a/lib/DllAvFormat.h +++ b/lib/DllAvFormat.h @@ -54,6 +54,10 @@ extern "C" { #define AVSEEK_FORCE 0x20000 #endif +#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(55,12,100) +#define AVFORMAT_HAS_STREAM_GET_R_FRAME_RATE +#endif + typedef int64_t offset_t; class DllAvFormatInterface @@ -100,6 +104,9 @@ public: virtual int avformat_write_header (AVFormatContext *s, AVDictionary **options)=0; virtual int av_write_trailer(AVFormatContext *s)=0; virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt)=0; +#if defined(AVFORMAT_HAS_STREAM_GET_R_FRAME_RATE) + virtual AVRational av_stream_get_r_frame_rate(const AVStream *s)=0; +#endif }; #if (defined USE_EXTERNAL_FFMPEG) || (defined TARGET_DARWIN) @@ -157,6 +164,9 @@ public: virtual int avformat_write_header (AVFormatContext *s, AVDictionary **options) { return ::avformat_write_header (s, options); } virtual int av_write_trailer(AVFormatContext *s) { return ::av_write_trailer(s); } virtual int av_write_frame (AVFormatContext *s, AVPacket *pkt) { return ::av_write_frame(s, pkt); } +#if defined(AVFORMAT_HAS_STREAM_GET_R_FRAME_RATE) + virtual AVRational av_stream_get_r_frame_rate(const AVStream *s) { return ::av_stream_get_r_frame_rate(s); } +#endif // DLL faking. virtual bool ResolveExports() { return true; } @@ -225,6 +235,9 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface DEFINE_METHOD2(int, avformat_write_header , (AVFormatContext *p1, AVDictionary **p2)) DEFINE_METHOD1(int, av_write_trailer, (AVFormatContext *p1)) DEFINE_METHOD2(int, av_write_frame , (AVFormatContext *p1, AVPacket *p2)) +#if defined(AVFORMAT_HAS_STREAM_GET_R_FRAME_RATE) + DEFINE_METHOD1(AVRational, av_stream_get_r_frame_rate, (const AVStream *p1)) +#endif BEGIN_METHOD_RESOLVE() RESOLVE_METHOD_RENAME(av_register_all, av_register_all_dont_call) RESOLVE_METHOD_RENAME(avformat_network_init, avformat_network_init_dont_call) @@ -261,6 +274,9 @@ class DllAvFormat : public DllDynamic, DllAvFormatInterface RESOLVE_METHOD(avformat_write_header) RESOLVE_METHOD(av_write_trailer) RESOLVE_METHOD(av_write_frame) +#if defined(AVFORMAT_HAS_STREAM_GET_R_FRAME_RATE) + RESOLVE_METHOD(av_stream_get_r_frame_rate) +#endif END_METHOD_RESOLVE() /* dependencies of libavformat */ |