1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Implementation of video playback display handler |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 7 % |
|
19 |
|
20 #include <sysutil.h> |
|
21 #include <s32file.h> |
|
22 #include <mpxcommand.h> |
|
23 #include <mpxcommandgeneraldefs.h> |
|
24 #include <mpxplaybackutility.h> |
|
25 #include <mpxvideoplaybackdefs.h> |
|
26 |
|
27 #include "mpxvideoviewwrapper.h" |
|
28 #include "mpxvideoplaybackdisplayhandler.h" |
|
29 #include "mpxvideoregion.h" |
|
30 #include "mpxvideoplaybackviewfiledetails.h" |
|
31 |
|
32 |
|
33 CMPXVideoPlaybackDisplayHandler::CMPXVideoPlaybackDisplayHandler( MMPXPlaybackUtility* aPlayUtil, |
|
34 CMPXVideoViewWrapper* aViewWrapper ) |
|
35 : iPlaybackUtility( aPlayUtil ) |
|
36 , iViewWrapper( aViewWrapper ) |
|
37 { |
|
38 } |
|
39 |
|
40 CMPXVideoPlaybackDisplayHandler::~CMPXVideoPlaybackDisplayHandler() |
|
41 { |
|
42 } |
|
43 |
|
44 CMPXVideoPlaybackDisplayHandler* |
|
45 CMPXVideoPlaybackDisplayHandler::NewL( MMPXPlaybackUtility* aPlayUtil, |
|
46 CMPXVideoViewWrapper* aViewWrapper ) |
|
47 { |
|
48 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::NewL()")); |
|
49 |
|
50 CMPXVideoPlaybackDisplayHandler* self = |
|
51 new(ELeave) CMPXVideoPlaybackDisplayHandler( aPlayUtil, aViewWrapper ); |
|
52 |
|
53 CleanupStack::PushL( self ); |
|
54 self->ConstructL(); |
|
55 CleanupStack::Pop(); |
|
56 return self; |
|
57 } |
|
58 |
|
59 // ------------------------------------------------------------------------------------------------- |
|
60 // CMPXVideoPlaybackDisplayHandler::ConstructL() |
|
61 // ------------------------------------------------------------------------------------------------- |
|
62 // |
|
63 void CMPXVideoPlaybackDisplayHandler::ConstructL() |
|
64 { |
|
65 } |
|
66 |
|
67 // ------------------------------------------------------------------------------------------------- |
|
68 // CMPXVideoPlaybackDisplayHandler::CreateDisplayWindowL() |
|
69 // ------------------------------------------------------------------------------------------------- |
|
70 // |
|
71 void CMPXVideoPlaybackDisplayHandler::CreateDisplayWindowL( |
|
72 RWsSession& aWs, |
|
73 CWsScreenDevice& aScreenDevice, |
|
74 RWindow& aWin, |
|
75 TRect aDisplayRect ) |
|
76 { |
|
77 Q_UNUSED( aWs ); |
|
78 Q_UNUSED( aScreenDevice ); |
|
79 Q_UNUSED( aWin ); |
|
80 Q_UNUSED( aDisplayRect ); |
|
81 } |
|
82 |
|
83 // ------------------------------------------------------------------------------------------------- |
|
84 // CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
|
85 // ------------------------------------------------------------------------------------------------- |
|
86 // |
|
87 void CMPXVideoPlaybackDisplayHandler::RemoveDisplayWindow() |
|
88 { |
|
89 if ( iVideoDisplay ) |
|
90 { |
|
91 delete iVideoDisplay; |
|
92 iVideoDisplay = NULL; |
|
93 } |
|
94 } |
|
95 |
|
96 // ------------------------------------------------------------------------------------------------- |
|
97 // CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL() |
|
98 // ------------------------------------------------------------------------------------------------- |
|
99 // |
|
100 void CMPXVideoPlaybackDisplayHandler::HandleVideoDisplayMessageL( CMPXMessage* /*aMessage*/ ) |
|
101 { |
|
102 } |
|
103 |
|
104 // ------------------------------------------------------------------------------------------------- |
|
105 // CMPXVideoPlaybackDisplayHandler::SetAspectRatioL() |
|
106 // ------------------------------------------------------------------------------------------------- |
|
107 // |
|
108 TInt CMPXVideoPlaybackDisplayHandler::SetAspectRatioL( TMPXVideoPlaybackCommand aCmd ) |
|
109 { |
|
110 iCommand = aCmd; |
|
111 |
|
112 switch ( aCmd ) |
|
113 { |
|
114 case EPbCmdNaturalAspectRatio: |
|
115 { |
|
116 iAspectRatio = EMMFNatural; |
|
117 break; |
|
118 } |
|
119 case EPbCmdZoomAspectRatio: |
|
120 { |
|
121 iAspectRatio = EMMFZoom; |
|
122 break; |
|
123 } |
|
124 case EPbCmdStretchAspectRatio: |
|
125 { |
|
126 iAspectRatio = EMMFStretch; |
|
127 break; |
|
128 } |
|
129 } |
|
130 |
|
131 return iAspectRatio; |
|
132 } |
|
133 |
|
134 // ------------------------------------------------------------------------------------------------- |
|
135 // CMPXVideoPlaybackDisplayHandler::SetDefaultAspectRatioL |
|
136 // ------------------------------------------------------------------------------------------------- |
|
137 // |
|
138 TInt CMPXVideoPlaybackDisplayHandler::SetDefaultAspectRatioL( |
|
139 QMPXVideoPlaybackViewFileDetails* aFileDetails, |
|
140 TReal32 aDisplayAspectRatio ) |
|
141 { |
|
142 Q_UNUSED( aFileDetails ); |
|
143 Q_UNUSED( aDisplayAspectRatio ); |
|
144 |
|
145 return iAspectRatio; |
|
146 } |
|
147 |
|
148 // ------------------------------------------------------------------------------------------------- |
|
149 // CMPXVideoPlaybackDisplayHandler::UpdateVideoRectL() |
|
150 // ------------------------------------------------------------------------------------------------- |
|
151 // |
|
152 void CMPXVideoPlaybackDisplayHandler::UpdateVideoRectL( TRect aClipRect, TBool transitionEffect ) |
|
153 { |
|
154 MPX_ENTER_EXIT(_L("CMPXVideoPlaybackDisplayHandler::UpdateVideoRectL()")); |
|
155 |
|
156 Q_UNUSED( transitionEffect ); |
|
157 |
|
158 iRect = aClipRect; |
|
159 } |
|
160 |
|
161 // End of File |
|