MythTV  master
videoout_nullvdpau.h
Go to the documentation of this file.
1 #ifndef VIDEOOUTPUTNULLVDPAU_H
2 #define VIDEOOUTPUTNULLVDPAU_H
3 
4 // MythTV headers
5 #include "videooutbase.h"
6 #include "mythrender_vdpau.h"
7 
31 {
32  public:
33  static void GetRenderOptions(render_opts &opts);
34  static QStringList GetAllowedRenderers(MythCodecID myth_codec_id);
37 
38  bool Init(const QSize &video_dim_buf,
39  const QSize &video_dim_disp,
40  float aspect, WId winid,
41  const QRect &win_rect, MythCodecID codec_id) override; // VideoOutput
42  void* GetDecoderContext(unsigned char* buf, uint8_t*& id) override; // VideoOutput
43  bool InputChanged(const QSize &video_dim_buf,
44  const QSize &video_dim_disp,
45  float aspect,
46  MythCodecID av_codec_id,
47  void *codec_private,
48  bool &aspect_only) override; // VideoOutput
49  bool SetupDeinterlace(bool, const QString & = "") override // VideoOutput
50  { return false; }
51  bool SetDeinterlacingEnabled(bool) override // VideoOutput
52  { return false; }
53  bool ApproveDeintFilter(const QString&) const override // VideoOutput
54  { return false; }
55  void ClearAfterSeek(void) override; // VideoOutput
56  void ReleaseFrame(VideoFrame *frame) override; // VideoOutput
58  FilterChain *,
59  const PIPMap &,
60  FrameScanType) override {;} // VideoOutput
62  FrameScanType, OSD *) override {;} // VideoOutput
63  void Show(FrameScanType ) override {;} // VideoOutput
64 
65  void Zoom(ZoomDirection) override {;} // VideoOutput
66  void EmbedInWidget(const QRect &) override {;} // VideoOutput
67  void StopEmbedding(void) override {;} // VideoOutput
68  void DrawUnusedRects(bool = true) override {;} // VideoOutput
69  void UpdatePauseFrame(int64_t &) override {;} // VideoOutput
70  void MoveResizeWindow(QRect ) override {;} // VideoOutput
71  bool CanVisualise(AudioPlayer *, MythRender *) override // VideoOutput
72  { return false; }
74  const QString &) override // VideoOutput
75  { return false; }
76  MythPainter *GetOSDPainter(void) override // VideoOutput
77  { return nullptr; }
78  void DrawSlice(VideoFrame *frame, int x, int y, int w, int h) override; // VideoOutput
79 
80  VideoFrame *GetLastDecodedFrame(void) override; // VideoOutput
81  VideoFrame *GetLastShownFrame(void) override; // VideoOutput
82  void DoneDisplayingFrame(VideoFrame *frame) override; // VideoOutput
83 
84  private:
85  void TearDown(void);
86  bool InitRender(void);
87  void DeleteRender(void);
88  bool InitBuffers(void);
89  void DeleteBuffers(void);
90  bool InitShadowBuffers(void);
91  void DeleteShadowBuffers(void);
92  bool CreateVideoSurfaces(uint num);
93  void DeleteVideoSurfaces(void);
94  void ClaimVideoSurfaces(void);
95  void DiscardFrame(VideoFrame*) override; // VideoOutput
96  void DiscardFrames(bool next_frame_keyframe) override; // VideoOutput
97  void CheckFrameStates(void) override; // VideoOutput
98  bool BufferSizeCheck(void);
99 
100  private:
102  AVVDPAUContext m_context;
103  QMutex m_lock;
107  QVector<uint> m_video_surfaces;
111 };
112 
113 #endif // VIDEOOUTPUTNULLVDPAU_H
MythPainter * GetOSDPainter(void) override
void UpdatePauseFrame(int64_t &) override
Updates frame displayed when video is paused.
A dummy video class that uses VDPAU to decode video frames.
MythRenderVDPAU * m_render
QMap< MythPlayer *, PIPLocation > PIPMap
Definition: videooutbase.h:37
MythCodecID
Definition: mythcodecid.h:10
void DrawSlice(VideoFrame *frame, int x, int y, int w, int h) override
Informs video output of new data for frame, used for hardware accelerated decoding.
bool CreateVideoSurfaces(uint num)
void PrepareFrame(VideoFrame *, FrameScanType, OSD *) override
FrameScanType
Definition: videoouttypes.h:80
unsigned int uint
Definition: compat.h:140
void ProcessFrame(VideoFrame *, OSD *, FilterChain *, const PIPMap &, FrameScanType) override
void EmbedInWidget(const QRect &) override
Tells video output to embed video in an existing window.
void MoveResizeWindow(QRect) override
void DrawUnusedRects(bool=true) override
Draws non-video portions of the screen.
QVector< uint > m_video_surfaces
This class serves as the base class for all video output methods.
Definition: videooutbase.h:46
void CheckFrameStates(void) override
VideoFrame * GetLastShownFrame(void) override
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been call...
void DoneDisplayingFrame(VideoFrame *frame) override
Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.
static void GetRenderOptions(render_opts &opts)
VideoBuffers * m_shadowBuffers
void DiscardFrame(VideoFrame *) override
Releases frame from any queue onto the queue of frames ready for decoding onto.
void * GetDecoderContext(unsigned char *buf, uint8_t *&id) override
void Zoom(ZoomDirection) override
Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize().
bool Init(const QSize &video_dim_buf, const QSize &video_dim_disp, float aspect, WId winid, const QRect &win_rect, MythCodecID codec_id) override
Performs most of the initialization for VideoOutput.
bool SetupDeinterlace(bool, const QString &="") override
Attempts to enable or disable deinterlacing.
void Show(FrameScanType) override
void DiscardFrames(bool next_frame_keyframe) override
Releases all frames not being actively displayed from any queue onto the queue of frames ready for de...
bool InputChanged(const QSize &video_dim_buf, const QSize &video_dim_disp, float aspect, MythCodecID av_codec_id, void *codec_private, bool &aspect_only) override
Tells video output to discard decoded frames and wait for new ones.
void ReleaseFrame(VideoFrame *frame) override
Releases a frame from the ready for decoding queue onto the queue of frames ready for display.
bool ApproveDeintFilter(const QString &) const override
Approves bobdeint filter for XVideo and otherwise defers to VideoOutput::ApproveDeintFilter(const QSt...
Definition: osd.h:132
bool SetupVisualisation(AudioPlayer *, MythRender *, const QString &) override
void StopEmbedding(void) override
Tells video output to stop embedding video in an existing window.
static QStringList GetAllowedRenderers(MythCodecID myth_codec_id)
void ClearAfterSeek(void) override
Tells video output to toss decoded buffers due to a seek.
This class creates tracks the state of the buffers used by various VideoOutput derived classes.
Definition: videobuffers.h:61
ZoomDirection
Definition: videoouttypes.h:28
VideoFrame * GetLastDecodedFrame(void) override
bool CanVisualise(AudioPlayer *, MythRender *) override
bool SetDeinterlacingEnabled(bool) override
Attempts to enable/disable deinterlacing using existing deinterlace method when enabling.