8#ifndef SkVideDecoder_DEFINED
9#define SkVideDecoder_DEFINED
14#include "libavcodec/avcodec.h"
15#include "libavformat/avformat.h"
16#include "libavformat/avio.h"
17#include "libavutil/pixdesc.h"
18#include "libswscale/swscale.h"
42 double computeTimeStamp(
const AVFrame*)
const;
44 struct ConvertedColorSpace {
45 AVColorPrimaries fPrimaries;
46 AVColorTransferCharacteristic fTransfer;
52 ConvertedColorSpace();
54 void update(AVColorPrimaries, AVColorTransferCharacteristic);
59 std::unique_ptr<SkStream> fStream;
61 AVIOContext* fStreamCtx =
nullptr;
62 AVFormatContext* fFormatCtx =
nullptr;
63 AVCodecContext* fDecoderCtx =
nullptr;
64 int fStreamIndex = -1;
67 AVFrame* fFrame =
nullptr;
68 ConvertedColorSpace fCSCache;
75 Mode fMode = kDone_Mode;
SkISize dimensions() const
void setGrContext(GrRecordingContext *rContext)
SkVideoDecoder(GrRecordingContext *=nullptr)
bool loadStream(std::unique_ptr< SkStream >)
sk_sp< SkImage > nextImage(double *timeStamp=nullptr)