|
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 |
|
19 #ifndef MEDIAMTPDATAPROVIDERCONST_H |
|
20 #define MEDIAMTPDATAPROVIDERCONST_H |
|
21 |
|
22 #include <mtp/mtpprotocolconstants.h> |
|
23 |
|
24 #include "tobjectdescription.h" |
|
25 |
|
26 _LIT( KMTPTxtColon, ":" ); |
|
27 |
|
28 /** Granularity of the drive list*/ |
|
29 const TInt KMtpMaxStringLength = 255; |
|
30 |
|
31 enum TMmMtpNumberOfChannels |
|
32 { |
|
33 EMTPChannelMono = 0x0001, |
|
34 EMTPChannelStereo = 0x0002 |
|
35 }; |
|
36 |
|
37 enum TMmMtpSampleRateValue |
|
38 { |
|
39 EMTPSampleRate8K = 0x00001F40, |
|
40 EMTPSampleRate16K = 0x00003E80, |
|
41 EMTPSampleRate22_05K = 0x00005622, |
|
42 EMTPSampleRate24K = 0x00005DC0, |
|
43 EMTPSampleRate32K = 0x00007D00, |
|
44 EMTPSampleRate44_1K = 0x0000AC44, |
|
45 EMTPSampleRate48K = 0x0000BB80 |
|
46 }; |
|
47 |
|
48 // WAVECodec value |
|
49 enum TMmMtpWAVECodecValue |
|
50 { |
|
51 EMTPAudioWAVECodecMP3 = 0x00000055, |
|
52 EMTPAudioWAVECodecWMA = 0x00000161, |
|
53 EMTPAudioWAVECodecAAC = 0x0000A106, |
|
54 EMTPAudioWAVECodecPCM = 0x00000001 |
|
55 }; |
|
56 |
|
57 // Bitrate value scope |
|
58 enum TMmMtpBitrateValue |
|
59 { |
|
60 EMTPMP3MinBitrate = 0x00001F40, //8 kbps |
|
61 EMTPMP3MaxBitrate = 0x0004E200, //320 kbps |
|
62 EMTPWMAMinBitrate = 0x00001388, //5 kbps |
|
63 EMTPWMAMaxBitrate = 0x0004E200, //320 kbps |
|
64 EMTPAACMinBitrate = 0x00001F40, //8 kbps |
|
65 EMTPAACMaxBitrate = 0x0004E200, //320 kbps |
|
66 EMTPPCMMinBitrate = 0x00003E80, //16 kbps |
|
67 EMTPPCMMaxBitrate = 0x00177000, //1536 kbps |
|
68 EMTPAACPlusMinBitrate = 0x00003E80, //16 kbps |
|
69 EMTPAACPlusMaxBitrate = 0x0008CA00, //576 kbps |
|
70 EMTPAudioBitrateStep = 0x00000001 |
|
71 }; |
|
72 |
|
73 enum TMmMtpDuration |
|
74 { |
|
75 EMTPMinDuration = 0x00000000, |
|
76 EMTPMaxDuration = 0xFFFFFFFF, |
|
77 EMTPDurationStep = 0x00000001 |
|
78 }; |
|
79 |
|
80 enum TMmMtpWidthRange |
|
81 { |
|
82 EMTPMinWidth = 0x000000b0, // 176 pixels |
|
83 EMTPMaxWidth = 0x00000140, // 320 pixels |
|
84 EMTPStepWidth = 0x00000001, |
|
85 }; |
|
86 |
|
87 enum TMmMtpHeightRange |
|
88 { |
|
89 EMTPMinHeight = 0x00000090, // 144 pixels |
|
90 EMTPMaxHeight = 0x000000F0, // 240 pixels |
|
91 EMTPStepHeight = 0x00000001, |
|
92 }; |
|
93 |
|
94 enum TMmMtpVideoBitRateRange |
|
95 { |
|
96 EMTPWMVMinBitrate = 0x00000000, |
|
97 EMTPWMVMaxBitrate = 0x0005dc00, // 384 kbps |
|
98 EMTPVideoBitrateStep = 0x00000001 |
|
99 }; |
|
100 |
|
101 enum TMmMtpScanType |
|
102 { |
|
103 EMTPScanTypeProgressive = 0x0001 |
|
104 }; |
|
105 |
|
106 enum TMmMtpVideoFourCCCodec |
|
107 { |
|
108 EMTPVideoFourCCCodecWMV3 = 0x33564d57/*, // this is intended, please keep it like this, comment out asf fourcc for mp2a and mp4a, not sure if this is needed |
|
109 EMTPVideoFourCCCodecMP2A = 0x4D503241, |
|
110 EMTPVideoFourCCCodecMP4A = 0x4D503441*/ |
|
111 }; |
|
112 |
|
113 enum TMmMtpFramesPerThousandSecondsRange |
|
114 { |
|
115 EMTPMinFramesPerThousandSeconds = 0x00000000, |
|
116 EMTPMaxFramesPerThousandSeconds = 0x00003a98, // 15000 frame per ms |
|
117 EMTPStepFramesPerThousandSeconds = 0x00000001 |
|
118 }; |
|
119 |
|
120 enum TMmMtpKeyFrameDistanceRange |
|
121 { |
|
122 EMTPMinKeyFrameDistance = 0x00000000, |
|
123 EMTPMaxKeyFrameDistance = 0x00003a98, // 15000 ms |
|
124 EMTPStepKeyFrameDistance = 0x00000001 |
|
125 }; |
|
126 |
|
127 enum TMmMtpDrmPropertyValues |
|
128 { |
|
129 EMTPDrmNoProtection = 0x0000, |
|
130 EMTPDrmProtection = 0x0001, |
|
131 EMTPDrmReserveForMTP = 0x4000, |
|
132 EMTPDrmVenderExtension = 0x4001 |
|
133 }; |
|
134 |
|
135 enum TMmMtpOMADrmPropertyValues |
|
136 { |
|
137 EMTPOMADrmNoProtection = 0x00, |
|
138 EMTPOMADrmProtection = 0x01 |
|
139 }; |
|
140 |
|
141 /** |
|
142 * define all the operations that are supported by the media mtp data provider |
|
143 */ |
|
144 static const TUint16 KMediaMtpDataProviderSupportedFormats[] = |
|
145 { |
|
146 EMTPFormatCodeMP3, |
|
147 #ifdef __WINDOWS_MEDIA |
|
148 EMTPFormatCodeWMA, |
|
149 #endif |
|
150 EMTPFormatCodeMP4Container, |
|
151 EMTPFormatCode3GPContainer, |
|
152 EMTPFormatCodeAAC, |
|
153 EMTPFormatCodeWAV, |
|
154 #ifdef __WINDOWS_MEDIA |
|
155 EMTPFormatCodeWMV, |
|
156 EMTPFormatCodeASF |
|
157 #endif |
|
158 }; |
|
159 |
|
160 /** |
|
161 * define all the operations that are supported by the media mtp data provider |
|
162 */ |
|
163 static const TUint16 KMediaMtpDataProviderSupportedOperations[] = |
|
164 { |
|
165 // basic mode |
|
166 EMTPOpCodeGetObjectInfo, |
|
167 EMTPOpCodeGetObject, |
|
168 EMTPOpCodeDeleteObject, |
|
169 EMTPOpCodeSendObjectInfo, |
|
170 EMTPOpCodeSendObject, |
|
171 EMTPOpCodeMoveObject, |
|
172 EMTPOpCodeCopyObject, |
|
173 EMTPOpCodeGetPartialObject, |
|
174 EMTPOpCodeGetObjectPropsSupported, |
|
175 EMTPOpCodeGetObjectPropDesc, |
|
176 EMTPOpCodeGetObjectPropValue, |
|
177 EMTPOpCodeSetObjectPropValue, |
|
178 |
|
179 // enhanced mode |
|
180 EMTPOpCodeGetObjectPropList, |
|
181 EMTPOpCodeSetObjectPropList, |
|
182 EMTPOpCodeGetInterdependentPropDesc, |
|
183 EMTPOpCodeSendObjectPropList, |
|
184 EMTPOpCodeGetFormatCapabilities |
|
185 }; |
|
186 |
|
187 // Mandatory for audio formats |
|
188 static const TUint16 KMmMtpDpSupportedPropMandatoryAudio[] = |
|
189 { |
|
190 EMTPObjectPropCodeArtist, |
|
191 EMTPObjectPropCodeTrack, |
|
192 EMTPObjectPropCodeGenre, |
|
193 EMTPObjectPropCodeAlbumName, |
|
194 EMTPObjectPropCodeSampleRate, |
|
195 EMTPObjectPropCodeNumberOfChannels, |
|
196 EMTPObjectPropCodeAudioWAVECodec, |
|
197 EMTPObjectPropCodeAudioBitRate, |
|
198 }; |
|
199 |
|
200 // Additional for audio formats |
|
201 static const TUint16 KMmMtpDpSupportedPropAdditionalAudio[] = |
|
202 { |
|
203 EMTPObjectPropCodeDuration, |
|
204 EMTPObjectPropCodeOriginalReleaseDate, |
|
205 EMTPObjectPropCodeDescription, |
|
206 EMTPObjectPropCodeComposer, |
|
207 EMTPObjectPropCodeDRMStatus, |
|
208 EMTPExtObjectPropCodeOmaDrmStatus, |
|
209 }; |
|
210 |
|
211 // Mandatory properties for WMV/ASF |
|
212 static const TUint16 KMmMtpDpSupportedPropMandatoryWMV[] = |
|
213 { |
|
214 EMTPObjectPropCodeWidth, |
|
215 EMTPObjectPropCodeHeight, |
|
216 EMTPObjectPropCodeDuration, |
|
217 EMTPObjectPropCodeGenre, |
|
218 EMTPObjectPropCodeUseCount, |
|
219 EMTPObjectPropCodeSampleRate, |
|
220 EMTPObjectPropCodeNumberOfChannels, |
|
221 EMTPObjectPropCodeScanType, |
|
222 EMTPObjectPropCodeAudioWAVECodec, |
|
223 EMTPObjectPropCodeAudioBitRate, |
|
224 EMTPObjectPropCodeVideoFourCCCodec, |
|
225 EMTPObjectPropCodeVideoBitRate, |
|
226 EMTPObjectPropCodeFramesPerThousandSeconds, |
|
227 EMTPObjectPropCodeKeyFrameDistance, |
|
228 EMTPObjectPropCodeEncodingProfile, |
|
229 }; |
|
230 |
|
231 // Additional for WMV/ASF |
|
232 static const TUint16 KMmMtpDpSupportedPropAdditionalWMV[] = |
|
233 { |
|
234 EMTPObjectPropCodeParentalRating, |
|
235 EMTPObjectPropCodeDRMStatus, |
|
236 EMTPExtObjectPropCodeOmaDrmStatus, |
|
237 }; |
|
238 |
|
239 |
|
240 #endif // MEDIAMTPDATAPROVIDERCONST_H |