| 1 |
/* This file is part of the KDE project. |
| 2 |
|
| 3 |
Copyright (C) 2 //Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).007 Nokia Corporation and/or its subsidiary(-ies). |
| 4 |
|
| 5 |
This library is free software: you can redistribute it and/or modify |
| 6 |
it under the terms of the GNU Lesser General Public License as published by |
| 7 |
the Free Software Foundation, either version 2.1 or 3 of the License. |
| 8 |
|
| 9 |
This library is distributed in the hope that it will be useful, |
| 10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
GNU Lesser General Public License for more details. |
| 13 |
|
| 14 |
You should have received a copy of the GNU Lesser General Public License |
| 15 |
along with this library. If not, see <http://www.gnu.org/licenses/>. |
| 16 |
*/ |
| 17 |
|
| 18 |
#ifndef Phonon_GSTREAMER_ABSTRACTRENDERER_H |
| 19 |
#define Phonon_GSTREAMER_ABSTRACTRENDERER_H |
| 20 |
|
| 21 |
#include "backend.h" |
| 22 |
#include "common.h" |
| 23 |
#include "medianode.h" |
| 24 |
#include <phonon/videowidget.h> |
| 25 |
|
| 26 |
#ifndef QT_NO_PHONON_VIDEO |
| 27 |
QT_BEGIN_NAMESPACE |
| 28 |
|
| 29 |
class QString; |
| 30 |
namespace Phonon |
| 31 |
{ |
| 32 |
namespace Gstreamer |
| 33 |
{ |
| 34 |
|
| 35 |
class VideoWidget; |
| 36 |
|
| 37 |
class AbstractRenderer |
| 38 |
{ |
| 39 |
public: |
| 40 |
AbstractRenderer(VideoWidget *video) : |
| 41 |
m_videoWidget(video) |
| 42 |
, m_videoSink(0) { } |
| 43 |
virtual ~AbstractRenderer(); |
| 44 |
virtual GstElement *videoSink() {return m_videoSink;} |
| 45 |
virtual void aspectRatioChanged(Phonon::VideoWidget::AspectRatio aspectRatio); |
| 46 |
virtual void scaleModeChanged(Phonon::VideoWidget::ScaleMode scaleMode); |
| 47 |
virtual void movieSizeChanged(const QSize &movieSize); |
| 48 |
virtual void handleMediaNodeEvent(const MediaNodeEvent *event) = 0; |
| 49 |
virtual bool eventFilter(QEvent *) = 0; |
| 50 |
virtual void handlePaint(QPaintEvent *) {} |
| 51 |
virtual bool paintsOnWidget() { return true; } // Controls overlays |
| 52 |
|
| 53 |
protected: |
| 54 |
VideoWidget *m_videoWidget; |
| 55 |
GstElement *m_videoSink; |
| 56 |
}; |
| 57 |
|
| 58 |
} |
| 59 |
} //namespace Phonon::Gstreamer |
| 60 |
|
| 61 |
QT_END_NAMESPACE |
| 62 |
#endif //QT_NO_PHONON_VIDEO |
| 63 |
#endif // Phonon_GSTREAMER_ABSTRACTRENDERER_H |