|
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 base playback view |
|
15 * |
|
16 */ |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 |
|
21 |
|
22 // Include Files |
|
23 |
|
24 #include "mpxvideoviewwrapper.h" |
|
25 #include "hbvideobaseplaybackview.h" |
|
26 #include "mpxvideoplaybackviewfiledetails.h" |
|
27 #include "mpxcommonvideoplaybackview.hrh" |
|
28 |
|
29 // Member Functions |
|
30 |
|
31 // ------------------------------------------------------------------------------------------------- |
|
32 // CMPXVideoViewWrapper::CMPXVideoViewWrapper() |
|
33 // ------------------------------------------------------------------------------------------------- |
|
34 // |
|
35 CMPXVideoViewWrapper::CMPXVideoViewWrapper( HbVideoBasePlaybackView* aView ) |
|
36 : iView( aView ) |
|
37 { |
|
38 } |
|
39 |
|
40 // ------------------------------------------------------------------------------------------------- |
|
41 // CMPXVideoViewWrapper::NewL() |
|
42 // ------------------------------------------------------------------------------------------------- |
|
43 // |
|
44 CMPXVideoViewWrapper* CMPXVideoViewWrapper::NewL( HbVideoBasePlaybackView* aView ) |
|
45 { |
|
46 CMPXVideoViewWrapper* self = new (ELeave) CMPXVideoViewWrapper( aView ); |
|
47 |
|
48 CleanupStack::PushL( self ); |
|
49 self->ConstructL(); |
|
50 CleanupStack::Pop(); |
|
51 |
|
52 return self; |
|
53 } |
|
54 |
|
55 // ------------------------------------------------------------------------------------------------- |
|
56 // CMPXVideoViewWrapper::ConstructL() |
|
57 // ------------------------------------------------------------------------------------------------- |
|
58 // |
|
59 void CMPXVideoViewWrapper::ConstructL() |
|
60 { |
|
61 iMediaRequested = EFalse; |
|
62 } |
|
63 |
|
64 // ------------------------------------------------------------------------------------------------- |
|
65 // CMPXVideoViewWrapper::~CMPXVideoViewWrapper() |
|
66 // ------------------------------------------------------------------------------------------------- |
|
67 // |
|
68 CMPXVideoViewWrapper::~CMPXVideoViewWrapper() |
|
69 { |
|
70 } |
|
71 |
|
72 // ------------------------------------------------------------------------------------------------- |
|
73 // CMPXVideoViewWrapper::IsLive() |
|
74 // ------------------------------------------------------------------------------------------------- |
|
75 // |
|
76 TBool CMPXVideoViewWrapper::IsLive() |
|
77 { |
|
78 return EFalse; |
|
79 } |
|
80 |
|
81 // ------------------------------------------------------------------------------------------------- |
|
82 // CMPXVideoViewWrapper::IsPlaylist() |
|
83 // ------------------------------------------------------------------------------------------------- |
|
84 // |
|
85 TBool CMPXVideoViewWrapper::IsPlaylist() |
|
86 { |
|
87 return EFalse; |
|
88 } |
|
89 |
|
90 // ------------------------------------------------------------------------------------------------- |
|
91 // CMPXVideoViewWrapper::CreateGeneralPlaybackCommandL() |
|
92 // ------------------------------------------------------------------------------------------------- |
|
93 // |
|
94 void CMPXVideoViewWrapper::CreateGeneralPlaybackCommandL( int aCmd ) |
|
95 { |
|
96 Q_UNUSED( aCmd ); |
|
97 } |
|
98 |
|
99 // ------------------------------------------------------------------------------------------------- |
|
100 // CMPXVideoViewWrapper::HandleCommandL() |
|
101 // ------------------------------------------------------------------------------------------------- |
|
102 // |
|
103 void CMPXVideoViewWrapper::HandleCommandL( TInt aCommand ) |
|
104 { |
|
105 switch ( aCommand ) |
|
106 { |
|
107 case EMPXPbvCmdNextListItem: |
|
108 { |
|
109 SetFileDetails( EFalse ); |
|
110 break; |
|
111 } |
|
112 |
|
113 case EMPXPbvCmdPreviousListItem: |
|
114 { |
|
115 SetFileDetails( ETrue ); |
|
116 break; |
|
117 } |
|
118 } |
|
119 |
|
120 } |
|
121 |
|
122 // ------------------------------------------------------------------------------------------------- |
|
123 // Request for the media object |
|
124 // ------------------------------------------------------------------------------------------------- |
|
125 // |
|
126 void CMPXVideoViewWrapper::RequestMediaL() |
|
127 { |
|
128 iMediaRequested = ETrue; |
|
129 |
|
130 SetFileDetails( ETrue ); |
|
131 |
|
132 } |
|
133 |
|
134 |
|
135 // ------------------------------------------------------------------------------------------------- |
|
136 // CMPXVideoViewWrapper::ActivateClosePlayerActiveObject |
|
137 // ------------------------------------------------------------------------------------------------- |
|
138 // |
|
139 void CMPXVideoViewWrapper::ActivateClosePlayerActiveObject() |
|
140 { |
|
141 iClosePlayerAO = ETrue; |
|
142 } |
|
143 |
|
144 // ------------------------------------------------------------------------------------------------- |
|
145 // CMPXVideoViewWrapper::IsMultiItemPlaylist() |
|
146 // ------------------------------------------------------------------------------------------------- |
|
147 // |
|
148 TBool CMPXVideoViewWrapper::IsMultiItemPlaylist() |
|
149 { |
|
150 return iFileDetails->mMultiItemPlaylist; |
|
151 } |
|
152 |
|
153 // ------------------------------------------------------------------------------------------------- |
|
154 // CMPXVideoViewWrapper::SetFileDetails() |
|
155 // ------------------------------------------------------------------------------------------------- |
|
156 // |
|
157 void CMPXVideoViewWrapper::SetFileDetails(TBool aDefault) |
|
158 { |
|
159 if ( iFileDetails ) |
|
160 { |
|
161 delete iFileDetails; |
|
162 iFileDetails = NULL; |
|
163 } |
|
164 |
|
165 iFileDetails = new QMPXVideoPlaybackViewFileDetails(); |
|
166 |
|
167 |
|
168 _LIT(KTestMimeType, "video/3gp"); |
|
169 const QString qMimeType( (QChar*)KTestMimeType().Ptr(), KTestMimeType().Length() ); |
|
170 iFileDetails->mMimeType = qMimeType; |
|
171 |
|
172 |
|
173 _LIT(KTestTitle, "Test Video Title"); |
|
174 const QString qTitle( (QChar*)KTestTitle().Ptr(), KTestTitle().Length() ); |
|
175 iFileDetails->mTitle = qTitle; |
|
176 |
|
177 |
|
178 _LIT(KTestArtist, "TestArtist"); |
|
179 const QString qArtist( (QChar*)KTestArtist().Ptr(), KTestArtist().Length() ); |
|
180 iFileDetails->mArtist = qArtist; |
|
181 |
|
182 |
|
183 _LIT(KTestDescription, "Test Description"); |
|
184 const QString qDescription( (QChar*)KTestDescription().Ptr(), KTestDescription().Length() ); |
|
185 iFileDetails->mDescription = qDescription; |
|
186 |
|
187 |
|
188 _LIT(KTestLocation, "Test Location"); |
|
189 const QString qLocation( (QChar*)KTestLocation().Ptr(), KTestLocation().Length() ); |
|
190 iFileDetails->mLocation = qLocation; |
|
191 |
|
192 |
|
193 _LIT(KTestCopyright, "Test Copyright"); |
|
194 const QString qCopyright( (QChar*)KTestCopyright().Ptr(), KTestCopyright().Length() ); |
|
195 iFileDetails->mCopyright = qCopyright; |
|
196 |
|
197 |
|
198 _LIT(KTestLanguage, "Test Language"); |
|
199 const QString qLanguage( (QChar*)KTestLanguage().Ptr(), KTestLanguage().Length() ); |
|
200 iFileDetails->mLanguage = qLanguage; |
|
201 |
|
202 |
|
203 _LIT(KTestKeywords, "Test Keywords"); |
|
204 const QString qKeywords( (QChar*)KTestKeywords().Ptr(), KTestKeywords().Length() ); |
|
205 iFileDetails->mKeywords = qKeywords; |
|
206 |
|
207 |
|
208 if ( aDefault ) |
|
209 { |
|
210 _LIT(KTestClipName, "testClip.3gp"); |
|
211 const QString qClipname( (QChar*)KTestClipName().Ptr(), KTestClipName().Length() ); |
|
212 iFileDetails->mClipName = qClipname; |
|
213 } |
|
214 else |
|
215 { |
|
216 _LIT(KTestClipName, "nextClip.3gp"); |
|
217 const QString qClipname( (QChar*)KTestClipName().Ptr(), KTestClipName().Length() ); |
|
218 iFileDetails->mClipName = qClipname; |
|
219 } |
|
220 |
|
221 |
|
222 iFileDetails->mPlaybackMode = EMPXVideoLocal; |
|
223 iFileDetails->mSeekable = true; |
|
224 iFileDetails->mPausableStream = true; |
|
225 iFileDetails->mAudioEnabled = true; |
|
226 iFileDetails->mVideoEnabled = true; |
|
227 iFileDetails->mPartialPlayback = false; |
|
228 iFileDetails->mRNFormat = false; |
|
229 iFileDetails->mDuration = 100; |
|
230 iFileDetails->mTvOutConnected = false; |
|
231 iFileDetails->mTvOutPlayAllowed = true; |
|
232 iFileDetails->mDrmProtected = false; |
|
233 iFileDetails->mMultiItemPlaylist = false; |
|
234 iFileDetails->mVideoHeight = 320; |
|
235 iFileDetails->mVideoWidth = 240; |
|
236 iFileDetails->mBitRate = 16000; |
|
237 } |
|
238 |
|
239 // ------------------------------------------------------------------------------------------------- |
|
240 // CMPXVideoViewWrapper::IssueVideoAppForegroundCmd() |
|
241 // ------------------------------------------------------------------------------------------------- |
|
242 // |
|
243 void CMPXVideoViewWrapper::IssueVideoAppForegroundCmdL( TBool aForeground ) |
|
244 { |
|
245 iForeground = aForeground; |
|
246 } |
|
247 |
|
248 |
|
249 // ------------------------------------------------------------------------------------------------- |
|
250 // CMPXVideoViewWrapper::UpdateVideoRectDone() |
|
251 // ------------------------------------------------------------------------------------------------- |
|
252 // |
|
253 void CMPXVideoViewWrapper::UpdateVideoRectDone() |
|
254 { |
|
255 } |
|
256 // EOF |