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 return ETrue; |
|
69 } |
|
70 |
|
71 // ----------------------------------------------------------------------------- |
|
72 // From MLcVideoPlayer |
|
73 // ----------------------------------------------------------------------------- |
|
74 // |
|
75 void CMusEngLiveVideoPlayer::LcPlayL() |
|
76 { |
|
77 // iCameraHandler.PlayL(); |
|
78 } |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // From MLcVideoPlayer |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 void CMusEngLiveVideoPlayer::LcPauseL() |
|
85 { |
|
86 // iCameraHandler.PauseL(); |
|
87 } |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // From MLcVideoPlayer |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 MLcCameraControl* CMusEngLiveVideoPlayer::LcCameraControl() |
|
94 { |
|
95 return &iCameraHandler; |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // From MLcVideoPlayer |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 MLcDestinationFileControl* CMusEngLiveVideoPlayer::LcDestinationFileControl() |
|
103 { |
|
104 return this; |
|
105 } |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // From MLcVideoPlayer |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 MLcZoomControl* CMusEngLiveVideoPlayer::LcZoomControl() |
|
112 { |
|
113 return &iCameraHandler; |
|
114 } |
|
115 |
|
116 // ----------------------------------------------------------------------------- |
|
117 // From MLcVideoPlayer |
|
118 // ----------------------------------------------------------------------------- |
|
119 // |
|
120 MLcBrightnessControl* CMusEngLiveVideoPlayer::LcBrightnessControl() |
|
121 { |
|
122 return &iCameraHandler; |
|
123 } |
|
124 |
|
125 // ----------------------------------------------------------------------------- |
|
126 // From MLcFileControl |
|
127 // ----------------------------------------------------------------------------- |
|
128 // |
|
129 void CMusEngLiveVideoPlayer::SetLcFileNameL( const TFileName& aFileName ) |
|
130 { |
|
131 iFileName = aFileName; |
|
132 } |
|
133 |
|
134 // ----------------------------------------------------------------------------- |
|
135 // From MLcFileControl |
|
136 // ----------------------------------------------------------------------------- |
|
137 // |
|
138 TFileName& CMusEngLiveVideoPlayer::LcFileName() |
|
139 { |
|
140 return iFileName; |
|
141 } |
|
142 |
|
143 // ----------------------------------------------------------------------------- |
|
144 // From MLcDestinationFileControl |
|
145 // ----------------------------------------------------------------------------- |
|
146 // |
|
147 void CMusEngLiveVideoPlayer::LcRecordL( TBool aRecord ) |
|
148 { |
|
149 MUS_LOG1( "mus: [ENGINE] -> CMusEngLiveVideoPlayer::LcRecordL(( %d )", |
|
150 aRecord ) |
|
151 |
|
152 MUS_LOG( "mus: [ENGINE] <- CMusEngLiveVideoPlayer::LcRecordL" ) |
|
153 } |
|
154 |
|
155 // ----------------------------------------------------------------------------- |
|
156 // From MLcDestinationFileControl |
|
157 // ----------------------------------------------------------------------------- |
|
158 // |
|
159 TBool CMusEngLiveVideoPlayer::LcIsRecording() |
|
160 { |
|
161 MUS_LOG( "mus: [ENGINE] -> CMusEngLiveVideoPlayer::LcIsRecording()" ) |
|
162 |
|
163 TBool isEnabled( EFalse ); |
|
164 |
|
165 return isEnabled; |
|
166 } |
|