|
1 /* This file is part of the KDE project. |
|
2 |
|
3 Copyright (C) 2009 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 |
|
19 #ifndef PHONON_MMF_ABSTRACTVIDEOOUTPUT_H |
|
20 #define PHONON_MMF_ABSTRACTVIDEOOUTPUT_H |
|
21 |
|
22 #include <QtGui/QWidget> |
|
23 #include <QVector> |
|
24 #include <QRect> |
|
25 #include "defs.h" |
|
26 |
|
27 #include <phonon/abstractvideooutput.h> |
|
28 #include <phonon/videowidget.h> |
|
29 |
|
30 #include <e32std.h> |
|
31 class RWindowBase; |
|
32 |
|
33 QT_BEGIN_NAMESPACE |
|
34 |
|
35 namespace Phonon |
|
36 { |
|
37 namespace MMF |
|
38 { |
|
39 |
|
40 /** |
|
41 * @short ABC for widget on which video is displayed |
|
42 * |
|
43 * @see DsaVideoOutput, SurfaceVideoOutput |
|
44 */ |
|
45 class AbstractVideoOutput |
|
46 : public QWidget |
|
47 { |
|
48 Q_OBJECT |
|
49 |
|
50 public: |
|
51 ~AbstractVideoOutput(); |
|
52 |
|
53 // Set size of video frame. Called by VideoPlayer. |
|
54 void setVideoSize(const QSize &size); |
|
55 |
|
56 RWindowBase* videoWindow() const; |
|
57 QSize videoWindowSize() const; |
|
58 |
|
59 Phonon::VideoWidget::AspectRatio aspectRatio() const; |
|
60 void setAspectRatio(Phonon::VideoWidget::AspectRatio aspectRatio); |
|
61 |
|
62 Phonon::VideoWidget::ScaleMode scaleMode() const; |
|
63 void setScaleMode(Phonon::VideoWidget::ScaleMode scaleMode); |
|
64 |
|
65 // Debugging output |
|
66 void dump() const; |
|
67 |
|
68 Q_SIGNALS: |
|
69 void videoWindowChanged(); |
|
70 void aspectRatioChanged(); |
|
71 void scaleModeChanged(); |
|
72 |
|
73 protected: |
|
74 AbstractVideoOutput(QWidget *parent); |
|
75 |
|
76 private: |
|
77 // QWidget |
|
78 QSize sizeHint() const; |
|
79 |
|
80 private: |
|
81 // Dimensions of the video clip |
|
82 QSize m_videoFrameSize; |
|
83 |
|
84 Phonon::VideoWidget::AspectRatio m_aspectRatio; |
|
85 Phonon::VideoWidget::ScaleMode m_scaleMode; |
|
86 |
|
87 }; |
|
88 } |
|
89 } |
|
90 |
|
91 QT_END_NAMESPACE |
|
92 |
|
93 #endif |