videowidget.h
#ifndef PHONON_VIDEOWIDGET_H
#define PHONON_VIDEOWIDGET_H
#include <QtGui/QWidget>
#include <phonon/videowidgetinterface.h>
#include "backendnode.h"
QT_BEGIN_NAMESPACE
namespace Phonon
{
namespace DS9
{
class VideoWindow;
class AbstractVideoRenderer;
class VideoWidget : public BackendNode, public Phonon::VideoWidgetInterface
{
Q_OBJECT
Q_INTERFACES(Phonon::VideoWidgetInterface)
public:
VideoWidget(QWidget *parent = 0);
~VideoWidget();
Phonon::VideoWidget::AspectRatio aspectRatio() const;
void setAspectRatio(Phonon::VideoWidget::AspectRatio aspectRatio);
Phonon::VideoWidget::ScaleMode scaleMode() const;
void setScaleMode(Phonon::VideoWidget::ScaleMode);
qreal brightness() const;
void setBrightness(qreal);
qreal contrast() const;
void setContrast(qreal);
qreal hue() const;
void setHue(qreal);
qreal saturation() const;
void setSaturation(qreal);
void setCurrentGraph(int index);
QWidget *widget();
AbstractVideoRenderer *ensureSoftwareRendering(AbstractVideoRenderer *renderer);
void notifyVideoLoaded();
protected:
virtual void connected(BackendNode *, const InputPin& inpin);
private:
AbstractVideoRenderer *getDefaultRenderer() const;
void applyMixerSettings() const;
Phonon::VideoWidget::AspectRatio m_aspectRatio;
Phonon::VideoWidget::ScaleMode m_scaleMode;
VideoWindow *m_widget;
qreal m_brightness, m_contrast, m_hue, m_saturation;
QVector<AbstractVideoRenderer*> m_renderers;
bool m_hardwareRenderer;
};
}
}
QT_END_NAMESPACE
#endif // PHONON_VIDEOWIDGET_H