//int register_protocol(URLProtocol *protocol); #ifdef DISABLE_FFMPEG #define PKT_FLAG_KEY 0 #define AV_TIME_BASE 0 typedef unsigned char uint8_t; struct AVPacket { double pts; int flags; }; struct AVPicture { uint8_t *data[1]; }; struct AVFormatContext { }; #else extern "C" { #ifndef _WINDOWS #include #else #include "video_ffmpeg.h" #endif } #endif void video_uninit(); gboolean video_init(); struct video_ffmpeg *video_open(char *filename); int video_get_frame(struct video_ffmpeg *video, AVPacket *pkt); void video_close(struct video_ffmpeg *video); int64_t video_get_duration(struct video_ffmpeg *video); gboolean video_seek(struct video_ffmpeg *video, long time); int video_get_picture(struct video_ffmpeg *video, AVPicture *pict); int video_get_width(struct video_ffmpeg *video); int video_get_height(struct video_ffmpeg *video); double video_get_fps(struct video_ffmpeg *video); struct video { void *blah; }; struct video_ffmpeg { AVFormatContext *ic; int video_index; AVPacket *last_pkt; char *filename; };