Go to the documentation of this file.
33 : QObject(nullptr), m_visualizerVideo(visualizer)
35 setObjectName(
"MainVisual");
38 pVisFactory; pVisFactory = pVisFactory->
next())
86 LOG(VB_GENERAL, LOG_ERR, QString(
"MainVisual: visualizer %1 not found!").arg(name));
97 if (name.contains(
"-"))
99 visName = name.section(
'-', 0, 0);
100 pluginName = name.section(
'-', 1, 1);
115 pVisFactory; pVisFactory = pVisFactory->
next())
117 if (pVisFactory->name() == visName)
119 m_vis = pVisFactory->create(
this, pluginName);
124 QMutexLocker locker(
mutex());
146 std::chrono::milliseconds timecode,
147 int source_channels,
int bits_per_sample)
149 unsigned long len = b_len;
156 if (bits_per_sample == 24)
159 bits_per_sample = 32;
163 len /= source_channels;
164 len /= (bits_per_sample / 8);
170 if (source_channels == 2)
175 if (bits_per_sample == 8)
177 else if (bits_per_sample == 16)
181 else if (bits_per_sample == 32)
186 else if (source_channels == 1)
190 if (bits_per_sample == 8)
192 else if (bits_per_sample == 16)
196 else if (bits_per_sample == 32)
214 QMutexLocker locker(
mutex());
221 if (
m_nodes.first()->m_offset >= timestamp + 5s)
225 else if (
m_nodes.first()->m_offset > timestamp)
static void mono16_from_monopcm8(short *l, const uchar *c, long cnt)
AudioOutput * getOutput(void)
static void mono16_from_monopcmfloat(short *l, float *s, long cnt)
virtual unsigned long getDesiredSamples(void)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
void customEvent(QEvent *event) override
void prepare(void) override
void setVisual(const QString &name)
virtual MythRect GetArea(void) const
If the object has a minimum area defined, return it, other wise return the default area.
virtual void resize(const QSize &size)=0
static const Type kStopped
static void mono16_from_monopcm16(short *l, const short *s, long cnt)
static void stereo16_from_stereopcmfloat(short *l, short *r, float *s, long cnt)
static void stereo16_from_stereopcm16(short *l, short *r, const short *s, long cnt)
virtual int getDesiredFPS(void)
virtual bool draw(QPainter *, const QColor &)=0
static const VisFactory * VisFactories()
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
void UpdateFrame(MythImage *image)
int GetNumSetting(const QString &key, int defaultval=0)
virtual std::chrono::milliseconds GetAudiotime(void)=0
virtual bool process(VisualNode *node)=0
MythUIVideo * m_visualizerVideo
static const Type kPlaying
virtual bool processUndisplayed(VisualNode *)
static void stereo16_from_stereopcm8(short *l, short *r, const uchar *c, long cnt)
static void mono16_from_monopcm32(short *l, int *s, long cnt)
Video widget, displays raw image data.
static void stereo16_from_stereopcm32(short *l, short *r, int *s, long cnt)
QColor GetBackgroundColor(void)
void add(const void *buffer, unsigned long b_len, std::chrono::milliseconds timecode, int source_channel, int bits_per_sample) override
static const Type kBuffering
void SaveSetting(const QString &key, int newValue)
QList< VisualNode * > m_nodes
const VisFactory * next() const
QStringList m_visualizers
MainVisual(MythUIVideo *visualizer)
static const Type kPaused