MythTV
master
|
#include <libmythtv/videoout_d3d.h>
Public Member Functions | |
VideoOutputD3D (MythMainWindow *MainWindow, MythRenderD3D9 *Render, MythD3D9Painter *Painter, MythDisplay *Display, const MythVideoProfilePtr &VideoProfile, QString &Profile) | |
~VideoOutputD3D () | |
bool | Init (QSize video_dim_buf, QSize video_dim_disp, float video_aspect, QRect win_rect, MythCodecID codec_id) override |
void | RenderFrame (MythVideoFrame *buffer, FrameScanType) override |
void | RenderEnd () override |
void | PrepareFrame (MythVideoFrame *frame, FrameScanType scan) override |
void | EndFrame () override |
bool | InputChanged (QSize video_dim_buf, QSize video_dim_disp, float video_aspect, MythCodecID av_codec_id, bool &aspect_only, int reference_frames, bool force_change) override |
Tells video output to discard decoded frames and wait for new ones. More... | |
void | UpdatePauseFrame (std::chrono::milliseconds &disp_timecode, FrameScanType Scan=kScan_Progressive) override |
![]() | |
~MythVideoOutputGPU () override | |
void | InitPictureAttributes () override |
void | SetVideoFrameRate (float NewRate) override |
void | DiscardFrames (bool KeyFrame, bool Flushed) override |
Discard video frames. More... | |
void | DoneDisplayingFrame (MythVideoFrame *Frame) override |
Release a video frame back into the decoder pool. More... | |
void | ClearAfterSeek () override |
Tells video output to toss decoded buffers due to a seek. More... | |
![]() | |
~MythVideoOutput () override=default | |
virtual void | SetDeinterlacing (bool Enable, bool DoubleRate, MythDeintType Force=DEINT_NONE) |
virtual void | GetOSDBounds (QRect &Total, QRect &Visible, float &VisibleAspect, float &FontScaling, float ThemeAspect) const |
virtual void | SetFramesPlayed (long long FramesPlayed) |
virtual long long | GetFramesPlayed () |
bool | IsErrored () const |
VideoErrorState | GetError () const |
void | SetPrebuffering (bool Normal) |
Sets whether to use a normal number of buffers or fewer buffers. More... | |
virtual int | ValidVideoFrames () const |
Returns number of frames that are fully decoded. More... | |
int | FreeVideoFrames () |
Returns number of frames available for decoding onto. More... | |
bool | EnoughFreeFrames () |
Returns true iff enough frames are available to decode onto. More... | |
bool | EnoughDecodedFrames () |
Returns true iff there are plenty of decoded frames ready for display. More... | |
virtual MythVideoFrame * | GetNextFreeFrame () |
Blocks until it is possible to return a frame for decoding onto. More... | |
virtual void | ReleaseFrame (MythVideoFrame *Frame) |
Releases a frame from the ready for decoding queue onto the queue of frames ready for display. More... | |
virtual void | DeLimboFrame (MythVideoFrame *Frame) |
Releases a frame for reuse if it is in limbo. More... | |
virtual void | StartDisplayingFrame () |
Tell GetLastShownFrame() to return the next frame from the head of the queue of frames to display. More... | |
virtual void | DiscardFrame (MythVideoFrame *Frame) |
Releases frame from any queue onto the queue of frames ready for decoding onto. More... | |
virtual void | CheckFrameStates () |
virtual MythVideoFrame * | GetLastDecodedFrame () |
virtual MythVideoFrame * | GetLastShownFrame () |
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been called. More... | |
QString | GetFrameStatus () const |
Returns string with status of each frame for debugging. More... | |
QRect | GetImageRect (QRect Rect, QRect *DisplayRect=nullptr) |
translates caption/dvd button rectangle into 'screen' space More... | |
QRect | GetSafeRect () |
Returns a QRect describing an area of the screen on which it is 'safe' to render the On Screen Display. More... | |
PictureAttributeSupported | GetSupportedPictureAttributes () |
bool | HasSoftwareFrames () const |
![]() | |
MythVideoBounds () | |
~MythVideoBounds () override=default | |
bool | InitBounds (QSize VideoDim, QSize VideoDispDim, float Aspect, QRect WindowRect) |
void | SetDisplay (MythDisplay *mDisplay) |
bool | IsEmbedding (void) const |
bool | IsEmbeddingAndHidden () const |
QSize | GetVideoDim (void) const |
QSize | GetVideoDispDim (void) const |
float | GetOverridenVideoAspect (void) const |
QRect | GetDisplayVisibleRect (void) const |
QRect | GetWindowRect (void) const |
QRect | GetRawWindowRect (void) const |
QRect | GetVideoRect (void) const |
QRect | GetDisplayVideoRect (void) const |
QRect | GetEmbeddingRect (void) const |
bool | UsingGuiSize (void) const |
AdjustFillMode | GetAdjustFill (void) const |
float | GetVideoAspect (void) const |
float | GetDisplayAspect (void) const |
StereoscopicMode | GetStereoOverride () const |
bool | VideoIsFullScreen (void) const |
Check whether the video display rect covers the entire window/framebuffer. More... | |
QRegion | GetBoundingRegion (void) const |
Return the region of DisplayVisibleRect that lies outside of DisplayVideoRect. More... | |
Static Public Member Functions | |
static void | GetRenderOptions (RenderOptions &Options) |
static QStringList | GetAllowedRenderers (MythCodecID myth_codec_id, const QSize &video_dim) |
static MythCodecID | GetSupportedCodec (AVCodecContext **Context, const AVCodec **Codec, const QString &decoder, uint stream_type) |
![]() | |
static void | GetRenderOptions (RenderOptions &Options, MythRender *Render) |
static MythVideoOutputGPU * | Create (MythMainWindow *MainWindow, MythRender *Render, MythPainter *Painter, MythDisplay *Display, const QString &Decoder, MythCodecID CodecID, QSize VideoDim, QSize VideoDispDim, float VideoAspect, float FrameRate, uint PlayerFlags, const QString &Codec, int ReferenceFrames, const VideoFrameTypes *&RenderFormats) |
static VideoFrameType | FrameTypeForCodec (MythCodecID CodecId) |
![]() | |
static void | GetRenderOptions (RenderOptions &Options, MythRender *Render) |
Private Member Functions | |
void | TearDown (void) |
bool | SetupContext (void) |
bool | CreateBuffers (void) |
bool | InitBuffers (void) |
void | SetProfile (void) |
void | DestroyContext (void) |
void | UpdateFrame (MythVideoFrame *frame, D3D9Image *img) |
bool | CreateDecoder (void) |
void | DeleteDecoder (void) |
Private Attributes | |
MythVideoFrame | m_pauseFrame |
QRecursiveMutex | m_lock |
HWND | m_hWnd {nullptr} |
MythRenderD3D9 * | m_render {nullptr} |
D3D9Image * | m_video {nullptr} |
bool | m_renderValid {false} |
bool | m_renderReset {false} |
DXVA2Decoder * | m_decoder {nullptr} |
void * | m_pauseSurface {nullptr} |
Additional Inherited Members | |
![]() | |
void | WindowResized (QSize Size) |
void | ResizeForVideo (QSize Size=QSize()) |
![]() | |
void | RefreshVideoBoundsState () |
Send out latest state to listeners. More... | |
void | ScreenChanged (QScreen *screen) |
void | PhysicalDPIChanged (qreal) |
void | SourceChanged (QSize VideoDim, QSize VideoDispDim, float Aspect) |
Update for new source video dimensions and aspect ratio. More... | |
void | VideoAspectRatioChanged (float Aspect) |
Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes. More... | |
virtual void | EmbedPlayback (bool Embed, QRect Rect) |
void | ToggleAdjustFill (AdjustFillMode AdjustFillMode=kAdjustFill_Toggle) |
Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize() to apply them. More... | |
void | ToggleAspectOverride (AspectOverrideMode AspectMode=kAspect_Toggle) |
Enforce different aspect ratio than detected, then calls VideoAspectRatioChanged(float) to apply them. More... | |
void | ResizeDisplayWindow (QRect Rect, bool SaveVisibleRect) |
Resize Display Window. More... | |
void | MoveResize (void) |
performs all the calculations for video framing and any resizing. More... | |
void | Zoom (ZoomDirection Direction) |
Sets up zooming into to different parts of the video. More... | |
void | ToggleMoveBottomLine (void) |
void | SaveBottomLine (void) |
void | SetVideoScalingAllowed (bool Change) |
Disable or enable underscan/overscan. More... | |
void | SetDisplayAspect (float DisplayAspect) |
void | SetWindowSize (QSize Size) |
void | SetITVResize (QRect Rect) |
void | SetRotation (int Rotation) |
Set the rotation in degrees. More... | |
void | SetStereoOverride (StereoscopicMode Mode) |
![]() | |
void | ChangePictureAttribute (PictureAttribute Attribute, bool Direction, int Value) |
void | PictureAttributeChanged (PictureAttribute Attribute, int Value) |
void | SupportedAttributesChanged (PictureAttributeSupported Supported) |
void | PictureAttributesUpdated (const std::map< PictureAttribute, int > &Values) |
void | RefreshState () |
void | DoRefreshState () |
![]() | |
void | UpdateOSDMessage (const QString &Message) |
void | VideoSizeChanged (const QSize &VideoDim, const QSize &VideoDispDim) |
void | VideoRectsChanged (const QRect &DisplayVideoRect, const QRect &VideoRect) |
void | VisibleRectChanged (const QRect &DisplayVisibleRect) |
void | WindowRectChanged (const QRect &WindowRect) |
void | VideoBoundsStateChanged (MythVideoBoundsState VideoState) |
![]() | |
MythVideoOutputGPU (MythMainWindow *MainWindow, MythRender *Render, MythPainterGPU *Painter, MythDisplay *Display, MythVideoProfilePtr VideoProfile, QString &Profile) | |
virtual QRect | GetDisplayVisibleRectAdj () |
bool | CreateBuffers (MythCodecID CodecID, QSize Size) |
void | DestroyBuffers () |
bool | ProcessInputChange () |
void | InitDisplayMeasurements () |
Initialise display measurement. More... | |
void | SetReferenceFrames (int ReferenceFrames) |
![]() | |
MythVideoOutput () | |
QRect | GetVisibleOSDBounds (float &VisibleAspect, float &FontScaling, float ThemeAspect) const |
Returns visible portions of total OSD bounds. More... | |
![]() | |
MythMainWindow * | m_mainWindow { nullptr } |
MythRender * | m_render { nullptr } |
MythVideoGPU * | m_video { nullptr } |
MythPainterGPU * | m_painter { nullptr } |
MythCodecID | m_newCodecId { kCodec_NONE } |
QSize | m_newVideoDim { 0, 0 } |
QSize | m_newVideoDispDim { 0, 0 } |
float | m_newAspect { 0.0F } |
bool | m_newFrameRate { false } |
bool | m_buffersCreated { false } |
QString | m_profile |
bool | m_needFullClear { false } |
HDRTracker | m_hdrTracker { nullptr } |
![]() | |
MythVideoColourSpace | m_videoColourSpace |
LetterBoxColour | m_dbLetterboxColour { kLetterBoxColour_Black } |
uint8_t | m_clearColor { 0 } |
uint8_t | m_clearAlpha { 255 } |
MythCodecID | m_videoCodecID { kCodec_NONE } |
int | m_maxReferenceFrames { 16 } |
MythVideoProfilePtr | m_videoProfile { nullptr } |
VideoBuffers | m_videoBuffers |
VideoErrorState | m_errorState { kError_None } |
long long | m_framesPlayed { 0 } |
MythAVCopy | m_copyFrame |
MythDeinterlacer | m_deinterlacer |
const VideoFrameTypes * | m_renderFormats { &MythVideoFrame::kDefaultRenderFormats } |
bool | m_deinterlacing { false } |
bool | m_deinterlacing2X { false } |
MythDeintType | m_forcedDeinterlacer { DEINT_NONE } |
![]() | |
MythDisplay * | m_display {nullptr} |
Definition at line 15 of file videoout_d3d.h.
VideoOutputD3D::VideoOutputD3D | ( | MythMainWindow * | MainWindow, |
MythRenderD3D9 * | Render, | ||
MythD3D9Painter * | Painter, | ||
MythDisplay * | Display, | ||
const MythVideoProfilePtr & | VideoProfile, | ||
QString & | Profile | ||
) |
Definition at line 49 of file videoout_d3d.cpp.
VideoOutputD3D::~VideoOutputD3D | ( | ) |
Definition at line 57 of file videoout_d3d.cpp.
|
static |
Definition at line 34 of file videoout_d3d.cpp.
|
overridevirtual |
Reimplemented from MythVideoOutputGPU.
Definition at line 166 of file videoout_d3d.cpp.
Referenced by InputChanged().
|
overridevirtual |
Reimplemented from MythVideoOutputGPU.
Definition at line 251 of file videoout_d3d.cpp.
|
overridevirtual |
Implements MythVideoOutput.
Definition at line 296 of file videoout_d3d.cpp.
|
overridevirtual |
Reimplemented from MythVideoOutputGPU.
Definition at line 369 of file videoout_d3d.cpp.
|
overridevirtual |
Reimplemented from MythVideoOutputGPU.
Definition at line 303 of file videoout_d3d.cpp.
|
overridevirtual |
Tells video output to discard decoded frames and wait for new ones.
Reimplemented from MythVideoOutputGPU.
Definition at line 97 of file videoout_d3d.cpp.
|
overridevirtual |
Reimplemented from MythVideoOutputGPU.
Definition at line 320 of file videoout_d3d.cpp.
|
static |
Definition at line 432 of file videoout_d3d.cpp.
|
static |
Definition at line 444 of file videoout_d3d.cpp.
Referenced by MythCodecContext::FindDecoder().
|
private |
Definition at line 62 of file videoout_d3d.cpp.
Referenced by Init(), InputChanged(), and ~VideoOutputD3D().
|
private |
Definition at line 146 of file videoout_d3d.cpp.
Referenced by Init(), and PrepareFrame().
|
private |
Definition at line 211 of file videoout_d3d.cpp.
Referenced by Init().
|
private |
Definition at line 227 of file videoout_d3d.cpp.
Referenced by Init().
|
private |
Definition at line 205 of file videoout_d3d.cpp.
Referenced by Init().
|
private |
Definition at line 78 of file videoout_d3d.cpp.
Referenced by SetupContext(), and TearDown().
|
private |
Definition at line 344 of file videoout_d3d.cpp.
Referenced by PrepareFrame().
|
private |
Definition at line 457 of file videoout_d3d.cpp.
Referenced by Init(), and PrepareFrame().
|
private |
Definition at line 472 of file videoout_d3d.cpp.
Referenced by CreateDecoder(), and TearDown().
|
private |
Definition at line 55 of file videoout_d3d.h.
Referenced by PrepareFrame(), TearDown(), UpdatePauseFrame(), and VideoOutputD3D().
|
private |
Definition at line 56 of file videoout_d3d.h.
Referenced by CreateDecoder(), DeleteDecoder(), DestroyContext(), Init(), InitBuffers(), InputChanged(), PrepareFrame(), SetupContext(), TearDown(), and UpdatePauseFrame().
|
private |
Definition at line 57 of file videoout_d3d.h.
Referenced by Init(), and SetupContext().
|
private |
Definition at line 58 of file videoout_d3d.h.
Referenced by CreateDecoder(), DestroyContext(), EndFrame(), PrepareFrame(), RenderEnd(), RenderFrame(), and SetupContext().
|
private |
Definition at line 59 of file videoout_d3d.h.
Referenced by DestroyContext(), PrepareFrame(), RenderFrame(), and SetupContext().
Definition at line 60 of file videoout_d3d.h.
Referenced by DestroyContext(), EndFrame(), PrepareFrame(), RenderEnd(), RenderFrame(), and SetupContext().
Definition at line 61 of file videoout_d3d.h.
Referenced by DestroyContext(), EndFrame(), PrepareFrame(), and RenderFrame().
|
private |
Definition at line 66 of file videoout_d3d.h.
Referenced by CreateDecoder(), DeleteDecoder(), and InitBuffers().
|
private |
Definition at line 68 of file videoout_d3d.h.
Referenced by PrepareFrame(), and UpdatePauseFrame().