82 break; |
82 break; |
83 } |
83 } |
84 } |
84 } |
85 |
85 |
86 CMTPTypeInterdependentPropDesc* interdependentPropDesc = CMTPTypeInterdependentPropDesc::NewL(); |
86 CMTPTypeInterdependentPropDesc* interdependentPropDesc = CMTPTypeInterdependentPropDesc::NewL(); |
|
87 CleanupStack::PushL( interdependentPropDesc ); // + interdependentPropDesc |
87 |
88 |
88 if ( audioWaveCodecSupported && audioBitRateSupported ) |
89 if ( audioWaveCodecSupported && audioBitRateSupported ) |
89 { |
90 { |
|
91 if ( ( aFormatCode == EMTPFormatCodeWMA ) |
|
92 || ( aFormatCode == EMTPFormatCodeWMV ) |
|
93 || ( aFormatCode == EMTPFormatCodeASF ) ) |
|
94 { |
|
95 AppendWMAudioInterdepentPropDescL( interdependentPropDesc ); |
|
96 } |
|
97 else |
|
98 { |
|
99 CMTPTypeInterdependentProperties* properties = CMTPTypeInterdependentProperties::NewL(); |
|
100 CleanupStack::PushL( properties ); |
|
101 |
|
102 CMTPTypeObjectPropDesc* propertyDesc1 = NewAudioWaveCodecPropDescL( aFormatCode ); |
|
103 CleanupStack::PushL( propertyDesc1 ); // + propertyDesc1 |
|
104 properties->AppendL( propertyDesc1 ); |
|
105 CleanupStack::Pop( propertyDesc1 ); // - propertyDesc1 |
|
106 |
|
107 CMTPTypeObjectPropDesc* propertyDesc2 = NewAudioBitratePropDescL( aFormatCode ); |
|
108 CleanupStack::PushL( propertyDesc2 ); // + propertyDesc2 |
|
109 properties->AppendL( propertyDesc2 ); |
|
110 CleanupStack::Pop( propertyDesc2 ); // - propertyDesc2 |
|
111 |
|
112 interdependentPropDesc->AppendL( properties ); |
|
113 CleanupStack::Pop( properties ); |
|
114 } |
|
115 } |
|
116 |
|
117 if ( videoFourCcCodecSupported && videoBitRateSupported ) |
|
118 { |
90 CMTPTypeInterdependentProperties* properties = CMTPTypeInterdependentProperties::NewL(); |
119 CMTPTypeInterdependentProperties* properties = CMTPTypeInterdependentProperties::NewL(); |
91 properties->AppendL( NewAudioWaveCodecPropDescL( aFormatCode ) ); |
120 CleanupStack::PushL( properties ); // + properties |
92 properties->AppendL( NewAudioBitratePropDescL( aFormatCode ) ); |
121 |
|
122 CMTPTypeObjectPropDesc* propertyDesc1 = NewVideoFourCCCodecPropDescL( aFormatCode ); |
|
123 CleanupStack::PushL( propertyDesc1 ); // + propertyDesc1 |
|
124 properties->AppendL( propertyDesc1 ); |
|
125 CleanupStack::Pop( propertyDesc1 ); // - propertyDesc1 |
|
126 |
|
127 CMTPTypeObjectPropDesc* propertyDesc2 = NewVideoBitratePropDescL( aFormatCode ); |
|
128 CleanupStack::PushL( propertyDesc2 ); // + propertyDesc2 |
|
129 properties->AppendL( propertyDesc2 ); |
|
130 CleanupStack::Pop( propertyDesc2 ); // - propertyDesc2 |
|
131 |
93 interdependentPropDesc->AppendL( properties ); |
132 interdependentPropDesc->AppendL( properties ); |
94 } |
133 CleanupStack::Pop( properties ); // - properties |
95 |
|
96 if ( videoFourCcCodecSupported && videoBitRateSupported ) |
|
97 { |
|
98 CMTPTypeInterdependentProperties* properties = CMTPTypeInterdependentProperties::NewL(); |
|
99 properties->AppendL( NewVideoFourCCCodecPropDescL( aFormatCode ) ); |
|
100 properties->AppendL( NewVideoBitratePropDescL( aFormatCode ) ); |
|
101 interdependentPropDesc->AppendL( properties ); |
|
102 } |
134 } |
103 |
135 |
104 PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL" ) ); |
136 PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::NewInterdepentPropDescL" ) ); |
|
137 CleanupStack::Pop( interdependentPropDesc ); // - interdependentPropDesc |
105 return interdependentPropDesc; |
138 return interdependentPropDesc; |
|
139 } |
|
140 |
|
141 // ----------------------------------------------------------------------------- |
|
142 // CMediaMtpDataProviderDescriptionUtility::NewWMAudioInterdepentPropDescL |
|
143 // Append WM Audio specific to interdpendent property description. |
|
144 // ----------------------------------------------------------------------------- |
|
145 // |
|
146 void CMediaMtpDataProviderDescriptionUtility::AppendWMAudioInterdepentPropDescL(CMTPTypeInterdependentPropDesc* aInterdependentPropDesc) |
|
147 { |
|
148 PRINT( _L( "MM MTP => CMediaMtpDataProviderDescriptionUtility::AppendWMAudioInterdepentPropDescL" ) ); |
|
149 |
|
150 CMTPTypeInterdependentProperties* properties1 = CMTPTypeInterdependentProperties::NewL(); |
|
151 CleanupStack::PushL( properties1 ); // + properties1 |
|
152 |
|
153 CMTPTypeObjectPropDescEnumerationForm* form = CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT32 ); |
|
154 CleanupStack::PushL( form ); // + form |
|
155 form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecWMA ) ); |
|
156 |
|
157 CMTPTypeObjectPropDesc* propertyDesc1 = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeAudioWAVECodec, *form ); |
|
158 |
|
159 CleanupStack::PopAndDestroy( form ); // - form |
|
160 CleanupStack::PushL( propertyDesc1 ); // + propertyDesc1 |
|
161 properties1->AppendL( propertyDesc1 ); |
|
162 CleanupStack::Pop( propertyDesc1 ); // - propertyDesc1 |
|
163 |
|
164 CMTPTypeObjectPropDesc* propertyDesc2 = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate, |
|
165 EMTPWMAMinBitrate, |
|
166 EMTPWMAMaxBitrate, |
|
167 EMTPAudioBitrateStep ); |
|
168 |
|
169 CleanupStack::PushL( propertyDesc2 ); // + propertyDesc2 |
|
170 properties1->AppendL( propertyDesc2 ); |
|
171 CleanupStack::Pop( propertyDesc2 ); // - propertyDesc2 |
|
172 |
|
173 aInterdependentPropDesc->AppendL( properties1 ); |
|
174 CleanupStack::Pop( properties1 ); // - properties1 |
|
175 |
|
176 CMTPTypeInterdependentProperties* properties2 = CMTPTypeInterdependentProperties::NewL(); |
|
177 CleanupStack::PushL( properties2 ); // + properties2 |
|
178 |
|
179 form = CMTPTypeObjectPropDescEnumerationForm::NewL( EMTPTypeUINT32 ); |
|
180 CleanupStack::PushL( form ); // + form |
|
181 form->AppendSupportedValueL( TMTPTypeUint32( EMTPAudioWAVECodecWMAPro ) ); |
|
182 |
|
183 CMTPTypeObjectPropDesc* propertyDesc3 = CMTPTypeObjectPropDesc::NewL( EMTPObjectPropCodeAudioWAVECodec, *form ); |
|
184 |
|
185 CleanupStack::PopAndDestroy( form ); // - form |
|
186 CleanupStack::PushL( propertyDesc3 ); // + propertyDesc3 |
|
187 properties2->AppendL( propertyDesc3 ); |
|
188 CleanupStack::Pop( propertyDesc3 ); // - propertyDesc3 |
|
189 |
|
190 CMTPTypeObjectPropDesc* propertyDesc4 = NewRangeFormDescriptionL( EMTPObjectPropCodeAudioBitRate, |
|
191 EMTPWMAProMinBitrate, |
|
192 EMTPWMAProMaxBitrate, |
|
193 EMTPAudioBitrateStep ); |
|
194 |
|
195 CleanupStack::PushL( propertyDesc4 ); // + propertyDesc4 |
|
196 properties2->AppendL( propertyDesc4 ); |
|
197 CleanupStack::Pop( propertyDesc4 ); // - propertyDesc4 |
|
198 |
|
199 aInterdependentPropDesc->AppendL( properties2 ); |
|
200 CleanupStack::Pop( properties2 ); // - properties2 |
|
201 |
|
202 PRINT( _L( "MM MTP <= CMediaMtpDataProviderDescriptionUtility::AppendWMAudioInterdepentPropDescL" ) ); |
106 } |
203 } |
107 |
204 |
108 // ----------------------------------------------------------------------------- |
205 // ----------------------------------------------------------------------------- |
109 // CMediaMtpDataProviderDescriptionUtility::NewSpecificPropDescL |
206 // CMediaMtpDataProviderDescriptionUtility::NewSpecificPropDescL |
110 // Construct media dp specific property description. |
207 // Construct media dp specific property description. |