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 "musenglivevideoplayer.h" |
|
20 #include "musengcamerahandler.h" |
|
21 #include "musengdisplayhandler.h" |
|
22 #include "musenglogger.h" |
|
23 |
|
24 // SYSTEM |
|
25 #include <e32base.h> |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CMusEngLiveVideoPlayer* CMusEngLiveVideoPlayer::NewL( |
|
32 MMusEngDisplayHandler& aDisplayHandler, |
|
33 TMusEngCameraHandler& aCameraHandler, |
|
34 MLcAudioControl& aLcAudioControl ) |
|
35 { |
|
36 return new( ELeave )CMusEngLiveVideoPlayer( |
|
37 aDisplayHandler, aCameraHandler, aLcAudioControl ); |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 // ----------------------------------------------------------------------------- |
|
43 // |
|
44 CMusEngLiveVideoPlayer::CMusEngLiveVideoPlayer( |
|
45 MMusEngDisplayHandler& aDisplayHandler, |
|
46 TMusEngCameraHandler& aCameraHandler, |
|
47 MLcAudioControl& aLcAudioControl ) : |
|
48 CMusEngLocalVideoPlayer( aDisplayHandler, aLcAudioControl ), |
|
49 iCameraHandler( aCameraHandler ) |
|
50 { |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 CMusEngLiveVideoPlayer::~CMusEngLiveVideoPlayer() |
|
58 { |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // From MLcVideoPlayer |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 TBool CMusEngLiveVideoPlayer::LcIsPlayingL() |
|
66 { |
|
67 return iCameraHandler.IsPlayingL(); |
|
68 } |
|
69 |
|
70 // ----------------------------------------------------------------------------- |
|
71 // From MLcVideoPlayer |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 void CMusEngLiveVideoPlayer::LcPlayL() |
|
75 { |
|
76 MUS_LOG( "mus: [ENGINE] -> CMusEngLiveVideoPlayer::LcPlayL" ) |
|
77 iCameraHandler.PlayL(); |
|
78 MUS_LOG( "mus: [ENGINE] <- CMusEngLiveVideoPlayer::LcPlayL" ) |
|
79 } |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // From MLcVideoPlayer |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 void CMusEngLiveVideoPlayer::LcPauseL() |
|
86 { |
|
87 MUS_LOG( "mus: [ENGINE] -> CMusEngLiveVideoPlayer::LcPauseL" ) |
|
88 iCameraHandler.PauseL(); |
|
89 MUS_LOG( "mus: [ENGINE] <> CMusEngLiveVideoPlayer::LcPauseL" ) |
|
90 } |
|
91 |
|
92 // ----------------------------------------------------------------------------- |
|
93 // From MLcVideoPlayer |
|
94 // ----------------------------------------------------------------------------- |
|
95 // |
|
96 MLcCameraControl* CMusEngLiveVideoPlayer::LcCameraControl() |
|
97 { |
|
98 return &iCameraHandler; |
|
99 } |
|
100 |
|
101 // ----------------------------------------------------------------------------- |
|
102 // From MLcVideoPlayer |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 MLcDestinationFileControl* CMusEngLiveVideoPlayer::LcDestinationFileControl() |
|
106 { |
|
107 return this; |
|
108 } |
|
109 |
|
110 // ----------------------------------------------------------------------------- |
|
111 // From MLcVideoPlayer |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 MLcZoomControl* CMusEngLiveVideoPlayer::LcZoomControl() |
|
115 { |
|
116 return &iCameraHandler; |
|
117 } |
|
118 |
|
119 // ----------------------------------------------------------------------------- |
|
120 // From MLcVideoPlayer |
|
121 // ----------------------------------------------------------------------------- |
|
122 // |
|
123 MLcBrightnessControl* CMusEngLiveVideoPlayer::LcBrightnessControl() |
|
124 { |
|
125 return &iCameraHandler; |
|
126 } |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // From MLcFileControl |
|
130 // ----------------------------------------------------------------------------- |
|
131 // |
|
132 void CMusEngLiveVideoPlayer::SetLcFileNameL( const TFileName& aFileName ) |
|
133 { |
|
134 iFileName = aFileName; |
|
135 } |
|
136 |
|
137 // ----------------------------------------------------------------------------- |
|
138 // From MLcFileControl |
|
139 // ----------------------------------------------------------------------------- |
|
140 // |
|
141 TFileName& CMusEngLiveVideoPlayer::LcFileName() |
|
142 { |
|
143 return iFileName; |
|
144 } |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // From MLcDestinationFileControl |
|
148 // ----------------------------------------------------------------------------- |
|
149 // |
|
150 void CMusEngLiveVideoPlayer::LcRecordL( TBool aRecord ) |
|
151 { |
|
152 MUS_LOG1( "mus: [ENGINE] -> CMusEngLiveVideoPlayer::LcRecordL(( %d )", |
|
153 aRecord ) |
|
154 |
|
155 MUS_LOG( "mus: [ENGINE] <- CMusEngLiveVideoPlayer::LcRecordL" ) |
|
156 } |
|
157 |
|
158 // ----------------------------------------------------------------------------- |
|
159 // From MLcDestinationFileControl |
|
160 // ----------------------------------------------------------------------------- |
|
161 // |
|
162 TBool CMusEngLiveVideoPlayer::LcIsRecording() |
|
163 { |
|
164 MUS_LOG( "mus: [ENGINE] -> CMusEngLiveVideoPlayer::LcIsRecording()" ) |
|
165 |
|
166 TBool isEnabled( EFalse ); |
|
167 |
|
168 return isEnabled; |
|
169 } |
|