Go to the documentation of this file.
9 #define LOC QString("PlayerVideo: ")
15 qRegisterMetaType<MythVideoBoundsState>();
16 qRegisterMetaType<MythVideoColourState>();
47 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Couldn't create VideoOutput instance. Exiting..");
48 SetErrored(tr(
"Failed to initialize video output"));
53 auto toggleDetectLetterbox = [&]()
136 void* Opaque1,
void* Opaque2)
144 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"Queuing callback for %1").arg(Debug));
148 LOG(VB_GENERAL, LOG_WARNING, QString(
"Waited %1ms for %2").arg(count).arg(Debug));
160 LOG(VB_GENERAL, LOG_INFO,
LOC + QString(
"Executing %1").arg(it->m_debug));
161 it->m_function(it->m_opaque1, it->m_opaque2, it->m_opaque3);
192 int stretch =
static_cast<int>(lroundf(aspect * 100));
230 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"Video Aspect ratio changed from %1 to %2")
void ChangePictureAttribute(PictureAttribute Attribute, bool Direction, int Value)
InteractiveTV * GetInteractiveTV() override
MythVideoColourState m_colourState
virtual void GetOSDBounds(QRect &Total, QRect &Visible, float &VisibleAspect, float &FontScaling, float ThemeAspect) const
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
PictureAttributeSupported
MythInteropGPU::InteropMap m_interopTypes
void VideoAspectRatioChanged(float Aspect)
Calls SetVideoAspectRatio(float aspect), then calls MoveResize() to apply changes.
std::map< PictureAttribute, int > m_attributeValues
void VideoColourStateChanged(const MythVideoColourState &ColourState)
QMutex m_decoderCallbackLock
virtual void EmbedPlayback(bool Embed, QRect Rect)
void ChangeAspectOverride(AspectOverrideMode AspectMode=kAspect_Toggle)
void ToggleAdjustFill(AdjustFillMode Mode=kAdjustFill_Toggle)
void PictureAttributeChanged(PictureAttribute Attribute, int Value)
void PictureAttributesUpdated(const std::map< PictureAttribute, int > &Values)
DetectLetterbox m_detectLetterBox
void ChangeZoom(ZoomDirection Zoom)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
virtual MythCodecID GetVideoCodecID(void) const =0
void Reinit(QRect videoRect, QRect dispRect, float aspect)
void UpdateOSDMessage(const QString &Message)
void ResizeForVideo(QSize Size=QSize())
void SupportedAttributesChanged(PictureAttributeSupported Supported)
void SetErrored(const QString &reason)
void SaveBottomLine(void)
std::map< VideoFrameType, InteropTypes > InteropMap
QVector< DecoderCallback > m_decoderCallbacks
AdjustFillMode GetAdjustFill(void) const
void UpdateOSDMessage(const QString &Message)
virtual QString GetCodecDecoderName(void) const =0
void VideoColourStateChanged(const MythVideoColourState &ColourState)
void SetStereoOverride(StereoscopicMode Mode)
void PictureAttributesUpdated(const std::map< PictureAttribute, int > &Values)
void ChangeAdjustFill(AdjustFillMode FillMode=kAdjustFill_Toggle)
void ChangeOSDPositionUpdates(bool Enable)
void ToggleAspectOverride(AspectOverrideMode AspectMode=kAspect_Toggle)
Enforce different aspect ratio than detected, then calls VideoAspectRatioChanged(float) to apply them...
MythVideoOutput * m_videoOutput
void PictureAttributeChanged(PictureAttribute Attribute, int Value)
void HandleDecoderCallback(const QString &Debug, DecoderCallback::Callback Function, void *Opaque1, void *Opaque2)
Convenience function to request and wait for a callback into the main thread.
MythCaptionsOverlay m_captionsOverlay
void ResizeForInteractiveTV(const QRect &Rect)
@ kAdjustingPicture_Playback
const MythInteropGPU::InteropMap & GetInteropTypes() const
Return a list of interop types supported by the current render device.
double m_videoFrameRate
Video (input) Frame Rate (often inaccurate)
static MythVideoOutputGPU * Create(MythMainWindow *MainWindow, MythRender *Render, MythPainter *Painter, MythDisplay *Display, const QString &Decoder, MythCodecID CodecID, QSize VideoDim, QSize VideoDispDim, float VideoAspect, float FrameRate, uint PlayerFlags, const QString &Codec, int ReferenceFrames, const VideoFrameTypes *&RenderFormats)
void VideoBoundsStateChanged(const MythVideoBoundsState &VideoBoundsState)
PlayerContext * m_playerCtx
QSize m_videoDispDim
Video (input) width & height.
void ToggleMoveBottomLine()
QString m_codecName
Codec Name - used by playback profile.
QString toTypeString(PictureAdjustType type)
void ToggleAdjustFill(AdjustFillMode AdjustFillMode=kAdjustFill_Toggle)
Sets up letterboxing for various standard video frame and monitor dimensions, then calls MoveResize()...
PictureAttributeSupported m_supportedAttributes
PlayerFlags m_playerFlags
bool GetDetectLetterbox() const
bool Init(QRect Rect, float FontAspect) override
void ToggleMoveBottomLine(void)
void SetDetectLetterbox(bool Detect, AdjustFillMode Mode)
virtual void EnableCaptions(uint Mode, bool UpdateOSD=true)
void ToggleCaptionsByType(uint Type)
void SetITVResize(QRect Rect)
void ChangePictureAttribute(PictureAttribute Attribute, bool Direction, int Value)
void ResizeScreenForVideo(QSize Size={})
void CheckAspectRatio(MythVideoFrame *Frame)
QRecursiveMutex m_osdLock
int m_maxReferenceFrames
Number of reference frames used in the video stream.
void Zoom(ZoomDirection Direction)
Sets up zooming into to different parts of the video.
void ChangeOSDPositionUpdates(bool Enable)
@ kOSDFunctionalType_PictureAdjust
QString toTitleString(PictureAdjustType type)
void(*)(void *, void *, void *) Callback
MythMainWindow * m_mainWindow
InteractiveTV * m_interactiveTV
void EmbedPlayback(bool Embed, const QRect &Rect={})
static InteropMap GetTypes(MythRender *Render)
void SetChanged(bool changed=true)
bool IsChanged(void) const
QSize m_videoDim
Video (input) buffer width & height.
void UpdateOSDStatus(osdInfo &Info, int Type, enum OSDTimeout Timeout)
float m_videoAspect
Video (input) Apect Ratio.
MythPlayerVideoUI(MythMainWindow *MainWindow, TV *Tv, PlayerContext *Context, PlayerFlags Flags)
void SupportedAttributesChanged(PictureAttributeSupported Supported)
MythCaptionsState m_captionsState
void ChangeStereoOverride(StereoscopicMode Mode)
void WindowResized(const QSize &Size)
void VideoBoundsStateChanged(MythVideoBoundsState VideoState)
void UpdateOSD(uint64_t frame, double frame_rate, OSD *osd)
Show and update the edit mode On Screen Display.
bool InitVideo() override
bool IsEditing(void) const
void ToggleDetectLetterBox()
const VideoFrameTypes * m_renderFormats
void WindowResized(QSize Size)