/******************************************************************************
 *{@C
 * Copyright:   2018-2020 Paul Obermeier (obermeier@poSoft.de)
 *
 *              See the file "Mawt_License.txt" for information on
 *              usage and redistribution of this file, and for a
 *              DISCLAIMER OF ALL WARRANTIES.
 *
 * Description: Private declarations for video related functions.
 *              The structures and functions in this file are not
 *              wrapped by SWIG.
 *
 *****************************************************************************/

#ifndef __MAWTLIB_PRIVATE_H__
#define __MAWTLIB_PRIVATE_H__

typedef struct videoStruct {
    unsigned int videoPts;
    struct SwsContext *swsCtx;
    AVFormatContext *formatCtx;
    AVCodecContext *codecCtx, *audioCodecCtx;
    AVOutputFormat * outFmt;
    AVFrame *rgbFrame;
    AVFrame *yuvFrame;
    AVStream * stream;
    AVPacket packet;
    int videoStream;
    int audioStream;
    char name[1024];
    int numFrames;
    int started;
    int curFrame;
    int width, height;
    int outWidth, outHeight;
    unsigned int numTotalFrames;
    double frameRate;
    double timeBase;
    FILE *fp;
} VideoStruct;

#ifdef __cplusplus
   extern "C" {
#endif

Bool VideoNextFrame (VideoId videoId);
Bool VideoSeekFrame (VideoId videoId, unsigned int num);

#ifdef __cplusplus
   }
#endif

#endif /* __MAWTLIB_PRIVATE_H__ */
