/
mythvtbcontext.h
38 lines (32 loc) · 1.36 KB
/
mythvtbcontext.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#ifndef MYTHVTBCONTEXT_H
#define MYTHVTBCONTEXT_H
// MythTV
#include "mythcodecid.h"
#include "mythcodeccontext.h"
// FFmpeg
extern "C" {
#include "libavutil/pixfmt.h"
#include "libavutil/hwcontext.h"
#include "libavcodec/avcodec.h"
}
class MythVTBContext : public MythCodecContext
{
public:
MythVTBContext(DecoderBase *Parent, MythCodecID CodecID);
// Shared decode only and direct rendering
void InitVideoCodec (AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override;
bool RetrieveFrame (AVCodecContext* Context,
VideoFrame* Frame,
AVFrame* AvFrame) override;
int HwDecoderInit (AVCodecContext *Context) override;
static MythCodecID GetSupportedCodec (AVCodecContext **Context,
AVCodec **Codec,
const QString &Decoder,
uint StreamType);
static enum AVPixelFormat GetFormat (AVCodecContext *Context,
const enum AVPixelFormat *PixFmt);
private:
static bool CheckDecoderSupport (AVCodecContext **Context, uint StreamType);
static int InitialiseDecoder (AVCodecContext *Context);
};
#endif