From b26f27d9e3fd44ec5775accdc3666a339684be4c Mon Sep 17 00:00:00 2001 From: Fox Caminiti Date: Mon, 1 Aug 2022 20:03:12 -0400 Subject: large changes to bitmap structure --- ffmpeg_backend.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ffmpeg_backend.h (limited to 'ffmpeg_backend.h') diff --git a/ffmpeg_backend.h b/ffmpeg_backend.h new file mode 100644 index 0000000..d6a6a66 --- /dev/null +++ b/ffmpeg_backend.h @@ -0,0 +1,22 @@ +struct av_codec_info { + real32 AvgPTSPerFrame; + + AVFormatContext *FileFormatContext; + AVCodecParameters *VideoCodecParameters; + const AVCodec* VideoCodec; + const AVCodecHWConfig* VideoHWConfig; + // AVPixelFormat HWPixFormat; + AVCodecContext *VideoCodecContext; + AVStream *VideoStream; +}; + +struct av_packet_info { + uint64 PreviousPTS = -1; // PTS value of the previous frame, used to check timings. + + AVPacket *VideoPacket; + AVFrame *VideoFrame; + SwsContext *RGBContext; +}; + +static bool32 AV_TryFrame(av_codec_info *AV, av_packet_info *AVPacket, int32 *err); // Internal attempt to decode a frame. Typically run in a while loop until it returns true. + -- cgit v1.2.3