1#ifndef MYTH_VIDEOOUT_H_
2#define MYTH_VIDEOOUT_H_
13#include <qwindowdefs.h>
44 virtual bool Init(QSize VideoDim, QSize VideoDispDim,
45 float VideoAspect, QRect WindowRect,
MythCodecID CodecID);
52 virtual bool InputChanged(QSize VideoDim, QSize VideoDispDim,
54 bool& AspectChanged,
int ReferenceFrames,
bool ForceChange);
56 float& VisibleAspect,
float& FontScaling,
57 float ThemeAspect)
const;
80 QRect
GetImageRect(QRect Rect, QRect* DisplayRect =
nullptr);
92 QRect
GetVisibleOSDBounds(
float& VisibleAspect,
float& FontScaling,
float ThemeAspect)
const;
Handles software based deinterlacing of video frames.
MythVideoColourSpace contains a QMatrix4x4 that can convert YCbCr data to RGB.
static const VideoFrameTypes kDefaultRenderFormats
virtual void UpdatePauseFrame(std::chrono::milliseconds &, FrameScanType=kScan_Progressive)
MythCodecID m_videoCodecID
bool EnoughFreeFrames()
Returns true iff enough frames are available to decode onto.
VideoErrorState m_errorState
LetterBoxColour m_dbLetterboxColour
bool EnoughDecodedFrames()
Returns true iff there are plenty of decoded frames ready for display.
virtual void ReleaseFrame(MythVideoFrame *Frame)
Releases a frame from the ready for decoding queue onto the queue of frames ready for display.
virtual void StartDisplayingFrame()
Tell GetLastShownFrame() to return the next frame from the head of the queue of frames to display.
virtual void GetOSDBounds(QRect &Total, QRect &Visible, float &VisibleAspect, float &FontScaling, float ThemeAspect) const
virtual int ValidVideoFrames() const
Returns number of frames that are fully decoded.
virtual void ClearAfterSeek()
Tells video output to toss decoded buffers due to a seek.
virtual MythVideoFrame * GetLastDecodedFrame()
bool HasSoftwareFrames() const
void SetPrebuffering(bool Normal)
Sets whether to use a normal number of buffers or fewer buffers.
virtual void EndFrame()=0
virtual void InitPictureAttributes()
virtual void SetDeinterlacing(bool Enable, bool DoubleRate, MythDeintType Force=DEINT_NONE)
MythVideoColourSpace m_videoColourSpace
virtual bool Init(QSize VideoDim, QSize VideoDispDim, float VideoAspect, QRect WindowRect, MythCodecID CodecID)
~MythVideoOutput() override=default
QRect GetImageRect(QRect Rect, QRect *DisplayRect=nullptr)
translates caption/dvd button rectangle into 'screen' space
MythVideoProfilePtr m_videoProfile
virtual void CheckFrameStates()
virtual void SetVideoFrameRate(float VideoFrameRate)
virtual void PrepareFrame(MythVideoFrame *Frame, FrameScanType Scan=kScan_Ignore)=0
PictureAttributeSupported GetSupportedPictureAttributes()
virtual long long GetFramesPlayed()
virtual void RenderEnd()=0
QRect GetSafeRect()
Returns a QRect describing an area of the screen on which it is 'safe' to render the On Screen Displa...
QString GetFrameStatus() const
Returns string with status of each frame for debugging.
MythDeintType m_forcedDeinterlacer
VideoErrorState GetError() const
virtual void DeLimboFrame(MythVideoFrame *Frame)
Releases a frame for reuse if it is in limbo.
VideoBuffers m_videoBuffers
virtual MythVideoFrame * GetLastShownFrame()
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been call...
virtual MythVideoFrame * GetNextFreeFrame()
Blocks until it is possible to return a frame for decoding onto.
MythDeinterlacer m_deinterlacer
int FreeVideoFrames()
Returns number of frames available for decoding onto.
virtual void DiscardFrame(MythVideoFrame *Frame)
Releases frame from any queue onto the queue of frames ready for decoding onto.
virtual void SetFramesPlayed(long long FramesPlayed)
const VideoFrameTypes * m_renderFormats
virtual void DiscardFrames(bool KeyFrame, bool Flushed)
Releases all frames not being actively displayed from any queue onto the queue of frames ready for de...
static void GetRenderOptions(RenderOptions &Options, MythRender *Render)
virtual void DoneDisplayingFrame(MythVideoFrame *Frame)
Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.
virtual bool InputChanged(QSize VideoDim, QSize VideoDispDim, float VideoAspect, MythCodecID CodecID, bool &AspectChanged, int ReferenceFrames, bool ForceChange)
Tells video output to discard decoded frames and wait for new ones.
QRect GetVisibleOSDBounds(float &VisibleAspect, float &FontScaling, float ThemeAspect) const
Returns visible portions of total OSD bounds.
virtual void RenderFrame(MythVideoFrame *Frame, FrameScanType)=0
This class creates tracks the state of the buffers used by various VideoOutput derived classes.
static bool codec_sw_copy(MythCodecID id)
std::vector< VideoFrameType > VideoFrameTypes
std::shared_ptr< MythVideoProfile > MythVideoProfilePtr
PictureAttributeSupported