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