| 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_VIDEOPLAYER_SURFACE_H |
| 20 |
#define PHONON_MMF_VIDEOPLAYER_SURFACE_H |
| 21 |
|
| 22 |
#include "abstractvideoplayer.h" |
| 23 |
|
| 24 |
class RWindow; |
| 25 |
|
| 26 |
QT_BEGIN_NAMESPACE |
| 27 |
|
| 28 |
namespace Phonon |
| 29 |
{ |
| 30 |
namespace MMF |
| 31 |
{ |
| 32 |
|
| 33 |
/** |
| 34 |
* @short Wrapper over the MMF video player utility (surface version) |
| 35 |
* |
| 36 |
* This implementation is used on devices with a graphics subsystem which |
| 37 |
* supports surfaces. |
| 38 |
* |
| 39 |
* @see DsaVideoPlayer |
| 40 |
*/ |
| 41 |
class SurfaceVideoPlayer |
| 42 |
: public AbstractVideoPlayer |
| 43 |
{ |
| 44 |
Q_OBJECT |
| 45 |
|
| 46 |
public: |
| 47 |
// Factory function |
| 48 |
static SurfaceVideoPlayer* create(MediaObject *parent = 0, |
| 49 |
const AbstractPlayer *player = 0); |
| 50 |
~SurfaceVideoPlayer(); |
| 51 |
|
| 52 |
public Q_SLOTS: |
| 53 |
void videoWindowSizeChanged(); |
| 54 |
|
| 55 |
private: |
| 56 |
SurfaceVideoPlayer(MediaObject *parent, const AbstractPlayer *player); |
| 57 |
|
| 58 |
// AbstractVideoPlayer |
| 59 |
void createPlayer(); |
| 60 |
void initVideoOutput(); |
| 61 |
void prepareCompleted(); |
| 62 |
void handleVideoWindowChanged(); |
| 63 |
void handleParametersChanged(VideoParameters parameters); |
| 64 |
|
| 65 |
void addDisplayWindow(const TRect &rect); |
| 66 |
void removeDisplayWindow(); |
| 67 |
|
| 68 |
private: |
| 69 |
// Window handle which has been passed to the MMF via |
| 70 |
// CVideoPlayerUtility2::SetDisplayWindowL |
| 71 |
RWindow* m_displayWindow; |
| 72 |
|
| 73 |
}; |
| 74 |
|
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
QT_END_NAMESPACE |
| 79 |
|
| 80 |
#endif // !PHONON_MMF_VIDEOPLAYER_SURFACE_H |