60
|
1 |
/*
|
|
2 |
* Copyright (c) 2008-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: Video Playback command handler
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#include "glxcommandhandlervideoplayback.h"
|
|
22 |
|
|
23 |
#include <AknUtils.h>
|
|
24 |
#include <bautils.h>
|
|
25 |
#include <data_caging_path_literals.hrh>
|
|
26 |
#include <mpxcollectionpath.h>
|
|
27 |
#include <StringLoader.h>
|
|
28 |
#include <glxviewpluginuids.hrh>
|
|
29 |
|
|
30 |
#include <glxuiutilities.rsg>
|
|
31 |
#include <mglxmedialist.h>
|
|
32 |
#include <glxuistd.h>
|
|
33 |
#include <glxcommandhandlers.hrh>
|
|
34 |
#include <mpxviewutility.h>
|
|
35 |
#include <mglxmedialistprovider.h>
|
|
36 |
#include <glxattributeretriever.h>
|
|
37 |
#include <glxattributecontext.h>
|
|
38 |
//#include <ipvideo/ViaPlayerDefaultView.h>
|
|
39 |
#include <glxtracer.h>
|
|
40 |
#include <glxlog.h>
|
|
41 |
#include <alf/alfdisplay.h>
|
|
42 |
#include <glxuiutility.h>
|
|
43 |
#include <glxicons.mbg>
|
|
44 |
#include <glxfetchcontextremover.h>
|
|
45 |
#include <glxscreenfurniture.h>
|
|
46 |
|
|
47 |
#include <mpxmessage2.h>
|
|
48 |
#include <mpxplaybackmessage.h>
|
|
49 |
#include <mpxmessagegeneraldefs.h>
|
|
50 |
#include <glxgallery.hrh>
|
|
51 |
/**
|
|
52 |
* @internal reviewed 11/06/2007 by Alex Birkett
|
|
53 |
*/
|
|
54 |
|
|
55 |
const TUid KVideoHelixPlaybackPluginUid = { 0x10282551 };
|
|
56 |
|
|
57 |
#include "glxcommandfactory.h"
|
|
58 |
|
|
59 |
// ---------------------------------------------------------------------------
|
|
60 |
// Two-phased constructor.
|
|
61 |
// ---------------------------------------------------------------------------
|
|
62 |
//
|
|
63 |
EXPORT_C CGlxCommandHandlerVideoPlayback* CGlxCommandHandlerVideoPlayback::NewL(
|
|
64 |
MGlxMediaListProvider* aMediaListProvider)
|
|
65 |
{
|
|
66 |
CGlxCommandHandlerVideoPlayback* self = new ( ELeave )
|
|
67 |
CGlxCommandHandlerVideoPlayback(aMediaListProvider);
|
|
68 |
CleanupStack::PushL( self );
|
|
69 |
self->ConstructL();
|
|
70 |
CleanupStack::Pop( self );
|
|
71 |
return self;
|
|
72 |
}
|
|
73 |
|
|
74 |
// ---------------------------------------------------------------------------
|
|
75 |
// C++ default constructor can NOT contain any code, that
|
|
76 |
// might leave.
|
|
77 |
// ---------------------------------------------------------------------------
|
|
78 |
//
|
|
79 |
CGlxCommandHandlerVideoPlayback::CGlxCommandHandlerVideoPlayback(MGlxMediaListProvider*
|
|
80 |
aMediaListProvider)
|
|
81 |
: CGlxMediaListCommandHandler(aMediaListProvider), iIconDisplayState(EUndefined)
|
|
82 |
{
|
|
83 |
// Do nothing
|
|
84 |
}
|
|
85 |
|
|
86 |
// ---------------------------------------------------------------------------
|
|
87 |
// Symbian 2nd phase constructor can leave.
|
|
88 |
// ---------------------------------------------------------------------------
|
|
89 |
//
|
|
90 |
void CGlxCommandHandlerVideoPlayback::ConstructL()
|
|
91 |
{
|
|
92 |
iUiUtility = CGlxUiUtility::UtilityL();
|
|
93 |
|
|
94 |
iViewUtility = MMPXViewUtility::UtilityL();
|
|
95 |
|
|
96 |
// Add supported commands
|
|
97 |
// Play videoplayback
|
|
98 |
TCommandInfo info(EGlxCmdPlay);
|
|
99 |
// filter out everything except videos
|
|
100 |
info.iCategoryFilter = EMPXVideo;
|
|
101 |
info.iCategoryRule = TCommandInfo::ERequireAll;
|
|
102 |
info.iMinSelectionLength = 1;
|
|
103 |
info.iMaxSelectionLength = 1;
|
|
104 |
AddCommandL(info);
|
|
105 |
}
|
|
106 |
|
|
107 |
// ---------------------------------------------------------------------------
|
|
108 |
// Destructor
|
|
109 |
// ---------------------------------------------------------------------------
|
|
110 |
//
|
|
111 |
EXPORT_C CGlxCommandHandlerVideoPlayback::~CGlxCommandHandlerVideoPlayback()
|
|
112 |
{
|
|
113 |
if (iUiUtility)
|
|
114 |
{
|
|
115 |
iUiUtility->Close();
|
|
116 |
}
|
|
117 |
|
|
118 |
if ( iViewUtility )
|
|
119 |
{
|
|
120 |
iViewUtility->Close();
|
|
121 |
}
|
|
122 |
|
|
123 |
if ( iPlaybackUtility )
|
|
124 |
{
|
|
125 |
TRAP_IGNORE( iPlaybackUtility->CommandL( EPbCmdClose ) );
|
|
126 |
TRAP_IGNORE( iPlaybackUtility->RemoveObserverL( *this ) );
|
|
127 |
iPlaybackUtility->Close();
|
|
128 |
}
|
|
129 |
}
|
|
130 |
|
|
131 |
// -----------------------------------------------------------------------------
|
|
132 |
// DoExecute - the relevant action for the command id
|
|
133 |
// -----------------------------------------------------------------------------
|
|
134 |
//
|
|
135 |
TBool CGlxCommandHandlerVideoPlayback::DoExecuteL(TInt aCommandId,
|
|
136 |
MGlxMediaList& /*aList*/)
|
|
137 |
{
|
|
138 |
TRACER("CGlxCommandHandlerVideoPlayback::DoExecuteL()");
|
|
139 |
TBool handledCommand = ETrue;
|
|
140 |
|
|
141 |
switch (aCommandId)
|
|
142 |
{
|
|
143 |
case EGlxCmdPlay:
|
|
144 |
{
|
|
145 |
//Setting the navigational Status to Forwards when Play is activated
|
|
146 |
//and is set backwards in ActivatePreviousViewL
|
|
147 |
iUiUtility->SetViewNavigationDirection( EGlxNavigationForwards );
|
|
148 |
// Activate the videoplayback view
|
|
149 |
ActivateViewL();
|
|
150 |
break;
|
|
151 |
}
|
|
152 |
default:
|
|
153 |
{
|
|
154 |
handledCommand = EFalse;
|
|
155 |
break;
|
|
156 |
}
|
|
157 |
}
|
|
158 |
return handledCommand;
|
|
159 |
}
|
|
160 |
|
|
161 |
// -----------------------------------------------------------------------------
|
|
162 |
// DoDynInitMenuPaneL
|
|
163 |
// -----------------------------------------------------------------------------
|
|
164 |
//
|
|
165 |
void CGlxCommandHandlerVideoPlayback::DoDynInitMenuPaneL(TInt /*aResourceId*/,
|
|
166 |
CEikMenuPane* aMenuPane)
|
|
167 |
{
|
|
168 |
TInt pos = 0;
|
|
169 |
|
|
170 |
// If the menu contains Play command and if the device supports touch interface,
|
|
171 |
// hide the Play command in the menu. (Since the user can Play by just tapping on the video
|
|
172 |
// thumbnail in case of grid view and play icon in case of fullscreen view)
|
|
173 |
if(iUiUtility->IsPenSupported() && aMenuPane->MenuItemExists(EGlxCmdPlay,pos))
|
|
174 |
{
|
|
175 |
aMenuPane->SetItemDimmed( EGlxCmdPlay, ETrue);
|
|
176 |
}
|
|
177 |
}
|
|
178 |
// -----------------------------------------------------------------------------
|
|
179 |
// ActivateViewL - launch the ViaPlayer view
|
|
180 |
// -----------------------------------------------------------------------------
|
|
181 |
//
|
|
182 |
void CGlxCommandHandlerVideoPlayback::ActivateViewL()
|
|
183 |
{
|
|
184 |
TRACER("CGlxCommandHandlerVideoPlayback::ActivateViewL()");
|
|
185 |
|
|
186 |
// get the focused item from the media list
|
|
187 |
MGlxMediaList& mediaList = MediaList();
|
|
188 |
|
|
189 |
CGlxDefaultAttributeContext* attributeContext =
|
|
190 |
CGlxDefaultAttributeContext::NewL();
|
|
191 |
CleanupStack::PushL(attributeContext);
|
|
192 |
|
|
193 |
TInt focusIndex = mediaList.FocusIndex();
|
|
194 |
const TGlxMedia& mediaItem = mediaList.Item(focusIndex);
|
|
195 |
//If Item's uri is not present, only then retrieve 'uri'
|
|
196 |
if (!mediaItem.Uri().Length())
|
|
197 |
{
|
|
198 |
//Blocking call to retrieve Item Uri
|
|
199 |
attributeContext->AddAttributeL(KMPXMediaGeneralUri);
|
|
200 |
mediaList.AddContextL(attributeContext,
|
|
201 |
KGlxFetchContextPriorityBlocking);
|
|
202 |
|
|
203 |
// TGlxContextRemover will remove the context when it goes out of scope
|
|
204 |
// Used here to avoid a trap and still have safe cleanup
|
|
205 |
TGlxFetchContextRemover contextRemover(attributeContext, mediaList);
|
|
206 |
CleanupClosePushL(contextRemover);
|
|
207 |
|
|
208 |
User::LeaveIfError(GlxAttributeRetriever::RetrieveL(
|
|
209 |
*attributeContext, mediaList));
|
|
210 |
// context off the list
|
|
211 |
CleanupStack::PopAndDestroy(&contextRemover);
|
|
212 |
}
|
|
213 |
|
|
214 |
//Check if 'MPXPlaybackUtility' is already constructed
|
|
215 |
if (!iPlaybackUtility)
|
|
216 |
{
|
|
217 |
PlaybackUtilityL();
|
|
218 |
}
|
|
219 |
// MPX playbackutility instead of VIA Player
|
|
220 |
// Causes callback to HandlePlaybackMessage()
|
|
221 |
iPlaybackUtility->InitL(mediaItem.Uri());
|
|
222 |
|
|
223 |
CleanupStack::PopAndDestroy(attributeContext);
|
|
224 |
}
|
|
225 |
|
|
226 |
// -----------------------------------------------------------------------------
|
|
227 |
// DoActivateL - Activate this command handler
|
|
228 |
// -----------------------------------------------------------------------------
|
|
229 |
//
|
|
230 |
void CGlxCommandHandlerVideoPlayback::DoActivateL(TInt aViewId)
|
|
231 |
{
|
|
232 |
TRACER("CGlxCommandHandlerVideoPlayback::DoActivateL()");
|
|
233 |
iViewId = aViewId;
|
|
234 |
|
|
235 |
MGlxMediaList& mediaList = MediaList();
|
|
236 |
|
|
237 |
mediaList.AddMediaListObserverL(this);
|
|
238 |
|
|
239 |
iIconDisplayState = EVisible;
|
|
240 |
|
|
241 |
iAttributeContext = CGlxDefaultAttributeContext::NewL();
|
|
242 |
iAttributeContext->SetRangeOffsets(1, 1);
|
|
243 |
iAttributeContext->AddAttributeL(KMPXMediaGeneralCategory);
|
|
244 |
mediaList.AddContextL( iAttributeContext, KGlxFetchContextPriorityLow );
|
|
245 |
|
|
246 |
SetToolBar();
|
|
247 |
}
|
|
248 |
// -----------------------------------------------------------------------------
|
|
249 |
// Deactivate - Deactivate this command handler
|
|
250 |
// -----------------------------------------------------------------------------
|
|
251 |
//
|
|
252 |
void CGlxCommandHandlerVideoPlayback::Deactivate()
|
|
253 |
{
|
|
254 |
TRACER("CGlxCommandHandlerVideoPlayback::Deactivate()");
|
|
255 |
|
|
256 |
MGlxMediaList& mediaList = MediaList();
|
|
257 |
|
|
258 |
if (iAttributeContext)
|
|
259 |
{
|
|
260 |
mediaList.RemoveContext(iAttributeContext);
|
|
261 |
delete iAttributeContext;
|
|
262 |
iAttributeContext = NULL;
|
|
263 |
}
|
|
264 |
|
|
265 |
mediaList.RemoveMediaListObserver(this);
|
|
266 |
}
|
|
267 |
|
|
268 |
// -----------------------------------------------------------------------------
|
|
269 |
// HandleAttributesAvailableL - Sets the toolbar according to the attributes
|
|
270 |
// -----------------------------------------------------------------------------
|
|
271 |
//
|
|
272 |
void CGlxCommandHandlerVideoPlayback::HandleAttributesAvailableL(TInt aItemIndex, const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* /* aList */)
|
|
273 |
{
|
|
274 |
TRACER("CGlxCommandHandlerVideoPlayback::HandleAttributesAvailableL()");
|
|
275 |
if (MediaList().FocusIndex() == aItemIndex )
|
|
276 |
{
|
|
277 |
TIdentityRelation<TMPXAttribute> match(TMPXAttribute::Match);
|
|
278 |
if (KErrNotFound != aAttributes.Find(KMPXMediaGeneralCategory, match))
|
|
279 |
{
|
|
280 |
SetToolBar();
|
|
281 |
}
|
|
282 |
}
|
|
283 |
}
|
|
284 |
|
|
285 |
|
|
286 |
// -----------------------------------------------------------------------------
|
|
287 |
// HandleFocusChangedL - Handles a Focus change in the media list
|
|
288 |
// -----------------------------------------------------------------------------
|
|
289 |
//
|
|
290 |
void CGlxCommandHandlerVideoPlayback::HandleFocusChangedL(NGlxListDefs::TFocusChangeType
|
|
291 |
/* aType */, TInt /* aNewIndex */, TInt /* aOldIndex */, MGlxMediaList* /* aList */)
|
|
292 |
{
|
|
293 |
TRACER("CGlxCommandHandlerVideoPlayback::HandleFocusChangedL()");
|
|
294 |
SetToolBar();
|
|
295 |
}
|
|
296 |
|
|
297 |
// -----------------------------------------------------------------------------
|
|
298 |
// SetToolBarL - Set the toolbar to the correct state.
|
|
299 |
// -----------------------------------------------------------------------------
|
|
300 |
//
|
|
301 |
void CGlxCommandHandlerVideoPlayback::SetToolBar()
|
|
302 |
{
|
|
303 |
TRACER("CGlxCommandHandlerVideoPlayback::SetToolBar()");
|
|
304 |
TInt focus = MediaList().FocusIndex();
|
|
305 |
if ( focus >= 0 )
|
|
306 |
{
|
|
307 |
// Only show the icon if video is in focus
|
|
308 |
TMPXGeneralCategory category = MediaList().Item(focus).Category();
|
|
309 |
TBool visible = (EMPXVideo == category);
|
|
310 |
|
|
311 |
// Decide if we need to update the toolbar
|
|
312 |
TBool UpdateToolBar = EFalse;
|
|
313 |
|
|
314 |
if (visible)
|
|
315 |
{
|
|
316 |
if (iIconDisplayState != EVisible)
|
|
317 |
{
|
|
318 |
UpdateToolBar = ETrue;
|
|
319 |
}
|
|
320 |
}
|
|
321 |
else
|
|
322 |
{
|
|
323 |
if (iIconDisplayState != EHidden)
|
|
324 |
{
|
|
325 |
UpdateToolBar = ETrue;
|
|
326 |
}
|
|
327 |
}
|
|
328 |
|
|
329 |
// Update the toolbar if need be.
|
|
330 |
if (UpdateToolBar)
|
|
331 |
{
|
|
332 |
iUiUtility->ScreenFurniture()->SetToolbarItemVisibility( EGlxCmdPlay, visible );
|
|
333 |
iIconDisplayState = (visible ? EVisible : EHidden);
|
|
334 |
}
|
|
335 |
}
|
|
336 |
}
|
|
337 |
|
|
338 |
// -----------------------------------------------------------------------------
|
|
339 |
// HandlePlaybackMessage
|
|
340 |
// -----------------------------------------------------------------------------
|
|
341 |
//
|
|
342 |
void CGlxCommandHandlerVideoPlayback::HandlePlaybackMessage( CMPXMessage* aMessage, TInt aError )
|
|
343 |
{
|
|
344 |
TRACER("CGlxCommandHandlerVideoPlayback::HandlePlaybackMessage()");
|
|
345 |
|
|
346 |
if ( aError == KErrNone && aMessage )
|
|
347 |
{
|
|
348 |
TRAP_IGNORE( DoHandlePlaybackMessageL( *aMessage ) );
|
|
349 |
}
|
|
350 |
}
|
|
351 |
|
|
352 |
// -----------------------------------------------------------------------------
|
|
353 |
// DoHandlePlaybackMessageL
|
|
354 |
// -----------------------------------------------------------------------------
|
|
355 |
//
|
|
356 |
void CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL( const CMPXMessage& aMessage )
|
|
357 |
{
|
|
358 |
TRACER("CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL()");
|
|
359 |
|
|
360 |
TMPXMessageId id( *aMessage.Value< TMPXMessageId >( KMPXMessageGeneralId ) );
|
|
361 |
|
|
362 |
GLX_LOG_INFO1( "CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL TMPXMessageId =0x%08x",id);
|
|
363 |
|
|
364 |
if ( KMPXMessageGeneral == id )
|
|
365 |
{
|
|
366 |
switch ( *aMessage.Value<TInt>( KMPXMessageGeneralEvent ) )
|
|
367 |
{
|
|
368 |
case TMPXPlaybackMessage::EPlayerChanged:
|
|
369 |
{
|
|
370 |
// Need to call MMPXPlaybackUtility::CurrentPlayer() to get new features
|
|
371 |
GLX_LOG_INFO( "CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL: EPlayerChanged" );
|
|
372 |
HandlePlaybackPlayerChangedL();
|
|
373 |
break;
|
|
374 |
}
|
|
375 |
case TMPXPlaybackMessage::EInitializeComplete:
|
|
376 |
{
|
|
377 |
GLX_LOG_INFO( "CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL: EInitializeComplete" );
|
|
378 |
break;
|
|
379 |
}
|
|
380 |
case TMPXPlaybackMessage::EPlayerUnavailable:
|
|
381 |
{
|
|
382 |
GLX_LOG_INFO( "CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL: EPlayerUnavailable" );
|
|
383 |
break;
|
|
384 |
}
|
|
385 |
case TMPXPlaybackMessage::EPropertyChanged:
|
|
386 |
{
|
|
387 |
GLX_LOG_INFO( "CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL: EPropertyChanged" );
|
|
388 |
break;
|
|
389 |
}
|
|
390 |
case TMPXPlaybackMessage::EError:
|
|
391 |
{
|
|
392 |
GLX_LOG_INFO1( "CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL error = %d",
|
|
393 |
*aMessage.Value<TInt>( KMPXMessageGeneralData ) );
|
|
394 |
break;
|
|
395 |
}
|
|
396 |
|
|
397 |
case TMPXPlaybackMessage::EStateChanged:
|
|
398 |
{
|
|
399 |
break;
|
|
400 |
}
|
|
401 |
case TMPXPlaybackMessage::ECommandReceived: // iType=TMPXPlaybackCommand
|
|
402 |
case TMPXPlaybackMessage::ECommandComplete: // iType=TMPXPlaybackCommand
|
|
403 |
case TMPXPlaybackMessage::ESongCorrupt:
|
|
404 |
case TMPXPlaybackMessage::ESongContainerChanged: // Need to call MMPXMedia::CollectionPathL() to get new path
|
|
405 |
case TMPXPlaybackMessage::ESongChanged: // iData=new index; need to query to get new properties (e.g. duration: title etc.)
|
|
406 |
case TMPXPlaybackMessage::EActivePlayerChanged: // iData=active/inactive (ETrue/EFalse); iType (ETrue:rebind to ActivePlayerMode)
|
|
407 |
case TMPXPlaybackMessage::ESubPlayersChanged: // Need to query to get new list of sub players
|
|
408 |
case TMPXPlaybackMessage::EPlayerSelectionChanged: // Need to query MMPXPlayerManager::GetSelectionL()
|
|
409 |
case TMPXPlaybackMessage::EDownloadStarted: // iData=total expected bytes
|
|
410 |
case TMPXPlaybackMessage::EDownloadUpdated: // iData=total bytes so far
|
|
411 |
case TMPXPlaybackMessage::EDownloadComplete: // iData=total bytes downloaded
|
|
412 |
case TMPXPlaybackMessage::EDownloadPositionChanged: // iData=total bytes so far
|
|
413 |
case TMPXPlaybackMessage::EDownloadStateChanged: // iData=TMPXPlaybackPdDownloadState
|
|
414 |
case TMPXPlaybackMessage::EDownloadCmdPauseDownload: // iData=transaction ID
|
|
415 |
case TMPXPlaybackMessage::EDownloadCmdResumeDownload: // iData=transaction ID
|
|
416 |
case TMPXPlaybackMessage::EDownloadCmdCancelDownload: // iData=transaction ID
|
|
417 |
case TMPXPlaybackMessage::EAccessoryChanged: // iType=TAccessoryMode
|
|
418 |
case TMPXPlaybackMessage::EMediaChanged: // When the song/playlist hasn't: but data may become available
|
|
419 |
case TMPXPlaybackMessage::ESkipping: //skipping event, iData=+1, skipping forward, -1, skipping backward
|
|
420 |
case TMPXPlaybackMessage::ESkipEnd: //skipping end
|
|
421 |
case TMPXPlaybackMessage::EPlaylistUpdated: // playlist updated
|
|
422 |
case TMPXPlaybackMessage::EReachedEndOfPlaylist: // playback or skipping forward has reached end of playlist
|
|
423 |
{
|
|
424 |
GLX_LOG_INFO1( "CGlxCommandHandlerVideoPlayback::DoHandlePlaybackMessageL KMPXMessageGeneralEvent = %d",
|
|
425 |
*aMessage.Value<TInt>( KMPXMessageGeneralEvent ) );
|
|
426 |
break;
|
|
427 |
}
|
|
428 |
default:
|
|
429 |
{
|
|
430 |
break;
|
|
431 |
}
|
|
432 |
}
|
|
433 |
}
|
|
434 |
}
|
|
435 |
|
|
436 |
// -----------------------------------------------------------------------------
|
|
437 |
// HandlePlaybackPlayerChangedL
|
|
438 |
// -----------------------------------------------------------------------------
|
|
439 |
//
|
|
440 |
void CGlxCommandHandlerVideoPlayback::HandlePlaybackPlayerChangedL()
|
|
441 |
{
|
|
442 |
TRACER("CGlxCommandHandlerVideoPlayback::HandlePlaybackPlayerChangedL()");
|
|
443 |
|
|
444 |
MMPXPlayer* player = iPlaybackUtility->PlayerManager().CurrentPlayer();
|
|
445 |
|
|
446 |
TUid pluginUid( KNullUid );
|
|
447 |
RArray<TUid> array;
|
|
448 |
CleanupClosePushL( array );
|
|
449 |
|
|
450 |
if ( player )
|
|
451 |
{
|
|
452 |
pluginUid = player->UidL();
|
|
453 |
array.AppendL( pluginUid );
|
|
454 |
}
|
|
455 |
// Causes view switch to playback view
|
|
456 |
iViewUtility->ActivateViewL( array );
|
|
457 |
CleanupStack::PopAndDestroy( &array );
|
|
458 |
}
|
|
459 |
|
|
460 |
// -----------------------------------------------------------------------------
|
|
461 |
// CGlxCommandHandlerVideoPlayback::PlaybackUtilityL
|
|
462 |
// -----------------------------------------------------------------------------
|
|
463 |
void CGlxCommandHandlerVideoPlayback::PlaybackUtilityL()
|
|
464 |
{
|
|
465 |
TRACER("CGlxCommandHandlerVideoPlayback::PlaybackUtilityL");
|
|
466 |
if (!iPlaybackUtility)
|
|
467 |
{
|
|
468 |
iPlaybackUtility = MMPXPlaybackUtility::UtilityL(EMPXCategoryVideo,
|
|
469 |
TUid::Uid(KGlxGalleryApplicationUid) ); //use photos UID
|
|
470 |
MMPXPlayerManager& manager = iPlaybackUtility->PlayerManager();
|
|
471 |
manager.SelectPlayerL(KVideoHelixPlaybackPluginUid);
|
|
472 |
iPlaybackUtility->AddObserverL(*this);
|
|
473 |
}
|
|
474 |
}
|