MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
VideoOutput Class Referenceabstract

This class serves as the base class for all video output methods. More...

#include <videooutbase.h>

Inheritance diagram for VideoOutput:
Inheritance graph
[legend]
Collaboration diagram for VideoOutput:
Collaboration graph
[legend]

Public Member Functions

 VideoOutput ()
 This constructor for VideoOutput must be followed by an Init(int,int,float,WId,int,int,int,int,WId) call. More...
 
virtual ~VideoOutput ()
 Shuts down video output. More...
 
virtual bool Init (const QSize &video_dim_buf, const QSize &video_dim_disp, float aspect, WId winid, const QRect &win_rect, MythCodecID codec_id)
 Performs most of the initialization for VideoOutput. More...
 
virtual void InitOSD (OSD *osd)
 
virtual void SetVideoFrameRate (float)
 
virtual bool SetDeinterlacingEnabled (bool)
 Attempts to enable/disable deinterlacing using existing deinterlace method when enabling. More...
 
virtual bool SetupDeinterlace (bool interlaced, const QString &overridefilter="")
 Attempts to enable or disable deinterlacing. More...
 
virtual void FallbackDeint (void)
 Fallback to non-frame-rate-doubling deinterlacing method. More...
 
virtual void BestDeint (void)
 Change to the best deinterlacing method. More...
 
virtual bool NeedsDoubleFramerate (void) const
 Should Prepare() and Show() be called twice for every ProcessFrame(). More...
 
virtual bool IsBobDeint (void) const
 
virtual bool IsExtraProcessingRequired (void) const
 Should Prepare() and Show() and ProcessFrame be called twice for every Frameloop(). More...
 
virtual bool ApproveDeintFilter (const QString &filtername) const
 Approves bobdeint filter for XVideo and otherwise defers to VideoOutput::ApproveDeintFilter(const QString&). More...
 
void GetDeinterlacers (QStringList &deinterlacers)
 
QString GetDeinterlacer (void)
 
virtual void PrepareFrame (VideoFrame *buffer, FrameScanType, OSD *osd)=0
 
virtual void Show (FrameScanType)=0
 
VideoDisplayProfileGetProfile ()
 
virtual void WindowResized (const QSize &)
 
virtual bool InputChanged (const QSize &video_dim_buf, const QSize &video_dim_disp, float aspect, MythCodecID myth_codec_id, void *codec_private, bool &aspect_changed)
 Tells video output to discard decoded frames and wait for new ones. More...
 
virtual void VideoAspectRatioChanged (float aspect)
 Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes. More...
 
virtual void ResizeDisplayWindow (const QRect &, bool)
 Resize Display Window. More...
 
virtual void EmbedInWidget (const QRect &rect)
 Tells video output to embed video in an existing window. More...
 
virtual void StopEmbedding (void)
 Tells video output to stop embedding video in an existing window. More...
 
virtual void ResizeForGui (void)
 If we are using DisplayRes support, return the screen size and refresh rate to those used for the GUI. More...
 
virtual void ResizeForVideo (uint width=0, uint height=0)
 Sets display parameters based on video resolution. More...
 
virtual void MoveResizeWindow (QRect new_rect)=0
 
virtual void MoveResize (void)
 performs all the calculations for video framing and any resizing. More...
 
virtual void Zoom (ZoomDirection direction)
 Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize(). More...
 
virtual void ToggleMoveBottomLine (void)
 
virtual void SaveBottomLine (void)
 Save current Manual Zoom settings as BottomLine adjustment. More...
 
virtual void GetOSDBounds (QRect &total, QRect &visible, float &visible_aspect, float &font_scaling, float themeAspect) const
 
QRect GetMHEGBounds (void)
 
virtual void DrawSlice (VideoFrame *frame, int x, int y, int w, int h)
 Informs video output of new data for frame, used for hardware accelerated decoding. More...
 
virtual void DrawUnusedRects (bool sync=true)=0
 Draws non-video portions of the screen. More...
 
virtual float GetDisplayAspect (void) const
 Returns current display aspect ratio. More...
 
AspectOverrideMode GetAspectOverride (void) const
 Returns current aspect override mode. More...
 
virtual void ToggleAspectOverride (AspectOverrideMode aspectMode=kAspect_Toggle)
 Enforce different aspect ration than detected, then calls VideoAspectRatioChanged(float) to apply them. More...
 
AdjustFillMode GetAdjustFill (void) const
 Returns current adjust fill mode. More...
 
virtual void ToggleAdjustFill (AdjustFillMode adjustFillMode=kAdjustFill_Toggle)
 Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize() to apply them. More...
 
QString GetZoomString (void) const
 
virtual void ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, const PIPMap &pipPlayers, FrameScanType scan=kScan_Ignore)=0
 
void CropToDisplay (VideoFrame *frame)
 
void ExposeEvent (void)
 Tells video output that a full repaint is needed. More...
 
PictureAttributeSupported GetSupportedPictureAttributes (void)
 
int ChangePictureAttribute (PictureAttribute, bool direction)
 
virtual int SetPictureAttribute (PictureAttribute, int newValue)
 Sets a specified picture attribute. More...
 
int GetPictureAttribute (PictureAttribute)
 
virtual void InitPictureAttributes (void)
 
bool AllowPreviewEPG (void) const
 
virtual QString GetName (void) const
 
virtual bool IsPIPSupported (void) const
 
virtual bool IsPBPSupported (void) const
 
virtual bool NeedExtraAudioDecode (void) const
 
virtual bool hasHWAcceleration (void) const
 Return true if HW Acceleration is running. More...
 
virtual void * GetDecoderContext (unsigned char *, uint8_t *&)
 
virtual void SetFramesPlayed (long long fp)
 Sets the number of frames played. More...
 
virtual long long GetFramesPlayed (void)
 Returns the number of frames played. More...
 
bool IsErrored () const
 Returns true if a fatal error has been encountered. More...
 
VideoErrorState GetError (void) const
 Returns error type. More...
 
void SetPrebuffering (bool normal)
 Sets whether to use a normal number of buffers or fewer buffers. More...
 
virtual void ClearAfterSeek (void)
 Tells video output to toss decoded buffers due to a seek. More...
 
virtual int ValidVideoFrames (void) const
 Returns number of frames that are fully decoded. More...
 
int FreeVideoFrames (void)
 Returns number of frames available for decoding onto. More...
 
bool EnoughFreeFrames (void)
 Returns true iff enough frames are available to decode onto. More...
 
bool EnoughDecodedFrames (void)
 Returns true iff there are plenty of decoded frames ready for display. More...
 
bool EnoughPrebufferedFrames (void)
 Returns true iff we have at least the minimum number of decoded frames ready for display. More...
 
bool IsEmbedding (void)
 Returns if videooutput is embedding. More...
 
virtual VideoFrameGetNextFreeFrame (void)
 Blocks until it is possible to return a frame for decoding onto. More...
 
virtual void ReleaseFrame (VideoFrame *frame)
 Releases a frame from the ready for decoding queue onto the queue of frames ready for display. More...
 
virtual void DeLimboFrame (VideoFrame *frame)
 Releases a frame for reuse if it is in limbo. More...
 
virtual void StartDisplayingFrame (void)
 Tell GetLastShownFrame() to return the next frame from the head of the queue of frames to display. More...
 
virtual void DoneDisplayingFrame (VideoFrame *frame)
 Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto. More...
 
virtual void DiscardFrame (VideoFrame *frame)
 Releases frame from any queue onto the queue of frames ready for decoding onto. More...
 
virtual void DiscardFrames (bool kf)
 Releases all frames not being actively displayed from any queue onto the queue of frames ready for decoding onto. More...
 
virtual void ClearDummyFrame (VideoFrame *frame)
 Clears the frame to black. More...
 
virtual void CheckFrameStates (void)
 
virtual VideoFrameGetLastDecodedFrame (void)
 
virtual VideoFrameGetLastShownFrame (void)
 Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been called. More...
 
QString GetFrameStatus (void) const
 Returns string with status of each frame for debugging. More...
 
virtual void UpdatePauseFrame (int64_t &disp_timecode)=0
 Updates frame displayed when video is paused. More...
 
void SetVideoResize (const QRect &videoRect)
 Tells the player to resize the video frame (used for ITV) More...
 
void SetVideoScalingAllowed (bool change)
 Disable or enable underscan/overscan. More...
 
bool IsVideoScalingAllowed (void) const
 check if video underscan/overscan is allowed More...
 
virtual void SetVideoFlip (void)
 Tells the player to flip the video frames for proper display. More...
 
virtual QRect GetPIPRect (PIPLocation location, MythPlayer *pipplayer=nullptr, bool do_pixel_adj=true) const
 returns QRect of PIP based on PIPLocation More...
 
virtual void RemovePIP (MythPlayer *)
 
virtual void SetPIPState (PIPState setting)
 
virtual QString GetOSDRenderer (void) const
 \ brief return OSD renderer type for this videoOutput More...
 
virtual MythPainterGetOSDPainter (void)
 
virtual bool GetScreenShot (int=0, int=0, QString="")
 
QString GetFilters (void) const
 
QRect GetImageRect (const QRect &rect, QRect *display=nullptr)
 translates caption/dvd button rectangle into 'screen' space More...
 
QRect GetSafeRect (void)
 Returns a QRect describing an area of the screen on which it is 'safe' to render the On Screen Display. More...
 
bool EnableVisualisation (AudioPlayer *audio, bool enable, const QString &name=QString(""))
 
virtual bool CanVisualise (AudioPlayer *audio, MythRender *render)
 
virtual bool SetupVisualisation (AudioPlayer *audio, MythRender *render, const QString &name)
 
VideoVisualGetVisualisation (void)
 
QString GetVisualiserName (void)
 
virtual QStringList GetVisualiserList (void)
 
void DestroyVisualisation (void)
 
virtual bool StereoscopicModesAllowed (void) const
 
void SetStereoscopicMode (StereoscopicMode mode)
 
StereoscopicMode GetStereoscopicMode (void) const
 

Static Public Member Functions

static void GetRenderOptions (render_opts &opts)
 
static VideoOutputCreate (const QString &decoder, MythCodecID codec_id, void *codec_priv, PIPState pipState, const QSize &video_dim_buf, const QSize &video_dim_disp, float video_aspect, QWidget *parentwidget, const QRect &embed_rect, float video_prate, uint playerFlags, QString &codecName)
 Depending on compile-time configure settings and run-time renderer settings, create a relevant VideoOutput subclass. More...
 
static int CalcHueBase (const QString &adaptor_name)
 

Protected Member Functions

void InitBuffers (int numdecode, bool extra_for_pause, int need_free, int needprebuffer_normal, int needprebuffer_small, int keepprebuffer)
 
void InitDisplayMeasurements (uint width, uint height, bool resize)
 Init display measurements based on database settings and actual screen parameters. More...
 
virtual void ShowPIPs (VideoFrame *frame, const PIPMap &pipPlayers)
 
virtual void ShowPIP (VideoFrame *frame, MythPlayer *pipplayer, PIPLocation loc)
 Composites PiP image onto a video frame. More...
 
virtual bool DisplayOSD (VideoFrame *frame, OSD *osd)
 If the OSD has changed, this will convert the OSD buffer to the OSDSurface's color format. More...
 
QRect GetVisibleOSDBounds (float &, float &, float) const
 Returns visible portions of total OSD bounds. More...
 
QRect GetTotalOSDBounds (void) const
 Returns total OSD bounds. More...
 
virtual bool hasFullScreenOSD (void) const
 
void DoPipResize (int pipwidth, int pipheight)
 Sets up Picture in Picture image resampler. More...
 
void ShutdownPipResize (void)
 Shuts down Picture in Picture image resampler. More...
 
void ResizeVideo (VideoFrame *frame)
 
void DoVideoResize (const QSize &inDim, const QSize &outDim)
 Sets up Picture in Picture image resampler. More...
 
virtual void ShutdownVideoResize (void)
 

Static Protected Member Functions

static void CopyFrame (VideoFrame *to, const VideoFrame *from)
 Copies frame data from one VideoFrame to another. More...
 

Protected Attributes

VideoOutWindow window
 
QSize db_display_dim
 Screen dimensions in millimeters from DB. More...
 
VideoColourSpace videoColourSpace
 
AspectOverrideMode db_aspectoverride
 
AdjustFillMode db_adjustfill
 
LetterBoxColour db_letterbox_colour
 
QString db_deint_filtername
 
MythCodecID video_codec_id
 
VideoDisplayProfiledb_vdisp_profile
 
QSize pip_desired_display_size
 
QSize pip_display_size
 
QSize pip_video_size
 
unsigned char * pip_tmp_buf
 
unsigned char * pip_tmp_buf2
 
struct SwsContext * pip_scaling_context
 
VideoFrame pip_tmp_image
 
bool vsz_enabled
 
QRect vsz_desired_display_rect
 
QSize vsz_display_size
 
QSize vsz_video_size
 
unsigned char * vsz_tmp_buf
 
struct SwsContext * vsz_scale_context
 
bool m_deinterlacing
 
QString m_deintfiltername
 
FilterManagerm_deintFiltMan
 
FilterChainm_deintFilter
 
bool m_deinterlaceBeforeOSD
 
VideoBuffers vbuffers
 VideoBuffers instance used to track video output buffers. More...
 
VideoErrorState errorState
 
long long framesPlayed
 
DisplayResdisplay_res
 
QSize monitor_sz
 
QSize monitor_dim
 
MythYUVAPainterosd_painter
 
MythImageosd_image
 
MythPainterinvalid_osd_painter
 
VideoVisualm_visual
 
StereoscopicMode m_stereo
 
MythAVCopy m_copyFrame
 

Detailed Description

This class serves as the base class for all video output methods.

The basic use is:

VideoOutputType type = kVideoOutput_Default;
vo = VideoOutput::InitVideoOut(type);
vo->Init(width, height, aspect ...);
// Then create two threads.
// In the decoding thread
while (decoding)
{
if (vo->WaitForAvailable(1000)
{
frame = vo->GetNextFreeFrame(); // remove frame from "available"
av_lib_process(frame); // do something to fill it.
// call DrawSlice() // if you need piecemeal processing
// by VideoOutput use DrawSlice
vo->ReleaseFrame(frame); // enqueues frame in "used" queue
}
}
// In the displaying thread
while (playing)
{
if (vo->EnoughPrebufferedFrames())
{
// Sets "Last Shown Frame" to head of "used" queue
vo->StartDisplayingFrame();
// Get pointer to "Last Shown Frame"
frame = vo->GetLastShownFrame();
// add OSD, do any filtering, etc.
vo->ProcessFrame(frame, osd, filters, pict-in-pict, scan);
// tells show what frame to be show, do other last minute stuff
vo->PrepareFrame(frame, scan);
// here you wait until it's time to show the frame
// Show blits the last prepared frame to the screen
// as quickly as possible.
vo->Show(scan);
// remove frame from the head of "used",
// vo must get it into "available" eventually.
vo->DoneDisplayingFrame();
}
}
delete vo;

Note: Show() may be called multiple times between PrepareFrame() and DoneDisplayingFrame(). But if a frame is ever removed from available via GetNextFreeFrame(), you must either call DoneDisplayFrame() or call DiscardFrame(VideoFrame*) on it.

Note: ProcessFrame() may be called multiple times on a frame, to update an OSD for example.

The VideoBuffers class handles the buffer tracking, see it for more details on the states a buffer can take before it becomes available for reuse.

See also
VideoBuffers, MythPlayer

Definition at line 46 of file videooutbase.h.

Constructor & Destructor Documentation

◆ VideoOutput()

VideoOutput::VideoOutput ( )

This constructor for VideoOutput must be followed by an Init(int,int,float,WId,int,int,int,int,WId) call.

Definition at line 399 of file videooutbase.cpp.

◆ ~VideoOutput()

VideoOutput::~VideoOutput ( )
virtual

Shuts down video output.

Definition at line 462 of file videooutbase.cpp.

Member Function Documentation

◆ GetRenderOptions()

void VideoOutput::GetRenderOptions ( render_opts opts)
static

Definition at line 67 of file videooutbase.cpp.

Referenced by VideoDisplayProfile::init_statics().

◆ Create()

VideoOutput * VideoOutput::Create ( const QString &  decoder,
MythCodecID  codec_id,
void *  codec_priv,
PIPState  pipState,
const QSize &  video_dim_buf,
const QSize &  video_dim_disp,
float  video_aspect,
QWidget *  parentwidget,
const QRect &  embed_rect,
float  video_prate,
uint  playerFlags,
QString &  codecName 
)
static

Depending on compile-time configure settings and run-time renderer settings, create a relevant VideoOutput subclass.

Returns
instance of VideoOutput if successful, nullptr otherwise.

Definition at line 120 of file videooutbase.cpp.

Referenced by MythPlayer::InitVideo().

◆ Init()

bool VideoOutput::Init ( const QSize &  video_dim_buf,
const QSize &  video_dim_disp,
float  aspect,
WId  winid,
const QRect &  win_rect,
MythCodecID  codec_id 
)
virtual

◆ InitOSD()

void VideoOutput::InitOSD ( OSD osd)
virtual

Definition at line 519 of file videooutbase.cpp.

Referenced by MythPlayer::VideoStart().

◆ SetVideoFrameRate()

void VideoOutput::SetVideoFrameRate ( float  playback_fps)
virtual

Definition at line 532 of file videooutbase.cpp.

Referenced by MythPlayer::ChangeSpeed(), Create(), and MythPlayer::ReinitVideo().

◆ SetDeinterlacingEnabled()

bool VideoOutput::SetDeinterlacingEnabled ( bool  enable)
virtual

Attempts to enable/disable deinterlacing using existing deinterlace method when enabling.

Reimplemented in VideoOutputNullVDPAU, VideoOutputOpenGL, VideoOutputOMX, VideoOutputXv, VideoOutputOpenGLVAAPI, VideoOutputNullVAAPI, and VideoOutputVDPAU.

Definition at line 543 of file videooutbase.cpp.

Referenced by VideoOutputXv::SetDeinterlacingEnabled(), and MythPlayer::SetScanType().

◆ SetupDeinterlace()

bool VideoOutput::SetupDeinterlace ( bool  interlaced,
const QString &  overridefilter = "" 
)
virtual

Attempts to enable or disable deinterlacing.

Returns
true if successful, false otherwise.
Parameters
interlacedDesired state of interlacing.
overridefilteroptional, explicitly use this nondefault deinterlacing filter

Reimplemented in VideoOutputNullVDPAU, VideoOutputOpenGL, VideoOutputOMX, VideoOutputXv, VideoOutputOpenGLVAAPI, VideoOutputVDPAU, VideoOutputNullVAAPI, and VideoOutputNull.

Definition at line 563 of file videooutbase.cpp.

Referenced by BestDeint(), MythPlayer::ChangeSpeed(), FallbackDeint(), MythPlayer::FallbackDeint(), MythPlayer::ForceDeinterlacer(), VideoOutputOpenGL::SetDeinterlacingEnabled(), SetDeinterlacingEnabled(), VideoOutputXv::SetupDeinterlace(), VideoOutputOMX::SetupDeinterlace(), VideoOutputOpenGL::SetupDeinterlace(), and MythPlayer::VideoStart().

◆ FallbackDeint()

void VideoOutput::FallbackDeint ( void  )
virtual

Fallback to non-frame-rate-doubling deinterlacing method.

Definition at line 663 of file videooutbase.cpp.

Referenced by MythPlayer::ChangeSpeed(), and MythPlayer::FallbackDeint().

◆ BestDeint()

void VideoOutput::BestDeint ( void  )
virtual

◆ NeedsDoubleFramerate()

bool VideoOutput::NeedsDoubleFramerate ( void  ) const
virtual

Should Prepare() and Show() be called twice for every ProcessFrame().

Returns
m_deintfiltername == "bobdeint" && m_deinterlacing

Definition at line 698 of file videooutbase.cpp.

Referenced by MythPlayer::ChangeSpeed(), MythPlayer::ForceDeinterlacer(), MythPlayer::SetScanType(), VideoPerformanceTest::Test(), and MythPlayer::VideoStart().

◆ IsBobDeint()

bool VideoOutput::IsBobDeint ( void  ) const
virtual

◆ IsExtraProcessingRequired()

bool VideoOutput::IsExtraProcessingRequired ( void  ) const
virtual

Should Prepare() and Show() and ProcessFrame be called twice for every Frameloop().

All adaptive full framerate deinterlacers require an extra ProcessFrame() call.

Returns
true if deint name contains doubleprocess

Definition at line 688 of file videooutbase.cpp.

Referenced by MythPlayer::ChangeSpeed(), MythPlayer::ForceDeinterlacer(), MythPlayer::SetScanType(), and MythPlayer::VideoStart().

◆ ApproveDeintFilter()

bool VideoOutput::ApproveDeintFilter ( const QString &  filtername) const
virtual

Approves bobdeint filter for XVideo and otherwise defers to VideoOutput::ApproveDeintFilter(const QString&).

Approves all deinterlace filters, except ones which must be supported by a specific video output class.

Returns
whether current video output supports a specific filter.

Reimplemented in VideoOutputD3D, VideoOutputOpenGL, VideoOutputNullVDPAU, VideoOutputOMX, VideoOutputXv, VideoOutputOpenGLVAAPI, VideoOutputNullVAAPI, and VideoOutputVDPAU.

Definition at line 717 of file videooutbase.cpp.

Referenced by VideoOutputOMX::ApproveDeintFilter(), VideoOutputXv::ApproveDeintFilter(), VideoOutputOpenGL::ApproveDeintFilter(), and SetupDeinterlace().

◆ GetDeinterlacers()

void VideoOutput::GetDeinterlacers ( QStringList &  deinterlacers)

Definition at line 726 of file videooutbase.cpp.

Referenced by TV::PlaybackMenuInit().

◆ GetDeinterlacer()

QString VideoOutput::GetDeinterlacer ( void  )
inline

Definition at line 75 of file videooutbase.h.

Referenced by TV::PlaybackMenuInit().

◆ PrepareFrame()

virtual void VideoOutput::PrepareFrame ( VideoFrame buffer,
FrameScanType  ,
OSD osd 
)
pure virtual

◆ Show()

virtual void VideoOutput::Show ( FrameScanType  )
pure virtual

◆ GetProfile()

VideoDisplayProfile* VideoOutput::GetProfile ( )
inline

Definition at line 79 of file videooutbase.h.

◆ WindowResized()

virtual void VideoOutput::WindowResized ( const QSize &  )
inlinevirtual

Reimplemented in VideoOutputXv, and VideoOutputD3D.

Definition at line 82 of file videooutbase.h.

Referenced by MythPlayer::WindowResized().

◆ InputChanged()

VideoOutput::InputChanged ( const QSize &  video_dim_buf,
const QSize &  video_dim_disp,
float  aspect,
MythCodecID  myth_codec_id,
void *  codec_private,
bool aspect_changed 
)
virtual

Tells video output to discard decoded frames and wait for new ones.

Bug:
We set the new width height and aspect ratio here, but we should do this based on the new video frames in Show().
Parameters
video_dim_bufThe size of the video buffer.
video_dim_dispThe size of the video display.
aspectThe width/height of the presented video.
myth_codec_idThe video codec ID.
codec_privatePrivate data for the video codec.
aspect_changedAn output parameter indicating that only the aspect ratio has changed. It must be initialized to false before calling this function.

Reimplemented in VideoOutputXv, VideoOutputNullVDPAU, VideoOutputVDPAU, VideoOutputOMX, VideoOutputD3D, VideoOutputOpenGL, VideoOutputOpenGLVAAPI, VideoOutputNull, and VideoOutputNullVAAPI.

Definition at line 750 of file videooutbase.cpp.

Referenced by VideoOutputNull::InputChanged(), VideoOutputOMX::InputChanged(), VideoOutputXv::InputChanged(), and MythPlayer::ReinitVideo().

◆ VideoAspectRatioChanged()

void VideoOutput::VideoAspectRatioChanged ( float  aspect)
virtual

◆ ResizeDisplayWindow()

void VideoOutput::ResizeDisplayWindow ( const QRect &  rect,
bool  save_visible_rect 
)
virtual

Resize Display Window.

Definition at line 777 of file videooutbase.cpp.

Referenced by PlayerContext::ResizePIPWindow(), and VideoOutputOpenGL::SetupOpenGL().

◆ EmbedInWidget()

void VideoOutput::EmbedInWidget ( const QRect &  rect)
virtual

◆ StopEmbedding()

void VideoOutput::StopEmbedding ( void  )
virtual

◆ ResizeForGui()

void VideoOutput::ResizeForGui ( void  )
virtual

If we are using DisplayRes support, return the screen size and refresh rate to those used for the GUI.

Definition at line 1791 of file videooutbase.cpp.

Referenced by TV::DoEditSchedule(), and ~VideoOutput().

◆ ResizeForVideo()

void VideoOutput::ResizeForVideo ( uint  width = 0,
uint  height = 0 
)
virtual

Sets display parameters based on video resolution.

If we are using DisplayRes support we use the video size to determine the desired screen size and refresh rate. If we are also not using "GuiSizeForTV" we also resize the video output window.

Parameters
width,heightResolution of the video we will be playing

Definition at line 1808 of file videooutbase.cpp.

Referenced by TV::customEvent(), InitDisplayMeasurements(), and VideoOutputXv::InputChanged().

◆ MoveResizeWindow()

virtual void VideoOutput::MoveResizeWindow ( QRect  new_rect)
pure virtual

◆ MoveResize()

void VideoOutput::MoveResize ( void  )
virtual

performs all the calculations for video framing and any resizing.

First we apply playback over/underscanning and offsetting, then we letterbox settings, and finally we apply manual scale & move properties for "Zoom Mode".

See also
Zoom(ZoomDirection), ToggleAdjustFill(int)

Reimplemented in VideoOutputXv, and VideoOutputOpenGL.

Definition at line 899 of file videooutbase.cpp.

Referenced by VideoOutputVDPAU::EmbedInWidget(), VideoOutputNull::Init(), VideoOutputD3D::Init(), VideoOutputVDPAU::Init(), VideoOutputOMX::Init(), VideoOutputNull::InputChanged(), VideoOutputD3D::InputChanged(), VideoOutputOMX::InputChanged(), VideoOutputVDPAU::InputChanged(), VideoOutputOpenGL::MoveResize(), VideoOutputXv::MoveResize(), ResizeForVideo(), VideoOutputVDPAU::StopEmbedding(), VideoOutputNull::Zoom(), VideoOutputOMX::Zoom(), VideoOutputD3D::Zoom(), and VideoOutputVDPAU::Zoom().

◆ Zoom()

void VideoOutput::Zoom ( ZoomDirection  direction)
virtual

◆ ToggleMoveBottomLine()

void VideoOutput::ToggleMoveBottomLine ( void  )
virtual

Definition at line 920 of file videooutbase.cpp.

Referenced by MythPlayer::ToggleMoveBottomLine().

◆ SaveBottomLine()

void VideoOutput::SaveBottomLine ( void  )
virtual

Save current Manual Zoom settings as BottomLine adjustment.

Definition at line 929 of file videooutbase.cpp.

Referenced by MythPlayer::SaveBottomLine().

◆ GetOSDBounds()

void VideoOutput::GetOSDBounds ( QRect &  total,
QRect &  visible,
float &  visible_aspect,
float &  font_scaling,
float  themeAspect 
) const
virtual

◆ GetMHEGBounds()

QRect VideoOutput::GetMHEGBounds ( void  )

◆ DrawSlice()

void VideoOutput::DrawSlice ( VideoFrame frame,
int  x,
int  y,
int  w,
int  h 
)
virtual

Informs video output of new data for frame, used for hardware accelerated decoding.

Reimplemented in VideoOutputNullVDPAU, and VideoOutputVDPAU.

Definition at line 806 of file videooutbase.cpp.

Referenced by MythPlayer::DrawSlice().

◆ DrawUnusedRects()

virtual void VideoOutput::DrawUnusedRects ( bool  sync = true)
pure virtual

Draws non-video portions of the screen.

Parameters
syncif set any queued up draws are sent immediately to the graphics context and we block until they have completed.

Implemented in VideoOutputXv, VideoOutputNullVDPAU, VideoOutputOMX, VideoOutputVDPAU, VideoOutputNullVAAPI, VideoOutputD3D, VideoOutputOpenGL, and VideoOutputNull.

◆ GetDisplayAspect()

float VideoOutput::GetDisplayAspect ( void  ) const
virtual

Returns current display aspect ratio.

Definition at line 1341 of file videooutbase.cpp.

Referenced by GetVisibleOSDBounds().

◆ GetAspectOverride()

AspectOverrideMode VideoOutput::GetAspectOverride ( void  ) const

Returns current aspect override mode.

See also
ToggleAspectOverride(AspectOverrideMode)

Definition at line 1331 of file videooutbase.cpp.

Referenced by MythPlayer::GetAspectOverride().

◆ ToggleAspectOverride()

void VideoOutput::ToggleAspectOverride ( AspectOverrideMode  aspectMode = kAspect_Toggle)
virtual

Enforce different aspect ration than detected, then calls VideoAspectRatioChanged(float) to apply them.

See also
Zoom(ZoomDirection), ToggleAdjustFill(AdjustFillMode)

Definition at line 941 of file videooutbase.cpp.

Referenced by MythPlayer::ToggleAspectOverride().

◆ GetAdjustFill()

AdjustFillMode VideoOutput::GetAdjustFill ( void  ) const

Returns current adjust fill mode.

See also
ToggleAdjustFill(AdjustFillMode)

Definition at line 1336 of file videooutbase.cpp.

Referenced by MythPlayer::GetAdjustFill().

◆ ToggleAdjustFill()

void VideoOutput::ToggleAdjustFill ( AdjustFillMode  adjustFillMode = kAdjustFill_Toggle)
virtual

Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize() to apply them.

See also
Zoom(ZoomDirection), ToggleAspectOverride(AspectOverrideMode)

Definition at line 953 of file videooutbase.cpp.

Referenced by MythPlayer::ToggleAdjustFill().

◆ GetZoomString()

QString VideoOutput::GetZoomString ( void  ) const
inline

Definition at line 143 of file videooutbase.h.

Referenced by TV::ManualZoomHandleAction(), and TV::ToggleMoveBottomLine().

◆ ProcessFrame()

virtual void VideoOutput::ProcessFrame ( VideoFrame frame,
OSD osd,
FilterChain filterList,
const PIPMap pipPlayers,
FrameScanType  scan = kScan_Ignore 
)
pure virtual

◆ CropToDisplay()

void VideoOutput::CropToDisplay ( VideoFrame frame)

◆ ExposeEvent()

void VideoOutput::ExposeEvent ( void  )

Tells video output that a full repaint is needed.

Definition at line 1781 of file videooutbase.cpp.

Referenced by MythPlayer::ExposeEvent(), and MythPlayer::UnpauseVideo().

◆ GetSupportedPictureAttributes()

PictureAttributeSupported VideoOutput::GetSupportedPictureAttributes ( void  )
inline

◆ ChangePictureAttribute()

int VideoOutput::ChangePictureAttribute ( PictureAttribute  attributeType,
bool  direction 
)

Definition at line 958 of file videooutbase.cpp.

Referenced by TV::DoChangePictureAttribute().

◆ SetPictureAttribute()

int VideoOutput::SetPictureAttribute ( PictureAttribute  attribute,
int  newValue 
)
virtual

Sets a specified picture attribute.

Parameters
attributePicture attribute to set.
newValueValue to set attribute to.
Returns
Set value if it succeeds, -1 if it does not.

Reimplemented in VideoOutputXv, VideoOutputVDPAU, VideoOutputOpenGL, and VideoOutputOpenGLVAAPI.

Definition at line 985 of file videooutbase.cpp.

Referenced by ChangePictureAttribute(), TV::DoChangePictureAttribute(), VideoOutputOpenGL::SetPictureAttribute(), MythPlayer::ToggleNightMode(), and MythPlayer::ToggleStudioLevels().

◆ GetPictureAttribute()

int VideoOutput::GetPictureAttribute ( PictureAttribute  attributeType)

◆ InitPictureAttributes()

virtual void VideoOutput::InitPictureAttributes ( void  )
inlinevirtual

Reimplemented in VideoOutputXv, VideoOutputVDPAU, VideoOutputOpenGL, and VideoOutputOpenGLVAAPI.

Definition at line 160 of file videooutbase.h.

◆ AllowPreviewEPG()

bool VideoOutput::AllowPreviewEPG ( void  ) const

Definition at line 884 of file videooutbase.cpp.

Referenced by TV::DoEditSchedule().

◆ GetName()

virtual QString VideoOutput::GetName ( void  ) const
inlinevirtual

Reimplemented in VideoOutputOMX.

Definition at line 164 of file videooutbase.h.

Referenced by TV::HandleStateChange().

◆ IsPIPSupported()

virtual bool VideoOutput::IsPIPSupported ( void  ) const
inlinevirtual

◆ IsPBPSupported()

virtual bool VideoOutput::IsPBPSupported ( void  ) const
inlinevirtual

Reimplemented in VideoOutputXv, VideoOutputVDPAU, and VideoOutputOMX.

Definition at line 166 of file videooutbase.h.

Referenced by PlayerContext::IsPBPSupported().

◆ NeedExtraAudioDecode()

virtual bool VideoOutput::NeedExtraAudioDecode ( void  ) const
inlinevirtual

Reimplemented in VideoOutputXv, and VideoOutputVDPAU.

Definition at line 167 of file videooutbase.h.

◆ hasHWAcceleration()

virtual bool VideoOutput::hasHWAcceleration ( void  ) const
inlinevirtual

Return true if HW Acceleration is running.

Reimplemented in VideoOutputVDPAU, and VideoOutputD3D.

Definition at line 170 of file videooutbase.h.

Referenced by TV::PlaybackMenuInit(), and MythPlayer::PrebufferEnoughFrames().

◆ GetDecoderContext()

virtual void* VideoOutput::GetDecoderContext ( unsigned char *  ,
uint8_t *&   
)
inlinevirtual

◆ SetFramesPlayed()

virtual void VideoOutput::SetFramesPlayed ( long long  fp)
inlinevirtual

Sets the number of frames played.

Definition at line 174 of file videooutbase.h.

Referenced by MythPlayer::SetFramesPlayed().

◆ GetFramesPlayed()

virtual long long VideoOutput::GetFramesPlayed ( void  )
inlinevirtual

Returns the number of frames played.

Definition at line 176 of file videooutbase.h.

Referenced by MythPlayer::Pause(), and MythPlayer::VideoLoop().

◆ IsErrored()

bool VideoOutput::IsErrored ( void  ) const
inline

◆ GetError()

VideoErrorState VideoOutput::GetError ( void  ) const
inline

Returns error type.

Definition at line 181 of file videooutbase.h.

Referenced by MythPlayer::SetErrored().

◆ SetPrebuffering()

void VideoOutput::SetPrebuffering ( bool  normal)
inline

Sets whether to use a normal number of buffers or fewer buffers.

Definition at line 184 of file videooutbase.h.

Referenced by MythPlayer::ChangeSpeed().

◆ ClearAfterSeek()

virtual void VideoOutput::ClearAfterSeek ( void  )
inlinevirtual

Tells video output to toss decoded buffers due to a seek.

Reimplemented in VideoOutputNullVDPAU, VideoOutputXv, and VideoOutputVDPAU.

Definition at line 186 of file videooutbase.h.

Referenced by MythPlayer::ClearAfterSeek().

◆ ValidVideoFrames()

virtual int VideoOutput::ValidVideoFrames ( void  ) const
inlinevirtual

◆ FreeVideoFrames()

int VideoOutput::FreeVideoFrames ( void  )
inline

Returns number of frames available for decoding onto.

Definition at line 192 of file videooutbase.h.

Referenced by MythPlayer::GetFreeVideoFrames(), MythPlayer::GetPlaybackData(), and MythDVDPlayer::VideoLoop().

◆ EnoughFreeFrames()

bool VideoOutput::EnoughFreeFrames ( void  )
inline

Returns true iff enough frames are available to decode onto.

Definition at line 194 of file videooutbase.h.

Referenced by MythPlayer::DecoderGetFrame(), MythPlayer::PrebufferEnoughFrames(), and MythDVDPlayer::VideoLoop().

◆ EnoughDecodedFrames()

bool VideoOutput::EnoughDecodedFrames ( void  )
inline

Returns true iff there are plenty of decoded frames ready for display.

Definition at line 197 of file videooutbase.h.

Referenced by MythPlayer::PrebufferEnoughFrames().

◆ EnoughPrebufferedFrames()

bool VideoOutput::EnoughPrebufferedFrames ( void  )
inline

Returns true iff we have at least the minimum number of decoded frames ready for display.

Definition at line 200 of file videooutbase.h.

Referenced by MythPlayer::PrebufferEnoughFrames().

◆ IsEmbedding()

bool VideoOutput::IsEmbedding ( void  )

Returns if videooutput is embedding.

Definition at line 1776 of file videooutbase.cpp.

Referenced by MythPlayer::IsEmbedding(), and VideoOutputOMX::PrepareFrame().

◆ GetNextFreeFrame()

virtual VideoFrame* VideoOutput::GetNextFreeFrame ( void  )
inlinevirtual

Blocks until it is possible to return a frame for decoding onto.

Definition at line 208 of file videooutbase.h.

Referenced by MythPlayer::GetNextVideoFrame().

◆ ReleaseFrame()

virtual void VideoOutput::ReleaseFrame ( VideoFrame frame)
inlinevirtual

Releases a frame from the ready for decoding queue onto the queue of frames ready for display.

Reimplemented in VideoOutputNullVDPAU, and VideoOutputNullVAAPI.

Definition at line 212 of file videooutbase.h.

Referenced by VideoOutputNullVAAPI::ReleaseFrame(), VideoOutputNullVDPAU::ReleaseFrame(), and MythPlayer::ReleaseNextVideoFrame().

◆ DeLimboFrame()

virtual void VideoOutput::DeLimboFrame ( VideoFrame frame)
inlinevirtual

Releases a frame for reuse if it is in limbo.

Definition at line 214 of file videooutbase.h.

Referenced by MythPlayer::DeLimboFrame().

◆ StartDisplayingFrame()

virtual void VideoOutput::StartDisplayingFrame ( void  )
inlinevirtual

Tell GetLastShownFrame() to return the next frame from the head of the queue of frames to display.

Definition at line 217 of file videooutbase.h.

Referenced by MythPlayer::DisplayNormalFrame(), MythPlayer::GetRawVideoFrame(), MythCCExtractorPlayer::OnGotNewFrame(), and VideoPerformanceTest::Test().

◆ DoneDisplayingFrame()

virtual void VideoOutput::DoneDisplayingFrame ( VideoFrame frame)
inlinevirtual

Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.

Reimplemented in VideoOutputVDPAU, VideoOutputNullVDPAU, and VideoOutputNullVAAPI.

Definition at line 220 of file videooutbase.h.

Referenced by MythPlayer::DisplayNormalFrame(), MythCCExtractorPlayer::OnGotNewFrame(), VideoPerformanceTest::Test(), and Transcode::TranscodeFile().

◆ DiscardFrame()

virtual void VideoOutput::DiscardFrame ( VideoFrame frame)
inlinevirtual

Releases frame from any queue onto the queue of frames ready for decoding onto.

Reimplemented in VideoOutputXv, VideoOutputVDPAU, VideoOutputNullVDPAU, and VideoOutputNullVAAPI.

Definition at line 224 of file videooutbase.h.

Referenced by MythPlayer::DiscardVideoFrame(), and VideoOutputNullVAAPI::DoneDisplayingFrame().

◆ DiscardFrames()

virtual void VideoOutput::DiscardFrames ( bool  kf)
inlinevirtual

Releases all frames not being actively displayed from any queue onto the queue of frames ready for decoding onto.

Reimplemented in VideoOutputXv, VideoOutputVDPAU, and VideoOutputNullVDPAU.

Definition at line 227 of file videooutbase.h.

Referenced by VideoOutputNullVAAPI::DeleteBuffers(), VideoOutputOpenGL::DestroyCPUResources(), MythPlayer::DiscardVideoFrames(), and InputChanged().

◆ ClearDummyFrame()

void VideoOutput::ClearDummyFrame ( VideoFrame frame)
virtual

Clears the frame to black.

Subclasses may choose to mark the frame as a dummy and act appropriately

Reimplemented in VideoOutputVDPAU.

Definition at line 1370 of file videooutbase.cpp.

Referenced by VideoOutputVDPAU::ClearDummyFrame(), and MythPlayer::ClearDummyVideoFrame().

◆ CheckFrameStates()

virtual void VideoOutput::CheckFrameStates ( void  )
inlinevirtual

Reimplemented in VideoOutputVDPAU, and VideoOutputNullVDPAU.

Definition at line 231 of file videooutbase.h.

◆ GetLastDecodedFrame()

virtual VideoFrame* VideoOutput::GetLastDecodedFrame ( void  )
inlinevirtual
Bug:
not implemented correctly. vpos is not updated.

Reimplemented in VideoOutputNullVDPAU, and VideoOutputNullVAAPI.

Definition at line 234 of file videooutbase.h.

Referenced by MythPlayer::GetScreenGrabAtFrame(), VideoDecodeBuffer::run(), MythPlayer::SeekForScreenGrab(), and MythPlayer::TranscodeGetNextFrame().

◆ GetLastShownFrame()

virtual VideoFrame* VideoOutput::GetLastShownFrame ( void  )
inlinevirtual

◆ GetFrameStatus()

QString VideoOutput::GetFrameStatus ( void  ) const
inline

Returns string with status of each frame for debugging.

Definition at line 243 of file videooutbase.h.

Referenced by MythPlayer::PrebufferEnoughFrames().

◆ UpdatePauseFrame()

virtual void VideoOutput::UpdatePauseFrame ( int64_t &  disp_timecode)
pure virtual

◆ SetVideoResize()

void VideoOutput::SetVideoResize ( const QRect &  videoRect)

Tells the player to resize the video frame (used for ITV)

Definition at line 1379 of file videooutbase.cpp.

Referenced by MythPlayer::SetVideoResize().

◆ SetVideoScalingAllowed()

void VideoOutput::SetVideoScalingAllowed ( bool  change)

Disable or enable underscan/overscan.

Definition at line 1397 of file videooutbase.cpp.

Referenced by Create().

◆ IsVideoScalingAllowed()

bool VideoOutput::IsVideoScalingAllowed ( void  ) const

check if video underscan/overscan is allowed

Definition at line 1346 of file videooutbase.cpp.

◆ SetVideoFlip()

virtual void VideoOutput::SetVideoFlip ( void  )
inlinevirtual

Tells the player to flip the video frames for proper display.

Reimplemented in VideoOutputVDPAU.

Definition at line 257 of file videooutbase.h.

Referenced by MythPlayer::InitVideo().

◆ GetPIPRect()

QRect VideoOutput::GetPIPRect ( PIPLocation  location,
MythPlayer pipplayer = nullptr,
bool  do_pixel_adj = true 
) const
virtual

◆ RemovePIP()

virtual void VideoOutput::RemovePIP ( MythPlayer )
inlinevirtual

Reimplemented in VideoOutputVDPAU, VideoOutputD3D, and VideoOutputOpenGL.

Definition at line 263 of file videooutbase.h.

Referenced by MythPlayer::RemovePIPPlayer().

◆ SetPIPState()

void VideoOutput::SetPIPState ( PIPState  setting)
virtual

Definition at line 1758 of file videooutbase.cpp.

Referenced by Create().

◆ GetOSDRenderer()

QString VideoOutput::GetOSDRenderer ( void  ) const
virtual

◆ GetOSDPainter()

virtual MythPainter* VideoOutput::GetOSDPainter ( void  )
inlinevirtual

◆ GetScreenShot()

virtual bool VideoOutput::GetScreenShot ( int  = 0,
int  = 0,
QString  = "" 
)
inlinevirtual

Reimplemented in VideoOutputVDPAU.

Definition at line 269 of file videooutbase.h.

Referenced by MythPlayer::GetScreenShot().

◆ GetFilters()

QString VideoOutput::GetFilters ( void  ) const

◆ GetImageRect()

QRect VideoOutput::GetImageRect ( const QRect &  rect,
QRect *  display = nullptr 
)

translates caption/dvd button rectangle into 'screen' space

Definition at line 1677 of file videooutbase.cpp.

Referenced by SubtitleScreen::AddScaledImage(), BDOverlayScreen::DisplayBDOverlay(), and SubtitleScreen::DisplayScaledAVSubtitles().

◆ GetSafeRect()

QRect VideoOutput::GetSafeRect ( void  )

Returns a QRect describing an area of the screen on which it is 'safe' to render the On Screen Display.

For 'fullscreen' OSDs this will still translate to a subset of the video frame area to ensure consistency of presentation for subtitling etc.

Definition at line 1747 of file videooutbase.cpp.

Referenced by SubtitleScreen::DisplayCC608Subtitles(), SubtitleScreen::DisplayCC708Subtitles(), SubtitleScreen::DisplayRawTextSubtitles(), SubtitleScreen::DisplayTextSubtitles(), and TeletextScreen::Pulse().

◆ EnableVisualisation()

bool VideoOutput::EnableVisualisation ( AudioPlayer audio,
bool  enable,
const QString &  name = QString("") 
)

Definition at line 1616 of file videooutbase.cpp.

Referenced by MythPlayer::EnableVisualisation().

◆ CanVisualise()

bool VideoOutput::CanVisualise ( AudioPlayer audio,
MythRender render 
)
virtual

◆ SetupVisualisation()

bool VideoOutput::SetupVisualisation ( AudioPlayer audio,
MythRender render,
const QString &  name 
)
virtual

◆ GetVisualisation()

VideoVisual* VideoOutput::GetVisualisation ( void  )
inline

Definition at line 282 of file videooutbase.h.

Referenced by MythPlayer::IsVisualising().

◆ GetVisualiserName()

QString VideoOutput::GetVisualiserName ( void  )

Definition at line 1640 of file videooutbase.cpp.

Referenced by MythPlayer::GetVisualiserName().

◆ GetVisualiserList()

QStringList VideoOutput::GetVisualiserList ( void  )
virtual

◆ DestroyVisualisation()

void VideoOutput::DestroyVisualisation ( void  )

Definition at line 1652 of file videooutbase.cpp.

Referenced by EnableVisualisation(), and SetupVisualisation().

◆ CalcHueBase()

int VideoOutput::CalcHueBase ( const QString &  adaptor_name)
static

Definition at line 1979 of file videooutbase.cpp.

Referenced by VAAPIContext::CreateDisplay(), and VideoOutputXv::InitXVideo().

◆ StereoscopicModesAllowed()

virtual bool VideoOutput::StereoscopicModesAllowed ( void  ) const
inlinevirtual

Reimplemented in VideoOutputOpenGL.

Definition at line 291 of file videooutbase.h.

Referenced by TV::Handle3D(), and TV::PlaybackMenuInit().

◆ SetStereoscopicMode()

void VideoOutput::SetStereoscopicMode ( StereoscopicMode  mode)
inline

Definition at line 292 of file videooutbase.h.

Referenced by TV::Handle3D().

◆ GetStereoscopicMode()

StereoscopicMode VideoOutput::GetStereoscopicMode ( void  ) const
inline

Definition at line 293 of file videooutbase.h.

Referenced by TV::PlaybackMenuInit().

◆ InitBuffers()

void VideoOutput::InitBuffers ( int  numdecode,
bool  extra_for_pause,
int  need_free,
int  needprebuffer_normal,
int  needprebuffer_small,
int  keepprebuffer 
)
protected

◆ InitDisplayMeasurements()

void VideoOutput::InitDisplayMeasurements ( uint  width,
uint  height,
bool  resize 
)
protected

Init display measurements based on database settings and actual screen parameters.

Definition at line 1865 of file videooutbase.cpp.

Referenced by VideoOutputOpenGL::CreateGPUResources(), VideoOutputD3D::Init(), VideoOutputVDPAU::Init(), VideoOutputXv::Init(), VideoOutputOMX::Init(), and VideoOutputOpenGL::ProcessFrame().

◆ ShowPIPs()

void VideoOutput::ShowPIPs ( VideoFrame frame,
const PIPMap pipPlayers 
)
protectedvirtual

◆ ShowPIP()

void VideoOutput::ShowPIP ( VideoFrame frame,
MythPlayer pipplayer,
PIPLocation  loc 
)
protectedvirtual

Composites PiP image onto a video frame.

Note: This only works with memory backed VideoFrames.

Parameters
frameFrame to composite PiP onto.
pipplayerPicture-in-Picture Player.
locLocation of this PiP on the frame.

Reimplemented in VideoOutputVDPAU, VideoOutputD3D, and VideoOutputOpenGL.

Definition at line 1089 of file videooutbase.cpp.

Referenced by ShowPIPs().

◆ DisplayOSD()

bool VideoOutput::DisplayOSD ( VideoFrame frame,
OSD osd 
)
protectedvirtual

If the OSD has changed, this will convert the OSD buffer to the OSDSurface's color format.

If the destination format is either IA44 or AI44 the osd is converted to greyscale.

Returns
true if visible, false otherwise

Reimplemented in VideoOutputOMX.

Definition at line 1477 of file videooutbase.cpp.

Referenced by VideoOutputOMX::DisplayOSD(), and VideoOutputXv::ProcessFrame().

◆ GetVisibleOSDBounds()

QRect VideoOutput::GetVisibleOSDBounds ( float &  visible_aspect,
float &  font_scaling,
float  themeaspect 
) const
protected

Returns visible portions of total OSD bounds.

Parameters
visible_aspectphysical aspect ratio of bounds returned
font_scalingscaling to apply to fonts
themeaspectaspect ration of the theme

Definition at line 830 of file videooutbase.cpp.

Referenced by GetImageRect(), GetOSDBounds(), and GetSafeRect().

◆ GetTotalOSDBounds()

QRect VideoOutput::GetTotalOSDBounds ( void  ) const
protected

◆ hasFullScreenOSD()

virtual bool VideoOutput::hasFullScreenOSD ( void  ) const
inlineprotectedvirtual

◆ CopyFrame()

void VideoOutput::CopyFrame ( VideoFrame to,
const VideoFrame from 
)
staticprotected

Copies frame data from one VideoFrame to another.

Note: The frames must have the same width, height, and format.

Parameters
toThe destination frame.
fromThe source frame

Definition at line 1666 of file videooutbase.cpp.

Referenced by VideoOutputOpenGL::ProcessFrame(), VideoOutputD3D::ProcessFrame(), VideoOutputXv::ProcessFrame(), VideoOutputOMX::ProcessFrame(), VideoOutputOpenGLVAAPI::UpdatePauseFrame(), VideoOutputNull::UpdatePauseFrame(), VideoOutputOpenGL::UpdatePauseFrame(), VideoOutputD3D::UpdatePauseFrame(), VideoOutputOMX::UpdatePauseFrame(), and VideoOutputXv::UpdatePauseFrame().

◆ DoPipResize()

void VideoOutput::DoPipResize ( int  pipwidth,
int  pipheight 
)
protected

Sets up Picture in Picture image resampler.

Parameters
pipwidthinput width
pipheightinput height
See also
ShutdownPipResize(), ShowPIPs(VideoFrame*,const PIPMap&)

Definition at line 1019 of file videooutbase.cpp.

Referenced by ShowPIP().

◆ ShutdownPipResize()

void VideoOutput::ShutdownPipResize ( void  )
protected

Shuts down Picture in Picture image resampler.

See also
VideoOutput::DoPipResize(int,int), ShowPIPs(VideoFrame*,const PIPMap&)

Definition at line 1050 of file videooutbase.cpp.

Referenced by DoPipResize(), and ~VideoOutput().

◆ ResizeVideo()

void VideoOutput::ResizeVideo ( VideoFrame frame)
protected

Definition at line 1237 of file videooutbase.cpp.

Referenced by DisplayOSD().

◆ DoVideoResize()

void VideoOutput::DoVideoResize ( const QSize &  inDim,
const QSize &  outDim 
)
protected

Sets up Picture in Picture image resampler.

Parameters
inDiminput width and height
outDimoutput width and height
See also
ShutdownPipResize(), ShowPIPs(VideoFrame*,const PIPMap&)

Definition at line 1214 of file videooutbase.cpp.

Referenced by ResizeVideo().

◆ ShutdownVideoResize()

void VideoOutput::ShutdownVideoResize ( void  )
protectedvirtual

Definition at line 1351 of file videooutbase.cpp.

Referenced by DoVideoResize(), ResizeVideo(), SetVideoResize(), and ~VideoOutput().

Member Data Documentation

◆ window

VideoOutWindow VideoOutput::window
protected

Definition at line 320 of file videooutbase.h.

Referenced by AllowPreviewEPG(), Create(), VideoOutputOpenGL::CreateBuffers(), VideoOutputXv::CreateBuffers(), VideoOutputD3D::CreateDecoder(), VideoOutputOpenGL::CreateGPUResources(), VideoOutputXv::CreateShmImages(), VideoOutputOpenGLVAAPI::CreateVAAPIContext(), VideoOutputVDPAU::CreateVideoSurfaces(), VideoOutputNullVDPAU::CreateVideoSurfaces(), CropToDisplay(), DisplayOSD(), VideoOutputVDPAU::DrawSlice(), VideoOutputNullVDPAU::DrawSlice(), VideoOutputVDPAU::DrawUnusedRects(), VideoOutputXv::DrawUnusedRects(), VideoOutputNull::EmbedInWidget(), VideoOutputOMX::EmbedInWidget(), VideoOutputD3D::EmbedInWidget(), VideoOutputOpenGL::EmbedInWidget(), VideoOutputVDPAU::EmbedInWidget(), VideoOutputXv::EmbedInWidget(), EmbedInWidget(), ExposeEvent(), GetAdjustFill(), GetAspectOverride(), GetDisplayAspect(), GetImageRect(), GetMHEGBounds(), VideoOutputOMX::GetPIPRect(), VideoOutputXv::GetPIPRect(), GetPIPRect(), GetTotalOSDBounds(), GetVisibleOSDBounds(), VideoOutputNull::Init(), VideoOutputNullVAAPI::Init(), VideoOutputOpenGLVAAPI::Init(), VideoOutputOpenGL::Init(), VideoOutputD3D::Init(), VideoOutputVDPAU::Init(), VideoOutputXv::Init(), VideoOutputOMX::Init(), Init(), VideoOutputNullVAAPI::InitBuffers(), VideoOutputD3D::InitBuffers(), VideoOutputNullVDPAU::InitBuffers(), VideoOutputVDPAU::InitBuffers(), InitDisplayMeasurements(), VideoOutputVDPAU::InitPictureAttributes(), VideoOutputVDPAU::InitRender(), VideoOutputXv::InitSetupBuffers(), VideoOutputXv::InitVideoBuffers(), VideoOutputXv::InitXlib(), VideoOutputXv::InitXShm(), VideoOutputXv::InitXVideo(), VideoOutputNullVAAPI::InputChanged(), VideoOutputNull::InputChanged(), VideoOutputOpenGLVAAPI::InputChanged(), VideoOutputOpenGL::InputChanged(), VideoOutputD3D::InputChanged(), VideoOutputOMX::InputChanged(), VideoOutputVDPAU::InputChanged(), VideoOutputNullVDPAU::InputChanged(), VideoOutputXv::InputChanged(), InputChanged(), IsEmbedding(), IsVideoScalingAllowed(), VideoOutputOpenGL::MoveResize(), VideoOutputXv::MoveResize(), MoveResize(), VideoOutputOpenGL::PrepareFrame(), VideoOutputD3D::PrepareFrame(), VideoOutputVDPAU::PrepareFrame(), VideoOutputOMX::PrepareFrame(), VideoOutputXv::PrepareFrameMem(), VideoOutputOpenGL::ProcessFrame(), VideoOutputD3D::ProcessFrame(), VideoOutputXv::ProcessFrame(), VideoOutputOMX::ProcessFrame(), ChromaKeyOSD::ProcessOSD(), ResizeDisplayWindow(), ResizeForVideo(), VideoOutputVDPAU::RestoreDisplay(), SaveBottomLine(), SetPIPState(), VideoOutputD3D::SetupContext(), VideoOutputXv::SetupDeinterlace(), SetupDeinterlace(), VideoOutputOpenGL::SetupOpenGL(), VideoOutputOMX::SetVideoRect(), SetVideoScalingAllowed(), VideoOutputD3D::Show(), VideoOutputVDPAU::Show(), VideoOutputXv::Show(), VideoOutputOpenGL::ShowPIP(), VideoOutputVDPAU::ShowPIP(), ShowPIP(), VideoOutputXv::ShowXVideo(), VideoOutputNull::StopEmbedding(), VideoOutputOMX::StopEmbedding(), VideoOutputD3D::StopEmbedding(), VideoOutputOpenGL::StopEmbedding(), VideoOutputVDPAU::StopEmbedding(), VideoOutputXv::StopEmbedding(), StopEmbedding(), ToggleAdjustFill(), ToggleAspectOverride(), ToggleMoveBottomLine(), VideoAspectRatioChanged(), VideoOutputXv::WindowResized(), Zoom(), and VideoOutputXv::~VideoOutputXv().

◆ db_display_dim

QSize VideoOutput::db_display_dim
protected

Screen dimensions in millimeters from DB.

Definition at line 321 of file videooutbase.h.

Referenced by InitDisplayMeasurements(), and VideoOutput().

◆ videoColourSpace

VideoColourSpace VideoOutput::videoColourSpace
protected

◆ db_aspectoverride

AspectOverrideMode VideoOutput::db_aspectoverride
protected

Definition at line 323 of file videooutbase.h.

Referenced by Init(), and VideoOutput().

◆ db_adjustfill

AdjustFillMode VideoOutput::db_adjustfill
protected

Definition at line 324 of file videooutbase.h.

Referenced by Init(), and VideoOutput().

◆ db_letterbox_colour

LetterBoxColour VideoOutput::db_letterbox_colour
protected

◆ db_deint_filtername

QString VideoOutput::db_deint_filtername
protected

Definition at line 326 of file videooutbase.h.

◆ video_codec_id

MythCodecID VideoOutput::video_codec_id
protected

Definition at line 329 of file videooutbase.h.

Referenced by VideoOutputD3D::ApproveDeintFilter(), VideoOutputVDPAU::ClearDummyFrame(), VideoOutputOpenGLVAAPI::CreateBuffers(), VideoOutputOpenGL::CreateBuffers(), VideoOutputD3D::CreateBuffers(), VideoOutputD3D::CreateDecoder(), VideoOutputD3D::CreatePauseFrame(), VideoOutputOpenGLVAAPI::CreateVAAPIContext(), VideoOutputNullVAAPI::CreateVAAPIContext(), VideoOutputVDPAU::CreateVideoSurfaces(), VideoOutputVDPAU::DrawSlice(), VideoOutputNullVDPAU::DrawSlice(), VideoOutputVDPAU::FrameIsInUse(), VideoOutputD3D::hasHWAcceleration(), VideoOutputVDPAU::hasHWAcceleration(), VideoOutputOpenGLVAAPI::Init(), VideoOutputNullVAAPI::Init(), VideoOutputD3D::Init(), VideoOutputVDPAU::Init(), VideoOutputNullVDPAU::Init(), Init(), VideoOutputNullVAAPI::InitBuffers(), VideoOutputD3D::InitBuffers(), VideoOutputNullVDPAU::InitBuffers(), VideoOutputVDPAU::InitBuffers(), VideoOutputOpenGLVAAPI::InitPictureAttributes(), VideoOutputOpenGL::InitPictureAttributes(), VideoOutputXv::InitSetupBuffers(), VideoOutputNullVDPAU::InitShadowBuffers(), VideoOutputNullVAAPI::InputChanged(), VideoOutputOpenGLVAAPI::InputChanged(), VideoOutputOpenGL::InputChanged(), VideoOutputD3D::InputChanged(), VideoOutputOMX::InputChanged(), VideoOutputVDPAU::InputChanged(), VideoOutputNullVDPAU::InputChanged(), VideoOutputXv::InputChanged(), InputChanged(), VideoOutputVDPAU::NeedExtraAudioDecode(), VideoOutputVDPAU::ParseOptions(), VideoOutputD3D::PrepareFrame(), VideoOutputOpenGLVAAPI::PrepareFrame(), VideoOutputVDPAU::PrepareFrame(), VideoOutputOpenGL::ProcessFrame(), VideoOutputD3D::ProcessFrame(), VideoOutputVDPAU::ProcessFrame(), VideoOutputOpenGLVAAPI::SetPictureAttribute(), VideoOutputVDPAU::SetupDeinterlace(), VideoOutputOpenGL::SetupOpenGL(), VideoOutputD3D::UpdateFrame(), VideoOutputOpenGLVAAPI::UpdatePauseFrame(), VideoOutputD3D::UpdatePauseFrame(), VideoOutputVDPAU::UpdatePauseFrame(), and VideoOutputVDPAU::UpdateReferenceFrames().

◆ db_vdisp_profile

VideoDisplayProfile* VideoOutput::db_vdisp_profile
protected

◆ pip_desired_display_size

QSize VideoOutput::pip_desired_display_size
protected

Definition at line 333 of file videooutbase.h.

Referenced by DoPipResize(), and ShowPIP().

◆ pip_display_size

QSize VideoOutput::pip_display_size
protected

Definition at line 334 of file videooutbase.h.

Referenced by DoPipResize(), ShowPIP(), and ShutdownPipResize().

◆ pip_video_size

QSize VideoOutput::pip_video_size
protected

Definition at line 335 of file videooutbase.h.

Referenced by DoPipResize(), and ShutdownPipResize().

◆ pip_tmp_buf

unsigned char* VideoOutput::pip_tmp_buf
protected

Definition at line 336 of file videooutbase.h.

Referenced by DoPipResize(), ShowPIP(), and ShutdownPipResize().

◆ pip_tmp_buf2

unsigned char* VideoOutput::pip_tmp_buf2
protected

Definition at line 337 of file videooutbase.h.

Referenced by DoPipResize(), ShowPIP(), and ShutdownPipResize().

◆ pip_scaling_context

struct SwsContext* VideoOutput::pip_scaling_context
protected

Definition at line 338 of file videooutbase.h.

Referenced by DoPipResize(), ShowPIP(), and ShutdownPipResize().

◆ pip_tmp_image

VideoFrame VideoOutput::pip_tmp_image
protected

Definition at line 339 of file videooutbase.h.

Referenced by ShowPIP(), and VideoOutput().

◆ vsz_enabled

bool VideoOutput::vsz_enabled
protected

◆ vsz_desired_display_rect

QRect VideoOutput::vsz_desired_display_rect
protected

◆ vsz_display_size

QSize VideoOutput::vsz_display_size
protected

Definition at line 344 of file videooutbase.h.

Referenced by DoVideoResize(), and ShutdownVideoResize().

◆ vsz_video_size

QSize VideoOutput::vsz_video_size
protected

Definition at line 345 of file videooutbase.h.

Referenced by DoVideoResize(), and ShutdownVideoResize().

◆ vsz_tmp_buf

unsigned char* VideoOutput::vsz_tmp_buf
protected

Definition at line 346 of file videooutbase.h.

Referenced by DoVideoResize(), ResizeVideo(), and ShutdownVideoResize().

◆ vsz_scale_context

struct SwsContext* VideoOutput::vsz_scale_context
protected

Definition at line 347 of file videooutbase.h.

Referenced by DoVideoResize(), ResizeVideo(), and ShutdownVideoResize().

◆ m_deinterlacing

bool VideoOutput::m_deinterlacing
protected

◆ m_deintfiltername

QString VideoOutput::m_deintfiltername
protected

◆ m_deintFiltMan

FilterManager* VideoOutput::m_deintFiltMan
protected

◆ m_deintFilter

FilterChain* VideoOutput::m_deintFilter
protected

◆ m_deinterlaceBeforeOSD

bool VideoOutput::m_deinterlaceBeforeOSD
protected

◆ vbuffers

VideoBuffers VideoOutput::vbuffers
protected

VideoBuffers instance used to track video output buffers.

Definition at line 357 of file videooutbase.h.

Referenced by VideoOutputNullVDPAU::BufferSizeCheck(), VideoOutputNullVDPAU::CheckFrameStates(), VideoOutputVDPAU::CheckFrameStates(), VideoOutputOpenGLVAAPI::CreateBuffers(), VideoOutputOpenGL::CreateBuffers(), VideoOutputD3D::CreateBuffers(), VideoOutputOMX::CreateBuffers(), VideoOutputXv::CreateBuffers(), VideoOutputNull::CreatePauseFrame(), VideoOutputOpenGL::CreatePauseFrame(), VideoOutputD3D::CreatePauseFrame(), VideoOutputOMX::CreatePauseFrame(), VideoOutputXv::CreatePauseFrame(), VideoOutputOpenGLVAAPI::CreateVAAPIContext(), VideoOutputNullVAAPI::DeleteBuffers(), VideoOutputOMX::DeleteBuffers(), VideoOutputNullVDPAU::DeleteBuffers(), VideoOutputVDPAU::DeleteBuffers(), VideoOutputXv::DeleteBuffers(), VideoOutputOpenGL::DestroyCPUResources(), VideoOutputNullVAAPI::DiscardFrame(), VideoOutputNullVDPAU::DiscardFrame(), VideoOutputVDPAU::DiscardFrame(), VideoOutputXv::DiscardFrame(), VideoOutputNullVDPAU::DiscardFrames(), VideoOutputVDPAU::DiscardFrames(), VideoOutputXv::DiscardFrames(), VideoOutputNullVAAPI::DoneDisplayingFrame(), VideoOutputNullVDPAU::DoneDisplayingFrame(), VideoOutputVDPAU::DoneDisplayingFrame(), VideoOutputVDPAU::DrawSlice(), VideoOutputNullVDPAU::DrawSlice(), VideoOutputNullVAAPI::GetLastDecodedFrame(), VideoOutputNullVDPAU::GetLastDecodedFrame(), VideoOutputNullVAAPI::GetLastShownFrame(), VideoOutputNullVDPAU::GetLastShownFrame(), VideoOutputNull::Init(), VideoOutputOMX::Init(), VideoOutputNullVAAPI::InitBuffers(), VideoOutputD3D::InitBuffers(), VideoOutputNullVDPAU::InitBuffers(), VideoOutputVDPAU::InitBuffers(), VideoOutputNullVDPAU::InitShadowBuffers(), VideoOutputXv::InitVideoBuffers(), VideoOutputNull::InputChanged(), VideoOutputNull::PrepareFrame(), VideoOutputOpenGL::PrepareFrame(), VideoOutputD3D::PrepareFrame(), VideoOutputOMX::PrepareFrame(), VideoOutputXv::PrepareFrameMem(), VideoOutputXv::PrepareFrameXv(), VideoOutputOpenGL::ProcessFrame(), VideoOutputD3D::ProcessFrame(), VideoOutputXv::ProcessFrame(), VideoOutputOMX::ProcessFrame(), VideoOutputNullVAAPI::ReleaseFrame(), VideoOutputNullVDPAU::ReleaseFrame(), VideoOutputD3D::TearDown(), VideoOutputOpenGLVAAPI::UpdatePauseFrame(), VideoOutputNull::UpdatePauseFrame(), VideoOutputOpenGL::UpdatePauseFrame(), VideoOutputD3D::UpdatePauseFrame(), VideoOutputVDPAU::UpdatePauseFrame(), VideoOutputOMX::UpdatePauseFrame(), VideoOutputXv::UpdatePauseFrame(), and VideoOutputNull::~VideoOutputNull().

◆ errorState

VideoErrorState VideoOutput::errorState
protected

◆ framesPlayed

long long VideoOutput::framesPlayed
protected

◆ display_res

DisplayRes* VideoOutput::display_res
protected

◆ monitor_sz

QSize VideoOutput::monitor_sz
protected

Definition at line 367 of file videooutbase.h.

Referenced by InitDisplayMeasurements(), and VideoOutputXv::WindowResized().

◆ monitor_dim

QSize VideoOutput::monitor_dim
protected

Definition at line 368 of file videooutbase.h.

Referenced by InitDisplayMeasurements(), and VideoOutputXv::WindowResized().

◆ osd_painter

MythYUVAPainter* VideoOutput::osd_painter
protected

Definition at line 371 of file videooutbase.h.

Referenced by DisplayOSD(), and ~VideoOutput().

◆ osd_image

MythImage* VideoOutput::osd_image
protected

Definition at line 372 of file videooutbase.h.

Referenced by DisplayOSD(), and ~VideoOutput().

◆ invalid_osd_painter

MythPainter* VideoOutput::invalid_osd_painter
protected

◆ m_visual

VideoVisual* VideoOutput::m_visual
protected

◆ m_stereo

StereoscopicMode VideoOutput::m_stereo
protected

Definition at line 380 of file videooutbase.h.

Referenced by VideoOutputOpenGL::PrepareFrame().

◆ m_copyFrame

MythAVCopy VideoOutput::m_copyFrame
protected

Definition at line 382 of file videooutbase.h.

Referenced by VideoOutputXv::PrepareFrameMem(), and VideoOutputD3D::UpdateFrame().


The documentation for this class was generated from the following files: