34
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Implementation of MPXVideoPlaybackControlsController
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
// Version : %version: 4 %
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
// INCLUDE FILES
|
|
23 |
#include <coecntrl.h>
|
|
24 |
#include <bautils.h>
|
|
25 |
#include <barsread.h>
|
|
26 |
#include <stringloader.h>
|
|
27 |
#include <f32file.h>
|
|
28 |
|
|
29 |
#include <qtimer>
|
|
30 |
|
|
31 |
#include <hblabel.h>
|
|
32 |
#include <hbaction.h>
|
|
33 |
#include <hbiconanimator.h>
|
|
34 |
|
|
35 |
#include "mpxvideoviewwrapper.h"
|
|
36 |
#include "hbvideobaseplaybackview.h"
|
|
37 |
#include "mpxvideoplaybackbuttonbar.h"
|
|
38 |
#include "mpxvideoplaybackprogressbar.h"
|
|
39 |
#include "mpxvideoplaybackcontrolpolicy.h"
|
|
40 |
#include "mpxvideoplaybackdocumentloader.h"
|
|
41 |
#include "mpxvideoplaybackviewfiledetails.h"
|
|
42 |
#include "mpxvideoplaybackstatuspanecontrol.h"
|
|
43 |
#include "mpxvideoplaybackfiledetailswidget.h"
|
|
44 |
#include "mpxvideoplaybacknontouchvolumebar.h"
|
|
45 |
#include "mpxvideoplaybackfullscreencontrol.h"
|
|
46 |
#include "../inc/mpxvideoplaybackcontrolscontroller.h"
|
|
47 |
#include "mpxvideoplaybackcontrolconfiguration.h"
|
|
48 |
|
|
49 |
|
|
50 |
// ================= MEMBER FUNCTIONS ==============================================================
|
|
51 |
|
|
52 |
// -------------------------------------------------------------------------------------------------
|
|
53 |
// QMPXVideoPlaybackControlsController::QMPXVideoPlaybackControlsController()
|
|
54 |
// -------------------------------------------------------------------------------------------------
|
|
55 |
//
|
|
56 |
QMPXVideoPlaybackControlsController::QMPXVideoPlaybackControlsController(
|
|
57 |
HbVideoBasePlaybackView *view,
|
|
58 |
CMPXVideoViewWrapper *viewWrapper,
|
|
59 |
QMPXVideoPlaybackViewFileDetails *details )
|
|
60 |
: mView( view )
|
|
61 |
, mViewWrapper( viewWrapper )
|
|
62 |
, mFileDetails( details )
|
|
63 |
{
|
|
64 |
initializeController();
|
|
65 |
}
|
|
66 |
|
|
67 |
// -------------------------------------------------------------------------------------------------
|
|
68 |
// QMPXVideoPlaybackControlsController::initializeController()
|
|
69 |
// -------------------------------------------------------------------------------------------------
|
|
70 |
//
|
|
71 |
void QMPXVideoPlaybackControlsController::initializeController()
|
|
72 |
{
|
|
73 |
|
|
74 |
//createControls();
|
|
75 |
|
|
76 |
connect( mView, SIGNAL( tappedOnScreen() ), this, SLOT( handleTappedOnScreen() ) );
|
|
77 |
}
|
|
78 |
|
|
79 |
// -------------------------------------------------------------------------------------------------
|
|
80 |
// QMPXVideoPlaybackControlsController::addFileDetails()
|
|
81 |
// -------------------------------------------------------------------------------------------------
|
|
82 |
//
|
|
83 |
void QMPXVideoPlaybackControlsController::addFileDetails(
|
|
84 |
QMPXVideoPlaybackViewFileDetails* details )
|
|
85 |
{
|
|
86 |
Q_UNUSED( details );
|
|
87 |
}
|
|
88 |
|
|
89 |
// -------------------------------------------------------------------------------------------------
|
|
90 |
// QMPXVideoPlaybackControlsController::~QMPXVideoPlaybackControlsController
|
|
91 |
// -------------------------------------------------------------------------------------------------
|
|
92 |
//
|
|
93 |
QMPXVideoPlaybackControlsController::~QMPXVideoPlaybackControlsController()
|
|
94 |
{
|
|
95 |
MPX_DEBUG(_L("QMPXVideoPlaybackControlsController::~QMPXVideoPlaybackControlsController"));
|
|
96 |
|
|
97 |
disconnect( mView, SIGNAL( tappedOnScreen() ), this, SLOT( handleTappedOnScreen() ) );
|
|
98 |
|
|
99 |
}
|
|
100 |
|
|
101 |
// -------------------------------------------------------------------------------------------------
|
|
102 |
// QMPXVideoPlaybackControlsController::handleEvent
|
|
103 |
// -------------------------------------------------------------------------------------------------
|
|
104 |
//
|
|
105 |
void QMPXVideoPlaybackControlsController::handleEvent(
|
|
106 |
TMPXVideoPlaybackControlCommandIds event, int value )
|
|
107 |
{
|
|
108 |
switch ( event )
|
|
109 |
{
|
|
110 |
case EMPXControlCmdTvOutConnected:
|
|
111 |
{
|
|
112 |
handleTvOutEvent( true, event, value );
|
|
113 |
break;
|
|
114 |
}
|
|
115 |
case EMPXControlCmdTvOutDisconnected:
|
|
116 |
{
|
|
117 |
handleTvOutEvent( false, event, value );
|
|
118 |
break;
|
|
119 |
}
|
|
120 |
case EMPXControlCmdSetVolume:
|
|
121 |
{
|
|
122 |
mFileDetails->mAudioEnabled = false;
|
|
123 |
break;
|
|
124 |
}
|
|
125 |
case EMPXControlCmdSetDuration:
|
|
126 |
{
|
|
127 |
mFileDetails->mDuration = value;
|
|
128 |
break;
|
|
129 |
}
|
|
130 |
case EMPXControlCmdShowVolumeControls:
|
|
131 |
{
|
|
132 |
mFileDetails->mAudioEnabled = true;
|
|
133 |
break;
|
|
134 |
}
|
|
135 |
case EMPXControlCmdSetPosition:
|
|
136 |
{
|
|
137 |
mFileDetails->mSeekable = true;
|
|
138 |
break;
|
|
139 |
}
|
|
140 |
}
|
|
141 |
}
|
|
142 |
|
|
143 |
// -------------------------------------------------------------------------------------------------
|
|
144 |
// QMPXVideoPlaybackControlsController::handleStateChange
|
|
145 |
// -------------------------------------------------------------------------------------------------
|
|
146 |
//
|
|
147 |
void QMPXVideoPlaybackControlsController::handleStateChange( TMPXPlaybackState newState )
|
|
148 |
{
|
|
149 |
Q_UNUSED( newState );
|
|
150 |
}
|
|
151 |
|
|
152 |
// -------------------------------------------------------------------------------------------------
|
|
153 |
// QMPXVideoPlaybackControlsController::controlsListUpdated()
|
|
154 |
// -------------------------------------------------------------------------------------------------
|
|
155 |
//
|
|
156 |
void QMPXVideoPlaybackControlsController::controlsListUpdated()
|
|
157 |
{
|
|
158 |
|
|
159 |
}
|
|
160 |
|
|
161 |
// -------------------------------------------------------------------------------------------------
|
|
162 |
// QMPXVideoPlaybackControlsController::appendControl()
|
|
163 |
// -------------------------------------------------------------------------------------------------
|
|
164 |
//
|
|
165 |
void QMPXVideoPlaybackControlsController::appendControl( TMPXVideoPlaybackControls controlIndex )
|
|
166 |
{
|
|
167 |
Q_UNUSED( controlIndex );
|
|
168 |
}
|
|
169 |
|
|
170 |
// -------------------------------------------------------------------------------------------------
|
|
171 |
// QMPXVideoPlaybackControlsController::resetDisappearingTimers()
|
|
172 |
// -------------------------------------------------------------------------------------------------
|
|
173 |
//
|
|
174 |
void QMPXVideoPlaybackControlsController::resetDisappearingTimers( TMPXTimerAction timerAction )
|
|
175 |
{
|
|
176 |
Q_UNUSED( timerAction );
|
|
177 |
}
|
|
178 |
|
|
179 |
// -------------------------------------------------------------------------------------------------
|
|
180 |
// QMPXVideoPlaybackControlsController::hideAllControls()
|
|
181 |
// -------------------------------------------------------------------------------------------------
|
|
182 |
//
|
|
183 |
void QMPXVideoPlaybackControlsController::hideAllControls()
|
|
184 |
{
|
|
185 |
|
|
186 |
}
|
|
187 |
|
|
188 |
// -------------------------------------------------------------------------------------------------
|
|
189 |
// QMPXVideoPlaybackControlsController::showControls()
|
|
190 |
// -------------------------------------------------------------------------------------------------
|
|
191 |
//
|
|
192 |
void QMPXVideoPlaybackControlsController::showControls()
|
|
193 |
{
|
|
194 |
|
|
195 |
}
|
|
196 |
|
|
197 |
// -------------------------------------------------------------------------------------------------
|
|
198 |
// QMPXVideoPlaybackControlsController::isVisible()
|
|
199 |
// -------------------------------------------------------------------------------------------------
|
|
200 |
//
|
|
201 |
bool QMPXVideoPlaybackControlsController::isVisible()
|
|
202 |
{
|
|
203 |
|
|
204 |
}
|
|
205 |
|
|
206 |
// -------------------------------------------------------------------------------------------------
|
|
207 |
// QMPXVideoPlaybackControlsController::handleCommand()
|
|
208 |
// -------------------------------------------------------------------------------------------------
|
|
209 |
//
|
|
210 |
void QMPXVideoPlaybackControlsController::handleCommand(
|
|
211 |
TMPXVideoPlaybackViewCommandIds command, int value )
|
|
212 |
{
|
|
213 |
Q_UNUSED( command );
|
|
214 |
Q_UNUSED( value );
|
|
215 |
}
|
|
216 |
|
|
217 |
// -------------------------------------------------------------------------------------------------
|
|
218 |
// QMPXVideoPlaybackControlsController::volumeChanged()
|
|
219 |
// -------------------------------------------------------------------------------------------------
|
|
220 |
//
|
|
221 |
void QMPXVideoPlaybackControlsController::volumeChanged( int volume )
|
|
222 |
{
|
|
223 |
Q_UNUSED( volume );
|
|
224 |
}
|
|
225 |
|
|
226 |
// -------------------------------------------------------------------------------------------------
|
|
227 |
// QMPXVideoPlaybackControlsController::showVolumeControls()
|
|
228 |
// -------------------------------------------------------------------------------------------------
|
|
229 |
//
|
|
230 |
void QMPXVideoPlaybackControlsController::showVolumeControls()
|
|
231 |
{
|
|
232 |
|
|
233 |
}
|
|
234 |
|
|
235 |
// -------------------------------------------------------------------------------------------------
|
|
236 |
// QMPXVideoPlaybackControlsController::durationChanged()
|
|
237 |
// -------------------------------------------------------------------------------------------------
|
|
238 |
//
|
|
239 |
void QMPXVideoPlaybackControlsController::durationChanged( int duration )
|
|
240 |
{
|
|
241 |
Q_UNUSED( duration );
|
|
242 |
}
|
|
243 |
|
|
244 |
// -------------------------------------------------------------------------------------------------
|
|
245 |
// QMPXVideoPlaybackControlsController::positionChanged()
|
|
246 |
// -------------------------------------------------------------------------------------------------
|
|
247 |
//
|
|
248 |
void QMPXVideoPlaybackControlsController::positionChanged( int position )
|
|
249 |
{
|
|
250 |
Q_UNUSED( position );
|
|
251 |
}
|
|
252 |
|
|
253 |
// -------------------------------------------------------------------------------------------------
|
|
254 |
// QMPXVideoPlaybackControlsController::aspectRatioChanged()
|
|
255 |
// -------------------------------------------------------------------------------------------------
|
|
256 |
//
|
|
257 |
void QMPXVideoPlaybackControlsController::aspectRatioChanged( int aspectRatio )
|
|
258 |
{
|
|
259 |
Q_UNUSED( aspectRatio );
|
|
260 |
}
|
|
261 |
|
|
262 |
// -------------------------------------------------------------------------------------------------
|
|
263 |
// QMPXVideoPlaybackControlsController::realFormat()
|
|
264 |
// -------------------------------------------------------------------------------------------------
|
|
265 |
//
|
|
266 |
bool QMPXVideoPlaybackControlsController::realFormat( QString filename )
|
|
267 |
{
|
|
268 |
Q_UNUSED( filename );
|
|
269 |
}
|
|
270 |
|
|
271 |
// -------------------------------------------------------------------------------------------------
|
|
272 |
// QMPXVideoPlaybackControlsController::realFormatForStreaming()
|
|
273 |
// -------------------------------------------------------------------------------------------------
|
|
274 |
//
|
|
275 |
bool QMPXVideoPlaybackControlsController::realFormatForStreaming( const TDesC& des )
|
|
276 |
{
|
|
277 |
Q_UNUSED( des );
|
|
278 |
bool realFormat = false;
|
|
279 |
return realFormat;
|
|
280 |
}
|
|
281 |
|
|
282 |
// -------------------------------------------------------------------------------------------------
|
|
283 |
// QMPXVideoPlaybackControlsController::realFormatForLocal()
|
|
284 |
// -------------------------------------------------------------------------------------------------
|
|
285 |
//
|
|
286 |
bool QMPXVideoPlaybackControlsController::realFormatForLocal()
|
|
287 |
{
|
|
288 |
bool realFormat = false;
|
|
289 |
|
|
290 |
return realFormat;
|
|
291 |
}
|
|
292 |
|
|
293 |
// -------------------------------------------------------------------------------------------------
|
|
294 |
// QMPXVideoPlaybackControlsController::setDownloadSize()
|
|
295 |
// -------------------------------------------------------------------------------------------------
|
|
296 |
//
|
|
297 |
void QMPXVideoPlaybackControlsController::setDownloadSize( int size )
|
|
298 |
{
|
|
299 |
Q_UNUSED( size );
|
|
300 |
}
|
|
301 |
|
|
302 |
// -------------------------------------------------------------------------------------------------
|
|
303 |
// QMPXVideoPlaybackControlsController::updateDownloadPosition()
|
|
304 |
// -------------------------------------------------------------------------------------------------
|
|
305 |
//
|
|
306 |
void QMPXVideoPlaybackControlsController::updateDownloadPosition( int size )
|
|
307 |
{
|
|
308 |
Q_UNUSED( size );
|
|
309 |
}
|
|
310 |
|
|
311 |
// -------------------------------------------------------------------------------------------------
|
|
312 |
// QMPXVideoPlaybackControlsController::handleErrors
|
|
313 |
// -------------------------------------------------------------------------------------------------
|
|
314 |
//
|
|
315 |
void QMPXVideoPlaybackControlsController::handleErrors()
|
|
316 |
{
|
|
317 |
|
|
318 |
}
|
|
319 |
|
|
320 |
// -------------------------------------------------------------------------------------------------
|
|
321 |
// QMPXVideoPlaybackControlsController::isSoftKeyVisible()
|
|
322 |
// -------------------------------------------------------------------------------------------------
|
|
323 |
//
|
|
324 |
bool QMPXVideoPlaybackControlsController::isSoftKeyVisible( int /*value*/ )
|
|
325 |
{
|
|
326 |
|
|
327 |
}
|
|
328 |
|
|
329 |
// -------------------------------------------------------------------------------------------------
|
|
330 |
// QMPXVideoPlaybackControlsController::handleTvOutEvent
|
|
331 |
// -------------------------------------------------------------------------------------------------
|
|
332 |
//
|
|
333 |
void QMPXVideoPlaybackControlsController::handleTvOutEvent(
|
|
334 |
bool connected, TMPXVideoPlaybackControlCommandIds event, int value )
|
|
335 |
{
|
|
336 |
Q_UNUSED( event );
|
|
337 |
Q_UNUSED( value );
|
|
338 |
mFileDetails->mTvOutConnected = connected;
|
|
339 |
}
|
|
340 |
|
|
341 |
// -------------------------------------------------------------------------------------------------
|
|
342 |
// QMPXVideoPlaybackControlsController::updateVideoRectDone
|
|
343 |
// -------------------------------------------------------------------------------------------------
|
|
344 |
//
|
|
345 |
void QMPXVideoPlaybackControlsController::updateVideoRectDone()
|
|
346 |
{
|
|
347 |
mViewTransitionIsGoingOn = false;
|
|
348 |
|
|
349 |
}
|
|
350 |
|
|
351 |
|
|
352 |
// -------------------------------------------------------------------------------------------------
|
|
353 |
// QMPXVideoPlaybackControlsController::skipToPreviousVideoItem
|
|
354 |
// -------------------------------------------------------------------------------------------------
|
|
355 |
//
|
|
356 |
void QMPXVideoPlaybackControlsController::skipToPreviousVideoItem()
|
|
357 |
{
|
|
358 |
}
|
|
359 |
|
|
360 |
// -------------------------------------------------------------------------------------------------
|
|
361 |
// QMPXVideoPlaybackControlsController::skipToNextVideoItem
|
|
362 |
// -------------------------------------------------------------------------------------------------
|
|
363 |
//
|
|
364 |
void QMPXVideoPlaybackControlsController::skipToNextVideoItem()
|
|
365 |
{
|
|
366 |
|
|
367 |
}
|
|
368 |
|
|
369 |
// -------------------------------------------------------------------------------------------------
|
|
370 |
// QMPXVideoPlaybackControlsController::updateVideoRect()
|
|
371 |
// -------------------------------------------------------------------------------------------------
|
|
372 |
//
|
|
373 |
void QMPXVideoPlaybackControlsController::updateVideoRect( bool transitionEffect )
|
|
374 |
{
|
|
375 |
Q_UNUSED( transitionEffect );
|
|
376 |
}
|
|
377 |
|
|
378 |
// -------------------------------------------------------------------------------------------------
|
|
379 |
// QMPXVideoPlaybackControlsController::handleTappedOnScreen()
|
|
380 |
// -------------------------------------------------------------------------------------------------
|
|
381 |
//
|
|
382 |
void QMPXVideoPlaybackControlsController::handleTappedOnScreen()
|
|
383 |
{
|
|
384 |
|
|
385 |
}
|
|
386 |
|
|
387 |
// End of File
|