#ifndef _VIDEO_DECODE_H_ #define _VIDEO_DECODE_H_ #include struct video_decode { int64_t duration; }; struct video_frame { uint8_t *data; int width, height, stride; int64_t dts; }; int video_decode_init(struct video_decode **vd, char *file, int64_t timestamp); void video_decode_uninit(struct video_decode **vd); int video_decode_seek(struct video_decode *_vd, int64_t timestamp); /* * Returns number of decoded frames: * 1 - One frame decoded * 0 - Zero frames decoded - EOF * < 0 - Zero frames decoded - Error */ int video_decode_get_frame(struct video_decode *vd, struct video_frame **frame); void video_decode_free_frame(struct video_frame **frame); #endif /* _VIDEO_DECODE_H_ */