|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 // USER |
|
19 #include "musenglocalvideoplayer.h" |
|
20 #include "musengcamerahandler.h" |
|
21 #include "musengmceutils.h" |
|
22 #include "musengdisplayhandler.h" |
|
23 |
|
24 // SYSTEM |
|
25 #include <mcesession.h> |
|
26 #include <mcevideostream.h> |
|
27 |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 // ----------------------------------------------------------------------------- |
|
32 // |
|
33 CMusEngVideoPlayerBase::CMusEngVideoPlayerBase( |
|
34 MMusEngDisplayHandler& aDisplayHandler, |
|
35 MLcAudioControl& aLcAudioControl ) : |
|
36 iDisplayHandler( aDisplayHandler ), |
|
37 iLcAudioControl( aLcAudioControl ) |
|
38 { |
|
39 } |
|
40 |
|
41 |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 // ----------------------------------------------------------------------------- |
|
45 // |
|
46 CMusEngVideoPlayerBase::~CMusEngVideoPlayerBase() |
|
47 { |
|
48 } |
|
49 |
|
50 // ----------------------------------------------------------------------------- |
|
51 // |
|
52 // ----------------------------------------------------------------------------- |
|
53 // |
|
54 void CMusEngVideoPlayerBase::SetMceSession( CMceSession* aMceSession ) |
|
55 { |
|
56 iMceSession = aMceSession; |
|
57 } |
|
58 |
|
59 // ----------------------------------------------------------------------------- |
|
60 // From MLcVideoPlayer |
|
61 // ----------------------------------------------------------------------------- |
|
62 // |
|
63 void CMusEngVideoPlayerBase::LcPlayL( TLcVideoPlayerSource /*aSource*/ ) |
|
64 { |
|
65 // NOP |
|
66 } |
|
67 |
|
68 // ----------------------------------------------------------------------------- |
|
69 // From MLcVideoPlayer |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 void CMusEngVideoPlayerBase::LcPauseL() |
|
73 { |
|
74 // NOP |
|
75 } |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // From MLcVideoPlayer |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 MLcWindow* CMusEngVideoPlayerBase::LcWindow() |
|
82 { |
|
83 return this; |
|
84 } |
|
85 |
|
86 // ----------------------------------------------------------------------------- |
|
87 // From MLcVideoPlayer |
|
88 // ----------------------------------------------------------------------------- |
|
89 // |
|
90 MLcCameraControl* CMusEngVideoPlayerBase::LcCameraControl() |
|
91 { |
|
92 return NULL; |
|
93 } |
|
94 |
|
95 // ----------------------------------------------------------------------------- |
|
96 // From MLcVideoPlayer |
|
97 // ----------------------------------------------------------------------------- |
|
98 // |
|
99 MLcSourceFileControl* CMusEngVideoPlayerBase::LcSourceFileControl() |
|
100 { |
|
101 return NULL; |
|
102 } |
|
103 |
|
104 // ----------------------------------------------------------------------------- |
|
105 // From MLcVideoPlayer |
|
106 // ----------------------------------------------------------------------------- |
|
107 // |
|
108 MLcDestinationFileControl* CMusEngVideoPlayerBase::LcDestinationFileControl() |
|
109 { |
|
110 return NULL; |
|
111 } |
|
112 |
|
113 // ----------------------------------------------------------------------------- |
|
114 // From MLcVideoPlayer |
|
115 // ----------------------------------------------------------------------------- |
|
116 // |
|
117 MLcAudioControl* CMusEngVideoPlayerBase::LcAudioControl() |
|
118 { |
|
119 return &iLcAudioControl; |
|
120 } |
|
121 |
|
122 // ----------------------------------------------------------------------------- |
|
123 // From MLcVideoPlayer |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 MLcZoomControl* CMusEngVideoPlayerBase::LcZoomControl() |
|
127 { |
|
128 return NULL; |
|
129 } |
|
130 |
|
131 // ----------------------------------------------------------------------------- |
|
132 // From MLcVideoPlayer |
|
133 // ----------------------------------------------------------------------------- |
|
134 // |
|
135 MLcBrightnessControl* CMusEngVideoPlayerBase::LcBrightnessControl() |
|
136 { |
|
137 return NULL; |
|
138 } |
|
139 |
|
140 // ----------------------------------------------------------------------------- |
|
141 // From MLcWindow |
|
142 // ----------------------------------------------------------------------------- |
|
143 // |
|
144 void CMusEngVideoPlayerBase::EnableLcWindowL( TBool aEnable ) |
|
145 { |
|
146 iDisplayHandler.EnableDisplayL( aEnable ); |
|
147 } |
|
148 |
|
149 // ----------------------------------------------------------------------------- |
|
150 // From MLcWindow |
|
151 // ----------------------------------------------------------------------------- |
|
152 // |
|
153 TBool CMusEngVideoPlayerBase::IsLcWindowEnabled() |
|
154 { |
|
155 return iDisplayHandler.IsDisplayEnabled(); |
|
156 } |
|
157 |
|
158 // ----------------------------------------------------------------------------- |
|
159 // From MLcWindow |
|
160 // ----------------------------------------------------------------------------- |
|
161 // |
|
162 void CMusEngVideoPlayerBase::SetLcWindowRectL( TRect aRect ) |
|
163 { |
|
164 iDisplayHandler.SetRectL( aRect ); |
|
165 } |
|
166 |
|
167 |
|
168 // ----------------------------------------------------------------------------- |
|
169 // From MLcWindow |
|
170 // ----------------------------------------------------------------------------- |
|
171 // |
|
172 TRect CMusEngVideoPlayerBase::LcWindowRect() |
|
173 { |
|
174 return iDisplayHandler.Rect(); |
|
175 } |
|
176 |
|
177 // ----------------------------------------------------------------------------- |
|
178 // From MLcWindow |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 void CMusEngVideoPlayerBase::SetLcWindowOrientationL( |
|
182 TLcWindowOrientation aOrientation ) |
|
183 { |
|
184 if ( aOrientation == MLcWindow::ELandscape ) |
|
185 { |
|
186 iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::ELandscape ); |
|
187 } |
|
188 else |
|
189 { |
|
190 iDisplayHandler.SetOrientationL( MMusEngDisplayHandler::EPortrait ); |
|
191 } |
|
192 } |
|
193 |
|
194 // ----------------------------------------------------------------------------- |
|
195 // From MLcWindow |
|
196 // ----------------------------------------------------------------------------- |
|
197 // |
|
198 MLcWindow::TLcWindowOrientation CMusEngVideoPlayerBase::LcWindowOrientationL() |
|
199 { |
|
200 MLcWindow::TLcWindowOrientation orientation; |
|
201 if ( iDisplayHandler.OrientationL() == MMusEngDisplayHandler::ELandscape ) |
|
202 { |
|
203 orientation = MLcWindow::ELandscape; |
|
204 } |
|
205 else |
|
206 { |
|
207 orientation = MLcWindow::EPortrait; |
|
208 } |
|
209 return orientation; |
|
210 } |