sl@0
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
// Part of the MVS Application for TechView
|
sl@0
|
15 |
//
|
sl@0
|
16 |
|
sl@0
|
17 |
|
sl@0
|
18 |
#ifndef MVSAPPUI_H
|
sl@0
|
19 |
#define MVSAPPUI_H
|
sl@0
|
20 |
|
sl@0
|
21 |
|
sl@0
|
22 |
#include <mda/common/controller.h>
|
sl@0
|
23 |
#include <flogger.h>
|
sl@0
|
24 |
#include <techview/eikdialg.h>
|
sl@0
|
25 |
|
sl@0
|
26 |
#include "MVSApp.h"
|
sl@0
|
27 |
#include "MVSAppView.h"
|
sl@0
|
28 |
#include "audioplayagent.h"
|
sl@0
|
29 |
#include "audiorecordagent.h"
|
sl@0
|
30 |
#include "videoplayagent.h"
|
sl@0
|
31 |
#include "videorecordagent.h"
|
sl@0
|
32 |
#include "SettingsManager.h"
|
sl@0
|
33 |
|
sl@0
|
34 |
const TInt KMaxExtensionSize = 16;
|
sl@0
|
35 |
const TInt KMaxDisplayLabelSize = 32;
|
sl@0
|
36 |
const TInt KMaxDollarPaddingBufferSize = 256;
|
sl@0
|
37 |
const TInt KErrorTextLength = 80;
|
sl@0
|
38 |
|
sl@0
|
39 |
//forward declariotions.
|
sl@0
|
40 |
//The volume dialog class, used to increase/decrease volume.
|
sl@0
|
41 |
class CMVSVolumeDialog;
|
sl@0
|
42 |
//The balance dialog class, used to set the balance to right/left/centre.
|
sl@0
|
43 |
class CMVSBalanceDialog;
|
sl@0
|
44 |
//The repeats dialog class, used to set the number of times a clip has to be played back, along with the delay between the playback.
|
sl@0
|
45 |
class CMVSRepeatDialog;
|
sl@0
|
46 |
//The Controller selction dialog class, used to select the format and the controller,before recording.
|
sl@0
|
47 |
class CMVSSelectPluginsDialog;
|
sl@0
|
48 |
//The SaveAs dialog class, used to input the file name in which the recorded data would be stored.
|
sl@0
|
49 |
class CMVSSaveAsDialog;
|
sl@0
|
50 |
//The MetaInfo Editing dialog class, used to edit the Metadata info for a clip.
|
sl@0
|
51 |
class CMVSEditMetaInfoDialog;
|
sl@0
|
52 |
//The audio controller settings dialog class, used to set controller specific features like bitrates,samplerates,channels etc.
|
sl@0
|
53 |
class CMVSConfigAudioFormatDialog;
|
sl@0
|
54 |
//The system info dialog class,used to display a list of all the supported controllers and codecs by the system.
|
sl@0
|
55 |
class CMVSSystemInfoDialog;
|
sl@0
|
56 |
//The video Setting dialog class, used to set the video playing/recording properties such as Rotation and Cropping.
|
sl@0
|
57 |
class CMVSVideoSettingDialog;
|
sl@0
|
58 |
//The audio Setting dialog class, used to set the audio playing properties such as priority preferences,repeats etc.
|
sl@0
|
59 |
class CMVSAudioSettingDialog;
|
sl@0
|
60 |
//The Play Window dialog class, used to set the play window for a audio clip, specifying the start and end position.
|
sl@0
|
61 |
class CMVSSetPlayWindowDialog;
|
sl@0
|
62 |
//The crop window setting class, used to set the cropping position for a recorded clip.
|
sl@0
|
63 |
class CMVSCropDialog;
|
sl@0
|
64 |
//The video controller settings dialog class, used to set controller specific features like framerates,framsize,codecs etc.
|
sl@0
|
65 |
class CMVSConfigVideoFormatDialog;
|
sl@0
|
66 |
//The timer class, used to refresh the timer in the app periodically,while playing/recording a clip.
|
sl@0
|
67 |
class CMVSViewTicker;
|
sl@0
|
68 |
//The MetaInfo viewing dialog class, used to view the Metadata info of a clip.
|
sl@0
|
69 |
class CMVSViewMetaInfoDialog;
|
sl@0
|
70 |
//The class provides the interface to set the video output screen.
|
sl@0
|
71 |
class CMVSMultipleScreenDialog;
|
sl@0
|
72 |
//This class used to register the application for AP&R
|
sl@0
|
73 |
class CMVSResourceNotifyDialog;
|
sl@0
|
74 |
|
sl@0
|
75 |
class CMVSVideoControl;
|
sl@0
|
76 |
|
sl@0
|
77 |
//The main class that links to all the dialog windows in the application. This class implements the HandleCommandL()
|
sl@0
|
78 |
//function that handles any input generated by the user on the UI,and calls the respective dialouge.It acts as an interface
|
sl@0
|
79 |
//between all the dialouges and the user.Also this class is responsible for processing the commands and linking with
|
sl@0
|
80 |
//the agents to the UI.
|
sl@0
|
81 |
class CMVSAppUi : public CEikAppUi, MMVSClientObserver
|
sl@0
|
82 |
{
|
sl@0
|
83 |
public:
|
sl@0
|
84 |
void ConstructL();
|
sl@0
|
85 |
~CMVSAppUi();
|
sl@0
|
86 |
CMVSAppUi();
|
sl@0
|
87 |
void SetRepeats(TInt aNoRepeats, TTimeIntervalMicroSeconds aDelay);
|
sl@0
|
88 |
void SetBalanceL(TInt aBalance);
|
sl@0
|
89 |
void SetVolumeL(TInt aVolume, TTimeIntervalMicroSeconds aRamp);
|
sl@0
|
90 |
//for audio aMediaType = 0; for video aMediaType = 1;
|
sl@0
|
91 |
TInt GetExtensionListL(CDesCArrayFlat* aExtArray,TBool aMediaType);
|
sl@0
|
92 |
//for audio aMediaType = 0; for video aMediaType = 1;
|
sl@0
|
93 |
TInt GetPluginListL(TInt8 aExtIdx,CDesCArrayFlat* aExtArray,CDesCArrayFlat* aPluginArray,TBool aMediaType);
|
sl@0
|
94 |
void SetMetaDataL(RPointerArray<CMMFMetaDataEntry> aMetaArray);
|
sl@0
|
95 |
void GetMetaDataL(RPointerArray<CMMFMetaDataEntry>& aMetaArray);
|
sl@0
|
96 |
void SelectedPluginIdx(TInt aIdx);
|
sl@0
|
97 |
void SelectedExtension(TDesC16& aDes);
|
sl@0
|
98 |
void GetSupportedBitRatesL(RArray <TUint>& aBitRateArray);
|
sl@0
|
99 |
void GetSupportedSampleRatesArrayL(RArray<TUint>& aSampleRatesArray);
|
sl@0
|
100 |
void GetSupportedNoChannelsArrayL(RArray<TUint>& aNoChannelsArray);
|
sl@0
|
101 |
void GetSupportedCodecsArrayL(RArray<TFourCC>& aCodecsArray);
|
sl@0
|
102 |
void SelectedMedia(TBool aMediaType);
|
sl@0
|
103 |
void SetSampleRateL(TUint aSampleRate);
|
sl@0
|
104 |
void SetChannelsL(TUint aNumberOfChannels);
|
sl@0
|
105 |
void SetBitRateL(TUint aBitRate);
|
sl@0
|
106 |
void SetCodecsL(TFourCC aDataType);
|
sl@0
|
107 |
void GetSupportedFrameRatesL(RArray <TReal32>& aFrameRateArray);
|
sl@0
|
108 |
void GetSupportedFrameSizeArrayL(RArray <TSize>& aFrameRateArray);
|
sl@0
|
109 |
TInt GetSystemInfoL(CDesCArrayFlat* aPluginArray);
|
sl@0
|
110 |
void SetVideoFrameRateL(TReal32 aFrameRate);
|
sl@0
|
111 |
void SetVideoFrameSizeL(TSize aFrameSize);
|
sl@0
|
112 |
void SetAudioEnabledL(TBool aAudioEnabled);
|
sl@0
|
113 |
void SetRotationL(TVideoRotation aRotation);
|
sl@0
|
114 |
|
sl@0
|
115 |
void SetScaleFactorL(TReal32 aScaleWidth,TReal32 aScaleHeight,TBool aAntiAliasFiltering);
|
sl@0
|
116 |
void GetScaleFactorL(TReal32& aScaleWidth, TReal32& aScaleHeight, TBool& aAntiAliasFiltering);
|
sl@0
|
117 |
|
sl@0
|
118 |
void SetCropRegionL(const TRect& aCropRegion);
|
sl@0
|
119 |
void GetCropRegionL(TRect& aCropRegion);
|
sl@0
|
120 |
|
sl@0
|
121 |
void SetVideoExtent(const TRect& aVideoExtent);
|
sl@0
|
122 |
void SetWindowClippingRect(const TRect& aWindowClipRect);
|
sl@0
|
123 |
void SetOverlayTextL(const TDesC& aOverlayText);
|
sl@0
|
124 |
const TDesC& OverlayText() const;
|
sl@0
|
125 |
|
sl@0
|
126 |
void SetAutoScaleL(TAutoScaleType aAutoScaleType, TInt aHorizPos, TInt aVertPos);
|
sl@0
|
127 |
void GetAutoScale(TAutoScaleType& aScaleType, TInt& aHorizPos, TInt& aVertPos);
|
sl@0
|
128 |
|
sl@0
|
129 |
void GetSupportedVideoTypesL(CDesC8ArrayFlat& aMimeArray);
|
sl@0
|
130 |
void SetVideoTypeL(const TDesC8 &aType);
|
sl@0
|
131 |
void SetPriorityL(TInt aPriority, TMdaPriorityPreference aPriorityPreference);
|
sl@0
|
132 |
void SetCropL(TTimeIntervalMicroSeconds aCropStart,TBool aCropFromBeginning);
|
sl@0
|
133 |
TBool SetPlayWindow(TTimeIntervalMicroSeconds aStart,TTimeIntervalMicroSeconds aEnd);
|
sl@0
|
134 |
void WriteAudioDataL(CMVSConfigAudioFormatDialog* apAudioFormat,
|
sl@0
|
135 |
const TUid& aUid);
|
sl@0
|
136 |
void WriteVideoDataL(CMVSConfigVideoFormatDialog* apVideoFormatDlg,
|
sl@0
|
137 |
const TUid& aUid);
|
sl@0
|
138 |
void UpdatePositionViewL();
|
sl@0
|
139 |
void InternalizeL(RReadStream& aStream);
|
sl@0
|
140 |
void ExternalizeL(RWriteStream& aStream);
|
sl@0
|
141 |
void SetPosition(TTimeIntervalMicroSeconds& aPos);
|
sl@0
|
142 |
void SetMaxFileSize(TInt& aVal);
|
sl@0
|
143 |
void SetOutputScreen(TInt aScreenNumber);
|
sl@0
|
144 |
void RegisterForNotification(TBool aRegisterd);
|
sl@0
|
145 |
void SetPip(TBool aPip);
|
sl@0
|
146 |
void SetCrp(TBool aCrp);
|
sl@0
|
147 |
private:
|
sl@0
|
148 |
inline void FileOpenL();
|
sl@0
|
149 |
inline void FileOpenForRecordL();
|
sl@0
|
150 |
void FileClose();
|
sl@0
|
151 |
TTimeIntervalMicroSeconds GetCropStart() const;
|
sl@0
|
152 |
TTimeIntervalMicroSeconds GetCropEnd() const;
|
sl@0
|
153 |
void InitializeMetaArrayL();
|
sl@0
|
154 |
TReal32 GetVideoFrameRateL();
|
sl@0
|
155 |
void SaveAsDialogL();
|
sl@0
|
156 |
void DetermineFinalFNameL();
|
sl@0
|
157 |
TVideoRotation GetRotationL();
|
sl@0
|
158 |
void LogErrors(TInt aError);
|
sl@0
|
159 |
void Reset();
|
sl@0
|
160 |
void HandleCommandL(TInt aCommand); //Handles command invocations
|
sl@0
|
161 |
void BuildDollarDesFromArrayL(TDes& aDollarDes);
|
sl@0
|
162 |
void PopulateInfoWindowDataL(TMVSState aState);
|
sl@0
|
163 |
//from MMVSClientObserver
|
sl@0
|
164 |
void UpdateStateChange(TMVSState aState, TInt aError);
|
sl@0
|
165 |
void MvsResourceNotification(const TDesC8& aNotificationData);
|
sl@0
|
166 |
//Dynamically alter the availability of controls in the menu by
|
sl@0
|
167 |
// 'dimming' and 'undimming' them.
|
sl@0
|
168 |
void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); //Menu set-up
|
sl@0
|
169 |
void UpdateDisplayL(TMVSState aState);
|
sl@0
|
170 |
void ConvertTimeToDes(TTimeIntervalMicroSeconds aPosition,
|
sl@0
|
171 |
TDes& aDes);
|
sl@0
|
172 |
TPoint DrawBorders(const TSize& aSize) const;
|
sl@0
|
173 |
void StopViewFinder();
|
sl@0
|
174 |
|
sl@0
|
175 |
void PrepareVideoControlsL();
|
sl@0
|
176 |
|
sl@0
|
177 |
private:
|
sl@0
|
178 |
//The view
|
sl@0
|
179 |
CMVSAppView* iAppView; //The application view
|
sl@0
|
180 |
CMVSVolumeDialog* iVolumeDialog;
|
sl@0
|
181 |
CMVSBalanceDialog* iBalanceDialog;
|
sl@0
|
182 |
CMVSRepeatDialog* iRepeatDialog;
|
sl@0
|
183 |
CMVSSelectPluginsDialog* iSelectPluginsDialog;
|
sl@0
|
184 |
CDesCArrayFlat* iPluginArray; //Array of supported plugins
|
sl@0
|
185 |
CDesCArrayFlat* iExtArray; //Array of supported Extensions
|
sl@0
|
186 |
CDesCArrayFlat* iCodecArray;//Array of supported Codecs
|
sl@0
|
187 |
CMVSSaveAsDialog* iSaveAsDialog;
|
sl@0
|
188 |
// CMVSSetPriorityDialog* iSetAudioPriorityDialog;
|
sl@0
|
189 |
CMVSEditMetaInfoDialog* iEditMetaInfoDialog;
|
sl@0
|
190 |
CMVSViewMetaInfoDialog* iViewMetaInfoDialog;
|
sl@0
|
191 |
CMVSConfigAudioFormatDialog* iConfigFormatDialog;
|
sl@0
|
192 |
CMVSConfigVideoFormatDialog* iVideoFormatDialog;
|
sl@0
|
193 |
CMVSSystemInfoDialog* iSystemInfo;
|
sl@0
|
194 |
CMVSVideoSettingDialog* iVideoSetting;
|
sl@0
|
195 |
CMVSAudioSettingDialog* iAudioSetting;
|
sl@0
|
196 |
CMVSSetPlayWindowDialog* iSetPlayWindow;
|
sl@0
|
197 |
TFileName iSrcFName;
|
sl@0
|
198 |
TFileName iRecFName;
|
sl@0
|
199 |
RPointerArray<CMMFMetaDataEntry> iMetaArray;
|
sl@0
|
200 |
CMMFMetaDataEntry* iMetaTitle;
|
sl@0
|
201 |
CMMFMetaDataEntry* iMetaAuthor;
|
sl@0
|
202 |
CMMFMetaDataEntry* iMetaCopyright;
|
sl@0
|
203 |
CMMFMetaDataEntry* iMetaRevision;
|
sl@0
|
204 |
CMMFMetaDataEntry* iMetaCategory;
|
sl@0
|
205 |
CMMFMetaDataEntry* iMetaComments;
|
sl@0
|
206 |
//MVSClient
|
sl@0
|
207 |
CDesCArrayFlat* iPluginNames;
|
sl@0
|
208 |
CMVSAudioPlayAgent* iAudioPlayAgent;
|
sl@0
|
209 |
CMVSAudioRecordAgent* iAudioRecordAgent;
|
sl@0
|
210 |
CMVSVideoPlayAgent* iVideoPlayAgent;
|
sl@0
|
211 |
CMVSVideoRecordAgent* iVideoRecordAgent;
|
sl@0
|
212 |
CMVSControllerPluginInfo* iPluginInfo;
|
sl@0
|
213 |
CMVSCropDialog* iCropDialog;
|
sl@0
|
214 |
CMVSViewTicker* iViewTicker;
|
sl@0
|
215 |
CMVSMultipleScreenDialog* iSetScreen;
|
sl@0
|
216 |
CMVSResourceNotifyDialog* iRegisterForNotification;
|
sl@0
|
217 |
CSettingsManager* iSettingManager;
|
sl@0
|
218 |
RArray<TUid> iUidArray;
|
sl@0
|
219 |
RArray<TUid> iAudioUidArray;
|
sl@0
|
220 |
RArray<TUid> iAudioPlayUidArray;
|
sl@0
|
221 |
RArray<TUid> iVideoUidArray;
|
sl@0
|
222 |
TInt iSelectedPluginIdx;
|
sl@0
|
223 |
TInt iPluginsCnt;
|
sl@0
|
224 |
TBool iMediaType;
|
sl@0
|
225 |
TUid iControllerUid;
|
sl@0
|
226 |
TBuf<KMaxExtensionSize> iControllerExt;
|
sl@0
|
227 |
TInt iRec;
|
sl@0
|
228 |
TInt iVolumeOrGain;
|
sl@0
|
229 |
TTimeIntervalMicroSeconds iRamp;
|
sl@0
|
230 |
TInt iMaxVolume;
|
sl@0
|
231 |
TInt iBalance;
|
sl@0
|
232 |
TMVSMode iMode;
|
sl@0
|
233 |
TInt iPriority;
|
sl@0
|
234 |
TMdaPriorityPreference iPriorityPreference;
|
sl@0
|
235 |
TInt iNoRepeats;
|
sl@0
|
236 |
TTimeIntervalMicroSeconds iStart;
|
sl@0
|
237 |
TTimeIntervalMicroSeconds iEnd;
|
sl@0
|
238 |
TTimeIntervalMicroSeconds iCropStart;
|
sl@0
|
239 |
TTimeIntervalMicroSeconds iCropEnd;
|
sl@0
|
240 |
TTimeIntervalMicroSeconds iCropPosition;
|
sl@0
|
241 |
TTimeIntervalMicroSeconds iClipLength;
|
sl@0
|
242 |
TBool iCropFromBeginning;
|
sl@0
|
243 |
TFileName iDestFilename;
|
sl@0
|
244 |
TTimeIntervalMicroSeconds iRepeatDelay;
|
sl@0
|
245 |
TBuf<KMaxDisplayLabelSize> iDisplayState;
|
sl@0
|
246 |
TFileName iDisplayFName;
|
sl@0
|
247 |
TBuf<KMaxDisplayLabelSize> iDisplayTime;
|
sl@0
|
248 |
CDesCArrayFlat iMainWindowText;
|
sl@0
|
249 |
TBuf<KMaxDollarPaddingBufferSize> iDollarDes;
|
sl@0
|
250 |
TTimeIntervalMicroSeconds iTimeElapsed;
|
sl@0
|
251 |
TReal32 iVideoFrameRate;
|
sl@0
|
252 |
TVideoRotation iVideoRotation;
|
sl@0
|
253 |
TUint iBitRate;
|
sl@0
|
254 |
TUint iSampleRate;
|
sl@0
|
255 |
TUint iChannels;
|
sl@0
|
256 |
TVideoRotation iRotation;
|
sl@0
|
257 |
TSize iFrameSize;
|
sl@0
|
258 |
TBool iFileReplace;
|
sl@0
|
259 |
TTimeIntervalMicroSeconds iDuration;
|
sl@0
|
260 |
TBool iAutoplay;
|
sl@0
|
261 |
TBool iOpeningForRecord;
|
sl@0
|
262 |
TMVSState iState;
|
sl@0
|
263 |
RFileLogger iLogger;
|
sl@0
|
264 |
RFs iLogs;
|
sl@0
|
265 |
CEikButtonGroupContainer* iButtons;
|
sl@0
|
266 |
TBool iProceed;
|
sl@0
|
267 |
TBool iRecordLimitSet;
|
sl@0
|
268 |
TInt iMaxFileBuffer;
|
sl@0
|
269 |
TInt iScreenNumber;
|
sl@0
|
270 |
TBool iRegistered;
|
sl@0
|
271 |
TBool iAlreadyRegistered;
|
sl@0
|
272 |
TBool iAudioEnabled;
|
sl@0
|
273 |
TRect iVideoExtent;
|
sl@0
|
274 |
TRect iWindowClipRect;
|
sl@0
|
275 |
RBuf iOverlayText;
|
sl@0
|
276 |
TAutoScaleType iAutoScaleType;
|
sl@0
|
277 |
TInt iAutoScaleHorizPos;
|
sl@0
|
278 |
TInt iAutoScaleVertPos;
|
sl@0
|
279 |
|
sl@0
|
280 |
TBool iPip;
|
sl@0
|
281 |
TBool iCrp;
|
sl@0
|
282 |
TBool iVideoExtentSet;
|
sl@0
|
283 |
TBool iWindowClipRectSet;
|
sl@0
|
284 |
|
sl@0
|
285 |
CMVSVideoControl* iVideoCtl;
|
sl@0
|
286 |
// Controls displaying video, window owning
|
sl@0
|
287 |
RPointerArray<CMVSVideoControl> iVideoCtls;
|
sl@0
|
288 |
|
sl@0
|
289 |
TBool iDisplayAdded;
|
sl@0
|
290 |
};
|
sl@0
|
291 |
|
sl@0
|
292 |
#endif MVSAPPUI_H
|