#include <videoout_xv.h>

This class suppurts XVideo with VLD acceleration (XvMC-VLD), XVideo with inverse discrete cosine transform (XvMC-IDCT) acceleration, XVideo with motion vector (XvMC) acceleration, and normal XVideo with color transform and scaling acceleration only. When none of these will work, we also try to use X Shared memory, and if that fails we try standard Xlib output.
Definition at line 53 of file videoout_xv.h.
Public Member Functions | |
| VideoOutputXv (MythCodecID av_codec_id) | |
| ~VideoOutputXv () | |
| bool | Init (int width, int height, float aspect, WId winid, int winx, int winy, int winw, int winh, WId embedid=0) |
| Initializes class for video output. | |
| bool | SetDeinterlacingEnabled (bool) |
| Attempts to enable/disable deinterlacing using existing deinterlace method when enabling. | |
| bool | SetupDeinterlace (bool interlaced, const QString &ovrf="") |
| Attempts to enable or disable deinterlacing. | |
| bool | ApproveDeintFilter (const QString &filtername) const |
| Approves all deinterlace filters, except ones which must be supported by a specific video output class. | |
| void | ProcessFrame (VideoFrame *frame, OSD *osd, FilterChain *filterList, NuppelVideoPlayer *pipPlayer) |
| void | PrepareFrame (VideoFrame *, FrameScanType) |
| void | DrawSlice (VideoFrame *, int x, int y, int w, int h) |
| Informs video output of new data for frame, used for XvMC acceleration. | |
| void | Show (FrameScanType) |
| void | ClearAfterSeek (void) |
| Tells video output to toss decoded buffers due to a seek. | |
| void | MoveResize (void) |
| performs all the calculations for video framing and any resizing. | |
| bool | InputChanged (const QSize &input_size, float aspect, MythCodecID av_codec_id, void *codec_private) |
| Tells video output to discard decoded frames and wait for new ones. | |
| void | Zoom (ZoomDirection direction) |
| Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize(). | |
| void | VideoAspectRatioChanged (float aspect) |
| Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes. | |
| void | EmbedInWidget (WId wid, int x, int y, int w, int h) |
| Tells video output to embed video in an existing window. | |
| void | StopEmbedding (void) |
| Tells video output to stop embedding video in an existing window. | |
| void | ResizeForGui (void) |
| void | ResizeForVideo (void) |
| void | DrawUnusedRects (bool sync=true) |
| Draws non-video portions of the screen. | |
| void | UpdatePauseFrame (void) |
| Updates frame displayed when video is paused. | |
| int | SetPictureAttribute (PictureAttribute attribute, int newValue) |
| Sets a specified picture attribute. | |
| void | InitPictureAttributes (void) |
| int | GetRefreshRate (void) |
| Monitor refresh time in microseconds. | |
| 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. | |
| void | CheckFrameStates (void) |
| QRect | GetPIPRect (int location, NuppelVideoPlayer *pipplayer=NULL) |
| returns QRect of PIP based on PIPLocation | |
| virtual void | ShutdownVideoResize (void) |
Static Public Member Functions | |
| static MythCodecID | GetBestSupportedCodec (uint width, uint height, uint osd_width, uint osd_height, uint stream_type, int xvmc_chroma, bool test_surface, bool force_xv) |
| static int | GrabSuitableXvPort (Display *disp, Window root, MythCodecID type, uint width, uint height, int xvmc_chroma=0, XvMCSurfaceInfo *si=NULL, QString *adaptor_name=NULL) |
| Internal function used to grab a XVideo port with the desired properties. | |
| static XvMCContext * | CreateXvMCContext (Display *disp, int port, int surf_type, int width, int height) |
| static void | DeleteXvMCContext (Display *disp, XvMCContext *&ctx) |
| static QStringList | GetAllowedRenderers (MythCodecID myth_codec_id, const QSize &video_dim) |
Private Member Functions | |
| VOSType | VideoOutputSubType () const |
| virtual QRect | GetVisibleOSDBounds (float &, float &, float) const |
| virtual QRect | GetTotalOSDBounds (void) const |
| Returns total OSD bounds. | |
| VideoFrame * | GetNextFreeFrame (bool allow_unsafe) |
| void | DiscardFrame (VideoFrame *) |
| Frame is ready to be reused by decoder added to the done or available list. | |
| void | DiscardFrames (bool next_frame_keyframe) |
| Releases all frames not being actively displayed from any queue onto the queue of frames ready for decoding onto. | |
| void | DoneDisplayingFrame (void) |
| This is used to tell this class that the NPV will not call Show() on this frame again. | |
| void | ProcessFrameXvMC (VideoFrame *frame, OSD *osd) |
| void | ProcessFrameOpenGL (VideoFrame *frame, OSD *osd, FilterChain *filterList, NuppelVideoPlayer *pipPlayer) |
| void | ProcessFrameMem (VideoFrame *frame, OSD *osd, FilterChain *filterList, NuppelVideoPlayer *pipPlayer) |
| void | PrepareFrameXvMC (VideoFrame *, FrameScanType) |
| void | PrepareFrameXv (VideoFrame *) |
| void | PrepareFrameOpenGL (VideoFrame *, FrameScanType) |
| void | PrepareFrameMem (VideoFrame *, FrameScanType) |
| void | ShowXvMC (FrameScanType scan) |
| void | ShowXVideo (FrameScanType scan) |
| 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. | |
| void | ResizeForVideo (uint width, uint height) |
| Sets display parameters based on video resolution. | |
| void | InitDisplayMeasurements (uint width, uint height) |
| Init display measurements based on database settings and actual screen parameters. | |
| void | InitColorKey (bool turnoffautopaint) |
| Initializes color keying support used by XVideo output methods. | |
| bool | InitVideoBuffers (MythCodecID, bool use_xv, bool use_shm, bool use_opengl) |
| Creates and initializes video buffers. | |
| bool | InitXvMC (MythCodecID) |
| Creates and initializes video buffers. | |
| bool | InitXVideo (void) |
| Creates and initializes video buffers. | |
| bool | InitOpenGL (void) |
| bool | InitXShm (void) |
| Creates and initializes video buffers. | |
| bool | InitXlib (void) |
| Creates and initializes video buffers. | |
| bool | InitOSD (const QString &) |
| bool | CheckOSDInit (void) |
| bool | CreateXvMCBuffers (void) |
| bool | CreateBuffers (VOSType subtype) |
| vector< void * > | CreateXvMCSurfaces (uint num, bool surface_has_vld) |
| vector< unsigned char * > | CreateShmImages (uint num, bool use_xv) |
| Creates Shared Memory Images. | |
| void | CreatePauseFrame (VOSType subtype) |
| Creates an extra frame for pause. | |
| void | CopyFrame (VideoFrame *to, const VideoFrame *from) |
| Copies frame data from one VideoFrame to another. | |
| void | DeleteBuffers (VOSType subtype, bool delete_pause_frame) |
| bool | InitSetupBuffers (void) |
| XvMCOSD * | GetAvailableOSD () |
| void | ReturnAvailableOSD (XvMCOSD *) |
| bool | SetDeinterlacingEnabledOpenGL (bool enable) |
| bool | SetupDeinterlaceOpenGL (bool interlaced, const QString &overridefilter) |
Static Private Member Functions | |
| static bool | IsDisplaying (VideoFrame *frame) |
| static bool | IsRendering (VideoFrame *frame) |
| static void | SyncSurface (VideoFrame *frame, int past_future=0) |
| static void | FlushSurface (VideoFrame *frame) |
Private Attributes | |
| MythCodecID | myth_codec_id |
| VOSType | video_output_subtype |
| DisplayRes * | display_res |
| QMutex | global_lock |
| Window | XJ_root |
| Window | XJ_win |
| Window | XJ_curwin |
| GC | XJ_gc |
| Screen * | XJ_screen |
| Display * | XJ_disp |
| int | XJ_screen_num |
| unsigned long | XJ_white |
| unsigned long | XJ_black |
| unsigned long | XJ_letterbox_colour |
| int | XJ_depth |
| int | XJ_screenx |
| int | XJ_screeny |
| int | XJ_screenwidth |
| int | XJ_screenheight |
| bool | XJ_started |
| VideoFrame | av_pause_frame |
| vector< XShmSegmentInfo * > | XJ_shm_infos |
| vector< YUVInfo > | XJ_yuv_infos |
| XImage * | XJ_non_xv_image |
| long long | non_xv_frames_shown |
| int | non_xv_show_frame |
| int | non_xv_fps |
| int | non_xv_av_format |
| time_t | non_xv_stop_time |
| XvMCBufferSettings * | xvmc_buf_attr |
| int | xvmc_chroma |
| XvMCContext * | xvmc_ctx |
| vector< void * > | xvmc_surfs |
| QMutex | xvmc_osd_lock |
| MythDeque< XvMCOSD * > | xvmc_osd_available |
| XvMCSurfaceInfo | xvmc_surf_info |
| XvMCTextures * | xvmc_tex |
| int | xv_port |
| int | xv_hue_base |
| int | xv_colorkey |
| bool | xv_draw_colorkey |
| int | xv_chroma |
| buffer_map_t | xv_buffers |
| bool | xv_need_bobdeint_repaint |
| QMap< PictureAttribute, int > | xv_attribute_min |
| QMap< PictureAttribute, int > | xv_attribute_max |
| QMutex | gl_context_lock |
| OpenGLContext * | gl_context |
| OpenGLVideo * | gl_videochain |
| OpenGLVideo * | gl_pipchain |
| OpenGLVideo * | gl_osdchain |
| bool | gl_use_osd_opengl2 |
| bool | gl_pip_ready |
| bool | gl_osd_ready |
| ChromaKeyOSD * | chroma_osd |
Friends | |
| class | ChromaKeyOSD |
| class | OpenGLVideoSync |
| class | XvMCOSD |
| VideoOutputXv::VideoOutputXv | ( | MythCodecID | av_codec_id | ) |
Definition at line 100 of file videoout_xv.cpp.
| VideoOutputXv::~VideoOutputXv | ( | ) |
Definition at line 143 of file videoout_xv.cpp.
| bool VideoOutputXv::Init | ( | int | width, | |
| int | height, | |||
| float | aspect, | |||
| WId | winid, | |||
| int | winx, | |||
| int | winy, | |||
| int | winw, | |||
| int | winh, | |||
| WId | embedid = 0 | |||
| ) | [virtual] |
Initializes class for video output.
Reimplemented from VideoOutput.
Definition at line 1576 of file videoout_xv.cpp.
Attempts to enable/disable deinterlacing using existing deinterlace method when enabling.
Reimplemented from VideoOutput.
Definition at line 1704 of file videoout_xv.cpp.
Referenced by InitOpenGL().
Attempts to enable or disable deinterlacing.
| overridefilter | optional, explicitly use this nondefault deint filter |
Reimplemented from VideoOutput.
Definition at line 1714 of file videoout_xv.cpp.
Referenced by SetDeinterlacingEnabledOpenGL().
| bool VideoOutputXv::ApproveDeintFilter | ( | const QString & | filtername | ) | const [virtual] |
Approves all deinterlace filters, except ones which must be supported by a specific video output class.
Reimplemented from VideoOutput.
Definition at line 1846 of file videoout_xv.cpp.
| void VideoOutputXv::ProcessFrame | ( | VideoFrame * | frame, | |
| OSD * | osd, | |||
| FilterChain * | filterList, | |||
| NuppelVideoPlayer * | pipPlayer | |||
| ) | [virtual] |
| void VideoOutputXv::PrepareFrame | ( | VideoFrame * | buffer, | |
| FrameScanType | scan | |||
| ) | [virtual] |
| void VideoOutputXv::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 from VideoOutput.
Definition at line 3271 of file videoout_xv.cpp.
| void VideoOutputXv::Show | ( | FrameScanType | scan | ) | [virtual] |
| void VideoOutputXv::ClearAfterSeek | ( | void | ) | [virtual] |
Tells video output to toss decoded buffers due to a seek.
Reimplemented from VideoOutput.
Definition at line 2469 of file videoout_xv.cpp.
| void VideoOutputXv::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 from VideoOutput.
Definition at line 208 of file videoout_xv.cpp.
Referenced by EmbedInWidget(), Init(), InputChanged(), and Zoom().
| bool VideoOutputXv::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 from VideoOutput.
Definition at line 226 of file videoout_xv.cpp.
| void VideoOutputXv::Zoom | ( | ZoomDirection | direction | ) | [virtual] |
Sets up zooming into to different parts of the video, the zoom is actually applied in MoveResize().
Reimplemented from VideoOutput.
Definition at line 200 of file videoout_xv.cpp.
| void VideoOutputXv::VideoAspectRatioChanged | ( | float | aspect | ) | [virtual] |
Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.
| aspect | video aspect ratio to use |
Reimplemented from VideoOutput.
Definition at line 3346 of file videoout_xv.cpp.
| void VideoOutputXv::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 from VideoOutput.
Definition at line 2378 of file videoout_xv.cpp.
| void VideoOutputXv::StopEmbedding | ( | void | ) | [virtual] |
Tells video output to stop embedding video in an existing window.
Reimplemented from VideoOutput.
Definition at line 2393 of file videoout_xv.cpp.
| void VideoOutputXv::ResizeForGui | ( | void | ) | [virtual] |
| void VideoOutputXv::ResizeForVideo | ( | void | ) | [virtual] |
Reimplemented from VideoOutput.
Definition at line 381 of file videoout_xv.cpp.
Referenced by InitDisplayMeasurements(), and InputChanged().
| void VideoOutputXv::DrawUnusedRects | ( | bool | sync = true |
) | [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. |
Implements VideoOutput.
Definition at line 3150 of file videoout_xv.cpp.
Referenced by Show().
| void VideoOutputXv::UpdatePauseFrame | ( | void | ) | [virtual] |
Updates frame displayed when video is paused.
Implements VideoOutput.
Definition at line 3371 of file videoout_xv.cpp.
| int VideoOutputXv::SetPictureAttribute | ( | PictureAttribute | attribute, | |
| int | newValue | |||
| ) | [virtual] |
Sets a specified picture attribute.
| attribute | Picture attribute to set. | |
| newValue | Value to set attribute to. |
Reimplemented from VideoOutput.
Definition at line 3781 of file videoout_xv.cpp.
| void VideoOutputXv::InitPictureAttributes | ( | void | ) | [virtual] |
Reimplemented from VideoOutput.
Definition at line 3845 of file videoout_xv.cpp.
Referenced by InitSetupBuffers().
| int VideoOutputXv::GetRefreshRate | ( | void | ) | [virtual] |
Monitor refresh time in microseconds.
This uses the XFree86 xf86vmode extension to query the mode line It then uses the mode line to guess at the refresh rate.
Implements VideoOutput.
Definition at line 338 of file videoout_xv.cpp.
| virtual bool VideoOutputXv::hasMCAcceleration | ( | void | ) | const [inline, virtual] |
Returns true iff Motion Compensation acceleration is available.
Reimplemented from VideoOutput.
Definition at line 97 of file videoout_xv.h.
| virtual bool VideoOutputXv::hasIDCTAcceleration | ( | void | ) | const [inline, virtual] |
Returns true iff Inverse Discrete Cosine Transform acceleration is available.
Reimplemented from VideoOutput.
Definition at line 99 of file videoout_xv.h.
| virtual bool VideoOutputXv::hasVLDAcceleration | ( | void | ) | const [inline, virtual] |
Returns true iff VLD acceleration is available.
Reimplemented from VideoOutput.
Definition at line 101 of file videoout_xv.h.
Referenced by DrawSlice(), and ShowXvMC().
| void VideoOutputXv::CheckFrameStates | ( | void | ) | [virtual] |
Reimplemented from VideoOutput.
Definition at line 3883 of file videoout_xv.cpp.
Referenced by DiscardFrames(), DoneDisplayingFrame(), ProcessFrameXvMC(), ShowXvMC(), and UpdatePauseFrame().
| QRect VideoOutputXv::GetPIPRect | ( | int | location, | |
| NuppelVideoPlayer * | pipplayer = NULL | |||
| ) | [virtual] |
returns QRect of PIP based on PIPLocation
Reimplemented from VideoOutput.
Definition at line 4071 of file videoout_xv.cpp.
Referenced by ShowPip().
| void VideoOutputXv::ShutdownVideoResize | ( | void | ) | [virtual] |
| MythCodecID VideoOutputXv::GetBestSupportedCodec | ( | uint | width, | |
| uint | height, | |||
| uint | osd_width, | |||
| uint | osd_height, | |||
| uint | stream_type, | |||
| int | xvmc_chroma, | |||
| bool | test_surface, | |||
| bool | force_xv | |||
| ) | [static] |
Definition at line 1263 of file videoout_xv.cpp.
Referenced by AvFormatDecoder::ScanStreams().
| int VideoOutputXv::GrabSuitableXvPort | ( | Display * | disp, | |
| Window | root, | |||
| MythCodecID | mcodecid, | |||
| uint | width, | |||
| uint | height, | |||
| int | xvmc_chroma = 0, |
|||
| XvMCSurfaceInfo * | xvmc_surf_info = NULL, |
|||
| QString * | adaptor_name = NULL | |||
| ) | [static] |
Internal function used to grab a XVideo port with the desired properties.
Definition at line 568 of file videoout_xv.cpp.
Referenced by GetBestSupportedCodec(), InitXVideo(), and InitXvMC().
| XvMCContext * VideoOutputXv::CreateXvMCContext | ( | Display * | disp, | |
| int | port, | |||
| int | surf_type, | |||
| int | width, | |||
| int | height | |||
| ) | [static] |
Definition at line 1858 of file videoout_xv.cpp.
Referenced by CreateXvMCBuffers(), and GetBestSupportedCodec().
| void VideoOutputXv::DeleteXvMCContext | ( | Display * | disp, | |
| XvMCContext *& | ctx | |||
| ) | [static] |
Definition at line 1882 of file videoout_xv.cpp.
Referenced by DeleteBuffers(), and GetBestSupportedCodec().
| QStringList VideoOutputXv::GetAllowedRenderers | ( | MythCodecID | myth_codec_id, | |
| const QSize & | video_dim | |||
| ) | [static] |
| VOSType VideoOutputXv::VideoOutputSubType | ( | ) | const [inline, private] |
Definition at line 131 of file videoout_xv.h.
Referenced by ApproveDeintFilter(), CheckOSDInit(), ClearAfterSeek(), CopyFrame(), DiscardFrame(), DiscardFrames(), DoneDisplayingFrame(), DrawSlice(), DrawUnusedRects(), hasIDCTAcceleration(), hasMCAcceleration(), hasVLDAcceleration(), InitPictureAttributes(), InitVideoBuffers(), InputChanged(), PrepareFrame(), ProcessFrame(), SetDeinterlacingEnabled(), SetDeinterlacingEnabledOpenGL(), SetPictureAttribute(), SetupDeinterlace(), SetupDeinterlaceOpenGL(), Show(), ShowPip(), ShutdownVideoResize(), UpdatePauseFrame(), and ~VideoOutputXv().
| QRect VideoOutputXv::GetVisibleOSDBounds | ( | float & | visible_aspect, | |
| float & | font_scaling, | |||
| float | themeaspect | |||
| ) | const [private, virtual] |
| QRect VideoOutputXv::GetTotalOSDBounds | ( | void | ) | const [private, virtual] |
Returns total OSD bounds.
Reimplemented from VideoOutput.
Definition at line 317 of file videoout_xv.cpp.
Referenced by DisplayOSD(), and InitOSD().
| VideoFrame * VideoOutputXv::GetNextFreeFrame | ( | bool | allow_unsafe | ) | [private] |
Definition at line 2404 of file videoout_xv.cpp.
| void VideoOutputXv::DiscardFrame | ( | VideoFrame * | frame | ) | [private, virtual] |
Frame is ready to be reused by decoder added to the done or available list.
| frame | to discard. |
Reimplemented from VideoOutput.
Definition at line 2416 of file videoout_xv.cpp.
Referenced by DoneDisplayingFrame(), ProcessFrameXvMC(), ShowXvMC(), and UpdatePauseFrame().
| void VideoOutputXv::DiscardFrames | ( | bool | kf | ) | [private, virtual] |
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 2492 of file videoout_xv.cpp.
Referenced by ClearAfterSeek(), and DeleteBuffers().
| void VideoOutputXv::DoneDisplayingFrame | ( | void | ) | [private, virtual] |
This is used to tell this class that the NPV will not call Show() on this frame again.
If the frame is not referenced elsewhere or all frames referencing it are done rendering this removes last displayed frame from used queue and adds it to the available list. If the frame is still being used then it adds it to a special done displaying list that is checked when more frames are needed than in the available list.
Reimplemented from VideoOutput.
Definition at line 2582 of file videoout_xv.cpp.
| void VideoOutputXv::ProcessFrameXvMC | ( | VideoFrame * | frame, | |
| OSD * | osd | |||
| ) | [private] |
| void VideoOutputXv::ProcessFrameOpenGL | ( | VideoFrame * | frame, | |
| OSD * | osd, | |||
| FilterChain * | filterList, | |||
| NuppelVideoPlayer * | pipPlayer | |||
| ) | [private] |
| void VideoOutputXv::ProcessFrameMem | ( | VideoFrame * | frame, | |
| OSD * | osd, | |||
| FilterChain * | filterList, | |||
| NuppelVideoPlayer * | pipPlayer | |||
| ) | [private] |
| void VideoOutputXv::PrepareFrameXvMC | ( | VideoFrame * | frame, | |
| FrameScanType | scan | |||
| ) | [private] |
| void VideoOutputXv::PrepareFrameXv | ( | VideoFrame * | frame | ) | [private] |
| void VideoOutputXv::PrepareFrameOpenGL | ( | VideoFrame * | buffer, | |
| FrameScanType | t | |||
| ) | [private] |
| void VideoOutputXv::PrepareFrameMem | ( | VideoFrame * | buffer, | |
| FrameScanType | ||||
| ) | [private] |
| void VideoOutputXv::ShowXvMC | ( | FrameScanType | scan | ) | [private] |
| void VideoOutputXv::ShowXVideo | ( | FrameScanType | scan | ) | [private] |
| void VideoOutputXv::ShowPip | ( | VideoFrame * | frame, | |
| NuppelVideoPlayer * | pipplayer | |||
| ) | [private, 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 from VideoOutput.
Definition at line 3072 of file videoout_xv.cpp.
Referenced by ProcessFrameMem(), and ProcessFrameOpenGL().
| int VideoOutputXv::DisplayOSD | ( | VideoFrame * | frame, | |
| OSD * | osd, | |||
| int | stride = -1, |
|||
| int | revision = -1 | |||
| ) | [private, 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 from VideoOutput.
Definition at line 4152 of file videoout_xv.cpp.
Referenced by ProcessFrameMem(), ProcessFrameOpenGL(), and ProcessFrameXvMC().
Sets display parameters based on video resolution.
If we are using DisplayRes support we use the video size to determine the desired screen size and refresh rate. If we are also not using "GuiSizeForTV" we also resize the video output window.
| width,height | Resolution of the video we will be playing |
Definition at line 403 of file videoout_xv.cpp.
Init display measurements based on database settings and actual screen parameters.
Definition at line 446 of file videoout_xv.cpp.
Referenced by Init().
| void VideoOutputXv::InitColorKey | ( | bool | turnoffautopaint | ) | [private] |
Initializes color keying support used by XVideo output methods.
| turnoffautopaint | turn off or on XV_AUTOPAINT_COLORKEY property. |
Definition at line 1638 of file videoout_xv.cpp.
Referenced by InitSetupBuffers().
| bool VideoOutputXv::InitVideoBuffers | ( | MythCodecID | mcodecid, | |
| bool | use_xv, | |||
| bool | use_shm, | |||
| bool | use_opengl | |||
| ) | [private] |
Creates and initializes video buffers.
Definition at line 855 of file videoout_xv.cpp.
Referenced by InitSetupBuffers().
| bool VideoOutputXv::InitXvMC | ( | MythCodecID | mcodecid | ) | [private] |
Creates and initializes video buffers.
Definition at line 1014 of file videoout_xv.cpp.
Referenced by InitVideoBuffers().
| bool VideoOutputXv::InitXVideo | ( | void | ) | [private] |
Creates and initializes video buffers.
Definition at line 1097 of file videoout_xv.cpp.
Referenced by InitVideoBuffers().
| bool VideoOutputXv::InitOpenGL | ( | void | ) | [private] |
| bool VideoOutputXv::InitXShm | ( | void | ) | [private] |
Creates and initializes video buffers.
Definition at line 1198 of file videoout_xv.cpp.
Referenced by InitVideoBuffers().
| bool VideoOutputXv::InitXlib | ( | void | ) | [private] |
Creates and initializes video buffers.
Definition at line 1233 of file videoout_xv.cpp.
Referenced by InitVideoBuffers().
| bool VideoOutputXv::InitOSD | ( | const QString & | osd_renderer | ) | [private] |
| bool VideoOutputXv::CheckOSDInit | ( | void | ) | [private] |
| bool VideoOutputXv::CreateXvMCBuffers | ( | void | ) | [private] |
Definition at line 2171 of file videoout_xv.cpp.
Referenced by InitOpenGL(), InitXlib(), InitXShm(), InitXVideo(), and InputChanged().
Creates Shared Memory Images.
Each XvImage/XImage created is added to xv_buffers, and shared memory info is added to XJ_shm_infos.
| num | number of buffers to create | |
| use_xv | use XvShmCreateImage instead of XShmCreateImage |
Definition at line 2039 of file videoout_xv.cpp.
Referenced by CreateBuffers().
| 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. XvMC does not use this pause frame facility so this only creates a pause buffer for the other output methods.
Definition at line 816 of file videoout_xv.cpp.
Referenced by CreateBuffers().
| void VideoOutputXv::CopyFrame | ( | VideoFrame * | to, | |
| const VideoFrame * | from | |||
| ) | [private] |
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 from VideoOutput.
Definition at line 3353 of file videoout_xv.cpp.
Referenced by ProcessFrameMem(), ProcessFrameOpenGL(), and UpdatePauseFrame().
Definition at line 2260 of file videoout_xv.cpp.
Referenced by CheckOSDInit(), CreateXvMCBuffers(), InitOpenGL(), InitXlib(), InitXShm(), InitXVideo(), InitXvMC(), InputChanged(), and ~VideoOutputXv().
| bool VideoOutputXv::InitSetupBuffers | ( | void | ) | [private] |
| bool VideoOutputXv::IsDisplaying | ( | VideoFrame * | frame | ) | [static, private] |
Definition at line 3977 of file videoout_xv.cpp.
Referenced by CheckFrameStates(), and DiscardFrame().
| bool VideoOutputXv::IsRendering | ( | VideoFrame * | frame | ) | [static, private] |
Definition at line 3999 of file videoout_xv.cpp.
Referenced by CheckFrameStates(), FlushSurface(), and SyncSurface().
| void VideoOutputXv::SyncSurface | ( | VideoFrame * | frame, | |
| int | past_future = 0 | |||
| ) | [static, private] |
Definition at line 4021 of file videoout_xv.cpp.
Referenced by CheckFrameStates(), XvMCOSD::CompositeOSD(), DiscardFrame(), DiscardFrames(), and PrepareFrameXvMC().
| void VideoOutputXv::FlushSurface | ( | VideoFrame * | frame | ) | [static, private] |
| XvMCOSD * VideoOutputXv::GetAvailableOSD | ( | ) | [private] |
| void VideoOutputXv::ReturnAvailableOSD | ( | XvMCOSD * | avail | ) | [private] |
friend class ChromaKeyOSD [friend] |
friend class OpenGLVideoSync [friend] |
Definition at line 56 of file videoout_xv.h.
friend class XvMCOSD [friend] |
MythCodecID VideoOutputXv::myth_codec_id [private] |
Definition at line 204 of file videoout_xv.h.
Referenced by InitSetupBuffers(), InitVideoBuffers(), and InputChanged().
VOSType VideoOutputXv::video_output_subtype [private] |
Definition at line 205 of file videoout_xv.h.
Referenced by InitOpenGL(), InitSetupBuffers(), InitXlib(), InitXShm(), InitXVideo(), InitXvMC(), PrepareFrameMem(), SetPictureAttribute(), and VideoOutputSubType().
DisplayRes* VideoOutputXv::display_res [private] |
Definition at line 206 of file videoout_xv.h.
Referenced by InitDisplayMeasurements(), ResizeForGui(), ResizeForVideo(), VideoOutputXv(), and ~VideoOutputXv().
QMutex VideoOutputXv::global_lock [private] |
Definition at line 207 of file videoout_xv.h.
Referenced by CopyFrame(), EmbedInWidget(), InputChanged(), MoveResize(), PrepareFrameMem(), PrepareFrameXv(), PrepareFrameXvMC(), ProcessFrameMem(), ProcessFrameXvMC(), ShowXVideo(), StopEmbedding(), UpdatePauseFrame(), VideoAspectRatioChanged(), and Zoom().
Window VideoOutputXv::XJ_root [private] |
Window VideoOutputXv::XJ_win [private] |
Definition at line 211 of file videoout_xv.h.
Referenced by Init(), InitDisplayMeasurements(), InitOpenGL(), ResizeForVideo(), and StopEmbedding().
Window VideoOutputXv::XJ_curwin [private] |
Definition at line 212 of file videoout_xv.h.
Referenced by DrawUnusedRects(), EmbedInWidget(), Init(), InitOSD(), PrepareFrameMem(), ShowXVideo(), ShowXvMC(), StopEmbedding(), and ~VideoOutputXv().
GC VideoOutputXv::XJ_gc [private] |
Definition at line 213 of file videoout_xv.h.
Referenced by DrawUnusedRects(), Init(), PrepareFrameMem(), ShowXVideo(), and ~VideoOutputXv().
Screen* VideoOutputXv::XJ_screen [private] |
Display* VideoOutputXv::XJ_disp [private] |
Definition at line 215 of file videoout_xv.h.
Referenced by ChromaKeyOSD::AllocImage(), CheckOSDInit(), ClearAfterSeek(), CreateBuffers(), CreateShmImages(), CreateXvMCBuffers(), CreateXvMCSurfaces(), DeleteBuffers(), DrawSlice(), DrawUnusedRects(), ChromaKeyOSD::FreeImage(), GetRefreshRate(), Init(), InitColorKey(), InitDisplayMeasurements(), InitOpenGL(), InitOSD(), InitPictureAttributes(), InitSetupBuffers(), InitXlib(), InitXShm(), InitXVideo(), InitXvMC(), InputChanged(), PrepareFrameMem(), ProcessFrameXvMC(), ResizeForVideo(), SetPictureAttribute(), Show(), ShowXVideo(), ShowXvMC(), OpenGLVideoSync::Start(), OpenGLVideoSync::TryInit(), OpenGLVideoSync::WaitForFrame(), OpenGLVideoSync::~OpenGLVideoSync(), and ~VideoOutputXv().
int VideoOutputXv::XJ_screen_num [private] |
Definition at line 216 of file videoout_xv.h.
Referenced by ChromaKeyOSD::AllocImage(), CreateShmImages(), GetRefreshRate(), Init(), InitDisplayMeasurements(), InitOpenGL(), InitOSD(), and OpenGLVideoSync::TryInit().
unsigned long VideoOutputXv::XJ_white [private] |
unsigned long VideoOutputXv::XJ_black [private] |
unsigned long VideoOutputXv::XJ_letterbox_colour [private] |
int VideoOutputXv::XJ_depth [private] |
Definition at line 220 of file videoout_xv.h.
Referenced by ChromaKeyOSD::AllocImage(), CreateBuffers(), CreateShmImages(), Init(), and InitOSD().
int VideoOutputXv::XJ_screenx [private] |
int VideoOutputXv::XJ_screeny [private] |
int VideoOutputXv::XJ_screenwidth [private] |
int VideoOutputXv::XJ_screenheight [private] |
bool VideoOutputXv::XJ_started [private] |
Definition at line 225 of file videoout_xv.h.
Referenced by GetRefreshRate(), Init(), and ~VideoOutputXv().
VideoFrame VideoOutputXv::av_pause_frame [private] |
Definition at line 228 of file videoout_xv.h.
Referenced by CreatePauseFrame(), DeleteBuffers(), ProcessFrameMem(), ProcessFrameOpenGL(), UpdatePauseFrame(), and VideoOutputXv().
vector<XShmSegmentInfo*> VideoOutputXv::XJ_shm_infos [private] |
vector<YUVInfo> VideoOutputXv::XJ_yuv_infos [private] |
Definition at line 230 of file videoout_xv.h.
Referenced by CreateBuffers(), CreateShmImages(), and DeleteBuffers().
XImage* VideoOutputXv::XJ_non_xv_image [private] |
Definition at line 233 of file videoout_xv.h.
Referenced by CreateBuffers(), DeleteBuffers(), and PrepareFrameMem().
long long VideoOutputXv::non_xv_frames_shown [private] |
int VideoOutputXv::non_xv_show_frame [private] |
int VideoOutputXv::non_xv_fps [private] |
int VideoOutputXv::non_xv_av_format [private] |
time_t VideoOutputXv::non_xv_stop_time [private] |
XvMCBufferSettings* VideoOutputXv::xvmc_buf_attr [private] |
Definition at line 241 of file videoout_xv.h.
Referenced by CheckFrameStates(), CheckOSDInit(), CreateXvMCBuffers(), DiscardFrame(), DoneDisplayingFrame(), GetAvailableOSD(), InitOSD(), InitVideoBuffers(), PrepareFrameXvMC(), ProcessFrameXvMC(), ReturnAvailableOSD(), and ~VideoOutputXv().
int VideoOutputXv::xvmc_chroma [private] |
XvMCContext* VideoOutputXv::xvmc_ctx [private] |
Definition at line 243 of file videoout_xv.h.
Referenced by CreateXvMCBuffers(), CreateXvMCSurfaces(), DeleteBuffers(), DrawSlice(), and SetPictureAttribute().
vector<void*> VideoOutputXv::xvmc_surfs [private] |
Definition at line 244 of file videoout_xv.h.
Referenced by ClearAfterSeek(), CreateXvMCBuffers(), and DeleteBuffers().
QMutex VideoOutputXv::xvmc_osd_lock [private] |
Definition at line 245 of file videoout_xv.h.
Referenced by CreateXvMCBuffers(), DeleteBuffers(), GetAvailableOSD(), InitXvMC(), and ReturnAvailableOSD().
MythDeque<XvMCOSD*> VideoOutputXv::xvmc_osd_available [private] |
Definition at line 246 of file videoout_xv.h.
Referenced by CreateXvMCBuffers(), DeleteBuffers(), GetAvailableOSD(), InitXvMC(), and ReturnAvailableOSD().
XvMCSurfaceInfo VideoOutputXv::xvmc_surf_info [private] |
XvMCTextures* VideoOutputXv::xvmc_tex [private] |
Definition at line 252 of file videoout_xv.h.
Referenced by CopyFrame(), DeleteBuffers(), DoneDisplayingFrame(), InitOSD(), InitSetupBuffers(), PrepareFrameXvMC(), ProcessFrameXvMC(), ShowXvMC(), and UpdatePauseFrame().
int VideoOutputXv::xv_port [private] |
Definition at line 255 of file videoout_xv.h.
Referenced by CheckOSDInit(), CreateBuffers(), CreateShmImages(), CreateXvMCBuffers(), InitColorKey(), InitPictureAttributes(), InitXVideo(), InitXvMC(), InputChanged(), SetPictureAttribute(), ShowXVideo(), and ~VideoOutputXv().
int VideoOutputXv::xv_hue_base [private] |
Definition at line 256 of file videoout_xv.h.
Referenced by InitXVideo(), InitXvMC(), and SetPictureAttribute().
int VideoOutputXv::xv_colorkey [private] |
Definition at line 257 of file videoout_xv.h.
Referenced by CheckOSDInit(), DrawUnusedRects(), InitColorKey(), and ChromaKeyOSD::Reinit().
bool VideoOutputXv::xv_draw_colorkey [private] |
int VideoOutputXv::xv_chroma [private] |
Definition at line 259 of file videoout_xv.h.
Referenced by CreatePauseFrame(), CreateShmImages(), InitXVideo(), and InputChanged().
buffer_map_t VideoOutputXv::xv_buffers [private] |
Definition at line 260 of file videoout_xv.h.
Referenced by CreateBuffers(), CreateShmImages(), DeleteBuffers(), PrepareFrameXv(), and ShowXVideo().
bool VideoOutputXv::xv_need_bobdeint_repaint [private] |
Definition at line 261 of file videoout_xv.h.
Referenced by DrawUnusedRects(), SetDeinterlacingEnabled(), and Show().
QMap<PictureAttribute,int> VideoOutputXv::xv_attribute_min [private] |
Definition at line 262 of file videoout_xv.h.
Referenced by InitPictureAttributes(), and SetPictureAttribute().
QMap<PictureAttribute,int> VideoOutputXv::xv_attribute_max [private] |
Definition at line 263 of file videoout_xv.h.
Referenced by InitPictureAttributes(), and SetPictureAttribute().
QMutex VideoOutputXv::gl_context_lock [private] |
Definition at line 266 of file videoout_xv.h.
Referenced by DeleteBuffers(), InitOpenGL(), InitOSD(), MoveResize(), PrepareFrameOpenGL(), ProcessFrameOpenGL(), SetDeinterlacingEnabledOpenGL(), SetupDeinterlaceOpenGL(), Show(), and ~VideoOutputXv().
OpenGLContext* VideoOutputXv::gl_context [private] |
Definition at line 267 of file videoout_xv.h.
Referenced by DeleteBuffers(), InitOpenGL(), InitOSD(), PrepareFrameOpenGL(), ProcessFrameOpenGL(), Show(), ShowPip(), and ~VideoOutputXv().
OpenGLVideo* VideoOutputXv::gl_videochain [private] |
Definition at line 268 of file videoout_xv.h.
Referenced by CreateBuffers(), DeleteBuffers(), DisplayOSD(), InitOpenGL(), InitOSD(), InitPictureAttributes(), MoveResize(), PrepareFrameOpenGL(), ProcessFrameOpenGL(), SetDeinterlacingEnabledOpenGL(), SetPictureAttribute(), SetupDeinterlaceOpenGL(), ShowPip(), and ShutdownVideoResize().
OpenGLVideo* VideoOutputXv::gl_pipchain [private] |
Definition at line 269 of file videoout_xv.h.
Referenced by DeleteBuffers(), PrepareFrameOpenGL(), and ShowPip().
OpenGLVideo* VideoOutputXv::gl_osdchain [private] |
Definition at line 270 of file videoout_xv.h.
Referenced by DeleteBuffers(), DisplayOSD(), InitOSD(), PrepareFrameOpenGL(), and ShutdownVideoResize().
bool VideoOutputXv::gl_use_osd_opengl2 [private] |
Definition at line 271 of file videoout_xv.h.
Referenced by DeleteBuffers(), DisplayOSD(), GetTotalOSDBounds(), GetVisibleOSDBounds(), and InitOSD().
bool VideoOutputXv::gl_pip_ready [private] |
Definition at line 272 of file videoout_xv.h.
Referenced by DeleteBuffers(), PrepareFrameOpenGL(), and ShowPip().
bool VideoOutputXv::gl_osd_ready [private] |
Definition at line 273 of file videoout_xv.h.
Referenced by DeleteBuffers(), DisplayOSD(), and PrepareFrameOpenGL().
ChromaKeyOSD* VideoOutputXv::chroma_osd [private] |
Definition at line 276 of file videoout_xv.h.
Referenced by CheckOSDInit(), DrawUnusedRects(), GetTotalOSDBounds(), GetVisibleOSDBounds(), InitOSD(), MoveResize(), ProcessFrameMem(), and ProcessFrameXvMC().
1.5.5