sframe

Simple Frame — extract unique frames from videos
git clone git clone https://git.krisyotam.com/krisyotam/sframe.git
Log | Files | Refs | README | LICENSE

decode.h (602B)


      1 /* See LICENSE file for copyright and license details. */
      2 
      3 #ifndef DECODE_H
      4 #define DECODE_H
      5 
      6 #include <libavformat/avformat.h>
      7 #include <libavcodec/avcodec.h>
      8 #include <libavutil/avutil.h>
      9 #include <libswscale/swscale.h>
     10 
     11 typedef struct {
     12 	AVFormatContext *fmt_ctx;
     13 	AVCodecContext *codec_ctx;
     14 	struct SwsContext *sws_gray;
     15 	struct SwsContext *sws_rgb;
     16 	int stream_idx;
     17 	int width;
     18 	int height;
     19 } Decoder;
     20 
     21 int dec_open(Decoder *d, const char *path);
     22 int dec_read_frame(Decoder *d, AVFrame *frame);
     23 double dec_frame_time(Decoder *d, AVFrame *frame);
     24 void dec_close(Decoder *d);
     25 
     26 #endif /* DECODE_H */