[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/phonon
From: Marco Gulino <marco.gulino () gmail ! com>
Date: 2009-04-22 15:49:00
Message-ID: 1240415340.897988.1235.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 957628 by gulino:
implement with interface versions (needs review, currently snapshot() seems not working)
M +0 -6 ds9/videowidget.cpp
M +0 -1 ds9/videowidget.h
M +0 -6 gstreamer/videowidget.cpp
M +1 -2 gstreamer/videowidget.h
M +10 -2 phonon/videowidget.cpp
M +1 -1 phonon/videowidget.h
M +7 -1 phonon/videowidgetinterface.h
M +0 -1 qt7/videowidget.h
M +0 -5 qt7/videowidget.mm
M +1 -1 xine/videowidget.h
--- trunk/kdesupport/phonon/ds9/videowidget.cpp #957627:957628
@@ -384,15 +384,9 @@
renderer->notifyResize(m_widget->size(), m_aspectRatio, m_scaleMode);
}
}
-
- QImage VideoWidget::snapshot() const {
- // TODO implement me
- return QImage();
- }
-
}
}
--- trunk/kdesupport/phonon/ds9/videowidget.h #957627:957628
@@ -71,7 +71,6 @@
//apply contrast/brightness/hue/saturation
void applyMixerSettings() const;
void updateVideoSize() const;
- QImage snapshot() const;
protected:
virtual void connected(BackendNode *, const InputPin& inpin);
--- trunk/kdesupport/phonon/gstreamer/videowidget.cpp #957627:957628
@@ -25,8 +25,6 @@
#include <QApplication>
#include <gst/gst.h>
#include <gst/interfaces/propertyprobe.h>
-#include <gst/base/gstbasesink.h>
-
#include "mediaobject.h"
#include "message.h"
#include "common.h"
@@ -380,10 +378,6 @@
if (m_renderer)
m_renderer->handleMediaNodeEvent(event);
}
-QImage VideoWidget::snapshot() const {
- // TODO implement
- return QImage();
-}
}
} //namespace Phonon::Gstreamer
--- trunk/kdesupport/phonon/gstreamer/videowidget.h #957627:957628
@@ -25,6 +25,7 @@
#include "common.h"
#include "medianode.h"
#include "abstractrenderer.h"
+#include "videowidget.h"
#include <gst/gst.h>
@@ -83,8 +84,6 @@
return this;
}
- QImage snapshot() const;
-
protected:
GstElement *m_videoBin;
QSize m_movieSize;
--- trunk/kdesupport/phonon/phonon/videowidget.cpp #957627:957628
@@ -28,7 +28,7 @@
#include "phononnamespace_p.h"
#include <QtGui/QAction>
-
+#include <iostream>
#define PHONON_INTERFACENAME VideoWidgetInterface
QT_BEGIN_NAMESPACE
@@ -48,6 +48,8 @@
setMouseTracking(true);
}
+
+
VideoWidget::VideoWidget(VideoWidgetPrivate &dd, QWidget *parent)
: QWidget(parent),
Phonon::AbstractVideoOutput(dd)
@@ -98,9 +100,15 @@
PHONON_INTERFACE_GETTER(qreal, saturation, d->saturation)
PHONON_INTERFACE_SETTER(setSaturation, saturation, qreal)
-PHONON_INTERFACE_GETTER(QImage, snapshot, QImage() )
+QImage VideoWidget::snapshot() const {
+ Iface<VideoWidgetInterface4> iface((VideoWidgetPrivate*) (k_ptr));
+ std::cerr << "interface: " << iface << "\n";
+ if(iface) return iface->snapshot();
+ return QImage(); // TODO not implemented in VideoInterface
+}
+
void VideoWidget::setFullScreen(bool newFullScreen)
{
pDebug() << Q_FUNC_INFO << newFullScreen;
--- trunk/kdesupport/phonon/phonon/videowidget.h #957627:957628
@@ -172,7 +172,7 @@
qreal contrast() const;
qreal hue() const;
qreal saturation() const;
- QImage snapshot() const;
+ QImage snapshot() const;
//TODO: bar colors property
public Q_SLOTS:
--- trunk/kdesupport/phonon/phonon/videowidgetinterface.h #957627:957628
@@ -50,13 +50,19 @@
virtual qreal saturation() const = 0;
virtual void setSaturation(qreal) = 0;
virtual QWidget *widget() = 0;
- virtual QImage snapshot() const = 0;
//X virtual int overlayCapabilities() const = 0;
//X virtual bool createOverlay(QWidget *widget, int type) = 0;
};
+
+class VideoWidgetInterface4 : public VideoWidgetInterface
+{
+ public:
+ virtual QImage snapshot() const = 0;
+};
}
Q_DECLARE_INTERFACE(Phonon::VideoWidgetInterface, "VideoWidgetInterface3.phonon.kde.org")
+Q_DECLARE_INTERFACE(Phonon::VideoWidgetInterface4, "VideoWidgetInterface4.phonon.kde.org")
#endif //QT_NO_PHONON_VIDEO
--- trunk/kdesupport/phonon/qt7/videowidget.h #957627:957628
@@ -56,7 +56,6 @@
QWidget *widget();
void updateVideo(VideoFrame &frame);
- QImage snapshot() const;
protected:
void mediaNodeEvent(const MediaNodeEvent *event);
--- trunk/kdesupport/phonon/qt7/videowidget.mm #957627:957628
@@ -876,11 +876,6 @@
MediaNode::updateVideo(frame);
}
-QImage VideoWidget::snapshot() const {
- // TODO implement me
- return QImage();
-}
-
}} // namespace Phonon::QT7
QT_END_NAMESPACE
--- trunk/kdesupport/phonon/xine/videowidget.h #957627:957628
@@ -92,7 +92,7 @@
bool m_isValid;
};
-class VideoWidget : public QWidget, public Phonon::VideoWidgetInterface, public \
Phonon::Xine::SinkNode, public Phonon::Experimental::SnapshotInterface +class VideoWidget : \
public QWidget, public Phonon::VideoWidgetInterface4, public Phonon::Xine::SinkNode, public \
Phonon::Experimental::SnapshotInterface {
Q_OBJECT
Q_INTERFACES(Phonon::VideoWidgetInterface Phonon::Xine::SinkNode \
Phonon::Experimental::SnapshotInterface)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic