MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
VideoOutputXv Class Reference

Supports common video output methods used with X11 Servers. More...

#include <videoout_xv.h>

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

Public Member Functions

 VideoOutputXv ()
 
 ~VideoOutputXv ()
 
bool Init (const QSize &video_dim_buf, const QSize &video_dim_disp, float aspect, WId winid, const QRect &win_rect, MythCodecID codec_id) override
 Initializes class for video output. More...
 
bool SetDeinterlacingEnabled (bool) override
 Attempts to enable/disable deinterlacing using existing deinterlace method when enabling. More...
 
bool SetupDeinterlace (bool interlaced, const QString &overridefilter="") override
 Attempts to enable or disable deinterlacing. More...
 
bool ApproveDeintFilter (const QString &filtername) const override
 Approves bobdeint filter for XVideo and otherwise defers to VideoOutput::ApproveDeintFilter(const QString&). More...
 
void ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, const PIPMap &pipPlayers, FrameScanType scan) override
 
void PrepareFrame (VideoFrame *, FrameScanType, OSD *osd) override
 
void Show (FrameScanType) override
 
void ClearAfterSeek (void) override
 Tells video output to toss decoded buffers due to a seek. More...
 
void WindowResized (const QSize &new_size) override
 
void MoveResize (void) override
 performs all the calculations for video framing and any resizing. More...
 
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. More...
 
void Zoom (ZoomDirection direction) override
 Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize(). More...
 
void VideoAspectRatioChanged (float aspect) override
 Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes. More...
 
void EmbedInWidget (const QRect &rect) override
 Tells video output to embed video in an existing window. More...
 
void StopEmbedding (void) override
 Tells video output to stop embedding video in an existing window. More...
 
void MoveResizeWindow (QRect new_rect) override
 
void DrawUnusedRects (bool sync=true) override
 Draws non-video portions of the screen. More...
 
void UpdatePauseFrame (int64_t &disp_timecode) override
 Updates frame displayed when video is paused. More...
 
int SetPictureAttribute (PictureAttribute attribute, int newValue) override
 Sets a specified picture attribute. More...
 
void InitPictureAttributes (void) override
 
bool IsPIPSupported (void) const override
 
bool IsPBPSupported (void) const override
 
bool NeedExtraAudioDecode (void) const override
 
QRect GetPIPRect (PIPLocation location, MythPlayer *pipplayer=nullptr, bool do_pixel_adj=true) const override
 returns QRect of PIP based on PIPLocation More...
 
int GrabSuitableXvPort (MythXDisplay *disp, Window root, MythCodecID type, uint width, uint height, bool &xvsetdefaults, QString *adaptor_name=nullptr)
 Internal function used to grab a XVideo port with the desired properties. More...
 
VOSType VideoOutputSubType () const
 
MythPainterGetOSDPainter (void) override
 
- Public Member Functions inherited from VideoOutput
 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 void InitOSD (OSD *osd)
 
virtual void SetVideoFrameRate (float)
 
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...
 
void GetDeinterlacers (QStringList &deinterlacers)
 
QString GetDeinterlacer (void)
 
VideoDisplayProfileGetProfile ()
 
virtual void ResizeDisplayWindow (const QRect &, bool)
 Resize Display 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 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 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
 
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)
 
int GetPictureAttribute (PictureAttribute)
 
bool AllowPreviewEPG (void) const
 
virtual QString GetName (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 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 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...
 
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 void RemovePIP (MythPlayer *)
 
virtual void SetPIPState (PIPState setting)
 
virtual QString GetOSDRenderer (void) const
 \ brief return OSD renderer type for this videoOutput More...
 
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, QStringList &cpudeints)
 
static MythCodecID GetBestSupportedCodec (uint stream_type)
 
static void UngrabXvPort (MythXDisplay *disp, int port)
 Internal function used to release an XVideo port. More...
 
static QStringList GetAllowedRenderers (MythCodecID myth_codec_id, const QSize &video_dim)
 
- Static Public Member Functions inherited from VideoOutput
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)
 

Private Member Functions

bool hasFullScreenOSD (void) const override
 
void DiscardFrame (VideoFrame *) override
 Frame is ready to be reused by decoder added to the done or available list. More...
 
void DiscardFrames (bool next_frame_keyframe) override
 Releases all frames not being actively displayed from any queue onto the queue of frames ready for decoding onto. More...
 
void PrepareFrameXv (VideoFrame *)
 
void PrepareFrameMem (VideoFrame *, FrameScanType)
 
void ShowXVideo (FrameScanType scan)
 
int SetXVPictureAttribute (PictureAttribute attribute, int newValue)
 
void InitColorKey (bool turnoffautopaint)
 Initializes color keying support used by XVideo output methods. More...
 
bool InitVideoBuffers (bool use_xv, bool use_shm)
 Creates and initializes video buffers. More...
 
bool InitXVideo (void)
 Creates and initializes video buffers. More...
 
bool InitXShm (void)
 Creates and initializes video buffers. More...
 
bool InitXlib (void)
 Creates and initializes video buffers. More...
 
bool CreateOSD (void)
 
bool CreateBuffers (VOSType subtype)
 
vector< unsigned char * > CreateShmImages (uint num, bool use_xv)
 Creates Shared Memory Images. More...
 
void CreatePauseFrame (VOSType subtype)
 Creates an extra frame for pause. More...
 
void DeleteBuffers (VOSType subtype, bool delete_pause_frame)
 
bool InitSetupBuffers (void)
 

Private Attributes

VOSType video_output_subtype
 
QMutex global_lock
 
Window XJ_win
 
Window XJ_curwin
 
MythXDisplaydisp
 
unsigned long XJ_letterbox_colour
 
bool XJ_started
 
VideoFrame av_pause_frame
 
vector< XShmSegmentInfo * > XJ_shm_infos
 
vector< YUVInfoXJ_yuv_infos
 
XImage * XJ_non_xv_image
 
long long non_xv_frames_shown
 
int non_xv_show_frame
 
int non_xv_fps
 
AVPixelFormat non_xv_av_format
 
time_t non_xv_stop_time
 
int xv_port
 
int xv_hue_base
 
int xv_colorkey
 
bool xv_draw_colorkey
 
int xv_chroma
 
bool xv_set_defaults
 
buffer_map_t xv_buffers
 
bool xv_need_bobdeint_repaint
 
bool xv_use_picture_controls
 
QMap< PictureAttribute, int > xv_attribute_min
 
QMap< PictureAttribute, int > xv_attribute_max
 
QMap< PictureAttribute, int > xv_attribute_def
 
ChromaKeyOSDchroma_osd
 

Friends

class ChromaKeyOSD
 

Additional Inherited Members

- Protected Member Functions inherited from VideoOutput
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...
 
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 inherited from VideoOutput
static void CopyFrame (VideoFrame *to, const VideoFrame *from)
 Copies frame data from one VideoFrame to another. More...
 
- Protected Attributes inherited from VideoOutput
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

Supports common video output methods used with X11 Servers.

This class supports XVideo with color transform and scaling acceleration. When this is not available, we also try to use X Shared memory, and if that fails we try standard Xlib output.

See also
VideoOutput, VideoBuffers

Definition at line 28 of file videoout_xv.h.

Constructor & Destructor Documentation

◆ VideoOutputXv()

VideoOutputXv::VideoOutputXv ( )

Definition at line 137 of file videoout_xv.cpp.

◆ ~VideoOutputXv()

VideoOutputXv::~VideoOutputXv ( )

Definition at line 162 of file videoout_xv.cpp.

Member Function Documentation

◆ GetRenderOptions()

void VideoOutputXv::GetRenderOptions ( render_opts opts,
QStringList &  cpudeints 
)
static

Definition at line 80 of file videoout_xv.cpp.

Referenced by VideoOutput::GetRenderOptions().

◆ Init()

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

Initializes class for video output.

Returns
success or failure.

Reimplemented from VideoOutput.

Definition at line 874 of file videoout_xv.cpp.

◆ SetDeinterlacingEnabled()

bool VideoOutputXv::SetDeinterlacingEnabled ( bool  enable)
overridevirtual

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

Reimplemented from VideoOutput.

Definition at line 1000 of file videoout_xv.cpp.

◆ SetupDeinterlace()

bool VideoOutputXv::SetupDeinterlace ( bool  interlaced,
const QString &  overridefilter = "" 
)
overridevirtual

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 from VideoOutput.

Definition at line 1007 of file videoout_xv.cpp.

◆ ApproveDeintFilter()

bool VideoOutputXv::ApproveDeintFilter ( const QString &  filtername) const
overridevirtual

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 from VideoOutput.

Definition at line 1022 of file videoout_xv.cpp.

◆ ProcessFrame()

void VideoOutputXv::ProcessFrame ( VideoFrame frame,
OSD osd,
FilterChain filterList,
const PIPMap pipPlayers,
FrameScanType  scan 
)
overridevirtual

Implements VideoOutput.

Definition at line 1786 of file videoout_xv.cpp.

◆ PrepareFrame()

void VideoOutputXv::PrepareFrame ( VideoFrame buffer,
FrameScanType  scan,
OSD osd 
)
overridevirtual

Implements VideoOutput.

Definition at line 1485 of file videoout_xv.cpp.

◆ Show()

void VideoOutputXv::Show ( FrameScanType  scan)
overridevirtual

Implements VideoOutput.

Definition at line 1623 of file videoout_xv.cpp.

◆ ClearAfterSeek()

void VideoOutputXv::ClearAfterSeek ( void  )
overridevirtual

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

Reimplemented from VideoOutput.

Definition at line 1345 of file videoout_xv.cpp.

◆ WindowResized()

void VideoOutputXv::WindowResized ( const QSize &  new_size)
overridevirtual

Reimplemented from VideoOutput.

Definition at line 219 of file videoout_xv.cpp.

◆ MoveResize()

void VideoOutputXv::MoveResize ( void  )
overridevirtual

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 from VideoOutput.

Definition at line 211 of file videoout_xv.cpp.

Referenced by EmbedInWidget(), Init(), InputChanged(), StopEmbedding(), WindowResized(), and Zoom().

◆ InputChanged()

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

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 from VideoOutput.

Definition at line 241 of file videoout_xv.cpp.

◆ Zoom()

void VideoOutputXv::Zoom ( ZoomDirection  direction)
overridevirtual

Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize().

See also
ToggleAdjustFill(AdjustFillMode)

Reimplemented from VideoOutput.

Definition at line 203 of file videoout_xv.cpp.

◆ VideoAspectRatioChanged()

void VideoOutputXv::VideoAspectRatioChanged ( float  aspect)
overridevirtual

Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.

Parameters
aspectvideo aspect ratio to use

Reimplemented from VideoOutput.

Definition at line 1749 of file videoout_xv.cpp.

Referenced by InputChanged().

◆ EmbedInWidget()

void VideoOutputXv::EmbedInWidget ( const QRect &  rect)
overridevirtual

Tells video output to embed video in an existing window.

See also
StopEmbedding()

Reimplemented from VideoOutput.

Definition at line 1310 of file videoout_xv.cpp.

◆ StopEmbedding()

void VideoOutputXv::StopEmbedding ( void  )
overridevirtual

Tells video output to stop embedding video in an existing window.

See also
EmbedInWidget(const QRect&)

Reimplemented from VideoOutput.

Definition at line 1319 of file videoout_xv.cpp.

◆ MoveResizeWindow()

void VideoOutputXv::MoveResizeWindow ( QRect  new_rect)
overridevirtual

Implements VideoOutput.

Definition at line 314 of file videoout_xv.cpp.

◆ DrawUnusedRects()

void VideoOutputXv::DrawUnusedRects ( bool  sync = true)
overridevirtual

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.

Implements VideoOutput.

Definition at line 1643 of file videoout_xv.cpp.

Referenced by Show().

◆ UpdatePauseFrame()

void VideoOutputXv::UpdatePauseFrame ( int64_t &  disp_timecode)
overridevirtual

Updates frame displayed when video is paused.

Implements VideoOutput.

Definition at line 1755 of file videoout_xv.cpp.

◆ SetPictureAttribute()

int VideoOutputXv::SetPictureAttribute ( PictureAttribute  attribute,
int  newValue 
)
overridevirtual

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 from VideoOutput.

Definition at line 1843 of file videoout_xv.cpp.

◆ InitPictureAttributes()

void VideoOutputXv::InitPictureAttributes ( void  )
overridevirtual

Reimplemented from VideoOutput.

Definition at line 1886 of file videoout_xv.cpp.

Referenced by InitSetupBuffers().

◆ IsPIPSupported()

bool VideoOutputXv::IsPIPSupported ( void  ) const
inlineoverridevirtual

Reimplemented from VideoOutput.

Definition at line 74 of file videoout_xv.h.

◆ IsPBPSupported()

bool VideoOutputXv::IsPBPSupported ( void  ) const
inlineoverridevirtual

Reimplemented from VideoOutput.

Definition at line 76 of file videoout_xv.h.

◆ NeedExtraAudioDecode()

bool VideoOutputXv::NeedExtraAudioDecode ( void  ) const
inlineoverridevirtual

Reimplemented from VideoOutput.

Definition at line 78 of file videoout_xv.h.

◆ GetPIPRect()

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

returns QRect of PIP based on PIPLocation

Reimplemented from VideoOutput.

Definition at line 1928 of file videoout_xv.cpp.

◆ GetBestSupportedCodec()

MythCodecID VideoOutputXv::GetBestSupportedCodec ( uint  stream_type)
static
Returns
MythCodecID for the best supported codec on the main display.

Definition at line 755 of file videoout_xv.cpp.

◆ GrabSuitableXvPort()

int VideoOutputXv::GrabSuitableXvPort ( MythXDisplay _disp,
Window  root,
MythCodecID  type,
uint  width,
uint  height,
bool xvsetdefaults,
QString *  adaptor_name = nullptr 
)

Internal function used to grab a XVideo port with the desired properties.

Returns
port number if it succeeds, else -1.

Definition at line 359 of file videoout_xv.cpp.

Referenced by InitXVideo().

◆ UngrabXvPort()

void VideoOutputXv::UngrabXvPort ( MythXDisplay disp,
int  port 
)
static

Internal function used to release an XVideo port.

Definition at line 340 of file videoout_xv.cpp.

Referenced by InitXVideo(), InputChanged(), and ~VideoOutputXv().

◆ GetAllowedRenderers()

QStringList VideoOutputXv::GetAllowedRenderers ( MythCodecID  myth_codec_id,
const QSize &  video_dim 
)
static

Definition at line 2005 of file videoout_xv.cpp.

Referenced by VideoOutput::Create().

◆ VideoOutputSubType()

VOSType VideoOutputXv::VideoOutputSubType ( ) const
inline

◆ GetOSDPainter()

MythPainter * VideoOutputXv::GetOSDPainter ( void  )
overridevirtual

Reimplemented from VideoOutput.

Definition at line 2023 of file videoout_xv.cpp.

◆ hasFullScreenOSD()

bool VideoOutputXv::hasFullScreenOSD ( void  ) const
inlineoverrideprivatevirtual

Reimplemented from VideoOutput.

Definition at line 101 of file videoout_xv.h.

◆ DiscardFrame()

void VideoOutputXv::DiscardFrame ( VideoFrame frame)
overrideprivatevirtual

Frame is ready to be reused by decoder added to the done or available list.

Parameters
frameto discard.

Reimplemented from VideoOutput.

Definition at line 1337 of file videoout_xv.cpp.

◆ DiscardFrames()

void VideoOutputXv::DiscardFrames ( bool  kf)
overrideprivatevirtual

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

Reimplemented from VideoOutput.

Definition at line 1351 of file videoout_xv.cpp.

Referenced by ClearAfterSeek(), and DeleteBuffers().

◆ PrepareFrameXv()

void VideoOutputXv::PrepareFrameXv ( VideoFrame frame)
private

Definition at line 1370 of file videoout_xv.cpp.

Referenced by PrepareFrame().

◆ PrepareFrameMem()

void VideoOutputXv::PrepareFrameMem ( VideoFrame buffer,
FrameScanType   
)
private

Definition at line 1388 of file videoout_xv.cpp.

Referenced by PrepareFrame().

◆ ShowXVideo()

void VideoOutputXv::ShowXVideo ( FrameScanType  scan)
private

Definition at line 1581 of file videoout_xv.cpp.

Referenced by Show().

◆ SetXVPictureAttribute()

int VideoOutputXv::SetXVPictureAttribute ( PictureAttribute  attribute,
int  newValue 
)
private

Definition at line 1852 of file videoout_xv.cpp.

Referenced by InitPictureAttributes(), and SetPictureAttribute().

◆ InitColorKey()

void VideoOutputXv::InitColorKey ( bool  turnoffautopaint)
private

Initializes color keying support used by XVideo output methods.

Parameters
turnoffautopaintturn off or on XV_AUTOPAINT_COLORKEY property.

Definition at line 931 of file videoout_xv.cpp.

Referenced by Init(), and InputChanged().

◆ InitVideoBuffers()

bool VideoOutputXv::InitVideoBuffers ( bool  use_xv,
bool  use_shm 
)
private

Creates and initializes video buffers.

Side Effects:\n sets video_output_subtype if it succeeds.
Returns
success or failure at creating any buffers.

Definition at line 547 of file videoout_xv.cpp.

Referenced by InitSetupBuffers().

◆ InitXVideo()

bool VideoOutputXv::InitXVideo ( void  )
private

Creates and initializes video buffers.

Side Effects:\n sets video_output_subtype if it succeeds.
Returns
success or failure at creating any buffers.

Definition at line 595 of file videoout_xv.cpp.

Referenced by InitVideoBuffers().

◆ InitXShm()

bool VideoOutputXv::InitXShm ( void  )
private

Creates and initializes video buffers.

Side Effects:\n sets video_output_subtype if it succeeds.
Returns
success or failure at creating any buffers.

Definition at line 692 of file videoout_xv.cpp.

Referenced by InitVideoBuffers().

◆ InitXlib()

bool VideoOutputXv::InitXlib ( void  )
private

Creates and initializes video buffers.

Side Effects:\n sets video_output_subtype if it succeeds.
Returns
success or failure at creating any buffers.

Definition at line 726 of file videoout_xv.cpp.

Referenced by InitVideoBuffers().

◆ CreateOSD()

bool VideoOutputXv::CreateOSD ( void  )
private

Definition at line 760 of file videoout_xv.cpp.

Referenced by Init(), and InputChanged().

◆ CreateBuffers()

bool VideoOutputXv::CreateBuffers ( VOSType  subtype)
private

Definition at line 1173 of file videoout_xv.cpp.

Referenced by InitXlib(), InitXShm(), InitXVideo(), and InputChanged().

◆ CreateShmImages()

vector< unsigned char * > VideoOutputXv::CreateShmImages ( uint  num,
bool  use_xv 
)
private

Creates Shared Memory Images.

Each XvImage/XImage created is added to xv_buffers, and shared memory info is added to XJ_shm_infos.

Parameters
numnumber of buffers to create
use_xvuse XvShmCreateImage instead of XShmCreateImage
Returns
vector containing image data for each buffer created

Definition at line 1044 of file videoout_xv.cpp.

Referenced by CreateBuffers().

◆ CreatePauseFrame()

void VideoOutputXv::CreatePauseFrame ( VOSType  subtype)
private

Creates an extra frame for pause.

This creates a pause frame by copies the scratch frame settings, a and allocating a databuffer, so a scratch must already exist.

Side Effects:\n sets av_pause_frame.

Definition at line 519 of file videoout_xv.cpp.

Referenced by CreateBuffers().

◆ DeleteBuffers()

void VideoOutputXv::DeleteBuffers ( VOSType  subtype,
bool  delete_pause_frame 
)
private

Definition at line 1258 of file videoout_xv.cpp.

Referenced by InitXlib(), InitXShm(), InitXVideo(), InputChanged(), and ~VideoOutputXv().

◆ InitSetupBuffers()

bool VideoOutputXv::InitSetupBuffers ( void  )
private

Definition at line 811 of file videoout_xv.cpp.

Referenced by Init(), and InputChanged().

Friends And Related Function Documentation

◆ ChromaKeyOSD

friend class ChromaKeyOSD
friend

Definition at line 30 of file videoout_xv.h.

Referenced by CreateOSD().

Member Data Documentation

◆ video_output_subtype

VOSType VideoOutputXv::video_output_subtype
private

◆ global_lock

QMutex VideoOutputXv::global_lock
private

◆ XJ_win

Window VideoOutputXv::XJ_win
private

Definition at line 134 of file videoout_xv.h.

Referenced by Init(), and MoveResizeWindow().

◆ XJ_curwin

Window VideoOutputXv::XJ_curwin
private

◆ disp

MythXDisplay* VideoOutputXv::disp
private

◆ XJ_letterbox_colour

unsigned long VideoOutputXv::XJ_letterbox_colour
private

◆ XJ_started

bool VideoOutputXv::XJ_started
private

Definition at line 138 of file videoout_xv.h.

Referenced by Init(), and ~VideoOutputXv().

◆ av_pause_frame

VideoFrame VideoOutputXv::av_pause_frame
private

◆ XJ_shm_infos

vector<XShmSegmentInfo*> VideoOutputXv::XJ_shm_infos
private

Definition at line 141 of file videoout_xv.h.

Referenced by CreateShmImages(), and DeleteBuffers().

◆ XJ_yuv_infos

vector<YUVInfo> VideoOutputXv::XJ_yuv_infos
private

Definition at line 142 of file videoout_xv.h.

Referenced by CreateBuffers(), CreateShmImages(), and DeleteBuffers().

◆ XJ_non_xv_image

XImage* VideoOutputXv::XJ_non_xv_image
private

Definition at line 145 of file videoout_xv.h.

Referenced by CreateBuffers(), DeleteBuffers(), and PrepareFrameMem().

◆ non_xv_frames_shown

long long VideoOutputXv::non_xv_frames_shown
private

Definition at line 146 of file videoout_xv.h.

Referenced by PrepareFrameMem().

◆ non_xv_show_frame

int VideoOutputXv::non_xv_show_frame
private

Definition at line 147 of file videoout_xv.h.

Referenced by PrepareFrameMem().

◆ non_xv_fps

int VideoOutputXv::non_xv_fps
private

Definition at line 148 of file videoout_xv.h.

Referenced by PrepareFrameMem().

◆ non_xv_av_format

AVPixelFormat VideoOutputXv::non_xv_av_format
private

Definition at line 149 of file videoout_xv.h.

Referenced by CreateBuffers(), and PrepareFrameMem().

◆ non_xv_stop_time

time_t VideoOutputXv::non_xv_stop_time
private

Definition at line 150 of file videoout_xv.h.

Referenced by PrepareFrameMem().

◆ xv_port

int VideoOutputXv::xv_port
private

◆ xv_hue_base

int VideoOutputXv::xv_hue_base
private

Definition at line 154 of file videoout_xv.h.

Referenced by InitXVideo(), and SetXVPictureAttribute().

◆ xv_colorkey

int VideoOutputXv::xv_colorkey
private

Definition at line 155 of file videoout_xv.h.

Referenced by CreateOSD(), DrawUnusedRects(), InitColorKey(), and ChromaKeyOSD::ProcessOSD().

◆ xv_draw_colorkey

bool VideoOutputXv::xv_draw_colorkey
private

Definition at line 156 of file videoout_xv.h.

Referenced by DrawUnusedRects(), and InitColorKey().

◆ xv_chroma

int VideoOutputXv::xv_chroma
private

Definition at line 157 of file videoout_xv.h.

Referenced by CreateShmImages(), and InitXVideo().

◆ xv_set_defaults

bool VideoOutputXv::xv_set_defaults
private

Definition at line 158 of file videoout_xv.h.

Referenced by InitPictureAttributes(), InitXVideo(), and SetXVPictureAttribute().

◆ xv_buffers

buffer_map_t VideoOutputXv::xv_buffers
private

Definition at line 159 of file videoout_xv.h.

Referenced by CreateBuffers(), CreateShmImages(), DeleteBuffers(), and ShowXVideo().

◆ xv_need_bobdeint_repaint

bool VideoOutputXv::xv_need_bobdeint_repaint
private

Definition at line 160 of file videoout_xv.h.

Referenced by DrawUnusedRects(), SetDeinterlacingEnabled(), and Show().

◆ xv_use_picture_controls

bool VideoOutputXv::xv_use_picture_controls
private

Definition at line 161 of file videoout_xv.h.

Referenced by InitSetupBuffers(), and InitXVideo().

◆ xv_attribute_min

QMap<PictureAttribute,int> VideoOutputXv::xv_attribute_min
private

Definition at line 162 of file videoout_xv.h.

Referenced by InitPictureAttributes(), and SetXVPictureAttribute().

◆ xv_attribute_max

QMap<PictureAttribute,int> VideoOutputXv::xv_attribute_max
private

Definition at line 163 of file videoout_xv.h.

Referenced by InitPictureAttributes(), and SetXVPictureAttribute().

◆ xv_attribute_def

QMap<PictureAttribute,int> VideoOutputXv::xv_attribute_def
private

Definition at line 164 of file videoout_xv.h.

Referenced by InitPictureAttributes(), and SetXVPictureAttribute().

◆ chroma_osd

ChromaKeyOSD* VideoOutputXv::chroma_osd
private

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