#include <videooutbase.h>

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); // 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.
Definition at line 31 of file videooutbase.h.
Public Member Functions | |
| VideoOutput () | |
| This constructor for VideoOutput must be followed by an Init(int,int,float,WId,int,int,int,int,WId) call. | |
| virtual | ~VideoOutput () |
| Shuts down video output. | |
| virtual bool | Init (int width, int height, float aspect, WId winid, int winx, int winy, int winw, int winh, WId embedid=0) |
| Performs most of the initialization for VideoOutput. | |
| virtual void | InitOSD (OSD *osd) |
| virtual void | SetVideoFrameRate (float) |
| virtual bool | SetDeinterlacingEnabled (bool) |
| Attempts to enable/disable deinterlacing using existing deinterlace method when enabling. | |
| virtual bool | SetupDeinterlace (bool i, const QString &ovrf="") |
| Attempts to enable or disable deinterlacing. | |
| virtual void | FallbackDeint (void) |
| Fallback to non-frame-rate-doubling deinterlacing method. | |
| virtual void | BestDeint (void) |
| Change to the best deinterlacing method. | |
| virtual bool | NeedsDoubleFramerate (void) const |
| Approves bobdeint filter for XVideo and XvMC surfaces, rejects other filters for XvMC, and defers to VideoOutput::ApproveDeintFilter(const QString&) otherwise. | |
| virtual bool | IsBobDeint (void) const |
| virtual bool | IsExtraProcessingRequired (void) const |
| Should Prepare() and Show() and ProcessFrame be called twice for every Frameloop(). | |
| virtual bool | ApproveDeintFilter (const QString &filtername) const |
| Approves all deinterlace filters, except ones which must be supported by a specific video output class. | |
| virtual void | PrepareFrame (VideoFrame *buffer, FrameScanType)=0 |
| virtual void | Show (FrameScanType)=0 |
| virtual bool | InputChanged (const QSize &input_size, float aspect, MythCodecID myth_codec_id, void *codec_private) |
| Tells video output to discard decoded frames and wait for new ones. | |
| virtual void | VideoAspectRatioChanged (float aspect) |
| Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes. | |
| virtual void | EmbedInWidget (WId wid, int x, int y, int w, int h) |
| Tells video output to embed video in an existing window. | |
| virtual void | StopEmbedding (void) |
| Tells video output to stop embedding video in an existing window. | |
| virtual void | ResizeForGui (void) |
| virtual void | ResizeForVideo (void) |
| virtual void | MoveResize (void) |
| performs all the calculations for video framing and any resizing. | |
| virtual void | Zoom (ZoomDirection direction) |
| Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize(). | |
| virtual void | GetDrawSize (int &xoff, int &yoff, int &width, int &height) |
| Returns video output width, height, and location. | |
| virtual void | GetOSDBounds (QRect &visible, QRect &total, float &pixelAspect, float &fontScale, float themeaspect) const |
| virtual int | GetRefreshRate (void)=0 |
| Returns current display's frame refresh period in microseconds. | |
| virtual void | DrawSlice (VideoFrame *frame, int x, int y, int w, int h) |
| Informs video output of new data for frame, used for XvMC acceleration. | |
| virtual void | DrawUnusedRects (bool sync=true)=0 |
| Draws non-video portions of the screen. | |
| virtual float | GetDisplayAspect (void) const |
| Returns current display aspect ratio. | |
| AspectOverrideMode | GetAspectOverride (void) |
| Returns current aspect override mode. | |
| void | ToggleAspectOverride (AspectOverrideMode aspectOverrideMode=kAspect_Toggle) |
| Enforce different aspect ration than detected, then calls VideoAspectRatioChanged(float) to apply them. | |
| AdjustFillMode | GetAdjustFill (void) |
| Returns current adjust fill mode. | |
| void | ToggleAdjustFill (AdjustFillMode adjustFillMode=kAdjustFill_Toggle) |
| Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize() to apply them. | |
| virtual void | ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, NuppelVideoPlayer *pipPlayer)=0 |
| void | ExposeEvent (void) |
| Tells video output that a full repaint is needed. | |
| PictureAttributeSupported | GetSupportedPictureAttributes (void) const |
| int | ChangePictureAttribute (PictureAttribute, bool direction) |
| virtual int | SetPictureAttribute (PictureAttribute, int newValue) |
| Sets a specified picture attribute. | |
| int | GetPictureAttribute (PictureAttribute) const |
| virtual void | InitPictureAttributes (void) |
| bool | AllowPreviewEPG (void) |
| virtual bool | hasMCAcceleration (void) const |
| Returns true iff Motion Compensation acceleration is available. | |
| virtual bool | hasIDCTAcceleration (void) const |
| Returns true iff Inverse Discrete Cosine Transform acceleration is available. | |
| virtual bool | hasVLDAcceleration (void) const |
| Returns true iff VLD acceleration is available. | |
| virtual void | SetFramesPlayed (long long fp) |
| Sets the number of frames played. | |
| virtual long long | GetFramesPlayed (void) |
| Returns the number of frames played. | |
| bool | IsErrored () |
| Returns true if a fatal error has been encountered. | |
| void | SetPrebuffering (bool normal) |
| Sets whether to use a normal number of buffers or fewer buffers. | |
| virtual void | ClearAfterSeek (void) |
| Tells video output to toss decoded buffers due to a seek. | |
| bool | WaitForAvailable (uint w) |
| Blocks until a frame is available for decoding onto. | |
| virtual int | ValidVideoFrames (void) const |
| Returns number of frames that are fully decoded. | |
| int | FreeVideoFrames (void) |
| Returns number of frames available for decoding onto. | |
| bool | EnoughFreeFrames (void) |
| Returns true iff enough frames are available to decode onto. | |
| bool | EnoughDecodedFrames (void) |
| Returns true iff there are plenty of decoded frames ready for display. | |
| bool | EnoughPrebufferedFrames (void) |
| Returns true iff we have at least the minimum number of decoded frames ready for display. | |
| bool | IsEmbedding (void) |
| Returns if videooutput is embedding. | |
| virtual VideoFrame * | GetNextFreeFrame (bool with_lock=false, bool allow_unsafe=false) |
| Blocks until it is possible to return a frame for decoding onto. | |
| virtual void | ReleaseFrame (VideoFrame *frame) |
| Releases a frame from the ready for decoding queue onto the queue of frames ready for display. | |
| virtual void | DeLimboFrame (VideoFrame *frame) |
| Releases a frame for reuse if it is in limbo. | |
| virtual void | StartDisplayingFrame (void) |
| Tell GetLastShownFrame() to return the next frame from the head of the queue of frames to display. | |
| virtual void | DoneDisplayingFrame (void) |
| Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto. | |
| virtual void | DiscardFrame (VideoFrame *frame) |
| Releases frame from any queue onto the queue of frames ready for decoding onto. | |
| virtual void | DiscardFrames (bool kf) |
| Releases all frames not being actively displayed from any queue onto the queue of frames ready for decoding onto. | |
| virtual void | CheckFrameStates (void) |
| VideoFrame * | GetLastDecodedFrame (void) |
| VideoFrame * | GetLastShownFrame (void) |
| Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been called. | |
| QString | GetFrameStatus (void) const |
| Returns string with status of each frame for debugging. | |
| virtual void | UpdatePauseFrame (void)=0 |
| Updates frame displayed when video is paused. | |
| void | SetVideoResize (const QRect &videoRect) |
| Tells the player to resize the video frame (used for ITV). | |
| void | SetVideoScalingAllowed (bool change) |
| Disable or enable underscan/overscan. | |
| bool | IsVideoScalingAllowed (void) |
| check if video underscan/overscan is allowed | |
| virtual QRect | GetPIPRect (int location, NuppelVideoPlayer *pipplayer=NULL) |
| returns QRect of PIP based on PIPLocation | |
| QString | GetFilters (void) const |
Static Public Member Functions | |
| static VideoOutput * | Create (const QString &decoder, MythCodecID codec_id, void *codec_priv, const QSize &video_dim, float video_aspect, WId win_id, const QRect &display_rect, WId embed_id) |
Protected Types | |
| typedef QMap< PictureAttribute, int > | PictureSettingMap |
Protected Member Functions | |
| void | InitBuffers (int numdecode, bool extra_for_pause, int need_free, int needprebuffer_normal, int needprebuffer_small, int keepprebuffer) |
| virtual void | ShowPip (VideoFrame *frame, NuppelVideoPlayer *pipplayer) |
| Composites PiP image onto a video frame. | |
| virtual int | DisplayOSD (VideoFrame *frame, OSD *osd, int stride=-1, int revision=-1) |
| If the OSD has changed, this will convert the OSD buffer to the OSDSurface's color format. | |
| virtual void | SetPictureAttributeDBValue (PictureAttribute attributeType, int newValue) |
| virtual QRect | GetVisibleOSDBounds (float &, float &, float) const |
| virtual QRect | GetTotalOSDBounds (void) const |
| Returns total OSD bounds. | |
| void | DoPipResize (int pipwidth, int pipheight) |
| Sets up Picture in Picture image resampler. | |
| void | ShutdownPipResize (void) |
| Shuts down Picture in Picture image resampler. | |
| void | ResizeVideo (VideoFrame *frame) |
| void | DoVideoResize (const QSize &inDim, const QSize &outDim) |
| Sets up Picture in Picture image resampler. | |
| virtual void | ShutdownVideoResize (void) |
| void | SetVideoAspectRatio (float aspect) |
| Sets VideoOutput::video_aspect to aspect, and sets VideoOutput::overriden_video_aspect if aspectoverride is set to either 4:3, 14:9 or 16:9. | |
| void | ApplyManualScaleAndMove (void) |
| Apply scales and moves from "Zoom Mode" settings. | |
| void | ApplyDBScaleAndMove (void) |
| Apply scales and moves for "Overscan" and "Underscan" DB settings. | |
| void | ApplyLetterboxing (void) |
| void | ApplySnapToVideoRect (void) |
| Snap displayed rectagle to video rectange if they are close. | |
| void | PrintMoveResizeDebug (void) |
Static Protected Member Functions | |
| static void | CopyFrame (VideoFrame *to, const VideoFrame *from) |
| Copies frame data from one VideoFrame to another. | |
Protected Attributes | |
| QSize | db_display_dim |
| Screen dimensions in millimeters from DB. | |
| QPoint | db_move |
| Percentage move from database. | |
| float | db_scale_horiz |
| Horizontal Overscan/Underscan percentage. | |
| float | db_scale_vert |
| Vertical Overscan/Underscan percentage. | |
| PIPLocation | db_pip_location |
| int | db_pip_size |
| percentage of full window to use for PiP | |
| PictureSettingMap | db_pict_attr |
| Picture settings. | |
| AspectOverrideMode | db_aspectoverride |
| AdjustFillMode | db_adjustfill |
| LetterBoxColour | db_letterbox_colour |
| QString | db_deint_filtername |
| bool | db_use_picture_controls |
| VideoDisplayProfile * | db_vdisp_profile |
| float | mz_scale_v |
| Manually applied vertical scaling. | |
| float | mz_scale_h |
| Manually applied horizontal scaling. | |
| QPoint | mz_move |
| Manually applied percentage move. | |
| QSize | display_dim |
| Screen dimensions of playback window in mm. | |
| float | display_aspect |
| Physical aspect ratio of playback window. | |
| QSize | video_dim |
| Pixel dimensions of video buffer. | |
| QSize | video_disp_dim |
| Pixel dimensions of video display area. | |
| float | video_aspect |
| Physical aspect ratio of video. | |
| float | overriden_video_aspect |
| Normally this is the same as videoAspect, but may not be if the user has toggled the aspect override mode. | |
| AspectOverrideMode | aspectoverride |
| AspectOverrideMode to use to modify overriden_video_aspect. | |
| AdjustFillMode | adjustfill |
| Zoom mode. | |
| QRect | video_rect |
| Pixel rectangle in video frame to display. | |
| QRect | display_video_rect |
| Pixel rectangle in display window into which video_rect maps to. | |
| QRect | display_visible_rect |
| Visible portion of display window in pixels. | |
| QRect | tmp_display_visible_rect |
| Used to save the display_visible_rect for restoration after video embedding ends. | |
| QSize | pip_desired_display_size |
| QSize | pip_display_size |
| QSize | pip_video_size |
| unsigned char * | pip_tmp_buf |
| ImgReSampleContext * | 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 |
| ImgReSampleContext * | vsz_scale_context |
| bool | m_deinterlacing |
| QString | m_deintfiltername |
| FilterManager * | m_deintFiltMan |
| FilterChain * | m_deintFilter |
| bool | m_deinterlaceBeforeOSD |
| VideoBuffers | vbuffers |
| VideoBuffers instance used to track video output buffers. | |
| bool | embedding |
| bool | needrepaint |
| bool | allowpreviewepg |
| bool | errored |
| long long | framesPlayed |
| bool | db_scaling_allowed |
| disable this to prevent overscan/underscan | |
| PictureAttributeSupported | supported_attributes |
Static Protected Attributes | |
| static const float | kManualZoomMaxHorizontalZoom = 2.0f |
| static const float | kManualZoomMaxVerticalZoom = 2.0f |
| static const float | kManualZoomMinHorizontalZoom = 0.5f |
| static const float | kManualZoomMinVerticalZoom = 0.5f |
| static const int | kManualZoomMaxMove = 50 |
typedef QMap<PictureAttribute,int> VideoOutput::PictureSettingMap [protected] |
Definition at line 256 of file videooutbase.h.
| 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 260 of file videooutbase.cpp.
| VideoOutput::~VideoOutput | ( | ) | [virtual] |
| VideoOutput * VideoOutput::Create | ( | const QString & | decoder, | |
| MythCodecID | codec_id, | |||
| void * | codec_priv, | |||
| const QSize & | video_dim, | |||
| float | video_aspect, | |||
| WId | win_id, | |||
| const QRect & | display_rect, | |||
| WId | embed_id | |||
| ) | [static] |
| bool VideoOutput::Init | ( | int | width, | |
| int | height, | |||
| float | aspect, | |||
| WId | winid, | |||
| int | winx, | |||
| int | winy, | |||
| int | winw, | |||
| int | winh, | |||
| WId | embedid = 0 | |||
| ) | [virtual] |
Performs most of the initialization for VideoOutput.
Reimplemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputIvtv, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Definition at line 366 of file videooutbase.cpp.
Referenced by Create(), VideoOutputXv::Init(), VideoOutputQuartz::Init(), VideoOutputNull::Init(), VideoOutputIvtv::Init(), VideoOutputDX::Init(), VideoOutputDirectfb::Init(), VideoOutputD3D::Init(), and NuppelVideoPlayer::InitVideo().
| void VideoOutput::InitOSD | ( | OSD * | osd | ) | [virtual] |
| void VideoOutput::SetVideoFrameRate | ( | float | playback_fps | ) | [virtual] |
Reimplemented in VideoOutputQuartz.
Definition at line 407 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::DoPlay(), and NuppelVideoPlayer::ReinitVideo().
Attempts to enable/disable deinterlacing using existing deinterlace method when enabling.
Reimplemented in VideoOutputXv.
Definition at line 417 of file videooutbase.cpp.
Referenced by VideoOutputXv::SetDeinterlacingEnabled(), and NuppelVideoPlayer::SetScanType().
Attempts to enable or disable deinterlacing.
| overridefilter | optional, explicitly use this nondefault deint filter |
Reimplemented in VideoOutputNull, and VideoOutputXv.
Definition at line 436 of file videooutbase.cpp.
Referenced by BestDeint(), FallbackDeint(), NuppelVideoPlayer::OutputVideoLoop(), SetDeinterlacingEnabled(), VideoOutputXv::SetDeinterlacingEnabledOpenGL(), VideoOutputXv::SetupDeinterlace(), and VideoOutputXv::SetupDeinterlaceOpenGL().
| void VideoOutput::FallbackDeint | ( | void | ) | [virtual] |
Fallback to non-frame-rate-doubling deinterlacing method.
Definition at line 508 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::DoPlay(), and NuppelVideoPlayer::FallbackDeint().
| void VideoOutput::BestDeint | ( | void | ) | [virtual] |
Change to the best deinterlacing method.
Definition at line 517 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::DoPlay(), and InputChanged().
| bool VideoOutput::NeedsDoubleFramerate | ( | void | ) | const [virtual] |
Approves bobdeint filter for XVideo and XvMC surfaces, rejects other filters for XvMC, and defers to VideoOutput::ApproveDeintFilter(const QString&) otherwise.
Should Prepare() and Show() be called twice for every ProcessFrame().
m_deintfiltername == "bobdeint" && m_deinterlacing
Definition at line 542 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::DoPlay(), NuppelVideoPlayer::OutputVideoLoop(), and NuppelVideoPlayer::SetScanType().
| bool VideoOutput::IsBobDeint | ( | void | ) | const [virtual] |
Definition at line 551 of file videooutbase.cpp.
Referenced by VideoOutputXv::ProcessFrameMem(), and VideoOutputXv::ProcessFrameOpenGL().
| 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.
Definition at line 532 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::DoPlay(), NuppelVideoPlayer::OutputVideoLoop(), and NuppelVideoPlayer::SetScanType().
| bool VideoOutput::ApproveDeintFilter | ( | const QString & | filtername | ) | const [virtual] |
Approves all deinterlace filters, except ones which must be supported by a specific video output class.
Reimplemented in VideoOutputXv.
Definition at line 561 of file videooutbase.cpp.
Referenced by VideoOutputXv::ApproveDeintFilter(), and SetupDeinterlace().
| virtual void VideoOutput::PrepareFrame | ( | VideoFrame * | buffer, | |
| FrameScanType | ||||
| ) | [pure virtual] |
Implemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputIvtv, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Referenced by NuppelVideoPlayer::AVSync(), and NuppelVideoPlayer::DisplayPauseFrame().
| virtual void VideoOutput::Show | ( | FrameScanType | ) | [pure virtual] |
Implemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputIvtv, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Referenced by NuppelVideoPlayer::AVSync(), and NuppelVideoPlayer::DisplayPauseFrame().
| bool VideoOutput::InputChanged | ( | const QSize & | input_size, | |
| float | aspect, | |||
| MythCodecID | myth_codec_id, | |||
| void * | codec_private | |||
| ) | [virtual] |
Tells video output to discard decoded frames and wait for new ones.
Reimplemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputIvtv, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Definition at line 601 of file videooutbase.cpp.
Referenced by VideoOutputXv::InputChanged(), VideoOutputQuartz::InputChanged(), VideoOutputNull::InputChanged(), VideoOutputIvtv::InputChanged(), VideoOutputDX::InputChanged(), VideoOutputDirectfb::InputChanged(), VideoOutputD3D::InputChanged(), and NuppelVideoPlayer::ReinitVideo().
| void VideoOutput::VideoAspectRatioChanged | ( | float | aspect | ) | [virtual] |
Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.
| aspect | video aspect ratio to use |
Reimplemented in VideoOutputQuartz, and VideoOutputXv.
Definition at line 589 of file videooutbase.cpp.
Referenced by Init(), NuppelVideoPlayer::SetForcedAspectRatio(), ToggleAspectOverride(), VideoOutputXv::VideoAspectRatioChanged(), and VideoOutputQuartz::VideoAspectRatioChanged().
| void VideoOutput::EmbedInWidget | ( | WId | wid, | |
| int | x, | |||
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) | [virtual] |
Tells video output to embed video in an existing window.
| wid | window to embed in. | |
| x | X location where to locate video | |
| y | Y location where to locate video | |
| w | width of video | |
| h | height of video |
Reimplemented in VideoOutputD3D, VideoOutputDX, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Definition at line 633 of file videooutbase.cpp.
Referenced by VideoOutputXv::EmbedInWidget(), VideoOutputQuartz::EmbedInWidget(), VideoOutputNull::EmbedInWidget(), VideoOutputDX::EmbedInWidget(), VideoOutputD3D::EmbedInWidget(), NuppelVideoPlayer::EmbedInWidget(), and NuppelVideoPlayer::InitVideo().
| void VideoOutput::StopEmbedding | ( | void | ) | [virtual] |
Tells video output to stop embedding video in an existing window.
Reimplemented in VideoOutputD3D, VideoOutputDX, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Definition at line 658 of file videooutbase.cpp.
Referenced by VideoOutputXv::StopEmbedding(), VideoOutputQuartz::StopEmbedding(), VideoOutputNull::StopEmbedding(), VideoOutputDX::StopEmbedding(), VideoOutputD3D::StopEmbedding(), and NuppelVideoPlayer::StopEmbedding().
| virtual void VideoOutput::ResizeForGui | ( | void | ) | [inline, virtual] |
Reimplemented in VideoOutputXv.
Definition at line 70 of file videooutbase.h.
Referenced by TV::doEditSchedule().
| virtual void VideoOutput::ResizeForVideo | ( | void | ) | [inline, virtual] |
Reimplemented in VideoOutputXv.
Definition at line 71 of file videooutbase.h.
Referenced by TV::doEditSchedule().
| 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".
Reimplemented in VideoOutputDirectfb, VideoOutputDX, VideoOutputQuartz, and VideoOutputXv.
Definition at line 1112 of file videooutbase.cpp.
Referenced by EmbedInWidget(), VideoOutputNull::Init(), VideoOutputIvtv::Init(), VideoOutputD3D::Init(), VideoOutputNull::InputChanged(), VideoOutputIvtv::InputChanged(), VideoOutputD3D::InputChanged(), VideoOutputXv::MoveResize(), VideoOutputQuartz::MoveResize(), VideoOutputDX::MoveResize(), VideoOutputDirectfb::MoveResize(), SetVideoScalingAllowed(), StopEmbedding(), ToggleAdjustFill(), VideoAspectRatioChanged(), and VideoOutputNull::Zoom().
| void VideoOutput::Zoom | ( | ZoomDirection | direction | ) | [virtual] |
Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize().
Reimplemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Definition at line 1153 of file videooutbase.cpp.
Referenced by VideoOutputXv::Zoom(), VideoOutputQuartz::Zoom(), VideoOutputNull::Zoom(), VideoOutputDX::Zoom(), VideoOutputDirectfb::Zoom(), and NuppelVideoPlayer::Zoom().
| void VideoOutput::GetDrawSize | ( | int & | xoff, | |
| int & | yoff, | |||
| int & | width, | |||
| int & | height | |||
| ) | [virtual] |
Returns video output width, height, and location.
| xoff | X location where video is located in window | |
| yoff | Y location where video is located in window | |
| width | width of video output | |
| height | height of video output |
Definition at line 689 of file videooutbase.cpp.
| void VideoOutput::GetOSDBounds | ( | QRect & | visible, | |
| QRect & | total, | |||
| float & | pixelAspect, | |||
| float & | fontScale, | |||
| float | themeaspect | |||
| ) | const [virtual] |
Definition at line 697 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::ReinitOSD(), and NuppelVideoPlayer::StartPlaying().
| virtual int VideoOutput::GetRefreshRate | ( | void | ) | [pure virtual] |
Returns current display's frame refresh period in microseconds.
e.g. 1000000 / frame_rate_in_Hz
Implemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputIvtv, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Referenced by NuppelVideoPlayer::InitAVSync(), and NuppelVideoPlayer::OutputVideoLoop().
| void VideoOutput::DrawSlice | ( | VideoFrame * | frame, | |
| int | x, | |||
| int | y, | |||
| int | w, | |||
| int | h | |||
| ) | [virtual] |
Informs video output of new data for frame, used for XvMC acceleration.
Reimplemented in VideoOutputXv.
Definition at line 672 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::DrawSlice().
| virtual void VideoOutput::DrawUnusedRects | ( | bool | sync = true |
) | [pure virtual] |
Draws non-video portions of the screen.
| sync | if set any queued up draws are sent immediately to the graphics context and we block until they have completed. |
Implemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputIvtv, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Referenced by NuppelVideoPlayer::DrawUnusedRects().
| virtual float VideoOutput::GetDisplayAspect | ( | void | ) | const [inline, virtual] |
Returns current display aspect ratio.
Reimplemented in VideoOutputD3D, and VideoOutputDX.
Definition at line 93 of file videooutbase.h.
Referenced by ApplyLetterboxing(), GetVisibleOSDBounds(), VideoOutputXv::GetVisibleOSDBounds(), PrintMoveResizeDebug(), and ShowPip().
| AspectOverrideMode VideoOutput::GetAspectOverride | ( | void | ) | [inline] |
Returns current aspect override mode.
Definition at line 97 of file videooutbase.h.
Referenced by NuppelVideoPlayer::GetAspectOverride().
| void VideoOutput::ToggleAspectOverride | ( | AspectOverrideMode | aspectOverrideMode = kAspect_Toggle |
) |
Enforce different aspect ration than detected, then calls VideoAspectRatioChanged(float) to apply them.
Definition at line 1229 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::ToggleAspectOverride().
| AdjustFillMode VideoOutput::GetAdjustFill | ( | void | ) | [inline] |
Returns current adjust fill mode.
Definition at line 103 of file videooutbase.h.
Referenced by NuppelVideoPlayer::GetAdjustFill().
| void VideoOutput::ToggleAdjustFill | ( | AdjustFillMode | adjustFillMode = kAdjustFill_Toggle |
) |
Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize() to apply them.
Definition at line 1249 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::ToggleAdjustFill().
| virtual void VideoOutput::ProcessFrame | ( | VideoFrame * | frame, | |
| OSD * | osd, | |||
| FilterChain * | filterList, | |||
| NuppelVideoPlayer * | pipPlayer | |||
| ) | [pure virtual] |
Implemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputIvtv, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Referenced by NuppelVideoPlayer::AVSync(), NuppelVideoPlayer::DisplayNormalFrame(), NuppelVideoPlayer::DisplayPauseFrame(), and NuppelVideoPlayer::IvtvVideoLoop().
| void VideoOutput::ExposeEvent | ( | void | ) | [inline] |
Tells video output that a full repaint is needed.
Definition at line 112 of file videooutbase.h.
Referenced by NuppelVideoPlayer::ExposeEvent().
| PictureAttributeSupported VideoOutput::GetSupportedPictureAttributes | ( | void | ) | const [inline] |
| int VideoOutput::ChangePictureAttribute | ( | PictureAttribute | attributeType, | |
| bool | direction | |||
| ) |
| int VideoOutput::SetPictureAttribute | ( | PictureAttribute | attribute, | |
| int | newValue | |||
| ) | [virtual] |
Sets a specified picture attribute.
| attribute | Picture attribute to set. | |
| newValue | Value to set attribute to. |
Reimplemented in VideoOutputDirectfb, VideoOutputDX, and VideoOutputXv.
Definition at line 1283 of file videooutbase.cpp.
Referenced by ChangePictureAttribute(), and InitPictureAttributes().
| int VideoOutput::GetPictureAttribute | ( | PictureAttribute | attributeType | ) | const |
Definition at line 1290 of file videooutbase.cpp.
Referenced by ChangePictureAttribute(), TV::DoTogglePictureAttribute(), and VideoOutputXv::SetPictureAttribute().
| void VideoOutput::InitPictureAttributes | ( | void | ) | [virtual] |
Reimplemented in VideoOutputXv.
Definition at line 1298 of file videooutbase.cpp.
Referenced by VideoOutputDX::Init(), VideoOutputDirectfb::Init(), and VideoOutputXv::InitPictureAttributes().
| bool VideoOutput::AllowPreviewEPG | ( | void | ) | [inline] |
Definition at line 121 of file videooutbase.h.
Referenced by TV::doEditSchedule(), and TV::VideoThemeCheck().
| virtual bool VideoOutput::hasMCAcceleration | ( | void | ) | const [inline, virtual] |
Returns true iff Motion Compensation acceleration is available.
Reimplemented in VideoOutputXv.
Definition at line 124 of file videooutbase.h.
Referenced by NuppelVideoPlayer::AVSync(), and NuppelVideoPlayer::CheckPrebuffering().
| virtual bool VideoOutput::hasIDCTAcceleration | ( | void | ) | const [inline, virtual] |
Returns true iff Inverse Discrete Cosine Transform acceleration is available.
Reimplemented in VideoOutputXv.
Definition at line 127 of file videooutbase.h.
Referenced by NuppelVideoPlayer::AVSync(), and NuppelVideoPlayer::CheckPrebuffering().
| virtual bool VideoOutput::hasVLDAcceleration | ( | void | ) | const [inline, virtual] |
Returns true iff VLD acceleration is available.
Reimplemented in VideoOutputXv.
Definition at line 129 of file videooutbase.h.
Referenced by NuppelVideoPlayer::AVSync(), and NuppelVideoPlayer::CheckPrebuffering().
| virtual void VideoOutput::SetFramesPlayed | ( | long long | fp | ) | [inline, virtual] |
Sets the number of frames played.
Definition at line 132 of file videooutbase.h.
Referenced by DecoderBase::DoFastForward(), AvFormatDecoder::DoFastForward(), DecoderBase::DoRewind(), and DecoderBase::UpdateDVDFramesPlayed().
| virtual long long VideoOutput::GetFramesPlayed | ( | void | ) | [inline, virtual] |
Returns the number of frames played.
Reimplemented in VideoOutputIvtv.
Definition at line 134 of file videooutbase.h.
Referenced by NuppelVideoPlayer::Pause(), and NuppelVideoPlayer::StartPlaying().
| bool VideoOutput::IsErrored | ( | void | ) | [inline] |
Returns true if a fatal error has been encountered.
Definition at line 137 of file videooutbase.h.
Referenced by NuppelVideoPlayer::AVSync(), NuppelVideoPlayer::DisplayPauseFrame(), VideoOutputXv::PrepareFrame(), VideoOutputDX::PrepareFrame(), VideoOutputD3D::PrepareFrame(), VideoOutputXv::ProcessFrame(), VideoOutputDX::ProcessFrame(), VideoOutputD3D::ProcessFrame(), NuppelVideoPlayer::ReinitVideo(), VideoOutputXv::Show(), VideoOutputDX::Show(), and VideoOutputD3D::Show().
| void VideoOutput::SetPrebuffering | ( | bool | normal | ) | [inline] |
Sets whether to use a normal number of buffers or fewer buffers.
Definition at line 141 of file videooutbase.h.
Referenced by NuppelVideoPlayer::DoPause(), NuppelVideoPlayer::DoPlay(), and AvFormatDecoder::GetFrame().
| virtual void VideoOutput::ClearAfterSeek | ( | void | ) | [inline, virtual] |
Tells video output to toss decoded buffers due to a seek.
Reimplemented in VideoOutputXv.
Definition at line 143 of file videooutbase.h.
Referenced by NuppelVideoPlayer::ClearAfterSeek().
Blocks until a frame is available for decoding onto.
Definition at line 145 of file videooutbase.h.
Referenced by NuppelVideoPlayer::GetFrame().
| virtual int VideoOutput::ValidVideoFrames | ( | void | ) | const [inline, virtual] |
Returns number of frames that are fully decoded.
Reimplemented in VideoOutputIvtv.
Definition at line 148 of file videooutbase.h.
Referenced by NuppelVideoPlayer::AVSync(), NuppelVideoPlayer::DisplayNormalFrame(), NuppelVideoPlayer::IsReallyNearEnd(), and NuppelVideoPlayer::OutputVideoLoop().
| int VideoOutput::FreeVideoFrames | ( | void | ) | [inline] |
Returns number of frames available for decoding onto.
Definition at line 151 of file videooutbase.h.
| bool VideoOutput::EnoughFreeFrames | ( | void | ) | [inline] |
Returns true iff enough frames are available to decode onto.
Definition at line 153 of file videooutbase.h.
Referenced by NuppelVideoPlayer::GetFrame(), and NuppelVideoPlayer::PrebufferEnoughFrames().
| bool VideoOutput::EnoughDecodedFrames | ( | void | ) | [inline] |
Returns true iff there are plenty of decoded frames ready for display.
Definition at line 156 of file videooutbase.h.
Referenced by NuppelVideoPlayer::CheckPrebuffering(), and NuppelVideoPlayer::PrebufferEnoughFrames().
| bool VideoOutput::EnoughPrebufferedFrames | ( | void | ) | [inline] |
Returns true iff we have at least the minimum number of decoded frames ready for display.
Definition at line 159 of file videooutbase.h.
Referenced by NuppelVideoPlayer::CheckPrebuffering(), and NuppelVideoPlayer::PrebufferEnoughFrames().
| bool VideoOutput::IsEmbedding | ( | void | ) | [inline] |
Returns if videooutput is embedding.
Definition at line 162 of file videooutbase.h.
Referenced by NuppelVideoPlayer::IsEmbedding().
| virtual VideoFrame* VideoOutput::GetNextFreeFrame | ( | bool | with_lock = false, |
|
| bool | allow_unsafe = false | |||
| ) | [inline, virtual] |
Blocks until it is possible to return a frame for decoding onto.
| with_lock | if true frames are properly locked, but this means you must unlock them when you are done, so this is disabled by default. | |
| allow_unsafe | if true then that are queued for display can be returned as frames to decode onto, this defaults to false. |
Reimplemented in VideoOutputIvtv.
Definition at line 171 of file videooutbase.h.
Referenced by NuppelVideoPlayer::GetNextVideoFrame().
| virtual void VideoOutput::ReleaseFrame | ( | VideoFrame * | frame | ) | [inline, virtual] |
Releases a frame from the ready for decoding queue onto the queue of frames ready for display.
Definition at line 176 of file videooutbase.h.
Referenced by NuppelVideoPlayer::ReleaseNextVideoFrame().
| virtual void VideoOutput::DeLimboFrame | ( | VideoFrame * | frame | ) | [inline, virtual] |
Releases a frame for reuse if it is in limbo.
Definition at line 178 of file videooutbase.h.
Referenced by AvFormatDecoder::GenerateDummyVideoFrame(), NuppelDecoder::GetFrame(), release_avf_buffer(), and release_nuppel_buffer().
| virtual void VideoOutput::StartDisplayingFrame | ( | void | ) | [inline, virtual] |
Tell GetLastShownFrame() to return the next frame from the head of the queue of frames to display.
Definition at line 181 of file videooutbase.h.
Referenced by NuppelVideoPlayer::DisplayNormalFrame().
| virtual void VideoOutput::DoneDisplayingFrame | ( | void | ) | [inline, virtual] |
Releases frame returned from GetLastShownFrame() onto the queue of frames ready for decoding onto.
Reimplemented in VideoOutputXv.
Definition at line 184 of file videooutbase.h.
Referenced by NuppelVideoPlayer::DisplayNormalFrame(), and Transcode::TranscodeFile().
| virtual void VideoOutput::DiscardFrame | ( | VideoFrame * | frame | ) | [inline, virtual] |
Releases frame from any queue onto the queue of frames ready for decoding onto.
Reimplemented in VideoOutputXv.
Definition at line 187 of file videooutbase.h.
Referenced by NuppelVideoPlayer::DiscardVideoFrame().
| virtual void VideoOutput::DiscardFrames | ( | bool | kf | ) | [inline, virtual] |
Releases all frames not being actively displayed from any queue onto the queue of frames ready for decoding onto.
Reimplemented in VideoOutputXv.
Definition at line 190 of file videooutbase.h.
Referenced by NuppelVideoPlayer::DiscardVideoFrames(), and InputChanged().
| virtual void VideoOutput::CheckFrameStates | ( | void | ) | [inline, virtual] |
Reimplemented in VideoOutputXv.
Definition at line 192 of file videooutbase.h.
Referenced by NuppelVideoPlayer::PrebufferEnoughFrames().
| VideoFrame* VideoOutput::GetLastDecodedFrame | ( | void | ) | [inline] |
Definition at line 195 of file videooutbase.h.
Referenced by NuppelVideoPlayer::GetRawVideoFrame(), NuppelVideoPlayer::GetScreenGrabAtFrame(), Transcode::TranscodeFile(), and NuppelVideoPlayer::TranscodeGetNextFrame().
| VideoFrame* VideoOutput::GetLastShownFrame | ( | void | ) | [inline] |
Returns frame from the head of the ready to be displayed queue, if StartDisplayingFrame has been called.
Definition at line 199 of file videooutbase.h.
Referenced by NuppelVideoPlayer::AVSync(), NuppelVideoPlayer::DisplayAVSubtitles(), NuppelVideoPlayer::DisplayDVDButton(), NuppelVideoPlayer::DisplayNormalFrame(), NuppelVideoPlayer::DisplayTextSubtitles(), NuppelVideoPlayer::ExpireSubtitles(), NuppelVideoPlayer::GetCurrentFrame(), NuppelVideoPlayer::ShowText(), and VideoOutputXv::ShowXVideo().
| QString VideoOutput::GetFrameStatus | ( | void | ) | const [inline] |
Returns string with status of each frame for debugging.
Definition at line 202 of file videooutbase.h.
Referenced by AvFormatDecoderPrivate::DecodeMPEG2Video(), and NuppelVideoPlayer::PrebufferEnoughFrames().
| virtual void VideoOutput::UpdatePauseFrame | ( | void | ) | [pure virtual] |
Updates frame displayed when video is paused.
Implemented in VideoOutputD3D, VideoOutputDirectfb, VideoOutputDX, VideoOutputIvtv, VideoOutputNull, VideoOutputQuartz, and VideoOutputXv.
Referenced by NuppelVideoPlayer::DisplayPauseFrame().
| void VideoOutput::SetVideoResize | ( | const QRect & | videoRect | ) |
Tells the player to resize the video frame (used for ITV).
Definition at line 1658 of file videooutbase.cpp.
Referenced by NuppelVideoPlayer::SetVideoResize().
| void VideoOutput::SetVideoScalingAllowed | ( | bool | change | ) |
| bool VideoOutput::IsVideoScalingAllowed | ( | void | ) | [inline] |
| QRect VideoOutput::GetPIPRect | ( | int | location, | |
| NuppelVideoPlayer * | pipplayer = NULL | |||
| ) | [virtual] |
returns QRect of PIP based on PIPLocation
Reimplemented in VideoOutputXv.
Definition at line 1326 of file videooutbase.cpp.
Referenced by VideoOutputXv::GetPIPRect().
| QString VideoOutput::GetFilters | ( | void | ) | const |
| void VideoOutput::InitBuffers | ( | int | numdecode, | |
| bool | extra_for_pause, | |||
| int | need_free, | |||
| int | needprebuffer_normal, | |||
| int | needprebuffer_small, | |||
| int | keepprebuffer | |||
| ) | [protected] |
| void VideoOutput::ShowPip | ( | VideoFrame * | frame, | |
| NuppelVideoPlayer * | pipplayer | |||
| ) | [protected, virtual] |
Composites PiP image onto a video frame.
Note: This only works with memory backed VideoFrames, that is not XvMC.
| frame | Frame to composite PiP onto. | |
| pipplayer | Picture-in-Picture NVP. |
Reimplemented in VideoOutputIvtv, and VideoOutputXv.
Definition at line 1416 of file videooutbase.cpp.
Referenced by VideoOutputQuartz::ProcessFrame(), VideoOutputDX::ProcessFrame(), VideoOutputDirectfb::ProcessFrame(), VideoOutputD3D::ProcessFrame(), and VideoOutputXv::ShowPip().
| int VideoOutput::DisplayOSD | ( | VideoFrame * | frame, | |
| OSD * | osd, | |||
| int | stride = -1, |
|||
| int | revision = -1 | |||
| ) | [protected, virtual] |
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.
Reimplemented in VideoOutputXv.
Definition at line 1709 of file videooutbase.cpp.
Referenced by VideoOutputXv::DisplayOSD(), VideoOutputQuartz::ProcessFrame(), VideoOutputIvtv::ProcessFrame(), VideoOutputDX::ProcessFrame(), VideoOutputDirectfb::ProcessFrame(), and VideoOutputD3D::ProcessFrame().
| void VideoOutput::SetPictureAttributeDBValue | ( | PictureAttribute | attributeType, | |
| int | newValue | |||
| ) | [protected, virtual] |
Definition at line 1305 of file videooutbase.cpp.
Referenced by VideoOutputXv::SetPictureAttribute(), VideoOutputDX::SetPictureAttribute(), and VideoOutputDirectfb::SetPictureAttribute().
| QRect VideoOutput::GetVisibleOSDBounds | ( | float & | visible_aspect, | |
| float & | font_scaling, | |||
| float | themeaspect | |||
| ) | const [protected, virtual] |
Reimplemented in VideoOutputXv.
Definition at line 716 of file videooutbase.cpp.
Referenced by GetOSDBounds(), and VideoOutputXv::GetVisibleOSDBounds().
| QRect VideoOutput::GetTotalOSDBounds | ( | void | ) | const [protected, virtual] |
Returns total OSD bounds.
Reimplemented in VideoOutputXv.
Definition at line 772 of file videooutbase.cpp.
Referenced by GetOSDBounds().
| void VideoOutput::CopyFrame | ( | VideoFrame * | to, | |
| const VideoFrame * | from | |||
| ) | [static, protected] |
Copies frame data from one VideoFrame to another.
Note: The frames must have the same width, height, and format.
| to | The destination frame. | |
| from | The source frame |
Reimplemented in VideoOutputXv.
Definition at line 1775 of file videooutbase.cpp.
Referenced by VideoOutputXv::CopyFrame(), VideoOutputDirectfb::PrepareFrame(), VideoOutputQuartz::ProcessFrame(), VideoOutputDX::ProcessFrame(), VideoOutputDirectfb::ProcessFrame(), VideoOutputD3D::ProcessFrame(), VideoOutputNull::UpdatePauseFrame(), VideoOutputDirectfb::UpdatePauseFrame(), and VideoOutputD3D::UpdatePauseFrame().
| void VideoOutput::DoPipResize | ( | int | pipwidth, | |
| int | pipheight | |||
| ) | [protected] |
Sets up Picture in Picture image resampler.
| pipwidth | input width | |
| pipheight | input height |
Definition at line 1365 of file videooutbase.cpp.
Referenced by ShowPip(), and VideoOutputIvtv::ShowPip().
| void VideoOutput::ShutdownPipResize | ( | void | ) | [protected] |
Shuts down Picture in Picture image resampler.
Definition at line 1390 of file videooutbase.cpp.
Referenced by DoPipResize(), and ~VideoOutput().
| void VideoOutput::ResizeVideo | ( | VideoFrame * | frame | ) | [protected] |
| void VideoOutput::DoVideoResize | ( | const QSize & | inDim, | |
| const QSize & | outDim | |||
| ) | [protected] |
Sets up Picture in Picture image resampler.
| inDim | input width and height | |
| outDim | output width and height |
Definition at line 1556 of file videooutbase.cpp.
Referenced by ResizeVideo().
| void VideoOutput::ShutdownVideoResize | ( | void | ) | [protected, virtual] |
Reimplemented in VideoOutputXv.
Definition at line 1639 of file videooutbase.cpp.
Referenced by DoVideoResize(), ResizeVideo(), SetVideoResize(), VideoOutputXv::ShutdownVideoResize(), and ~VideoOutput().
| void VideoOutput::SetVideoAspectRatio | ( | float | aspect | ) | [protected] |
Sets VideoOutput::video_aspect to aspect, and sets VideoOutput::overriden_video_aspect if aspectoverride is set to either 4:3, 14:9 or 16:9.
| aspect | video aspect ratio to use |
Definition at line 577 of file videooutbase.cpp.
Referenced by InputChanged(), and VideoAspectRatioChanged().
| void VideoOutput::ApplyManualScaleAndMove | ( | void | ) | [protected] |
Apply scales and moves from "Zoom Mode" settings.
Definition at line 780 of file videooutbase.cpp.
Referenced by MoveResize().
| void VideoOutput::ApplyDBScaleAndMove | ( | void | ) | [protected] |
Apply scales and moves for "Overscan" and "Underscan" DB settings.
It doesn't make any sense to me to offset an image such that it is clipped. Therefore, we only apply offsets if there is an underscan or overscan which creates "room" to move the image around. That is, if we overscan, we can move the "viewport". If we underscan, we change where we place the image into the display window. If no over/underscanning is performed, you just get the full original image scaled into the full display area.
Definition at line 817 of file videooutbase.cpp.
Referenced by MoveResize().
| void VideoOutput::ApplyLetterboxing | ( | void | ) | [protected] |
| void VideoOutput::ApplySnapToVideoRect | ( | void | ) | [protected] |
Snap displayed rectagle to video rectange if they are close.
If our display rectangle is within 5% of the video rectangle in either dimension then snap the display rectangle in that dimension to the video rectangle. The idea is to avoid scaling if it will result in only moderate distortion.
Definition at line 1031 of file videooutbase.cpp.
Referenced by MoveResize().
| void VideoOutput::PrintMoveResizeDebug | ( | void | ) | [protected] |
QSize VideoOutput::db_display_dim [protected] |
Screen dimensions in millimeters from DB.
Definition at line 250 of file videooutbase.h.
Referenced by VideoOutputDirectfb::Init(), VideoOutputXv::InitDisplayMeasurements(), and VideoOutput().
QPoint VideoOutput::db_move [protected] |
Percentage move from database.
Definition at line 251 of file videooutbase.h.
Referenced by ApplyDBScaleAndMove(), Init(), and VideoOutput().
float VideoOutput::db_scale_horiz [protected] |
Horizontal Overscan/Underscan percentage.
Definition at line 252 of file videooutbase.h.
Referenced by ApplyDBScaleAndMove(), GetVisibleOSDBounds(), MoveResize(), and SetVideoScalingAllowed().
float VideoOutput::db_scale_vert [protected] |
Vertical Overscan/Underscan percentage.
Definition at line 253 of file videooutbase.h.
Referenced by ApplyDBScaleAndMove(), GetVisibleOSDBounds(), MoveResize(), PrintMoveResizeDebug(), and SetVideoScalingAllowed().
PIPLocation VideoOutput::db_pip_location [protected] |
Definition at line 254 of file videooutbase.h.
Referenced by ShowPip(), VideoOutputXv::ShowPip(), VideoOutputIvtv::ShowPip(), and VideoOutput().
int VideoOutput::db_pip_size [protected] |
percentage of full window to use for PiP
Definition at line 255 of file videooutbase.h.
Referenced by GetPIPRect(), VideoOutputXv::GetPIPRect(), ShowPip(), and VideoOutput().
PictureSettingMap VideoOutput::db_pict_attr [protected] |
Picture settings.
Definition at line 257 of file videooutbase.h.
Referenced by GetPictureAttribute(), InitPictureAttributes(), SetPictureAttributeDBValue(), and VideoOutput().
AspectOverrideMode VideoOutput::db_aspectoverride [protected] |
Definition at line 258 of file videooutbase.h.
Referenced by Init(), VideoOutputQuartz::Init(), VideoOutputQuartz::InputChanged(), VideoOutputQuartz::VideoAspectRatioChanged(), and VideoOutput().
AdjustFillMode VideoOutput::db_adjustfill [protected] |
LetterBoxColour VideoOutput::db_letterbox_colour [protected] |
Definition at line 260 of file videooutbase.h.
Referenced by VideoOutputXv::Init(), and VideoOutput().
QString VideoOutput::db_deint_filtername [protected] |
Definition at line 261 of file videooutbase.h.
bool VideoOutput::db_use_picture_controls [protected] |
Definition at line 262 of file videooutbase.h.
Referenced by VideoOutputXv::InitOpenGL(), VideoOutputXv::InitSetupBuffers(), VideoOutputXv::ShowPip(), and VideoOutput().
VideoDisplayProfile* VideoOutput::db_vdisp_profile [protected] |
Definition at line 264 of file videooutbase.h.
Referenced by VideoOutputQuartz::CreateQuartzBuffers(), FallbackDeint(), GetFilters(), Init(), VideoOutputNull::Init(), VideoOutputIvtv::Init(), VideoOutputDX::Init(), VideoOutputD3D::Init(), InitOSD(), VideoOutputXv::InitSetupBuffers(), VideoOutputXv::InitVideoBuffers(), InputChanged(), VideoOutputNull::InputChanged(), VideoOutputDX::InputChanged(), VideoOutputD3D::InputChanged(), VideoOutputQuartz::SetDVDVDecoder(), SetupDeinterlace(), VideoOutputXv::SetupDeinterlaceOpenGL(), SetVideoFrameRate(), and ~VideoOutput().
float VideoOutput::mz_scale_v [protected] |
Manually applied vertical scaling.
Definition at line 267 of file videooutbase.h.
Referenced by ApplyManualScaleAndMove(), MoveResize(), and Zoom().
float VideoOutput::mz_scale_h [protected] |
Manually applied horizontal scaling.
Definition at line 268 of file videooutbase.h.
Referenced by ApplyManualScaleAndMove(), MoveResize(), and Zoom().
QPoint VideoOutput::mz_move [protected] |
Manually applied percentage move.
Definition at line 269 of file videooutbase.h.
Referenced by ApplyManualScaleAndMove(), and Zoom().
QSize VideoOutput::display_dim [protected] |
Screen dimensions of playback window in mm.
Definition at line 272 of file videooutbase.h.
Referenced by VideoOutputQuartz::Init(), VideoOutputDirectfb::Init(), VideoOutputXv::InitDisplayMeasurements(), and VideoOutputXv::ResizeForVideo().
float VideoOutput::display_aspect [protected] |
Physical aspect ratio of playback window.
Definition at line 273 of file videooutbase.h.
Referenced by GetDisplayAspect(), GetPIPRect(), VideoOutputQuartz::Init(), VideoOutputDirectfb::Init(), VideoOutputXv::InitDisplayMeasurements(), and VideoOutputXv::ResizeForVideo().
QSize VideoOutput::video_dim [protected] |
Pixel dimensions of video buffer.
Definition at line 276 of file videooutbase.h.
Referenced by VideoOutputXv::CreateBuffers(), VideoOutputQuartz::CreateQuartzBuffers(), VideoOutputXv::CreateShmImages(), VideoOutputXv::CreateXvMCBuffers(), VideoOutputXv::CreateXvMCSurfaces(), DisplayOSD(), Init(), VideoOutputQuartz::Init(), VideoOutputNull::Init(), VideoOutputIvtv::Init(), VideoOutputDX::Init(), VideoOutputDirectfb::Init(), VideoOutputD3D::Init(), VideoOutputXv::InitOpenGL(), VideoOutputXv::InitOSD(), VideoOutputXv::InitSetupBuffers(), VideoOutputXv::InitXVideo(), VideoOutputXv::InitXvMC(), InputChanged(), VideoOutputQuartz::InputChanged(), VideoOutputNull::InputChanged(), VideoOutputDX::InputChanged(), VideoOutputDirectfb::InputChanged(), VideoOutputD3D::InputChanged(), MoveResize(), VideoOutputIvtv::ProcessFrame(), SetupDeinterlace(), and VideoOutputIvtv::ShowPip().
QSize VideoOutput::video_disp_dim [protected] |
Pixel dimensions of video display area.
Definition at line 277 of file videooutbase.h.
Referenced by ApplyDBScaleAndMove(), VideoOutputXv::GetPIPRect(), GetTotalOSDBounds(), VideoOutputXv::GetTotalOSDBounds(), GetVisibleOSDBounds(), Init(), InputChanged(), VideoOutputXv::InputChanged(), VideoOutputQuartz::InputChanged(), VideoOutputNull::InputChanged(), MoveResize(), VideoOutputXv::ResizeForVideo(), and ShowPip().
float VideoOutput::video_aspect [protected] |
Physical aspect ratio of video.
Definition at line 278 of file videooutbase.h.
Referenced by VideoOutputXv::GetPIPRect(), VideoOutputXv::InputChanged(), VideoOutputQuartz::InputChanged(), PrintMoveResizeDebug(), SetVideoAspectRatio(), ShowPip(), and ToggleAspectOverride().
float VideoOutput::overriden_video_aspect [protected] |
Normally this is the same as videoAspect, but may not be if the user has toggled the aspect override mode.
Definition at line 282 of file videooutbase.h.
Referenced by ApplyLetterboxing(), VideoOutputXv::GetPIPRect(), GetVisibleOSDBounds(), PrintMoveResizeDebug(), SetVideoAspectRatio(), and ShowPip().
AspectOverrideMode VideoOutput::aspectoverride [protected] |
AspectOverrideMode to use to modify overriden_video_aspect.
Definition at line 284 of file videooutbase.h.
Referenced by GetAspectOverride(), VideoOutputXv::GetPIPRect(), Init(), PrintMoveResizeDebug(), SetVideoAspectRatio(), ShowPip(), and ToggleAspectOverride().
AdjustFillMode VideoOutput::adjustfill [protected] |
Zoom mode.
Definition at line 286 of file videooutbase.h.
Referenced by ApplyLetterboxing(), GetAdjustFill(), Init(), PrintMoveResizeDebug(), and ToggleAdjustFill().
QRect VideoOutput::video_rect [protected] |
Pixel rectangle in video frame to display.
Definition at line 289 of file videooutbase.h.
Referenced by ApplyDBScaleAndMove(), ApplySnapToVideoRect(), VideoOutputDX::DirectXUpdateOverlay(), GetDrawSize(), VideoOutputXv::GetPIPRect(), Init(), VideoOutputXv::InitOpenGL(), MoveResize(), VideoOutputXv::MoveResize(), PrintMoveResizeDebug(), VideoOutputDX::Show(), VideoOutputD3D::Show(), ShowPip(), VideoOutputXv::ShowXVideo(), and VideoOutputXv::ShowXvMC().
QRect VideoOutput::display_video_rect [protected] |
Pixel rectangle in display window into which video_rect maps to.
Definition at line 291 of file videooutbase.h.
Referenced by ApplyDBScaleAndMove(), ApplyLetterboxing(), ApplyManualScaleAndMove(), ApplySnapToVideoRect(), VideoOutputDX::DirectXUpdateOverlay(), VideoOutputXv::DrawUnusedRects(), EmbedInWidget(), VideoOutputXv::GetPIPRect(), GetVisibleOSDBounds(), VideoOutputXv::InitOpenGL(), MoveResize(), VideoOutputXv::MoveResize(), VideoOutputQuartz::MoveResize(), VideoOutputDirectfb::MoveResize(), VideoOutputXv::PrepareFrameXvMC(), PrintMoveResizeDebug(), ChromaKeyOSD::Reinit(), VideoOutputDX::Show(), VideoOutputD3D::Show(), ShowPip(), VideoOutputXv::ShowXVideo(), and VideoOutputXv::ShowXvMC().
QRect VideoOutput::display_visible_rect [protected] |
Visible portion of display window in pixels.
This may be bigger or smaller than display_video_rect.
Definition at line 294 of file videooutbase.h.
Referenced by ChromaKeyOSD::AllocImage(), ApplyDBScaleAndMove(), VideoOutputXv::CreateBuffers(), VideoOutputXv::CreateShmImages(), VideoOutputDX::DirectXUpdateOverlay(), VideoOutputXv::DrawUnusedRects(), EmbedInWidget(), VideoOutputDX::GetDisplayAspect(), VideoOutputD3D::GetDisplayAspect(), GetPIPRect(), VideoOutputXv::GetPIPRect(), VideoOutputXv::GetTotalOSDBounds(), GetVisibleOSDBounds(), VideoOutputXv::GetVisibleOSDBounds(), Init(), VideoOutputDirectfb::Init(), VideoOutputXv::InitOpenGL(), VideoOutputXv::InitOSD(), MoveResize(), VideoOutputDirectfb::MoveResize(), VideoOutputXv::PrepareFrameMem(), ChromaKeyOSD::Reinit(), VideoOutputXv::ResizeForVideo(), VideoOutputDX::Show(), ShowPip(), StopEmbedding(), and VideoOutputXv::~VideoOutputXv().
QRect VideoOutput::tmp_display_visible_rect [protected] |
Used to save the display_visible_rect for restoration after video embedding ends.
Definition at line 297 of file videooutbase.h.
Referenced by EmbedInWidget(), and StopEmbedding().
QSize VideoOutput::pip_desired_display_size [protected] |
Definition at line 300 of file videooutbase.h.
Referenced by DoPipResize(), ShowPip(), and VideoOutputIvtv::ShowPip().
QSize VideoOutput::pip_display_size [protected] |
Definition at line 301 of file videooutbase.h.
Referenced by DoPipResize(), ShowPip(), VideoOutputIvtv::ShowPip(), and ShutdownPipResize().
QSize VideoOutput::pip_video_size [protected] |
Definition at line 302 of file videooutbase.h.
Referenced by DoPipResize(), and ShutdownPipResize().
unsigned char* VideoOutput::pip_tmp_buf [protected] |
Definition at line 303 of file videooutbase.h.
Referenced by DoPipResize(), ShowPip(), VideoOutputIvtv::ShowPip(), and ShutdownPipResize().
ImgReSampleContext* VideoOutput::pip_scaling_context [protected] |
Definition at line 304 of file videooutbase.h.
Referenced by DoPipResize(), ShowPip(), VideoOutputIvtv::ShowPip(), and ShutdownPipResize().
VideoFrame VideoOutput::pip_tmp_image [protected] |
bool VideoOutput::vsz_enabled [protected] |
Definition at line 308 of file videooutbase.h.
Referenced by DisplayOSD(), VideoOutputXv::DisplayOSD(), ResizeVideo(), SetVideoResize(), ShutdownVideoResize(), and VideoOutputXv::ShutdownVideoResize().
QRect VideoOutput::vsz_desired_display_rect [protected] |
Definition at line 309 of file videooutbase.h.
Referenced by VideoOutputXv::DisplayOSD(), ResizeVideo(), and SetVideoResize().
QSize VideoOutput::vsz_display_size [protected] |
Definition at line 310 of file videooutbase.h.
Referenced by DoVideoResize(), and ShutdownVideoResize().
QSize VideoOutput::vsz_video_size [protected] |
Definition at line 311 of file videooutbase.h.
Referenced by DoVideoResize(), and ShutdownVideoResize().
unsigned char* VideoOutput::vsz_tmp_buf [protected] |
Definition at line 312 of file videooutbase.h.
Referenced by DoVideoResize(), ResizeVideo(), and ShutdownVideoResize().
ImgReSampleContext* VideoOutput::vsz_scale_context [protected] |
Definition at line 313 of file videooutbase.h.
Referenced by DoVideoResize(), ResizeVideo(), and ShutdownVideoResize().
bool VideoOutput::m_deinterlacing [protected] |
Definition at line 316 of file videooutbase.h.
Referenced by VideoOutputXv::DrawUnusedRects(), VideoOutputXv::InitOpenGL(), IsBobDeint(), IsExtraProcessingRequired(), NeedsDoubleFramerate(), VideoOutputXv::PrepareFrameOpenGL(), VideoOutputQuartz::ProcessFrame(), VideoOutputDX::ProcessFrame(), VideoOutputDirectfb::ProcessFrame(), VideoOutputD3D::ProcessFrame(), VideoOutputXv::ProcessFrameMem(), VideoOutputXv::ProcessFrameOpenGL(), ChromaKeyOSD::Reinit(), SetDeinterlacingEnabled(), VideoOutputXv::SetDeinterlacingEnabledOpenGL(), SetupDeinterlace(), VideoOutputXv::SetupDeinterlaceOpenGL(), VideoOutputXv::ShowXVideo(), VideoOutputXv::ShowXvMC(), and VideoOutputXv::~VideoOutputXv().
QString VideoOutput::m_deintfiltername [protected] |
Definition at line 317 of file videooutbase.h.
Referenced by VideoOutputXv::DrawUnusedRects(), VideoOutputXv::InitOpenGL(), IsBobDeint(), IsExtraProcessingRequired(), NeedsDoubleFramerate(), ChromaKeyOSD::Reinit(), VideoOutputXv::SetDeinterlacingEnabled(), VideoOutputXv::SetDeinterlacingEnabledOpenGL(), SetupDeinterlace(), VideoOutputXv::SetupDeinterlaceOpenGL(), and VideoOutputXv::ShowXVideo().
FilterManager* VideoOutput::m_deintFiltMan [protected] |
Definition at line 318 of file videooutbase.h.
Referenced by SetDeinterlacingEnabled(), VideoOutputXv::SetDeinterlacingEnabledOpenGL(), SetupDeinterlace(), VideoOutputXv::SetupDeinterlaceOpenGL(), and ~VideoOutput().
FilterChain* VideoOutput::m_deintFilter [protected] |
Definition at line 319 of file videooutbase.h.
Referenced by VideoOutputQuartz::ProcessFrame(), VideoOutputDX::ProcessFrame(), VideoOutputDirectfb::ProcessFrame(), VideoOutputD3D::ProcessFrame(), VideoOutputXv::ProcessFrameMem(), VideoOutputXv::ProcessFrameOpenGL(), SetDeinterlacingEnabled(), VideoOutputXv::SetDeinterlacingEnabledOpenGL(), SetupDeinterlace(), VideoOutputXv::SetupDeinterlaceOpenGL(), and ~VideoOutput().
bool VideoOutput::m_deinterlaceBeforeOSD [protected] |
Definition at line 320 of file videooutbase.h.
Referenced by VideoOutputQuartz::ProcessFrame(), VideoOutputXv::ProcessFrameMem(), VideoOutputXv::ProcessFrameOpenGL(), and SetupDeinterlace().
VideoBuffers VideoOutput::vbuffers [protected] |
VideoBuffers instance used to track video output buffers.
Definition at line 323 of file videooutbase.h.
Referenced by VideoOutputXv::CheckFrameStates(), ClearAfterSeek(), VideoOutputXv::CreateBuffers(), VideoOutputXv::CreatePauseFrame(), VideoOutputNull::CreatePauseFrame(), VideoOutputQuartz::CreateQuartzBuffers(), VideoOutputXv::CreateXvMCBuffers(), VideoOutputXv::DeleteBuffers(), VideoOutputQuartz::DeleteQuartzBuffers(), DeLimboFrame(), DiscardFrame(), VideoOutputXv::DiscardFrame(), DiscardFrames(), VideoOutputXv::DiscardFrames(), DoneDisplayingFrame(), VideoOutputXv::DoneDisplayingFrame(), VideoOutputXv::DrawSlice(), EnoughDecodedFrames(), EnoughFreeFrames(), EnoughPrebufferedFrames(), VideoOutputDX::Exit(), VideoOutputD3D::Exit(), FreeVideoFrames(), GetFrameStatus(), GetLastDecodedFrame(), GetLastShownFrame(), GetNextFreeFrame(), VideoOutputXv::GetNextFreeFrame(), VideoOutputQuartz::Init(), VideoOutputNull::Init(), VideoOutputDX::Init(), VideoOutputDirectfb::Init(), VideoOutputD3D::Init(), VideoOutputXv::InitVideoBuffers(), VideoOutputXv::InputChanged(), VideoOutputNull::InputChanged(), VideoOutputDX::InputChanged(), VideoOutputDirectfb::InputChanged(), VideoOutputD3D::InputChanged(), VideoOutputNull::PrepareFrame(), VideoOutputDX::PrepareFrame(), VideoOutputDirectfb::PrepareFrame(), VideoOutputD3D::PrepareFrame(), VideoOutputXv::PrepareFrameMem(), VideoOutputXv::PrepareFrameOpenGL(), VideoOutputXv::PrepareFrameXv(), VideoOutputXv::PrepareFrameXvMC(), VideoOutputQuartz::ProcessFrame(), VideoOutputDX::ProcessFrame(), VideoOutputDirectfb::ProcessFrame(), VideoOutputD3D::ProcessFrame(), VideoOutputXv::ProcessFrameMem(), VideoOutputXv::ProcessFrameOpenGL(), VideoOutputXv::ProcessFrameXvMC(), ReleaseFrame(), SetPrebuffering(), VideoOutputXv::ShowXVideo(), VideoOutputXv::ShowXvMC(), StartDisplayingFrame(), VideoOutputXv::UpdatePauseFrame(), VideoOutputQuartz::UpdatePauseFrame(), VideoOutputNull::UpdatePauseFrame(), VideoOutputDX::UpdatePauseFrame(), VideoOutputDirectfb::UpdatePauseFrame(), VideoOutputD3D::UpdatePauseFrame(), ValidVideoFrames(), WaitForAvailable(), VideoOutputDirectfb::~VideoOutputDirectfb(), and VideoOutputNull::~VideoOutputNull().
bool VideoOutput::embedding [protected] |
Definition at line 326 of file videooutbase.h.
Referenced by VideoOutputXv::DrawUnusedRects(), VideoOutputD3D::DrawUnusedRects(), EmbedInWidget(), VideoOutputXv::EmbedInWidget(), VideoOutputQuartz::EmbedInWidget(), VideoOutputNull::EmbedInWidget(), VideoOutputDX::EmbedInWidget(), VideoOutputD3D::EmbedInWidget(), Init(), IsEmbedding(), VideoOutputIvtv::ProcessFrame(), VideoOutputXv::ProcessFrameMem(), VideoOutputXv::ProcessFrameXvMC(), VideoOutputXv::Show(), VideoOutputD3D::Show(), StopEmbedding(), VideoOutputXv::StopEmbedding(), VideoOutputQuartz::StopEmbedding(), VideoOutputNull::StopEmbedding(), VideoOutputDX::StopEmbedding(), and VideoOutputD3D::StopEmbedding().
bool VideoOutput::needrepaint [protected] |
Definition at line 327 of file videooutbase.h.
Referenced by VideoOutputXv::DrawUnusedRects(), VideoOutputD3D::DrawUnusedRects(), ExposeEvent(), VideoOutputXv::Init(), MoveResize(), VideoOutputXv::MoveResize(), VideoOutputXv::ProcessFrameMem(), VideoOutputXv::ProcessFrameXvMC(), VideoOutputXv::SetupDeinterlace(), VideoOutputXv::Show(), and VideoOutputD3D::Show().
bool VideoOutput::allowpreviewepg [protected] |
Definition at line 328 of file videooutbase.h.
Referenced by AllowPreviewEPG(), VideoOutputXv::DeleteBuffers(), EmbedInWidget(), VideoOutputIvtv::Init(), VideoOutputXv::InitOpenGL(), VideoOutputXv::InitXlib(), VideoOutputXv::InitXShm(), VideoOutputXv::InitXVideo(), and VideoOutputXv::InitXvMC().
bool VideoOutput::errored [protected] |
Definition at line 329 of file videooutbase.h.
Referenced by VideoOutputXv::InputChanged(), VideoOutputNull::InputChanged(), VideoOutputD3D::InputChanged(), IsErrored(), and VideoOutputDX::PrepareFrame().
long long VideoOutput::framesPlayed [protected] |
Definition at line 330 of file videooutbase.h.
Referenced by VideoOutputXv::CopyFrame(), GetFramesPlayed(), VideoOutputQuartz::PrepareFrame(), VideoOutputNull::PrepareFrame(), VideoOutputDX::PrepareFrame(), VideoOutputDirectfb::PrepareFrame(), VideoOutputD3D::PrepareFrame(), VideoOutputXv::PrepareFrameMem(), VideoOutputXv::PrepareFrameOpenGL(), VideoOutputXv::PrepareFrameXv(), VideoOutputXv::PrepareFrameXvMC(), SetFramesPlayed(), VideoOutputXv::UpdatePauseFrame(), and VideoOutputNull::UpdatePauseFrame().
bool VideoOutput::db_scaling_allowed [protected] |
disable this to prevent overscan/underscan
Definition at line 331 of file videooutbase.h.
Referenced by IsVideoScalingAllowed(), and SetVideoScalingAllowed().
Definition at line 332 of file videooutbase.h.
Referenced by GetSupportedPictureAttributes(), VideoOutputXv::InitPictureAttributes(), and VideoOutputXv::SetPictureAttribute().
const float VideoOutput::kManualZoomMaxHorizontalZoom = 2.0f [static, protected] |
const float VideoOutput::kManualZoomMaxVerticalZoom = 2.0f [static, protected] |
const float VideoOutput::kManualZoomMinHorizontalZoom = 0.5f [static, protected] |
const float VideoOutput::kManualZoomMinVerticalZoom = 0.5f [static, protected] |
const int VideoOutput::kManualZoomMaxMove = 50 [static, protected] |
1.5.5