2#include "libmythbase/mythconfig.h"
14#define LOC QString("VidOutNull: ")
20 if (Options.
decoders->contains(
"ffmpeg"))
22#if CONFIG_VIDEOTOOLBOX
23 if (Options.
decoders->contains(
"vtb-dec"))
27 if (Options.
decoders->contains(
"vdpau-dec"))
31 if (Options.
decoders->contains(
"nvdec-dec"))
35 if (Options.
decoders->contains(
"vaapi-dec"))
39 if (Options.
decoders->contains(
"mediacodec-dec"))
43 if (Options.
decoders->contains(
"v4l2-dec"))
47 if (Options.
decoders->contains(
"mmal-dec"))
57 if (result->Init(VideoDim, VideoDispDim, VideoAspect, QRect(), CodecID))
71 LOG(VB_PLAYBACK, LOG_INFO,
LOC + QString(
"InputChanged(WxH = %1x%2, aspect = %3)")
72 .arg(VideoDispDim.width()).arg(VideoDispDim.height()).arg(
static_cast<qreal
>(VideoAspect)));
76 LOG(VB_GENERAL, LOG_ERR,
LOC +
77 QString(
"VideoOutputNull::InputChanged(): new video codec is not supported."));
89 VideoAspect, CodecID, AspectOnly,
90 ReferenceFrames, ForceChange);
98 LOG(VB_GENERAL, LOG_ERR,
LOC +
99 "VideoOutputNull::InputChanged(): Failed to recreate buffers");
107 float VideoAspect,
const QRect DisplayVisibleRect,
MythCodecID CodecID)
109 if (VideoDispDim.isEmpty())
114 LOG(VB_GENERAL, LOG_ERR,
LOC + QString(
"Cannot create VideoOutputNull for codec %1")
151 LOG(VB_GENERAL, LOG_ERR,
LOC +
"No frame in PrepareFrame!");
void Filter(MythVideoFrame *Frame, FrameScanType Scan, MythVideoProfile *Profile, bool Force=false)
Deinterlace Frame if needed.
QSize GetVideoDim(void) const
void MoveResize(void)
performs all the calculations for video framing and any resizing.
bool InputChanged(QSize VideoDim, QSize VideoDispDim, float VideoAspect, MythCodecID CodecID, bool &AspectOnly, int ReferenceFrames, bool ForceChange) override
Tells video output to discard decoded frames and wait for new ones.
void SetDeinterlacing(bool Enable, bool DoubleRate, MythDeintType Force=DEINT_NONE) override
bool Init(QSize VideoDim, QSize VideoDispDim, float VideoAspect, QRect DisplayVisibleRect, MythCodecID CodecID) override
MythVideoOutputNull()=default
static MythVideoOutputNull * Create(QSize VideoDim, QSize VideoDispDim, float VideoAspect, MythCodecID CodecID)
void RenderFrame(MythVideoFrame *Frame, FrameScanType Scan) override
static void GetRenderOptions(RenderOptions &Options)
void PrepareFrame(MythVideoFrame *Frame, FrameScanType Scan) override
MythCodecID m_videoCodecID
VideoErrorState m_errorState
virtual void SetDeinterlacing(bool Enable, bool DoubleRate, MythDeintType Force=DEINT_NONE)
virtual bool Init(QSize VideoDim, QSize VideoDispDim, float VideoAspect, QRect WindowRect, MythCodecID CodecID)
MythDeintType m_forcedDeinterlacer
VideoBuffers m_videoBuffers
MythDeinterlacer m_deinterlacer
const VideoFrameTypes * m_renderFormats
virtual bool InputChanged(QSize VideoDim, QSize VideoDispDim, float VideoAspect, MythCodecID CodecID, bool &AspectChanged, int ReferenceFrames, bool ForceChange)
Tells video output to discard decoded frames and wait for new ones.
static uint GetNumBuffers(int PixelFormat, int MaxReferenceFrames=16, bool Decoder=false)
void SetDeinterlacing(MythDeintType Single, MythDeintType Double, MythCodecID CodecID)
bool CreateBuffers(VideoFrameType Type, const VideoFrameTypes *RenderFormats, QSize Size, uint NeedFree, uint NeedprebufferNormal, uint NeedPrebufferSmall, int MaxReferenceFrames=16)
void Init(uint NumDecode, uint NeedFree, uint NeedprebufferNormal, uint NeedPrebufferSmall)
Creates buffers and sets various buffer management parameters.
static bool codec_is_std(MythCodecID id)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
const int kPrebufferFramesSmall
const int kPrebufferFramesNormal
const int kNeedFreeFrames
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
QMap< QString, QStringList > * safe_renderers
QMap< QString, uint > * priorities