MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
VideoOutputNull Class Reference

#include <videoout_null.h>

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

Public Member Functions

 VideoOutputNull ()
 
 ~VideoOutputNull ()
 
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...
 
bool SetupDeinterlace (bool, const QString &ovrf="")
 Attempts to enable or disable deinterlacing. More...
 
void PrepareFrame (VideoFrame *buffer, FrameScanType, OSD *osd)
 
void Show (FrameScanType)
 
void CreatePauseFrame (void)
 
bool InputChanged (const QSize &video_dim_buf, const QSize &video_dim_disp, float aspect, MythCodecID av_codec_id, void *codec_private, bool &aspect_only)
 Tells video output to discard decoded frames and wait for new ones. More...
 
void Zoom (ZoomDirection direction)
 Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize(). More...
 
void EmbedInWidget (const QRect &rect)
 Tells video output to embed video in an existing window. More...
 
void StopEmbedding (void)
 Tells video output to stop embedding video in an existing window. More...
 
void DrawUnusedRects (bool sync=true)
 Draws non-video portions of the screen. More...
 
void UpdatePauseFrame (int64_t &disp_timecode)
 Updates frame displayed when video is paused. More...
 
void ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, const PIPMap &pipPlayers, FrameScanType scan)
 
void MoveResizeWindow (QRect)
 
virtual bool SetupVisualisation (AudioPlayer *audio, MythRender *render, const QString &name)
 
- 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 bool IsPreferredRenderer (QSize video_size)
 
virtual bool SetDeinterlacingEnabled (bool)
 Attempts to enable/disable deinterlacing using existing deinterlace method when enabling. 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 WindowResized (const QSize &new_size)
 
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 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 MoveResize (void)
 performs all the calculations for video framing and any resizing. More...
 
virtual void GetOSDBounds (QRect &total, QRect &visible, float &visibleAspect, float &fontScale, 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 aspectOverrideMode=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)
 
virtual int SetPictureAttribute (PictureAttribute, int newValue)
 Sets a specified picture attribute. More...
 
int GetPictureAttribute (PictureAttribute)
 
virtual void InitPictureAttributes (void)
 
bool AllowPreviewEPG (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 voidGetDecoderContext (unsigned char *buf, uint8_t *&id)
 
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...
 
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=NULL, bool do_pixel_adj=true) const
 returns QRect of PIP based on PIPLocation More...
 
virtual void RemovePIP (MythPlayer *pipplayer)
 
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 width=0, int height=0, QString filename="")
 
QString GetFilters (void) const
 
QRect GetImageRect (const QRect &rect, QRect *display=NULL)
 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)
 
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 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)
 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 Attributes

QMutex global_lock
 
VideoFrame av_pause_frame
 

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...
 
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 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
 
VideoVisualm_visual
 
StereoscopicMode m_stereo
 

Detailed Description

Definition at line 8 of file videoout_null.h.

Constructor & Destructor Documentation

VideoOutputNull::VideoOutputNull ( )

Definition at line 31 of file videoout_null.cpp.

VideoOutputNull::~VideoOutputNull ( )

Definition at line 38 of file videoout_null.cpp.

Member Function Documentation

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

Definition at line 15 of file videoout_null.cpp.

Referenced by VideoOutput::GetRenderOptions().

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

Performs most of the initialization for VideoOutput.

Returns
true if successful, false otherwise.

Reimplemented from VideoOutput.

Definition at line 136 of file videoout_null.cpp.

bool VideoOutputNull::SetupDeinterlace ( bool  i,
const QString &  ovrf = "" 
)
inlinevirtual

Attempts to enable or disable deinterlacing.

Returns
true if successful, false otherwise.
Parameters
overridefilteroptional, explicitly use this nondefault deint filter

Reimplemented from VideoOutput.

Definition at line 19 of file videoout_null.h.

void VideoOutputNull::PrepareFrame ( VideoFrame buffer,
FrameScanType  t,
OSD osd 
)
virtual

Implements VideoOutput.

Definition at line 191 of file videoout_null.cpp.

void VideoOutputNull::Show ( FrameScanType  )
virtual

Implements VideoOutput.

Definition at line 203 of file videoout_null.cpp.

void VideoOutputNull::CreatePauseFrame ( void  )

Definition at line 60 of file videoout_null.cpp.

Referenced by Init(), and InputChanged().

bool VideoOutputNull::InputChanged ( const QSize &  video_dim_buf,
const QSize &  video_dim_disp,
float  aspect,
MythCodecID  myth_codec_id,
void codec_private,
bool aspect_only 
)
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().

Reimplemented from VideoOutput.

Definition at line 79 of file videoout_null.cpp.

void VideoOutputNull::Zoom ( ZoomDirection  direction)
virtual

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 53 of file videoout_null.cpp.

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

Tells video output to embed video in an existing window.

See Also
StopEmbedding()

Reimplemented from VideoOutput.

Definition at line 177 of file videoout_null.cpp.

void VideoOutputNull::StopEmbedding ( void  )
virtual

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

See Also
EmbedInWidget(const QRect&)

Reimplemented from VideoOutput.

Definition at line 184 of file videoout_null.cpp.

void VideoOutputNull::DrawUnusedRects ( bool  sync = true)
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.

Implements VideoOutput.

Definition at line 207 of file videoout_null.cpp.

void VideoOutputNull::UpdatePauseFrame ( int64_t &  disp_timecode)
virtual

Updates frame displayed when video is paused.

Implements VideoOutput.

Definition at line 211 of file videoout_null.cpp.

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

Implements VideoOutput.

Definition at line 234 of file videoout_null.cpp.

static QStringList VideoOutputNull::GetAllowedRenderers ( MythCodecID  myth_codec_id,
const QSize &  video_dim 
)
static
void VideoOutputNull::MoveResizeWindow ( QRect  )
inlinevirtual

Implements VideoOutput.

Definition at line 41 of file videoout_null.h.

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

Reimplemented from VideoOutput.

Definition at line 42 of file videoout_null.h.

Member Data Documentation

QMutex VideoOutputNull::global_lock
private
VideoFrame VideoOutputNull::av_pause_frame
private

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