# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272375633 -10800 # Node ID 7f2b2a65da299fd4e4b7fce16f38657030a3b663 # Parent 8970fbd719ec0c2cada5b48df5efec271f22f8af Revision: 201015 Kit: 201017 diff -r 8970fbd719ec -r 7f2b2a65da29 mediasettings/mediasettingsengine/group/MPSettROPModel.mmp --- a/mediasettings/mediasettingsengine/group/MPSettROPModel.mmp Wed Apr 14 15:59:50 2010 +0300 +++ b/mediasettings/mediasettingsengine/group/MPSettROPModel.mmp Tue Apr 27 16:40:33 2010 +0300 @@ -16,10 +16,11 @@ -// Version : %version: 5 % +// Version : %version: 6 % +#include #include TARGET mpsettropmodel.dll CAPABILITY CAP_ECOM_PLUGIN @@ -41,7 +42,7 @@ START RESOURCE MPSettingsROPModel.rss HEADER TARGET mpsettingsropmodel.rsc -TARGETPATH resource +TARGETPATH RESOURCE_FILES_DIR END USERINCLUDE . diff -r 8970fbd719ec -r 7f2b2a65da29 mediasettings/mediasettingsengine/rom/mpsettropmodel.iby --- a/mediasettings/mediasettingsengine/rom/mpsettropmodel.iby Wed Apr 14 15:59:50 2010 +0300 +++ b/mediasettings/mediasettingsengine/rom/mpsettropmodel.iby Tue Apr 27 16:40:33 2010 +0300 @@ -21,8 +21,6 @@ #include -ECOM_PLUGIN( mpsettropmodel.dll, 101f857b.rsc ) - -data=DATAZ_\resource\MPSettingsROPModel.rsc resource\MPSettingsROPModel.rsc +ECOM_PLUGIN( mpsettropmodel.dll, mpsettropmodel.rsc ) #endif // MPSETTROPMODEL_IBY \ No newline at end of file diff -r 8970fbd719ec -r 7f2b2a65da29 mediasettings/mediasettingsengine/rom/mpsettropmodelrsc.iby --- a/mediasettings/mediasettingsengine/rom/mpsettropmodelrsc.iby Wed Apr 14 15:59:50 2010 +0300 +++ b/mediasettings/mediasettingsengine/rom/mpsettropmodelrsc.iby Tue Apr 27 16:40:33 2010 +0300 @@ -22,7 +22,7 @@ #include -data=DATAZ_\APP_RESOURCE_DIR\MPSettingsROPModel.rsc APP_RESOURCE_DIR\MPSettingsROPModel.rsc +data=DATAZ_\RESOURCE_FILES_DIR\mpsettingsropmodel.rsc RESOURCE_FILES_DIR\mpsettingsropmodel.rsc #endif // MPSETTROPMODELRSC_IBY \ No newline at end of file diff -r 8970fbd719ec -r 7f2b2a65da29 videocollection/hgmyvideos/data/vcxhgmyvideos.rss --- a/videocollection/hgmyvideos/data/vcxhgmyvideos.rss Wed Apr 14 15:59:50 2010 +0300 +++ b/videocollection/hgmyvideos/data/vcxhgmyvideos.rss Tue Apr 27 16:40:33 2010 +0300 @@ -182,6 +182,13 @@ txt = qtn_vcx_hg_options_use_video_as; flags = EEikMenuItemSpecificListQuery; }, +#else + MENU_ITEM + { + command = EVcxHgMyVideosCmdMarkContext; + txt = qtn_options_list_mark_one; + flags = EEikMenuItemSpecific; + }, #endif MENU_ITEM { diff -r 8970fbd719ec -r 7f2b2a65da29 videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh --- a/videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh Wed Apr 14 15:59:50 2010 +0300 +++ b/videocollection/hgmyvideos/inc/vcxhgmyvideos.hrh Tue Apr 27 16:40:33 2010 +0300 @@ -45,6 +45,7 @@ EVcxHgMyVideosCmdUnmark, // Mark/Unmark submenu: Unmark video EVcxHgMyVideosCmdMarkAll, // Mark/Unmark submenu: Mark all videos EVcxHgMyVideosCmdUnmarkAll, // Mark/Unmark submenu: Unmark all videos + EVcxHgMyVideosCmdMarkContext, // Mark video (context menu) #ifdef RD_VIDEO_AS_RINGING_TONE EVcxHgMyVideosCmdAiwAssign, // Submenu: Placeholder for "Use video as" #endif diff -r 8970fbd719ec -r 7f2b2a65da29 videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h --- a/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videocollection/hgmyvideos/inc/vcxhgmyvideosvideomodelhandler.h Tue Apr 27 16:40:33 2010 +0300 @@ -475,13 +475,13 @@ * @return ETrue if media belongs to category, otherwise EFalse. */ TBool ValidOrigin( CMPXMedia& aMedia ); - + /** - * Saves MPX id of highlighted item. + * Saves MPX id of highlighted item. */ void SaveHighlightedItemIdL(); - - /** + + /** * Update scrollbar strip type depending on sort order */ void UpdateScrollbarTypeL( const TVcxMyVideosSortingOrder& aSortingOrder ); @@ -501,10 +501,25 @@ * Resizes scroller with refetch * This is faster way to reset scroller than CHgScroller::Reset() and * CHgScroller::ResizeL() calls combined - * @param aNewItemCount New item count + * @param aNewItemCount New item count */ void ResizeScrollerL( TInt aNewItemCount ); + /** + * Saves the marked MPXMedia items to iMarkedMediaList. This is called before + * re-sorting the videos list if marking mode is enabled to preserve the + * marking status of marked items. + */ + void SaveMarkingsL(); + + /** + * Restores the marking status of the MPXMedia items from iMarkedMediaList. + * This is called after re-sorting the list if marking mode is enabled to + * restore the marking status of the marked items. + * This method resets iMarkedMediaList before returning. + */ + void RestoreMarkingsL(); + private: /** @@ -570,7 +585,7 @@ * MPX id of highlighted item in a video list. */ TMPXItemId iHighlightedItemId; - + /** * Downloading has been resumed for these MPX IDs. Needed for showing * note "Resuming download not possible, download starts from beginning". @@ -581,6 +596,14 @@ * Video indicator gives an overlay icon for video thumbnails. */ CMyVideosIndicator* iVideoIndicator; + + /** + * Array of marked MPXMedia items to temporarily hold a list of marked items in video list. + * The array is temporarily filled with pointers to marked media items prior to re-sorting + * the video list and is cleared after sorting. + */ + RPointerArray iMarkedMediaList; + }; #endif // VCXHGMYVIDEOSVIDEOMODELHANDLER_H diff -r 8970fbd719ec -r 7f2b2a65da29 videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp --- a/videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videocollection/hgmyvideos/src/vcxhgmyvideosmainview.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ */ -// Version : %version: 39 % +// Version : %version: 42 % // INCLUDE FILES #include @@ -459,7 +459,8 @@ case EVcxHgMyVideosCmdUnmark: case EVcxHgMyVideosCmdMarkAll: case EVcxHgMyVideosCmdUnmarkAll: - case EVcxHgMyVideosCmdToggleMultipleMarking: + case EVcxHgMyVideosCmdToggleMultipleMarking: + case EVcxHgMyVideosCmdMarkContext: { VideoListL()->HandleMarkCommandL( aCommand ); } @@ -624,6 +625,8 @@ aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdShowViaHomenet, ETrue ); #ifdef RD_VIDEO_AS_RINGING_TONE aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdAiwAssign, ETrue ); +#else + aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMarkContext, ETrue ); #endif aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdOpen, ETrue ); aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdPlay, ETrue ); diff -r 8970fbd719ec -r 7f2b2a65da29 videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp --- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideolistimpl.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -625,6 +625,12 @@ EndMarkingMode(); break; } + case EVcxHgMyVideosCmdMarkContext: + { + iVideoModel->HandleMarkCommandL( EVcxHgMyVideosCmdMark ); + StartMarkingMode(); + break; + } default: break; } @@ -749,6 +755,9 @@ // Hide Assign (use as) menu item aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdAiwAssign, ETrue ); } +#else + // Context sensitive Mark + aMenuPane->SetItemDimmed( EVcxHgMyVideosCmdMarkContext, IsMarking() ); #endif // Marking submenu diff -r 8970fbd719ec -r 7f2b2a65da29 videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp --- a/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videocollection/hgmyvideos/src/vcxhgmyvideosvideomodelhandler.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -141,6 +141,7 @@ CVcxHgMyVideosVideoModelHandler::~CVcxHgMyVideosVideoModelHandler() { iResumeArray.Close(); + iMarkedMediaList.Close(); delete iVideoDetails; delete iVideoIndicator; @@ -186,9 +187,9 @@ TRAP_IGNORE( iDownloadUpdater->SetPausedL( ETrue ) ); iModel.CollectionClient().SetVideoModelObserver( NULL ); iScroller.DisableScrollBuffer(); - + TRAP_IGNORE( SaveHighlightedItemIdL() ); - + IPTVLOGSTRING_LOW_LEVEL( "MPX My Videos UI # CVcxHgMyVideosVideoModelHandler::DoModelDeactivate() - Exit" ); } @@ -198,7 +199,7 @@ // ----------------------------------------------------------------------------- // void CVcxHgMyVideosVideoModelHandler::SaveHighlightedItemIdL() - { + { iHighlightedItemId = iVideoArray->ArrayIndexToMpxItemIdL( Highlight() ); } @@ -248,8 +249,14 @@ iDownloadUpdater->SetPausedL( ETrue ); TVcxMyVideosSortingOrder sortOrder = iModel.VideolistSortOrderL(); + + if ( iVideoListImpl.IsMarking() ) + { + SaveMarkingsL(); + } + iVideoArray->ResortVideoListL( sortOrder ); - + TInt highlight = iScroller.SelectedIndex(); ResetScrollerBufferAndItemsL(); @@ -258,6 +265,11 @@ iView.DynInitMskL(); + if ( iVideoListImpl.IsMarking() ) + { + RestoreMarkingsL(); + } + iDownloadUpdater->VideoArrayChangedL(); iDownloadUpdater->SetPausedL( EFalse ); @@ -1053,8 +1065,15 @@ // Last item has deleted, set empty text and reset list. iVideoListImpl.SetEmptyListTextByResourceL( R_VCXHGMYVIDEOS_NO_VIDEOS ); iScroller.Reset(); + + // End marking mode for empty list + if ( iVideoListImpl.IsMarking() ) + { + iVideoListImpl.EndMarkingMode(); + iView.DynInitRskL(); + } } - + // fix for error where highlight was sometimes lost after delete. Problem is // that someone is 'stealing' keyboard focus from the scroller (probably the // confirmation note, as user needs to clicks them to start the delete). @@ -1194,16 +1213,16 @@ if ( videoCount > 0 ) { ResizeScrollerL( videoCount ); - + TInt highlight( KErrNotFound ); - + if ( iRestoreHighlightPosition ) { highlight = iVideoArray->IndexByMPXItemId( iHighlightedItemId ); } highlight != KErrNotFound ? iScroller.SetSelectedIndex( highlight ) : - iScroller.SetSelectedIndex( 0 ); + iScroller.SetSelectedIndex( 0 ); } else { @@ -1482,3 +1501,55 @@ iScroller.ResizeL( aNewItemCount ); } } + +// ----------------------------------------------------------------------------- +// CVcxHgMyVideosVideoModelHandler::SaveMarkingsL() +// ----------------------------------------------------------------------------- +// +void CVcxHgMyVideosVideoModelHandler::SaveMarkingsL() + { + // Get marked list item indexes + RArray markedVideos; + CleanupClosePushL( markedVideos ); + MarkedVideosL( markedVideos ); + TInt markedCount( markedVideos.Count() ); + + iMarkedMediaList.Reset(); + iMarkedMediaList.ReserveL( markedCount ); + + TInt markedIndex; + + for ( TInt i = 0; i MPXMedia( markedIndex ); + iMarkedMediaList.Append( media ); + iScroller.ItemL( markedIndex ).ClearFlags( CHgItem::EHgItemFlagMarked ); + IPTVLOGSTRING3_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::SaveMarkingsL() marked index = %d CMPXMedia = 0x%08x", markedIndex, media ); + } + + CleanupStack::PopAndDestroy( &markedVideos ); + } + +// ----------------------------------------------------------------------------- +// CVcxHgMyVideosVideoModelHandler::RestoreMarkingsL() +// ----------------------------------------------------------------------------- +// +void CVcxHgMyVideosVideoModelHandler::RestoreMarkingsL() + { + TInt videoCount = iVideoArray->VideoCount(); + TInt found( KErrNotFound ); + + for ( TInt i = 0; i < videoCount; i++ ) + { + CMPXMedia* media = iVideoArray->MPXMedia( i ); + found = iMarkedMediaList.Find( media ); + if ( KErrNotFound != found ) + { + iScroller.ItemL( i ).SetFlags( CHgItem::EHgItemFlagMarked ); + } + IPTVLOGSTRING4_LOW_LEVEL( "CVcxHgMyVideosVideoModelHandler::RestoreMarkingsL() list index = %d CMPXMedia = 0x%08x found = %d", i, media, found ); + } + + iMarkedMediaList.Reset(); + } diff -r 8970fbd719ec -r 7f2b2a65da29 videocollection/mpxmyvideoscollection/src/vcxmyvideoscollectionplugin.cpp --- a/videocollection/mpxmyvideoscollection/src/vcxmyvideoscollectionplugin.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videocollection/mpxmyvideoscollection/src/vcxmyvideoscollectionplugin.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -45,11 +45,6 @@ const TInt KMaxFileDeleteAttempts = 4; const TInt KFileDeleteLoopDelay = 100000; -// Add 2000 new videos to memory card. Reboot phone, mds starts harvesting, -// open my videos -> mds server crashes and lots of events is sent to client. -// If one waits until all are harvested before opening my videos, it works. - - // ============================ MEMBER FUNCTIONS ============================== // ---------------------------------------------------------------------------- diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/inc/mpxvideobaseplaybackview.h --- a/videoplayback/inc/mpxvideobaseplaybackview.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/inc/mpxvideobaseplaybackview.h Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 19 % +// Version : %version: 21 % // This file defines the API for VideoBasePlaybackView.dll @@ -208,11 +208,6 @@ inline void HandleOpenL( const CMPXCollectionPlaylist& /*aPlaylist*/, TInt /*aError*/ ) {} - /* - * Handle actions when the surface is being removed - */ - void RemoveBackgroundSurfaceL(); - public: /** * Set property @@ -235,6 +230,8 @@ */ virtual void HandleStoppedStateL() = 0; + virtual void HandleInitializingStateL( TMPXPlaybackState aLastState ) = 0; + virtual void HandlePluginErrorL( TInt aError ); virtual void ClosePlaybackViewL(); @@ -247,7 +244,6 @@ void DisplayInfoMessageL( TInt aResourceId, TBool aWaitingDialog = EFalse ); void DisplayErrorMessageL( TInt aResourceId ); - CMPXVideoBasePlaybackView(); /* @@ -287,6 +283,10 @@ TInt RetrieveBufferingPercentageL(); + void DoHandleInitializingStateL( TMPXPlaybackState aLastState ); + + TBool IsMultiItemPlaylist(); + private: /** @@ -309,7 +309,6 @@ void SetVideoRectL(); - void DisplayFileDetailsDialogL(); /** @@ -347,7 +346,7 @@ void ShowFileDetailsDialogL(); void HandleDrmErrorsL( TInt aError ); - TBool IsMultiItemPlaylist(); + TInt OpenDrmFileHandleL( RFile& aFile ); void LaunchDRMDetailsL(); @@ -355,6 +354,8 @@ void SendWindowCommandL( TMPXVideoPlaybackCommand aCmd ); + TBool IsInMemoryPlugin(); + #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API TInt OpenDrmFileHandle64L( RFile64& aFile ); #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API @@ -382,8 +383,6 @@ TBool iPdlReloading; TBool iRealOneDelayedPlay; TBool iKeyboardInFocus; - - HBufC* iClipName; }; #endif // __VIDEOBASEPLAYBACKVIEW_H__ diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/inc/mpxvideopdlplaybackview.h --- a/videoplayback/inc/mpxvideopdlplaybackview.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/inc/mpxvideopdlplaybackview.h Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 6 % +// Version : %version: 7 % // This file defines the API for VideoPlaybackView.dll @@ -73,6 +73,8 @@ void HandleBufferingStateL(); + void HandleInitializingStateL( TMPXPlaybackState aLastState ); + private: CMPXVideoPdlPlaybackView(); diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/inc/mpxvideoplaybackcontrol.hrh --- a/videoplayback/inc/mpxvideoplaybackcontrol.hrh Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/inc/mpxvideoplaybackcontrol.hrh Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 9 % +// Version : %version: 10 % #ifndef MPXVIDEOPLAYBACKCONTROL_HRH_ @@ -100,7 +100,8 @@ EMPXControlCmdCloseFileDetailsViewer, EMPXControlCmdHideControls, EMPXControlCmdSurfaceCreated, - EMPXControlCmdSurfaceRemoved + EMPXControlCmdSurfaceRemoved, + EMPXControlCmdLoadingStarted }; enum TMPXVideoSeekingType diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/inc/mpxvideoplaybackcontrolscontroller.h --- a/videoplayback/inc/mpxvideoplaybackcontrolscontroller.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/inc/mpxvideoplaybackcontrolscontroller.h Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: e003sa33#11 % +// Version : %version: e003sa33#14 % #ifndef MPXVIDEOPLAYBACKCONTROLSCONTROLLER_H_ @@ -139,9 +139,12 @@ inline TBool IsRealMediaFormat(); /** - * Check if video clip's aspect ratio is equal to screen display aspect ratio + * Check aspect ratio icon + * In case that Clip's AR is equals to Screen Display AR, also hide AR icon. + * + * @return ETrue in case that clip's AspectRatioIcon can be shown */ - TBool IsSameAspectRatio(); + TBool ShowAspectRatioIcon(); private: /** @@ -338,6 +341,18 @@ */ void CloseMediaDetailsViewer(); + /* + * Handles the Loading Started command that was received after Buffering state was + * blocked by the playback view + */ + void HandleLoadingStarted(); + + /* + * This will cause the controls to be updated when the surface changes and the + * controls are visible. + */ + void RedrawControlsForSurfaceChanges(); + private: CMPXVideoPlaybackControlPolicy* iControlsPolicy; diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/inc/mpxvideoplaybackdisplayhandler.h --- a/videoplayback/inc/mpxvideoplaybackdisplayhandler.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/inc/mpxvideoplaybackdisplayhandler.h Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 9 % +// Version : %version: 10 % #ifndef __CMPXVIDEOPLAYBACKDISPLAYHANDLER_H__ @@ -65,9 +65,9 @@ void CreateDisplayWindowL( CWsScreenDevice& aScreenDevice, RWindow& aWin ); - void RemoveDisplayWindow( TBool aSignalPlaybackPlugin = ETrue ); + void RemoveDisplayWindow(); - void HandleVideoDisplaySyncMessageL( CMPXMessage* aMessage ); + void HandleVideoDisplayMessageL( CMPXMessage* aMessage ); TInt SetAspectRatioL( TMPXVideoPlaybackCommand aCmd ); diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/inc/mpxvideoplaybackuserinputhandler.h --- a/videoplayback/inc/mpxvideoplaybackuserinputhandler.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/inc/mpxvideoplaybackuserinputhandler.h Tue Apr 27 16:40:33 2010 +0300 @@ -15,8 +15,8 @@ * */ -// Version : %version: ou1cpsw#7 % +// Version : %version: 8 % #ifndef MPXVIDEOPLAYBACKUSERINPUTHANDLER_H_ @@ -103,9 +103,7 @@ * @return void */ void SetForeground(TBool aForeground); - - - + private: /** * Handles volume repeat timer timout @@ -130,8 +128,7 @@ void ReRoutePointerEventL(CCoeControl* aControl, const TPointerEvent& aPointerEvent, TMPXVideoControlType aMPXControl); - - + private: TMPXVideoUserInputType iProcessingInputType; // the type of input being processed @@ -145,10 +142,10 @@ CPeriodic* iVolumeRepeatTimer; // owned TBool iVolumeRepeatUp; TBool iForeground; - - CMPXVideoPlaybackContainer* iContainer; // not owned - + CMPXVideoPlaybackContainer* iContainer; // not owned + CCoeControl* iActiveControlPtr; // not owned + TMPXVideoControlType iActiveControlType; }; diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/inc/mpxvideoplaybackview.h --- a/videoplayback/inc/mpxvideoplaybackview.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/inc/mpxvideoplaybackview.h Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 4 % +// Version : %version: 5 % // This file defines the API for VideoPlaybackView.dll @@ -77,6 +77,8 @@ */ void HandleStoppedStateL(); + void HandleInitializingStateL( TMPXPlaybackState aLastState ); + private: CMPXVideoPlaybackView(); diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/inc/mpxvideofiledetails.h --- a/videoplayback/videohelix/inc/mpxvideofiledetails.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/inc/mpxvideofiledetails.h Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 8 % +// Version : %version: 9 % @@ -69,7 +69,9 @@ TInt iResolutionHeight; TInt iMaxVolume; TInt iBitRate; - + TInt iCreationTime; + TInt iModificationTime; + TBool iSeekable; TBool iPausableStream; TBool iLiveStream; diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h --- a/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/inc/mpxvideoplaybackcontroller.h Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 22 % +// Version : %version: 24 % #ifndef _CMPXVIDEOPLAYBACKCONTROLLER_H_ @@ -132,6 +132,8 @@ void SetVolumeSteps( TInt aVolumeSteps ); void HandleVolumeL( TBool aIncrease ); + void SendHideControlsEventL(); + #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API void OpenFile64L( const TDesC& aMediaFile, RFile64& aFile, TInt aPosition, TInt aAccessPointId = KUseDefaultIap ); @@ -184,7 +186,7 @@ CHWRMLight* GetLightsL(); void ReleaseLights(); - TBool SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed ); + void SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed ); protected: diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/inc/mpxvideoplayerutility.h --- a/videoplayback/videohelix/inc/mpxvideoplayerutility.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/inc/mpxvideoplayerutility.h Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 10 % +// Version : %version: 11 % #ifndef __MPXVIDEOPLAYERUTILITY__ @@ -123,8 +123,6 @@ const TSurfaceId& aSurfaceId, const TRect& aCropRect, TVideoAspectRatio aAspectRatio ); - - void SurfaceRemovedFromView(); #endif diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/src/mpxvideoaccessoryobserver.cpp --- a/videoplayback/videohelix/src/mpxvideoaccessoryobserver.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/src/mpxvideoaccessoryobserver.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 7 % +// Version : %version: 8 % // // INCLUDE FILES @@ -133,7 +133,6 @@ MPX_DEBUG(_L("CMPXVideoAccessoryObserver::UpdateTvOutStatusL()")); TBool statusChanged = EFalse; - TBool tvOutHDMI = EFalse; // // Initialize TV-Out value to EFalse before checking if @@ -168,23 +167,7 @@ { MPX_DEBUG(_L(" TV-Out Capabilities Exist")); - tvOutConnected = ETrue; - - TAccPolNameRecord nameRecord; - nameRecord.SetNameL( KAccVideoOut ); - TAccValueTypeTInt value; - iConnection.GetValueL( genId, nameRecord, value ); - - if ( value.iValue == EAccVideoOutEHDMI ) - { - tvOutHDMI = ETrue; - // - // HDMI has precedence over Comp TV-Out, If the accessory is - // HDMI then stop the search for Video Out accessory, else continue - // looping through all the accessories. - // - break; - } + tvOutConnected = ETrue; } } @@ -198,7 +181,7 @@ { iTvOutConnected = tvOutConnected; - if ( iTvOutConnected && !tvOutHDMI) + if ( iTvOutConnected ) { // // Check the playablility of the clip @@ -213,7 +196,7 @@ statusChanged = ETrue; } - MPX_DEBUG(_L("CMPXVideoAccessoryObserver::UpdateTvOutStatusL iTvOutConnected = %d, tvOutHDMI = %d"), iTvOutConnected, tvOutHDMI); + MPX_DEBUG(_L("CMPXVideoAccessoryObserver::UpdateTvOutStatusL iTvOutConnected = %d"), iTvOutConnected); MPX_DEBUG(_L("CMPXVideoAccessoryObserver::UpdateTvOutStatusL() ret = %d"), statusChanged); diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/src/mpxvideofiledetails.cpp --- a/videoplayback/videohelix/src/mpxvideofiledetails.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/src/mpxvideofiledetails.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 10 % +// Version : %version: 11 % @@ -126,6 +126,8 @@ iFourCCCode = 0; iDuration = 0; + iCreationTime = 0; + iModificationTime = 0; } // EOF diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp --- a/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/src/mpxvideoplaybackcontroller.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 52 % +// Version : %version: 56 % // @@ -86,6 +86,8 @@ _LIT( KRightCopy, "Copyright" ); _LIT( KLanguage, "Language" ); _LIT( KKeywords, "Keywords" ); +_LIT( KCreated, "CreationTime" ); +_LIT( KLastModified, "ModificationTime" ); // ============================ MEMBER FUNCTIONS =================================================== @@ -546,15 +548,6 @@ break; } - case EPbCmdSurfaceRemoved: - { - iPlayer->SurfaceRemovedFromView(); - break; - } - default: - { - break; - } } } } @@ -1451,6 +1444,16 @@ { iFileDetails->iKeywords = metaData->Value().AllocL(); } + else if ( !metaData->Name().CompareF( KCreated ) ) + { + TLex lex( metaData->Value() ); + lex.Val( iFileDetails->iCreationTime ); + } + else if ( !metaData->Name().CompareF( KLastModified ) ) + { + TLex lex( metaData->Value() ); + lex.Val( iFileDetails->iModificationTime ); + } CleanupStack::PopAndDestroy( metaData ); } @@ -1770,7 +1773,7 @@ // CMPXVideoPlaybackController::SendTvOutEventL // ------------------------------------------------------------------------------------------------- // -TBool CMPXVideoPlaybackController::SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed ) +void CMPXVideoPlaybackController::SendTvOutEventL( TBool aConnected, TBool aPlaybackAllowed ) { MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::SendTvOutEventL()")); @@ -1792,6 +1795,31 @@ CleanupStack::PopAndDestroy( message ); } +// ------------------------------------------------------------------------------------------------- +// CMPXVideoPlaybackController::SendHideControlsEventL +// ------------------------------------------------------------------------------------------------- +// +void CMPXVideoPlaybackController::SendHideControlsEventL() +{ + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackController::SendHideControlsEventL()")); + + // + // Send notice to the playback view to hide the controls + // when key lock + // + CMPXMessage* message = CMPXMessage::NewL(); + CleanupStack::PushL( message ); + + message->SetTObjectValueL( KMPXMessageGeneralId, KMPXMediaIdVideoPlayback ); + + message->SetTObjectValueL + ( KMPXMediaVideoPlaybackCommand, EPbCmdHideControls ); + + iMPXPluginObs->HandlePlaybackMessage( message, KErrNone ); + + CleanupStack::PopAndDestroy( message ); +} + // ------------------------------------------------------------------------------------------------ // CMPXVideoPlaybackController::HandleTvOutEventL() // ------------------------------------------------------------------------------------------------ diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/src/mpxvideoplaybackmode.cpp --- a/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/src/mpxvideoplaybackmode.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 22 % +// Version : %version: 23 % @@ -179,12 +179,17 @@ if ( iVideoPlaybackCtlr->iAppInForeground ) { - if ( iVideoPlaybackCtlr->IsAlarm() || - ( iVideoPlaybackCtlr->IsKeyLocked() && iVideoPlaybackCtlr->iFileDetails->iVideoEnabled ) ) + if ( iVideoPlaybackCtlr->IsAlarm() ) { iVideoPlaybackCtlr->iForegroundPause = ETrue; iVideoPlaybackCtlr->iState->HandlePause(); } + else if ( iVideoPlaybackCtlr->IsKeyLocked() && iVideoPlaybackCtlr->iFileDetails->iVideoEnabled ) + { + iVideoPlaybackCtlr->iForegroundPause = ETrue; + iVideoPlaybackCtlr->iState->HandlePause(); + iVideoPlaybackCtlr->SendHideControlsEventL(); + } else if ( iVideoPlaybackCtlr->IsPhoneCall() || iVideoPlaybackCtlr->IsVideoCall() ) { iVideoPlaybackCtlr->iForegroundPause = EFalse; diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/src/mpxvideoplaybackstate.cpp --- a/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/src/mpxvideoplaybackstate.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,8 @@ * */ -// Version : %version: 37 % + +// Version : %version: 39 % // @@ -577,6 +578,27 @@ TMPXAttribute( KMPXMediaVideoKeywords ), *( iVideoPlaybackCtlr->iFileDetails->iKeywords ) ); } + + // + // Creation date/time + // + if ( attrV & KMPXMediaVideoCreated.iAttributeId ) + { + aMedia->SetTObjectValueL( + TMPXAttribute( KMPXMediaVideoCreated ), + iVideoPlaybackCtlr->iFileDetails->iCreationTime ); + } + + // + // Last Modified date/time + // + if ( attrV & KMPXMediaVideoLastModified.iAttributeId ) + { + aMedia->SetTObjectValueL( + TMPXAttribute( KMPXMediaVideoLastModified ), + iVideoPlaybackCtlr->iFileDetails->iModificationTime ); + } + } // ------------------------------------------------------------------------------------------------ @@ -1716,17 +1738,32 @@ } // ------------------------------------------------------------------------------------------------ -// CMPXBufferingState::HandleLoadingStarted() -// -// We transition to Buffering state after Play command is issued initially -// -// No state transitions necessary here as we are already in Buffering state +// CMPXBufferingState::HandleLoadingStarted() // ------------------------------------------------------------------------------------------------ void CMPXBufferingState::HandleLoadingStarted() { MPX_DEBUG(_L("CMPXBufferingState::HandleLoadingStarted()")); - // no need to send any events - we are already in buffering state + TInt loadingPercentage = RetrieveBufferingPercentage(); + + if ( loadingPercentage < 100 ) + { + MPX_TRAPD( err, + { + CMPXMessage* message = CMPXMessage::NewL(); + CleanupStack::PushL( message ); + + message->SetTObjectValueL( KMPXMessageGeneralId, + KMPXMediaIdVideoPlayback ); + + message->SetTObjectValueL( KMPXMediaVideoPlaybackCommand, + EPbCmdLoadingStarted ); + + iVideoPlaybackCtlr->iMPXPluginObs->HandlePlaybackMessage( message, KErrNone ); + + CleanupStack::PopAndDestroy( message ); + } ); + } } // ------------------------------------------------------------------------------------------------ diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/src/mpxvideoplayerutility.cpp --- a/videoplayback/videohelix/src/mpxvideoplayerutility.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/src/mpxvideoplayerutility.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,8 @@ * */ -// Version : %version: e003sa33#19 % + +// Version : %version: 20 % #include @@ -79,11 +80,7 @@ iControllerEventMonitor = NULL; } - if ( ! iSurfaceId.IsNull() ) - { - MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoRemoveDisplayWindow ) ); - iSurfaceId = TSurfaceId::CreateNullId(); - } + iSurfaceId = TSurfaceId::CreateNullId(); iController.Close(); iDirectScreenAccessAbort = EFalse; @@ -280,21 +277,6 @@ } } - -// ------------------------------------------------------------------------------------------------- -// CMpxVideoPlayerUtility::SurfaceRemovedFromView() -// ------------------------------------------------------------------------------------------------- -// -void CMpxVideoPlayerUtility::SurfaceRemovedFromView() -{ - MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::SurfaceRemovedFromView()")); - - if ( ! iSurfaceId.IsNull() ) - { - iSurfaceId = TSurfaceId::CreateNullId(); - } -} - TBool CMpxVideoPlayerUtility::AudioEnabledL() const { TBool enabled; @@ -498,40 +480,35 @@ { MPX_ENTER_EXIT(_L("CMpxVideoPlayerUtility::VideoSurfaceCreated()")); - TSurfaceId oldSurfaceId( iSurfaceId ); - TBool replaceSurface = ! ( iSurfaceId.IsNull() ); - - TSurfaceId surfaceId; - TRect cropRect; - TVideoAspectRatio aspectRatio; + TInt error = KErrNone; - TInt error = - iVideoPlaySurfaceSupportCustomCommands.GetSurfaceParameters( surfaceId, - cropRect, - aspectRatio ); - - if ( error == KErrNone ) + if ( iSurfaceId.IsNull() ) { - // - // Send data to the display handler to remove old surface and add new surface - // - MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceCreated, - surfaceId, - cropRect, - aspectRatio ) ); + TSurfaceId surfaceId; + TRect cropRect; + TVideoAspectRatio aspectRatio; - iSurfaceId = surfaceId; + error = iVideoPlaySurfaceSupportCustomCommands.GetSurfaceParameters( surfaceId, + cropRect, + aspectRatio ); - // - // if surface already existed tell video adaptation it is no longer in use. - // Video adaptation will remove the surface when it receives this call therefore - // the following code must be done at the end of this function. - // - if ( replaceSurface ) + if ( error == KErrNone ) { - error = iVideoPlaySurfaceSupportCustomCommands.SurfaceRemoved( oldSurfaceId ); + // + // Send data to the display handler to remove old surface and add new surface + // + MPX_TRAPD( err, SendSurfaceCommandL( EPbMsgVideoSurfaceCreated, + surfaceId, + cropRect, + aspectRatio ) ); + + iSurfaceId = surfaceId; } } + else + { + error = KErrAlreadyExists; + } return error; } @@ -619,10 +596,10 @@ CMPXMessage* msg = CMPXMessage::NewL(); CleanupStack::PushL( msg ); - msg->SetTObjectValueL( KMPXMessageGeneralId, KMPXMediaIdVideoDisplaySyncMessage ); + msg->SetTObjectValueL( KMPXMessageGeneralId, KMPXMediaIdVideoDisplayMessage ); msg->SetTObjectValueL( KMPXMediaVideoDisplayCommand, aCmd ); - iVideoPlaybackController->iMPXPluginObs->HandlePlaybackSyncMessage( *msg ); + iVideoPlaybackController->iMPXPluginObs->HandlePlaybackMessage( *msg ); CleanupStack::PopAndDestroy( msg ); } @@ -645,13 +622,13 @@ CMPXMessage* msg = CMPXMessage::NewL(); CleanupStack::PushL( msg ); - msg->SetTObjectValueL( KMPXMessageGeneralId, KMPXMediaIdVideoDisplaySyncMessage ); + msg->SetTObjectValueL( KMPXMessageGeneralId, KMPXMediaIdVideoDisplayMessage ); msg->SetTObjectValueL( KMPXMediaVideoDisplayCommand, aCmd ); msg->SetTObjectValueL( KMPXMediaVideoDisplayTSurfaceId, aSurfaceId ); msg->SetTObjectValueL( KMPXMediaVideoDisplayCropRect, aCropRect ); msg->SetTObjectValueL( KMPXMediaVideoDisplayAspectRatio, aAspectRatio ); - iVideoPlaybackController->iMPXPluginObs->HandlePlaybackSyncMessage( *msg ); + iVideoPlaybackController->iMPXPluginObs->HandlePlaybackMessage( *msg ); CleanupStack::PopAndDestroy( msg ); } diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg --- a/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/conf/videohelixtest.cfg Tue Apr 27 16:40:33 2010 +0300 @@ -821,22 +821,7 @@ [Endtest] [Test] -title 54. HDMI Tv-Out - Unprotected Content -create videohelixtest test -test Initialize 60000 10 vhpp_test.3gp KErrNone KErrNone KErrNone -waittestclass test -pause 100 -test ConnectHDMITvOut -waittestclass test -test DisconnectHDMITvOut -waittestclass test -delete test -pause 1000 -[Endtest] - - -[Test] -title 55. InitialiseWithPositionL with file missing +title 54. InitialiseWithPositionL with file missing create videohelixtest test test InitializeWithPositionL 0 10 6575 vhpp_nofile.3gp KErrNotFound KErrNone KErrNone waittestclass test @@ -847,7 +832,7 @@ [Endtest] [Test] -title 56. InitialiseL with 32-bit file handle +title 55. InitialiseL with 32-bit file handle create videohelixtest test test InitializeHandleWithPositionL ERFile 60000 10 6575 vhpp_test.3gp KErrNone KErrNone KErrNone waittestclass test @@ -856,7 +841,7 @@ [Endtest] [Test] -title 57. Initialise with rtsp link & AP +title 56. Initialise with rtsp link & AP create videohelixtest test test InitializeLinkWithPositionL 0 10 6575 rtsp:\/\/link.3gp KErrNone KErrNone KErrNone waittestclass test @@ -865,7 +850,7 @@ [Endtest] [Test] -title 58. Play rtsp link (forces buffering state) +title 57. Play rtsp link (forces buffering state) create videohelixtest test test InitializeLinkWithPositionL 0 10 6575 rtsp:\/\/link.3gp KErrNone KErrNone KErrNone waittestclass test @@ -876,7 +861,7 @@ [Endtest] [Test] -title 59. Initialise with SDP file via 32-bit file handle +title 58. Initialise with SDP file via 32-bit file handle create videohelixtest test test InitializeHandleWithPositionL ERFile 60000 10 6575 sdp_test.sdp KErrNone KErrNone KErrNone waittestclass test @@ -885,7 +870,7 @@ [Endtest] [Test] -title 60. InitialiseL with 64-bit file handle +title 59. InitialiseL with 64-bit file handle create videohelixtest test test InitializeHandleWithPositionL ERFile64 60000 10 6575 vhpp_test.3gp KErrNone KErrNone KErrNone waittestclass test @@ -894,7 +879,7 @@ [Endtest] [Test] -title 61. Initialise with SDP file via 64-bit file handle +title 60. Initialise with SDP file via 64-bit file handle create videohelixtest test test InitializeHandleWithPositionL ERFile64 60000 10 6575 sdp_test.sdp KErrNone KErrNone KErrNone waittestclass test diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoaccessoryobserver_stub.h --- a/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoaccessoryobserver_stub.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoaccessoryobserver_stub.h Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 4 % +// Version : %version: 5 % @@ -74,7 +74,6 @@ void UpdateTvOutStatusL( TBool aTvOutConnected ); void SetTvOutConnected( TBool aConnected ); void SetTvOutPlaybackAllowed( TBool aAllowed ); - void SetTvOutHDMI( TBool aTvOutHDMI ); private: @@ -95,7 +94,6 @@ CMPXVideoPlaybackController* iController; TBool iTvOutConnected; TBool iTvOutPlaybackAllowed; - TBool iTvOutHDMI; }; #endif // MPXVIDEOACCESSORYOBSERVER_H diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoplayerutility_stub.h --- a/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoplayerutility_stub.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/mpxvideoplayerutility_stub.h Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 11 % +// Version : %version: 12 % #ifndef __MPXVIDEOPLAYERUTILITY__ @@ -170,6 +170,8 @@ TInt iAudioBitRate; TInt iVideoBitRate; TInt iVolume; + TInt iCreationTime; + TInt iModificationTime; TBool iAudioEnabled; TBool iSeekable; diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h --- a/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/inc/videohelixtest.h Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 12 % +// Version : %version: 13 % #ifndef __VHPPTESTCASE_H__ @@ -170,9 +170,6 @@ virtual TInt SetDrmProtectedL( CStifItemParser& aItem ); virtual TInt IssueSeekedToEndCommandL( CStifItemParser& aItem ); virtual TInt HandleVolumeL( CStifItemParser& aItem ); - virtual TInt ConnectHDMITvOutL(); - virtual TInt DisconnectHDMITvOutL(); - virtual TInt SetHDMITvOutConnectedL(); virtual TInt InitializeWithPositionL( CStifItemParser& aItem ); virtual TInt InitializeLinkWithPositionL( CStifItemParser& aItem ); virtual TInt InitializeHandleWithPositionL( CStifItemParser& aItem ); diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoaccessoryobserver_stub.cpp --- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoaccessoryobserver_stub.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoaccessoryobserver_stub.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 4 % +// Version : %version: 5 % // // INCLUDE FILES @@ -65,7 +65,6 @@ : iController( aController ) , iTvOutConnected( EFalse ) , iTvOutPlaybackAllowed( ETrue ) - , iTvOutHDMI( EFalse ) { } @@ -105,12 +104,6 @@ if ( iTvOutConnected != aTvOutConnected ) { iTvOutConnected = aTvOutConnected; - - if ( iTvOutConnected && iTvOutHDMI) - { - // if HDMI playback is always allowed - iTvOutPlaybackAllowed = ETrue; - } iController->HandleTvOutEventL( iTvOutConnected ); } @@ -141,12 +134,4 @@ return playAllowed; } -void CMPXVideoAccessoryObserver::SetTvOutHDMI( TBool aTvOutHDMI ) -{ - MPX_ENTER_EXIT(_L("CMPXVideoAccessoryObserver::SetTvOutHDMI()"), - _L("aTvOutHDMI = %d"), aTvOutHDMI); - - iTvOutHDMI = aTvOutHDMI; -} - // End of File diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoplayerutility_stub.cpp --- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoplayerutility_stub.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/mpxvideoplayerutility_stub.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 13 % +// Version : %version: 15 % #include #include @@ -695,6 +695,16 @@ iKeywords = value.AllocL(); } + else if ( ! aItem.Compare(_L8("CreationTime")) ) + { + TLex8 lex(value); + lex.Val( iCreationTime ); + } + else if ( ! aItem.Compare(_L8("ModificationTime")) ) + { + TLex8 lex(value); + lex.Val( iModificationTime ); + } HBufC* name = HBufC::NewL( aItem.Length() ); TPtr namePtr( name->Des() ); @@ -743,10 +753,6 @@ return KErrNone; } -void CMpxVideoPlayerUtility::SurfaceRemovedFromView() -{ -} - #endif #ifdef SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp --- a/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videohelix/tsrc/ut_videohelixtest/src/videohelixtestbody.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 18 % +// Version : %version: 19 % // [INCLUDE FILES] - do not remove @@ -116,9 +116,6 @@ ENTRY( "SetDrmProtected", CVHPPTestClass::SetDrmProtectedL ), ENTRY( "IssueSeekedToEndCommand", CVHPPTestClass::IssueSeekedToEndCommandL), ENTRY( "HandleVolume", CVHPPTestClass::HandleVolumeL ), - ENTRY( "ConnectHDMITvOut", CVHPPTestClass::ConnectHDMITvOutL ), - ENTRY( "DisconnectHDMITvOut", CVHPPTestClass::DisconnectHDMITvOutL ), - ENTRY( "SetHDMITvOutConnected", CVHPPTestClass::SetHDMITvOutConnectedL ), ENTRY ("InitializeWithPositionL", CVHPPTestClass::InitializeWithPositionL), ENTRY ("InitializeLinkWithPositionL", CVHPPTestClass::InitializeLinkWithPositionL), @@ -2171,66 +2168,6 @@ return err; } -TInt -CVHPPTestClass::ConnectHDMITvOutL( ) -{ - MPX_ENTER_EXIT(_L("CVHPPTestClass::ConnectHDMITvOutL()")); - iLog->Log(_L("CVHPPTestClass::ConnectHDMITvOutL()")); - - // Connect HDMI TV Out - iAccObserver->SetTvOutHDMI( ETrue ); - - // - // Add event for callback - // - TCallbackEvent* event = new TCallbackEvent; - - event->iEvent = EPbCmdTvOutEvent; - event->iData = ETrue; - event->iError = ETrue; - - AddExpectedEvent( event ); - - iAccObserver->UpdateTvOutStatusL( ETrue ); - - return KErrNone; -} - -TInt -CVHPPTestClass::DisconnectHDMITvOutL() -{ - MPX_ENTER_EXIT(_L("CVHPPTestClass::DisconnectHDMITvOutL()")); - iLog->Log(_L("CVHPPTestClass::DisconnectHDMITvOutL()")); - - // Connect HDMI TV Out - iAccObserver->SetTvOutHDMI( EFalse ); - - // - // Add event for callback - // - TCallbackEvent* event = new TCallbackEvent; - - event->iEvent = EPbCmdTvOutEvent; - event->iData = EFalse; - event->iError = ETrue; - - AddExpectedEvent( event ); - - iAccObserver->UpdateTvOutStatusL( EFalse ); - - return KErrNone; -} - -TInt -CVHPPTestClass::SetHDMITvOutConnectedL() -{ - MPX_ENTER_EXIT(_L("CVHPPTestClass::SetHDMITvOutConnectedL()")); - iLog->Log(_L("CVHPPTestClass::SetHDMITvOutConnectedL()")); - - iAccObserver->SetTvOutHDMI( ETrue ); - - return KErrNone; -} TInt CVHPPTestClass::InitializeWithPositionL( CStifItemParser& aItem ) diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp --- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackbuttonbar.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: e003sa33#17 % +// Version : %version: 18 % @@ -395,7 +395,7 @@ iFeedback->InstantFeedback( ETouchFeedbackBasicButton ); #else iFeedback->InstantFeedback( ETouchFeedbackBasic ); -#endif //SYMBIAN_BUILD_GCE +#endif //SYMBIAN_BUILD_GCE } #endif //RD_TACTILE_FEEDBACK @@ -434,7 +434,7 @@ iFeedback->InstantFeedback( ETouchFeedbackBasicButton ); #else iFeedback->InstantFeedback( ETouchFeedbackBasic ); -#endif //SYMBIAN_BUILD_GCE +#endif //SYMBIAN_BUILD_GCE } #endif //RD_TACTILE_FEEDBACK iController->HandleCommandL( EMPXPbvCmdPause ); @@ -453,7 +453,7 @@ iFeedback->InstantFeedback( ETouchFeedbackBasicButton ); #else iFeedback->InstantFeedback( ETouchFeedbackBasic ); -#endif //SYMBIAN_BUILD_GCE +#endif //SYMBIAN_BUILD_GCE } #endif //RD_TACTILE_FEEDBACK iController->HandleCommandL( EMPXPbvCmdPlay ); @@ -485,7 +485,7 @@ iFeedback->InstantFeedback( ETouchFeedbackBasicButton ); #else iFeedback->InstantFeedback( ETouchFeedbackBasic ); -#endif //SYMBIAN_BUILD_GCE +#endif //SYMBIAN_BUILD_GCE } #endif //RD_TACTILE_FEEDBACK @@ -534,7 +534,7 @@ iFeedback->InstantFeedback( ETouchFeedbackBasicButton ); #else iFeedback->InstantFeedback( ETouchFeedbackSensitive ); -#endif //SYMBIAN_BUILD_GCE +#endif //SYMBIAN_BUILD_GCE } #endif //RD_TACTILE_FEEDBACK @@ -686,6 +686,8 @@ // void CMPXVideoPlaybackButtonBar::Reset() { + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackButtonBar::Reset()")); + if ( iSeeking ) { // Abandon the ongoing seek operation diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp --- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrol.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: e003sa33#20 % +// Version : %version: 21 % // INCLUDE FILES @@ -202,7 +202,8 @@ // void CMPXVideoPlaybackControl::HandlePointerEventL( const TPointerEvent& aPointerEvent ) { - MPX_DEBUG(_L("CMPXVideoPlaybackControl::HandlePointerEventL()")); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControl::HandlePointerEventL()"), + _L("iControlIndex = %d"), iControlIndex ); iController->iContainer->UserInputHandler()->ProcessPointerEventL( this, aPointerEvent, @@ -215,10 +216,31 @@ // EXPORT_C void CMPXVideoPlaybackControl::DoHandlePointerEventL( const TPointerEvent& aPointerEvent) { - MPX_DEBUG(_L("CMPXVideoPlaybackControl::DoHandlePointerEventL()")); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControl::DoHandlePointerEventL()"), + _L(" iControlIndex = %d, aPointerEvent.iType = %d"), + iControlIndex, aPointerEvent.iType ); if ( AknLayoutUtils::PenEnabled() ) { + if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) + { + iController->ResetDisappearingTimers( EMPXTimerCancel ); + + // + // Grab the pointer event for all controls so the events will not transfer to a + // different control as a dragging event occurs + // + SetPointerCapture( ETrue ); + ClaimPointerGrab( ETrue ); + } + else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) + { + iController->ResetDisappearingTimers( EMPXTimerReset ); + + SetPointerCapture( EFalse ); + ClaimPointerGrab( EFalse ); + } + switch( iControlIndex ) { case EMPXProgressBar: @@ -227,21 +249,6 @@ case EMPXAspectRatioIcon: case EMPXMediaDetailsViewer: { - if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) - { - iController->ResetDisappearingTimers( EMPXTimerCancel ); - - iControl->SetPointerCapture( ETrue ); - iControl->ClaimPointerGrab( ETrue ); - } - else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) - { - iController->ResetDisappearingTimers( EMPXTimerReset ); - - iControl->SetPointerCapture( EFalse ); - iControl->ClaimPointerGrab( EFalse ); - } - // // Pass an event to controller // @@ -562,9 +569,9 @@ { MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::ResetControl()")); - iControl->SetPointerCapture( EFalse ); - iControl->ClaimPointerGrab( EFalse ); - + SetPointerCapture( EFalse ); + ClaimPointerGrab( EFalse ); + switch( iControlIndex ) { case EMPXButtonBar: @@ -582,9 +589,6 @@ static_cast(iControl)->Reset(); break; } - case EMPXAspectRatioIcon: - default: - break; } } diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolconfiguration.cpp --- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolconfiguration.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolconfiguration.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: e003sa33#13 % +// Version : %version: e003sa33#14 % // INCLUDE FILES @@ -200,9 +200,7 @@ iTitleArtistIndicatorsAdded = EFalse; } - if ( ! iAspectRatioIconAdded && - iControlsController->FileDetails()->iVideoHeight > 0 && - iControlsController->FileDetails()->iVideoWidth > 0 ) + if ( ! iAspectRatioIconAdded && iControlsController->ShowAspectRatioIcon() ) { iControlsList.AppendL( EMPXAspectRatioIcon ); iAspectRatioIconAdded = ETrue; @@ -291,16 +289,7 @@ iTitleArtistIndicatorsAdded = EFalse; } - // - // If video is enabled, - // if video has not same aspect ratio with phone screenadd then - // add aspect ratio icon - // - if ( ! iAspectRatioIconAdded && - fileDetails->iVideoHeight > 0 && - fileDetails->iVideoWidth > 0 && - ! ( iControlsController->IsSameAspectRatio() ) && - AknLayoutUtils::PenEnabled() ) + if ( ! iAspectRatioIconAdded && iControlsController->ShowAspectRatioIcon() ) { iControlsList.AppendL( EMPXAspectRatioIcon ); iAspectRatioIconAdded = ETrue; diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp --- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackcontrolscontroller.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 32 % +// Version : %version: e003sa33#36 % // INCLUDE FILES @@ -160,7 +160,7 @@ // EXPORT_C CMPXVideoPlaybackControlsController::~CMPXVideoPlaybackControlsController() { - MPX_DEBUG(_L("CMPXVideoPlaybackControlsController::~CMPXVideoPlaybackControlsController")); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::~CMPXVideoPlaybackControlsController")); iFs.Close(); @@ -374,11 +374,18 @@ { iSurfaceCreated = ETrue; SetRealOneBitmapVisibility( EFalse ); + RedrawControlsForSurfaceChanges(); break; } case EMPXControlCmdSurfaceRemoved: { iSurfaceCreated = EFalse; + RedrawControlsForSurfaceChanges(); + break; + } + case EMPXControlCmdLoadingStarted: + { + HandleLoadingStarted(); break; } } @@ -1938,33 +1945,70 @@ } // ------------------------------------------------------------------------------------------------- -// CMPXVideoPlaybackControlsController::IsSameAspectRatio +// CMPXVideoPlaybackControlsController::ShowAspectRatioIcon // ------------------------------------------------------------------------------------------------- // -TBool CMPXVideoPlaybackControlsController::IsSameAspectRatio() +TBool CMPXVideoPlaybackControlsController::ShowAspectRatioIcon() { - MPX_ENTER_EXIT( _L( "CMPXVideoPlaybackControlsController::IsSameAspectRatio()" ) ); - + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::ShowAspectRatioIcon()")); + TBool retVal = EFalse; if ( iFileDetails->iVideoEnabled && iFileDetails->iVideoHeight > 0 && - iFileDetails->iVideoWidth > 0 ) + iFileDetails->iVideoWidth > 0 && + AknLayoutUtils::PenEnabled() ) { TRect displayRect = iContainer->Rect(); TReal displayAspectRatio = ( TReal32 )displayRect.Width() / ( TReal32 )displayRect.Height(); - TReal videoAspectRatio = ( TReal32 )iFileDetails->iVideoWidth / + TReal videoAspectRatio = ( TReal32 )iFileDetails->iVideoWidth / ( TReal32 )iFileDetails->iVideoHeight; - if ( displayAspectRatio == videoAspectRatio ) + // If clip's AR is as same as screen display AR, AspectRatioIcon does not display. + if ( displayAspectRatio != videoAspectRatio ) { retVal = ETrue; } } - MPX_DEBUG( _L( "CMPXVideoPlaybackControlsController::IsSameAspectRatio(%d)" ), retVal ); - + MPX_DEBUG( _L( "CMPXVideoPlaybackControlsController::ShowAspectRatioIcon()[%d]" ), retVal ); + return retVal; } +// ------------------------------------------------------------------------------------------------- +// CMPXVideoPlaybackControlsController::HandleLoadingStarted +// ------------------------------------------------------------------------------------------------- +// +void CMPXVideoPlaybackControlsController::HandleLoadingStarted() +{ + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::HandleLoadingStarted()")); + + if ( iState != EPbStateBuffering ) + { + iState = EPbStateBuffering; + UpdateStateOnButtonBar(); + UpdateControlsVisibility(); + } +} + +// ------------------------------------------------------------------------------------------------- +// CMPXVideoPlaybackControlsController::RedrawControlsForSurfaceChanges +// ------------------------------------------------------------------------------------------------- +// +void CMPXVideoPlaybackControlsController::RedrawControlsForSurfaceChanges() +{ + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackControlsController::RedrawControlsForSurfaceChanges()")); + + // + // A surface has been added or removed. + // If the controls are visible, redraw them with the new transparency value. + // + if ( IsVisible() ) + { + UpdateControlsVisibility(); + } +} + + // End of File diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp --- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackprogressbar.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: e003sa33#20 % +// Version : %version: 21 % // INCLUDE FILES @@ -86,7 +86,6 @@ iMinSecFormatString = iEikonEnv->AllocReadResourceL(R_QTN_TIME_DURAT_MIN_SEC); iHourMinSecFormatString = iEikonEnv->AllocReadResourceL(R_QTN_TIME_DURAT_LONG); - #ifdef RD_TACTILE_FEEDBACK iFeedback = MTouchFeedback::Instance(); #endif //RD_TACTILE_FEEDBACK @@ -182,9 +181,9 @@ } #ifdef RD_TACTILE_FEEDBACK - if (iFeedback) + if ( iFeedback ) { - iFeedback->RemoveFeedbackForControl(this); + iFeedback->RemoveFeedbackForControl( this ); } #endif //RD_TACTILE_FEEDBACK @@ -217,7 +216,6 @@ // // Calculate icon rects // - TRect progressRect = Rect(); TInt topMarginHeight = ( progressRect.iBr.iY - KMPXProgressBarHeight ) / 2 - 10; progressRect.iTl.iY += topMarginHeight; @@ -284,6 +282,7 @@ delete iFrameIcon; iFrameIcon = NULL; + iFrameIcon = AknsUtils::CreateGulIconL( skin, KAknsIIDQgnGrafMup2BarFrame, @@ -300,6 +299,7 @@ delete iPlaybackIcon; iPlaybackIcon = NULL; + iPlaybackIcon = AknsUtils::CreateGulIconL( skin, KAknsIIDQgnGrafMup2BarProgress2, @@ -374,7 +374,7 @@ _L("ratio = %f"), aRatio ); iPointerEventStarted = ETrue; - iWasPlaying = iController->State() == EPbStatePlaying? ETrue:EFalse; + iWasPlaying = iController->State() == EPbStatePlaying ? ETrue : EFalse; if ( iWasPlaying ) { @@ -388,7 +388,7 @@ iFeedback->InstantFeedback( ETouchFeedbackSlider ); #else iFeedback->InstantFeedback( ETouchFeedbackBasic ); -#endif //SYMBIAN_BUILD_GCE +#endif //SYMBIAN_BUILD_GCE } #endif //RD_TACTILE_FEEDBACK @@ -421,7 +421,7 @@ iFeedback->InstantFeedback( ETouchFeedbackSlider ); #else iFeedback->InstantFeedback( ETouchFeedbackSensitive ); -#endif //SYMBIAN_BUILD_GCE +#endif //SYMBIAN_BUILD_GCE } #endif //RD_TACTILE_FEEDBACK @@ -502,9 +502,11 @@ } else { - // draw a solid background so that the entire progress - // bar is shown not just the area representing the - // portion that has been played. + // + // draw a solid background so that the entire progress + // bar is shown not just the area representing the + // portion that has been played. + // gc.SetBrushColor( KRgbBlack ); gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); gc.DrawRect( aRect ); @@ -630,7 +632,8 @@ // void CMPXVideoPlaybackProgressBar::PositionChangedL( TInt aPosition, TBool aUserChanged ) { - MPX_DEBUG(_L("CMPXVideoPlaybackProgressBar::PositionChangedL() [%d]"), aPosition ); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackProgressBar::PositionChangedL()"), + _L("aPosition = %d, aUserChanged = %d"), aPosition, aUserChanged ); // // We will ignore position information which engine sent @@ -722,7 +725,8 @@ // void CMPXVideoPlaybackProgressBar::SetTextLWithReadableTimeL( TInt aTime, CEikLabel* aLabel ) { - MPX_DEBUG(_L("CMPXVideoPlaybackProgressBar::SetTextLWithReadableTimeL() [%d]"), aTime); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackProgressBar::SetTextLWithReadableTimeL()"), + _L("aTime = %d"), aTime ); TBuf<16> text; @@ -768,6 +772,7 @@ { delete iDownloadIcon; iDownloadIcon = NULL; + iDownloadIcon = AknsUtils::CreateGulIconL( skin, KAknsIIDQgnGrafMup2BarProgress, @@ -796,6 +801,7 @@ { delete iSliderIcon; iSliderIcon = NULL; + iSliderIcon = AknsUtils::CreateGulIconL( skin, KAknsIIDQgnGrafNsliderMarker, @@ -805,6 +811,7 @@ delete iSelectedSliderIcon; iSelectedSliderIcon = NULL; + iSelectedSliderIcon = AknsUtils::CreateGulIconL( skin, KAknsIIDQgnGrafNsliderMarkerSelected, @@ -856,6 +863,8 @@ // void CMPXVideoPlaybackProgressBar::Reset() { + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackProgressBar::Reset()")); + if ( iPointerEventStarted || iDragging ) { TPointerEvent event; diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp --- a/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackcontrols/src/mpxvideoplaybackvolumebar.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: e003sa33#20 % +// Version : %version: 21 % // INCLUDE FILES @@ -481,30 +481,30 @@ switch ( aPointerEvent.iType ) { - case TPointerEvent::EButtonRepeat: - { -#ifdef RD_TACTILE_FEEDBACK - if ( iFeedback ) - { + case TPointerEvent::EButtonRepeat: + { +#ifdef RD_TACTILE_FEEDBACK + if ( iFeedback ) + { #ifdef SYMBIAN_BUILD_GCE iFeedback->InstantFeedback( ETouchFeedbackSlider ); #else iFeedback->InstantFeedback( ETouchFeedbackSensitive ); -#endif //SYMBIAN_BUILD_GCE - } -#endif //RD_TACTILE_FEEDBACK +#endif //SYMBIAN_BUILD_GCE + } +#endif //RD_TACTILE_FEEDBACK iController->HandleCommandL( EMPXPbvCmdIncreaseVolume ); iDragging = EVolumeIncreaseDragging; - - } - case TPointerEvent::EButton1Down: - { - Window().RequestPointerRepeatEvent( - TTimeIntervalMicroSeconds32(KMPXPtrEventRepeatRequestTime) - ,iVolumeUpControlRect); + + } + case TPointerEvent::EButton1Down: + { + Window().RequestPointerRepeatEvent( + TTimeIntervalMicroSeconds32(KMPXPtrEventRepeatRequestTime) + ,iVolumeUpControlRect); break; - } + } case TPointerEvent::EDrag: { iDragging = EVolumeIncreaseDragging; @@ -520,7 +520,7 @@ iFeedback->InstantFeedback( ETouchFeedbackSlider ); #else iFeedback->InstantFeedback( ETouchFeedbackBasic ); -#endif //SYMBIAN_BUILD_GCE +#endif //SYMBIAN_BUILD_GCE } #endif //RD_TACTILE_FEEDBACK @@ -543,30 +543,30 @@ switch ( aPointerEvent.iType ) { - case TPointerEvent::EButtonRepeat: - { -#ifdef RD_TACTILE_FEEDBACK - if ( iFeedback ) - { + case TPointerEvent::EButtonRepeat: + { +#ifdef RD_TACTILE_FEEDBACK + if ( iFeedback ) + { #ifdef SYMBIAN_BUILD_GCE iFeedback->InstantFeedback( ETouchFeedbackSlider ); #else - iFeedback->InstantFeedback( ETouchFeedbackSensitive ); -#endif //SYMBIAN_BUILD_GCE - } -#endif //RD_TACTILE_FEEDBACK + iFeedback->InstantFeedback( ETouchFeedbackSensitive ); +#endif //SYMBIAN_BUILD_GCE + } +#endif //RD_TACTILE_FEEDBACK iController->HandleCommandL( EMPXPbvCmdDecreaseVolume ); iDragging = EVolumeDecreaseDragging; - - } - case TPointerEvent::EButton1Down: - { - Window().RequestPointerRepeatEvent( - TTimeIntervalMicroSeconds32(KMPXPtrEventRepeatRequestTime) - ,iVolumeDownControlRect); + + } + case TPointerEvent::EButton1Down: + { + Window().RequestPointerRepeatEvent( + TTimeIntervalMicroSeconds32(KMPXPtrEventRepeatRequestTime) + ,iVolumeDownControlRect); break; - } + } case TPointerEvent::EDrag: { iDragging = EVolumeDecreaseDragging; @@ -577,7 +577,7 @@ #ifdef RD_TACTILE_FEEDBACK if ( iFeedback ) { -#ifdef SYMBIAN_BUILD_GCE +#ifdef SYMBIAN_BUILD_GCE iFeedback->InstantFeedback( ETouchFeedbackSlider ); #else iFeedback->InstantFeedback( ETouchFeedbackBasic ); @@ -701,7 +701,7 @@ #ifdef RD_TACTILE_FEEDBACK if ( iFeedback ) { -#ifdef SYMBIAN_BUILD_GCE +#ifdef SYMBIAN_BUILD_GCE iFeedback->InstantFeedback( ETouchFeedbackSlider ); #else iFeedback->InstantFeedback( ETouchFeedbackSensitive ); @@ -727,7 +727,7 @@ { // // volume & mute levels are kept track in playbackplugin. - // + // iController->HandleCommandL( EMPXPbvCmdMute ); } @@ -1000,14 +1000,14 @@ // void CMPXVideoPlaybackVolumeBar::Reset() { - MPX_DEBUG(_L("CMPXVideoPlaybackVolumeBar::Reset()")); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackVolumeBar::Reset()")); if ( iDragging != EVolumeNotDragging ) { TPointerEvent event; event.iType = TPointerEvent::EButton1Up; event.iPosition.iY = ( iSliderRect.iTl.iY + iSliderRect.iBr.iY ) / 2; - + MPX_TRAPD( err, HandlePointerEventL(event) ); } } @@ -1018,8 +1018,9 @@ // void CMPXVideoPlaybackVolumeBar::SetVolumeL( TInt aVolume ) { - MPX_DEBUG(_L("CMPXVideoPlaybackVolumeBar::SetVolumeL(%d)"), aVolume); - + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackVolumeBar::SetVolumeL()"), + _L("aVolume = %d"), aVolume ); + iController->HandleCommandL( EMPXPbvCmdSetVolume, aVolume ); } diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg --- a/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackcontrols/tsrc/videoplaybackcontrols_test/conf/ui_videoplaybackcontrolstest.cfg Tue Apr 27 16:40:33 2010 +0300 @@ -164,7 +164,7 @@ [Endtest] [Test] -title [6]Set volume to 20 +title [6]Set volume to 25 bringtoforeground create ui_videoplaybackcontrolstest ControlsTest ControlsTest CreateControls test.3gp EMPXVideoLocal @@ -182,7 +182,7 @@ pause 100 ControlsTest PointerEvent eventtype=EButton1Up x=75 y=198 pause 100 -ControlsTest ExpectedResult EMPXPbvCmdSetVolume 20 +ControlsTest ExpectedResult EMPXPbvCmdSetVolume 25 pause 100 ControlsTest DeleteControls delete ControlsTest diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp --- a/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackviews/src/mpxvideobaseplaybackview.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: e003sa33#71 % +// Version : %version: 75 % // Include Files @@ -51,6 +51,7 @@ #include #include #include +#include #include #include @@ -107,6 +108,7 @@ // // Get an instance of collection utility + // Used for the Collection Observer to get the MediaL callbacks // iCollectionUtility = MMPXCollectionUtility::NewL( this ); @@ -128,12 +130,6 @@ { MPX_DEBUG(_L("CMPXVideoBasePlaybackView::~CMPXVideoBasePlaybackView()")); - if ( iClipName ) - { - delete iClipName; - iClipName = NULL; - } - if ( iCloseAO ) { delete iCloseAO; @@ -232,12 +228,6 @@ case EMPXPbvCmdClose: { MPX_DEBUG(_L("CMPXVideoBasePlaybackView::HandleCommandL() EMPXPbvCmdClose")); - - // - // The display window must be removed before closing the playback plugin - // - RemoveBackgroundSurfaceL(); - CreateGeneralPlaybackCommandL( EPbCmdClose ); break; } @@ -542,12 +532,6 @@ iMediaRequested = EFalse; iPlaybackState = EPbStateNotInitialised; - - if ( iClipName ) - { - delete iClipName; - iClipName = NULL; - } } // ------------------------------------------------------------------------------------------------- @@ -615,12 +599,13 @@ // // This view is active since we are receiving the callback. - // Some new view is being activated so stop playback and return to automatic orientation + // Some new view is being activated so remove surface, stop playback and + // return to automatic orientation // - TRAP_IGNORE( - HandleCommandL( EMPXPbvCmdStop ); - AppUi()->SetOrientationL( CAknAppUiBase::EAppUiOrientationAutomatic ); - ); + iDisplayHandler->RemoveDisplayWindow(); + + TRAP_IGNORE( HandleCommandL( EMPXPbvCmdStop ); + AppUi()->SetOrientationL( CAknAppUiBase::EAppUiOrientationAutomatic ) ); } // ------------------------------------------------------------------------------------------------- @@ -644,6 +629,37 @@ } // ------------------------------------------------------------------------------------------------- +// CMPXVideoBasePlaybackView::IsInMemoryPlugin +// ------------------------------------------------------------------------------------------------- +// +TBool CMPXVideoBasePlaybackView::IsInMemoryPlugin() +{ + TBool retVal( EFalse ); + + MMPXCollection& collectionPlugin = iCollectionUtility->Collection(); + + TUid collectionUid; + TUid inMemoryPluginUid = TUid::Uid( KMpxInMemoryPluginUid ); + + MPX_TRAPD( error, collectionUid = collectionPlugin.UidL() ); + + if ( ! error ) + { + MPX_DEBUG(_L("CMPXVideoBasePlaybackView::IsInMemoryPlugin() collectionUid = 0x%08x"), + collectionUid.iUid ); + + if ( collectionUid == inMemoryPluginUid ) + { + retVal = ETrue; + } + } + + MPX_DEBUG(_L("CMPXVideoBasePlaybackView::IsInMemoryPlugin(%d)"), retVal ); + + return retVal; +} + +// ------------------------------------------------------------------------------------------------- // Request for the media object // ------------------------------------------------------------------------------------------------- // @@ -655,7 +671,7 @@ { iMediaRequested = ETrue; - if ( iPlaylistView ) + if ( iPlaylistView && IsInMemoryPlugin() ) { // Get the media attributes from the collection plugin RequestCollectionMediaL(); @@ -734,11 +750,9 @@ CleanupClosePushL(attrs); // General Media Attributes - attrs.Append( KMPXMediaGeneralUri ); - attrs.Append( KMPXMediaGeneralExtAccessPoint ); attrs.Append( KMPXMediaGeneralExtVideoSeekable ); - s->MediaL( attrs.Array(), *this); + s->MediaL( attrs.Array(), *this ); // Set the falg to indicate that media was reuqested from collection FW iCollectionMediaRequested = ETrue; @@ -767,11 +781,11 @@ { HandleVideoPlaybackMessage( aMessage ); } - else if ( KMPXMediaIdVideoDisplaySyncMessage == id ) + else if ( KMPXMediaIdVideoDisplayMessage == id ) { if ( iDisplayHandler ) { - iDisplayHandler->HandleVideoDisplaySyncMessageL( aMessage ); + iDisplayHandler->HandleVideoDisplayMessageL( aMessage ); } } } @@ -868,6 +882,23 @@ } break; } + case EPbCmdLoadingStarted: + { + if ( iContainer ) + { + MPX_TRAPD( err, iContainer->HandleEventL( EMPXControlCmdLoadingStarted ) ); + } + + break; + } + case EPbCmdHideControls: + { + if ( iContainer ) + { + MPX_TRAPD( err, iContainer->HandleEventL( EMPXControlCmdHideControls ) ); + } + break; + } } } @@ -879,13 +910,10 @@ { MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::HandleClosePlaybackViewL()")); - // Reset the playback state to stopped iPlaybackState = EPbStateStopped; - + if ( IsMultiItemPlaylist() ) { - RemoveBackgroundSurfaceL(); - iPlaybackUtility->CommandL( EPbCmdNext ); } else @@ -986,34 +1014,7 @@ { case EPbStateInitialising: { - // - // For multi item playlists, reset the container and controls for next - // item in playlist - // - if ( IsMultiItemPlaylist() && iContainer ) - { - // - // If transitioning from Not Initialized to Initialising there is - // no need to update the playback information that was gathered - // when the container was created - // - if ( oldState != EPbStateNotInitialised ) - { - iMediaRequested = EFalse; - - iContainer->HandleCommandL( EMPXPbvCmdResetControls ); - - if ( iFileDetails ) - { - if ( iFileDetailsDialog ) - { - iFileDetailsDialog->Close(); - } - - iFileDetails->ClearFileDetails(); - } - } - } + HandleInitializingStateL( oldState ); break; } case EPbStateBuffering: @@ -1293,6 +1294,13 @@ iContainer->HandleEventL( EMPXControlCmdSetAspectRatio, newAspectRatio ); } + else + { + // + // Remove the display window so the surface can be released + // + iDisplayHandler->RemoveDisplayWindow(); + } // // Delay the play command while the Real One Bitmap is being shown @@ -1314,7 +1322,8 @@ // void CMPXVideoBasePlaybackView::UpdatePbPluginMediaL( TBool aSeek) { - MPX_DEBUG(_L("CMPXVideoBasePlaybackView::UpdatePbPluginMediaL() iSeekable %d"), aSeek); + MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::UpdatePbPluginMediaL()"), + _L("aSeek = %d"), aSeek ); CMPXCommand* cmd = CMPXCommand::NewL(); CleanupStack::PushL( cmd ); @@ -1323,7 +1332,8 @@ cmd->SetTObjectValueL( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback ); - cmd->SetTObjectValueL( KMPXMediaVideoPlaybackCommand, EPbCmdUpdateSeekable ); + cmd->SetTObjectValueL( KMPXMediaVideoPlaybackCommand, + EPbCmdUpdateSeekable ); cmd->SetTObjectValueL( KMPXMediaGeneralExtVideoSeekable, aSeek ); @@ -1351,20 +1361,6 @@ { seek = aMedia.ValueTObjectL( KMPXMediaGeneralExtVideoSeekable ); UpdatePbPluginMediaL( seek ); - MPX_DEBUG(_L("CMPXVideoBasePlaybackView::HandleMediaL() called UpdatePbPluginMediaL iSeekable %d"), seek); - } - - if ( aMedia.IsSupported( KMPXMediaGeneralUri ) ) - { - TPtrC uri( aMedia.ValueText( KMPXMediaGeneralUri ) ); - - if ( iClipName ) - { - delete iClipName; - iClipName = NULL; - } - - iClipName = uri.AllocL(); } // request for media from playbackplugin @@ -1978,12 +1974,11 @@ TInt openError = KErrNotFound; RFs& fs = iCoeEnv->FsSession(); - if ( iPlaylistView ) + if ( iPlaylistView && iFileDetails->iClipName ) { - // - // Use iClipName from the MediaL() call - // - openError = aFile.Open( fs, iClipName->Des(), EFileRead | EFileShareReadersOrWriters ); + openError = aFile.Open( fs, + iFileDetails->iClipName->Des(), + EFileRead | EFileShareReadersOrWriters ); } else { @@ -2115,12 +2110,11 @@ TInt openError = KErrNotFound; RFs& fs = iCoeEnv->FsSession(); - if ( iPlaylistView ) + if ( iPlaylistView && iFileDetails->iClipName ) { - // - // Use iClipName from the MediaL() call - // - openError = aFile.Open( fs, iClipName->Des(), EFileRead | EFileShareReadersOrWriters ); + openError = aFile.Open( fs, + iFileDetails->iClipName->Des(), + EFileRead | EFileShareReadersOrWriters ); } else { @@ -2160,23 +2154,6 @@ #endif // SYMBIAN_ENABLE_64_BIT_FILE_SERVER_API // ------------------------------------------------------------------------------------------------- -// CMPXVideoBasePlaybackView::RemoveBackgroundSurfaceL() -// ------------------------------------------------------------------------------------------------- -// -void CMPXVideoBasePlaybackView::RemoveBackgroundSurfaceL() -{ - MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::RemoveBackgroundSurfaceL()")); - - if ( iDisplayHandler ) - { - // - // Remove the display window so the surface can be released - // - iDisplayHandler->RemoveDisplayWindow(); - } -} - -// ------------------------------------------------------------------------------------------------- // CMPXVideoBasePlaybackView::HandleRealOneBitmapTimeoutL() // ------------------------------------------------------------------------------------------------- // @@ -2221,7 +2198,7 @@ // if ( ! iKeyboardInFocus && aEvent.Type() == EEventWindowVisibilityChanged ) { - MPX_DEBUG(_L("CMpxVideoPlayerAppUi::HandleWsEventL() EEventWindowVisibilityChanged")); + MPX_DEBUG(_L("CMPXVideoBasePlaybackView::HandleWsEventL() EEventWindowVisibilityChanged")); TUint visible = aEvent.VisibilityChanged()->iFlags; @@ -2239,7 +2216,7 @@ // void CMPXVideoBasePlaybackView::SendWindowCommandL( TMPXVideoPlaybackCommand aCmd ) { - MPX_ENTER_EXIT(_L("CMpxVideoPlayerAppUi::SendWindowCommandL()"), + MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::SendWindowCommandL()"), _L("aCmd = %d"), aCmd ); // @@ -2257,4 +2234,39 @@ CleanupStack::PopAndDestroy( cmd ); } +// ------------------------------------------------------------------------------------------------- +// CMPXVideoBasePlaybackView::DoHandleInitializingStateL() +// ------------------------------------------------------------------------------------------------- +// +void CMPXVideoBasePlaybackView::DoHandleInitializingStateL( TMPXPlaybackState aLastState ) +{ + MPX_ENTER_EXIT(_L("CMPXVideoBasePlaybackView::DoHandleInitializingStateL()"), + _L("aLastState = %d"), aLastState ); + + if ( iContainer ) + { + // + // If transitioning from Not Initialized to Initialising there is + // no need to update the playback information that was gathered + // when the container was created + // + if ( aLastState != EPbStateNotInitialised ) + { + iMediaRequested = EFalse; + + iContainer->HandleCommandL( EMPXPbvCmdResetControls ); + + if ( iFileDetails ) + { + if ( iFileDetailsDialog ) + { + iFileDetailsDialog->Close(); + } + + iFileDetails->ClearFileDetails(); + } + } + } +} + // EOF diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackviews/src/mpxvideopdlplaybackview.cpp --- a/videoplayback/videoplaybackviews/src/mpxvideopdlplaybackview.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackviews/src/mpxvideopdlplaybackview.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 23 % +// Version : %version: 24 % // Include Files @@ -436,4 +436,19 @@ ClosePlaybackViewL(); } +// ------------------------------------------------------------------------------------------------- +// CMPXVideoPdlPlaybackView::HandleInitializingStateL() +// ------------------------------------------------------------------------------------------------- +// +void CMPXVideoPdlPlaybackView::HandleInitializingStateL( TMPXPlaybackState aLastState ) +{ + MPX_ENTER_EXIT(_L("CMPXVideoPdlPlaybackView::HandleInitializingStateL()"), + _L("aLastState = %d"), aLastState ); + + // + // For PDL view, reset the container and controls for new download + // + DoHandleInitializingStateL( aLastState ); +} + // EOF diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp --- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackcontainer.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: e003sa33#26 % +// Version : %version: 27 % // INCLUDE FILES @@ -385,13 +385,26 @@ // only if if OK to handle pointer events // ------------------------------------------------------------------------------------------------- // -EXPORT_C void CMPXVideoPlaybackContainer::DoHandlePointerEventL( const TPointerEvent& aPointerEvent ) +EXPORT_C +void CMPXVideoPlaybackContainer::DoHandlePointerEventL( const TPointerEvent& aPointerEvent ) { - MPX_DEBUG(_L("CMPXVideoPlaybackContainer::DoHandlePointerEventL()")); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackContainer::DoHandlePointerEventL()"), + _L("aPointerEvent.iType = %d"), aPointerEvent.iType ); - if ( AknLayoutUtils::PenEnabled() && aPointerEvent.iType == TPointerEvent::EButton1Up ) + if ( AknLayoutUtils::PenEnabled() ) { - iControlsController->HandleEventL( EMPXControlCmdToggleVisibility ); + if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) + { + iControlsController->HandleEventL( EMPXControlCmdToggleVisibility ); + + SetPointerCapture( EFalse ); + ClaimPointerGrab( EFalse ); + } + else if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) + { + SetPointerCapture( ETrue ); + ClaimPointerGrab( ETrue ); + } } } diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackviews/src/mpxvideoplaybackdisplayhandler.cpp --- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackdisplayhandler.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackdisplayhandler.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 12 % +// Version : %version: 14 % #include @@ -110,35 +110,12 @@ } // ------------------------------------------------------------------------------------------------- -// CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL() -// ------------------------------------------------------------------------------------------------- -// -void CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL() -{ - MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::SignalSurfaceRemovedL()")); - - CMPXCommand* cmd = CMPXCommand::NewL(); - CleanupStack::PushL( cmd ); - - cmd->SetTObjectValueL( KMPXCommandGeneralDoSync, ETrue ); - cmd->SetTObjectValueL( KMPXCommandPlaybackGeneralNoBuffer, ETrue ); - cmd->SetTObjectValueL( KMPXCommandGeneralId, KMPXMediaIdVideoPlayback ); - cmd->SetTObjectValueL( KMPXMediaVideoPlaybackCommand, - EPbCmdSurfaceRemoved ); - - iPlaybackUtility->CommandL( *cmd ); - - CleanupStack::PopAndDestroy( cmd ); -} - -// ------------------------------------------------------------------------------------------------- // CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() // ------------------------------------------------------------------------------------------------- // -void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow( TBool aSignalPlaybackPlugin ) +void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() { - MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow()"), - _L("aSignalPlaybackPlugin = %d"), aSignalPlaybackPlugin ); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow()")); #ifdef SYMBIAN_BUILD_GCE if ( iVideoDisplay ) @@ -148,7 +125,7 @@ // if ( iContainer ) { - iContainer->HandleCommandL( EMPXPbvSurfaceRemoved ); + MPX_TRAPD( err, iContainer->HandleCommandL( EMPXPbvSurfaceRemoved ) ); } delete iVideoDisplay; @@ -156,28 +133,17 @@ } #endif - if ( ! iSurfaceId.IsNull() ) - { - if ( aSignalPlaybackPlugin ) - { - // - // Signal to the Playback Plugin that the surface has been removed - // - TRAP_IGNORE( SignalSurfaceRemovedL() ); - } - - iSurfaceId = TSurfaceId::CreateNullId(); - } + iSurfaceId = TSurfaceId::CreateNullId(); } // ------------------------------------------------------------------------------------------------- -// CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL() +// CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL() // ------------------------------------------------------------------------------------------------- // void -CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL( CMPXMessage* aMessage ) +CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL( CMPXMessage* aMessage ) { - MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::HandleVideoDisplaySyncMessageL()")); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL()")); TMPXVideoDisplayCommand message = ( *(aMessage->Value(KMPXMediaVideoDisplayCommand)) ); @@ -203,19 +169,8 @@ SurfaceRemoved(); break; } - case EPbMsgVideoRemoveDisplayWindow: - { - MPX_DEBUG(_L(" message = EPbMsgVideoRemoveDisplayWindow")); - RemoveDisplayWindow( EFalse ); - break; - } #endif } - - // - // Signal Sync Message handling is complete - // - iPlaybackUtility->CommandL( EPbCmdSyncMsgComplete ); } // ------------------------------------------------------------------------------------------------- @@ -573,7 +528,7 @@ { if ( iContainer ) { - iContainer->HandleCommandL( EMPXPbvSurfaceRemoved ); + MPX_TRAPD( err, iContainer->HandleCommandL( EMPXPbvSurfaceRemoved ) ); } iVideoDisplay->RemoveSurface(); diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp --- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackuserinputhandler.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 17 % +// Version : %version: 18 % // INCLUDE FILES @@ -357,7 +357,9 @@ const TPointerEvent& aPointerEvent, TMPXVideoControlType aMPXControl ) { - MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::ProcessPointerEvent()")); + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::ProcessPointerEvent()"), + _L("iProcessingInputType = %d, aPointerEvent.iType = %d"), + iProcessingInputType, aPointerEvent.iType ); switch ( iProcessingInputType ) { @@ -367,27 +369,82 @@ { iProcessingInputType = EMpxVideoTouch; + // + // Save the active controls pointer to reroute invalid pointer events + // + iActiveControlPtr = aControl; + iActiveControlType = aMPXControl; + ReRoutePointerEventL( aControl, aPointerEvent, aMPXControl ); } + break; } case EMpxVideoTouch: { - if ( aPointerEvent.iType != TPointerEvent::EButton1Down ) + if ( aControl == iActiveControlPtr ) { - ReRoutePointerEventL( aControl, aPointerEvent, aMPXControl ); + // + // Event is from the active control, process pointer event normally + // + if ( aPointerEvent.iType != TPointerEvent::EButton1Down ) + { + ReRoutePointerEventL( aControl, aPointerEvent, aMPXControl ); - // reset the value only on pointer up event - but not on drag + // + // reset the value only on pointer up event - but not on drag + // + if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) + { + iProcessingInputType = EMpxVideoNone; + iActiveControlPtr = NULL; + } + } + } + else + { + // + // Event is from non active control + // This should not happen, but if event is a button up event, + // end the current active control pointer processing + // if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) { + // + // Reroute button up event to active control and end current + // control processing + // + ReRoutePointerEventL( iActiveControlPtr, aPointerEvent, iActiveControlType ); iProcessingInputType = EMpxVideoNone; + iActiveControlPtr = NULL; } } + break; } } // switch } +// ------------------------------------------------------------------------------------------------- +// CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL() +// ------------------------------------------------------------------------------------------------- +// +void CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL( CCoeControl* aControl, + const TPointerEvent& aPointerEvent, + TMPXVideoControlType aMPXControl ) +{ + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL()"), + _L("aMPXControl = %d"), aMPXControl ); + + if ( aMPXControl == EMpxVideoPlaybackContainer ) + { + iContainer->DoHandlePointerEventL( aPointerEvent ); + } + else if ( aMPXControl == EMpxVideoPlaybackControl ) + { + static_cast(aControl)->DoHandlePointerEventL( aPointerEvent ); + } +} // ------------------------------------------------------------------------------------------------- // CMPXVideoPlaybackUserInputHandler::ProcessKeyEvent() @@ -515,27 +572,6 @@ iContainer->HandleCommandL( command ); } - -// ------------------------------------------------------------------------------------------------- -// CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL() -// ------------------------------------------------------------------------------------------------- -// -void CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL( CCoeControl* aControl, - const TPointerEvent& aPointerEvent, - TMPXVideoControlType aMPXControl ) -{ - MPX_ENTER_EXIT(_L("CMPXVideoPlaybackUserInputHandler::ReRoutePointerEventL()")); - - if ( aMPXControl == EMpxVideoPlaybackContainer ) - { - iContainer->DoHandlePointerEventL(aPointerEvent); - } - else if ( aMPXControl == EMpxVideoPlaybackControl ) - { - static_cast(aControl)->DoHandlePointerEventL(aPointerEvent); - } -} - // ------------------------------------------------------------------------------------------------- // CMPXVideoPlaybackUserInputHandler::SetForeground() // ------------------------------------------------------------------------------------------------- diff -r 8970fbd719ec -r 7f2b2a65da29 videoplayback/videoplaybackviews/src/mpxvideoplaybackview.cpp --- a/videoplayback/videoplaybackviews/src/mpxvideoplaybackview.cpp Wed Apr 14 15:59:50 2010 +0300 +++ b/videoplayback/videoplaybackviews/src/mpxvideoplaybackview.cpp Tue Apr 27 16:40:33 2010 +0300 @@ -16,7 +16,7 @@ */ -// Version : %version: 18 % +// Version : %version: 20 % // Include Files @@ -224,14 +224,25 @@ { HandleCommandL( EAknSoftkeyBack ); } - else if ( iPlaylistView ) +} + +// ------------------------------------------------------------------------------------------------- +// CMPXVideoPlaybackView::HandleInitializingStateL() +// ------------------------------------------------------------------------------------------------- +// +void CMPXVideoPlaybackView::HandleInitializingStateL( TMPXPlaybackState aLastState ) +{ + MPX_ENTER_EXIT(_L("CMPXVideoPlaybackView::HandleInitializingStateL()"), + _L("aLastState = %d"), aLastState ); + + // + // For multi item playlists, reset the container and controls for next + // item in playlist + // + if ( IsMultiItemPlaylist() ) { - // - // New item from the playlist clean up the view - // - RemoveBackgroundSurfaceL(); + DoHandleInitializingStateL( aLastState ); } } - // EOF