source: trunk/src/3rdparty/phonon/mmf/videoplayer_dsa.h

Last change on this file was 769, checked in by Dmitry A. Kuminov, 15 years ago

trunk: Merged in qt 4.6.3 sources from branches/vendor/nokia/qt.

File size: 2.6 KB
Line 
1/* This file is part of the KDE project.
2
3Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
5This library is free software: you can redistribute it and/or modify
6it under the terms of the GNU Lesser General Public License as published by
7the Free Software Foundation, either version 2.1 or 3 of the License.
8
9This library is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU Lesser General Public License for more details.
13
14You should have received a copy of the GNU Lesser General Public License
15along with this library. If not, see <http://www.gnu.org/licenses/>.
16
17*/
18
19#ifndef PHONON_MMF_VIDEOPLAYER_DSA_H
20#define PHONON_MMF_VIDEOPLAYER_DSA_H
21
22#include "abstractvideoplayer.h"
23
24QT_BEGIN_NAMESPACE
25
26namespace Phonon
27{
28namespace MMF
29{
30
31/**
32 * @short Wrapper over the MMF video player utility (DSA version)
33 *
34 * This implementation is used on devices with the legacy graphics
35 * subsystem, which does not support surfaces. On such devices,
36 * video rendering is done via Direct Screen Access (DSA), whereby
37 * the video decoder writes directly to the framebuffer. To ensure
38 * that the window server and video decoder do not try to draw to
39 * the same screen region at the same time, the video subsystem
40 * first requests permission to perform DSA. If the window server
41 * needs to draw to this screen region (for example to display a
42 * message dialog), it first notifies the video subsystem that it
43 * must stop rendering to this region.
44 *
45 * @see SurfaceVideoPlayer
46 */
47class DsaVideoPlayer
48 : public AbstractVideoPlayer
49{
50 Q_OBJECT
51
52public:
53 // Factory function
54 static DsaVideoPlayer* create(MediaObject *parent = 0,
55 const AbstractPlayer *player = 0);
56 ~DsaVideoPlayer();
57
58public Q_SLOTS:
59 void videoWindowScreenRectChanged();
60 void suspendDirectScreenAccess();
61 void resumeDirectScreenAccess();
62
63private:
64 DsaVideoPlayer(MediaObject *parent, const AbstractPlayer *player);
65
66 // AbstractVideoPlayer
67 void createPlayer();
68 void initVideoOutput();
69 void prepareCompleted();
70 void handleVideoWindowChanged();
71 void handleParametersChanged(VideoParameters parameters);
72
73 void startDirectScreenAccess();
74 bool stopDirectScreenAccess();
75
76private:
77 bool m_dsaActive;
78 bool m_dsaWasActive;
79
80 // Absolute screen rectangle on which video is displayed
81 TRect m_videoScreenRect;
82
83};
84
85}
86}
87
88QT_END_NAMESPACE
89
90#endif // !PHONON_MMF_VIDEOPLAYER_DSA_H
91
92
Note: See TracBrowser for help on using the repository browser.