williamr@2
|
1 |
// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef __DEVVIDEORECORD_H__
|
williamr@2
|
17 |
#define __DEVVIDEORECORD_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#include <e32std.h>
|
williamr@2
|
20 |
#include <mmf/devvideo/devvideobase.h>
|
williamr@2
|
21 |
|
williamr@2
|
22 |
class MMMFDevVideoRecordObserver;
|
williamr@2
|
23 |
class CMMFVideoRecordHwDevice;
|
williamr@2
|
24 |
class CMMFVideoEncodeHwDevice;
|
williamr@2
|
25 |
class CMMFVideoPreProcHwDevice;
|
williamr@2
|
26 |
class TVideoOutputBuffer;
|
williamr@2
|
27 |
|
williamr@2
|
28 |
/**
|
williamr@2
|
29 |
MMMFDevVideoRecordProxy is the interface the CDevVideoRecord implementation provides for video recording
|
williamr@2
|
30 |
hardware devices. The hardware devices use this interface to report events and send used pictures and
|
williamr@2
|
31 |
new buffers to the client.
|
williamr@2
|
32 |
@publishedAll
|
williamr@2
|
33 |
@released
|
williamr@2
|
34 |
*/
|
williamr@2
|
35 |
class MMMFDevVideoRecordProxy
|
williamr@2
|
36 |
{
|
williamr@2
|
37 |
public:
|
williamr@2
|
38 |
/**
|
williamr@2
|
39 |
Delivers a new coded data unit to the client. The CDevVideoRecord implementation will maintain a list
|
williamr@2
|
40 |
of buffers and implement NumDataBuffers() and NextBufferL() based on those. The buffers will be returned
|
williamr@2
|
41 |
back to the device using ReturnBuffer().
|
williamr@2
|
42 |
|
williamr@2
|
43 |
@param "aBuffer" "The buffer containing the data to send."
|
williamr@2
|
44 |
*/
|
williamr@2
|
45 |
virtual void MdvrpNewBuffer(TVideoOutputBuffer* aBuffer) = 0;
|
williamr@2
|
46 |
|
williamr@2
|
47 |
/**
|
williamr@2
|
48 |
Returns a used input picture back to the client. Called by the encoder hardware device after the picture
|
williamr@2
|
49 |
has been encoded.
|
williamr@2
|
50 |
|
williamr@2
|
51 |
@param "aPicture" "The picture to return."
|
williamr@2
|
52 |
*/
|
williamr@2
|
53 |
virtual void MdvrpReturnPicture(TVideoPicture* aPicture) = 0;
|
williamr@2
|
54 |
|
williamr@2
|
55 |
/**
|
williamr@2
|
56 |
Sends a notification to the client that the current supplemental info send request has completed.
|
williamr@2
|
57 |
*/
|
williamr@2
|
58 |
virtual void MdvrpSupplementalInfoSent() = 0;
|
williamr@2
|
59 |
|
williamr@2
|
60 |
/**
|
williamr@2
|
61 |
Reports a fatal error to the client. The device must automatically stop processing video data when
|
williamr@2
|
62 |
such errors occur, and may not do further processing before it has been deleted and re-created.
|
williamr@2
|
63 |
|
williamr@2
|
64 |
@param "aDevice" "The device that reports the error."
|
williamr@2
|
65 |
@param "aError" "The error code."
|
williamr@2
|
66 |
*/
|
williamr@2
|
67 |
virtual void MdvrpFatalError(CMMFVideoHwDevice* aDevice, TInt aError) = 0;
|
williamr@2
|
68 |
|
williamr@2
|
69 |
/**
|
williamr@2
|
70 |
Reports that an asynchronous Initialize() method has completed. The device is now ready for recording.
|
williamr@2
|
71 |
|
williamr@2
|
72 |
@param "aDevice" "The device that was initialized."
|
williamr@2
|
73 |
@param "aError" "Initialization result error code, KErrNone if initialization was successful."
|
williamr@2
|
74 |
*/
|
williamr@2
|
75 |
virtual void MdvrpInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError) = 0;
|
williamr@2
|
76 |
|
williamr@2
|
77 |
/**
|
williamr@2
|
78 |
Reports that the input video data end has been reached and all pictures have been processed. Called
|
williamr@2
|
79 |
by each hardware device after their InputEnd() methods have been called and all data has been processed.
|
williamr@2
|
80 |
The proxy implementation will notify the client about stream end when all hardware devices have called
|
williamr@2
|
81 |
this method.
|
williamr@2
|
82 |
*/
|
williamr@2
|
83 |
virtual void MdvrpStreamEnd() = 0;
|
williamr@2
|
84 |
};
|
williamr@2
|
85 |
|
williamr@2
|
86 |
|
williamr@2
|
87 |
/**
|
williamr@2
|
88 |
A video output buffer for a single output coded data unit from the encoder. In practice the encoder is
|
williamr@2
|
89 |
likely to inherit its own buffer class from this class, adding its own internal bookkeeping data.
|
williamr@2
|
90 |
@publishedAll
|
williamr@2
|
91 |
@released
|
williamr@2
|
92 |
*/
|
williamr@2
|
93 |
class TVideoOutputBuffer
|
williamr@2
|
94 |
{
|
williamr@2
|
95 |
public:
|
williamr@2
|
96 |
/**
|
williamr@2
|
97 |
Coded video data for this data unit.
|
williamr@2
|
98 |
*/
|
williamr@2
|
99 |
TPtrC8 iData;
|
williamr@2
|
100 |
|
williamr@2
|
101 |
/**
|
williamr@2
|
102 |
Capture timestamp for this data unit. If a single picture is divided into multiple data units,
|
williamr@2
|
103 |
all data units have the same timestamp.
|
williamr@2
|
104 |
*/
|
williamr@2
|
105 |
TTimeIntervalMicroSeconds iCaptureTimestamp;
|
williamr@2
|
106 |
|
williamr@2
|
107 |
/**
|
williamr@2
|
108 |
Identification number indicating the start of the spatial coverage of the data in the output buffer,
|
williamr@2
|
109 |
for example the first macroblock number.
|
williamr@2
|
110 |
*/
|
williamr@2
|
111 |
TUint iCoverageStartPosition;
|
williamr@2
|
112 |
|
williamr@2
|
113 |
/**
|
williamr@2
|
114 |
End of the spatial coverage of the data in the buffer, for example the last macroblock number.
|
williamr@2
|
115 |
The idenfication numbers can be used to match data partitions with each other.
|
williamr@2
|
116 |
*/
|
williamr@2
|
117 |
TUint iCoverageEndPosition;
|
williamr@2
|
118 |
|
williamr@2
|
119 |
/**
|
williamr@2
|
120 |
Order number of the output buffer having the same spatial coverage as an earlier output buffer
|
williamr@2
|
121 |
of the same picture. Used with video pictures or segments that do not fit into an output buffer.
|
williamr@2
|
122 |
The order number of the first output buffer of a particular spatial coverage area is 0. The order
|
williamr@2
|
123 |
number shall be incremented by 1 for each subsequent output buffer having the same coverage in the
|
williamr@2
|
124 |
same coded picture.
|
williamr@2
|
125 |
*/
|
williamr@2
|
126 |
TUint iOrderNumber;
|
williamr@2
|
127 |
|
williamr@2
|
128 |
/**
|
williamr@2
|
129 |
Lowest unequal error protection level present in the buffer. Level 0 indicates that the buffer can
|
williamr@2
|
130 |
be discarded without causing temporal error propagation in the decoder, higher values indicate more
|
williamr@2
|
131 |
important buffers. If unequal error protection is not used, the value is set to 1.
|
williamr@2
|
132 |
*/
|
williamr@2
|
133 |
TUint iMinErrorProtectionLevel;
|
williamr@2
|
134 |
|
williamr@2
|
135 |
/**
|
williamr@2
|
136 |
Highest unequal error protection level present in the buffer. If unequal error protection is not
|
williamr@2
|
137 |
used, the value is set to 1.
|
williamr@2
|
138 |
*/
|
williamr@2
|
139 |
TUint iMaxErrorProtectionLevel;
|
williamr@2
|
140 |
|
williamr@2
|
141 |
/**
|
williamr@2
|
142 |
True if this buffer contains data that is required for decoding several pictures, for example the
|
williamr@2
|
143 |
only copy of a sequence header. A picture needed for motion compensated prediction is not considered
|
williamr@2
|
144 |
"required for decoding several pictures".
|
williamr@2
|
145 |
*/
|
williamr@2
|
146 |
TBool iRequiredSeveralPictures;
|
williamr@2
|
147 |
|
williamr@2
|
148 |
/**
|
williamr@2
|
149 |
True if this buffer contains data that is required for decoding other parts of the same picture,
|
williamr@2
|
150 |
for example the only copy of the picture header.
|
williamr@2
|
151 |
*/
|
williamr@2
|
152 |
TBool iRequiredThisPicture;
|
williamr@2
|
153 |
|
williamr@2
|
154 |
/**
|
williamr@2
|
155 |
The layer number for this picture if layered bit-rate scalability is used. If layers are not used,
|
williamr@2
|
156 |
the layer number is always zero.
|
williamr@2
|
157 |
*/
|
williamr@2
|
158 |
TUint iLayer;
|
williamr@2
|
159 |
|
williamr@2
|
160 |
/**
|
williamr@2
|
161 |
Sub-sequence identifier of the output picture. A sub-sequence is a set of coded pictures within a
|
williamr@2
|
162 |
bit-rate scalability layer. A picture shall reside in one scalability layer and in one sub-sequence
|
williamr@2
|
163 |
only. A sub-sequence shall not depend on any other sub-sequence in the same or in a higher layer.
|
williamr@2
|
164 |
A sub-sequence in layer 0 can be decoded independently of any other sub-sequences. A sub-sequence
|
williamr@2
|
165 |
identifier labels the sub-sequence within a layer. Consecutive sub-sequences within a particular
|
williamr@2
|
166 |
layer in decoding order shall have a different sub-sequence identifier from each other. See Annex D
|
williamr@2
|
167 |
of H.264 | MPEG-4 AVC for further details.
|
williamr@2
|
168 |
*/
|
williamr@2
|
169 |
TUint iSubSeqId;
|
williamr@2
|
170 |
|
williamr@2
|
171 |
/**
|
williamr@2
|
172 |
The in-layer scalability step for the data in the buffer if in-layer scalability is used.
|
williamr@2
|
173 |
If in-layer scalability is not in use, the step is set to zero.
|
williamr@2
|
174 |
*/
|
williamr@2
|
175 |
TUint iInLayerScalabilityStep;
|
williamr@2
|
176 |
|
williamr@2
|
177 |
/**
|
williamr@2
|
178 |
iDataPartitionNumber equal to 0 indicates that data partitioning is not in use. Values of
|
williamr@2
|
179 |
iDataPartitionNumber greater than 0 indicate the data partition number in descending order of
|
williamr@2
|
180 |
importance, i.e. data partition 1 is the most important data partition subjectively. Data
|
williamr@2
|
181 |
partitioning can be used with multiple unequal error protection levels.
|
williamr@2
|
182 |
*/
|
williamr@2
|
183 |
TUint iDataPartitionNumber;
|
williamr@2
|
184 |
|
williamr@2
|
185 |
/**
|
williamr@2
|
186 |
True if this buffer contains data for a random access point.
|
williamr@2
|
187 |
*/
|
williamr@2
|
188 |
TBool iRandomAccessPoint;
|
williamr@2
|
189 |
|
williamr@2
|
190 |
/**
|
williamr@2
|
191 |
Updated HRD/VBV parameters, valid if HRD/VBV is in use and iRandomAccessPoint is true.
|
williamr@2
|
192 |
*/
|
williamr@2
|
193 |
TPtrC8 iHrdVbvParams;
|
williamr@2
|
194 |
|
williamr@2
|
195 |
/**
|
williamr@2
|
196 |
Coding-standard specific data.
|
williamr@2
|
197 |
*/
|
williamr@2
|
198 |
TPtrC8 iCodingStandardSpecificData;
|
williamr@2
|
199 |
|
williamr@2
|
200 |
/**
|
williamr@2
|
201 |
Implementation-specific data.
|
williamr@2
|
202 |
*/
|
williamr@2
|
203 |
TPtrC8 iImplementationSpecificData;
|
williamr@2
|
204 |
|
williamr@2
|
205 |
/**
|
williamr@2
|
206 |
A queue link used internally by the MSL API. The field must not be modified while the buffer is
|
williamr@2
|
207 |
in the MSL API, but can be used by the client before the buffer has been written and after the
|
williamr@2
|
208 |
buffer has been returned.
|
williamr@2
|
209 |
*/
|
williamr@2
|
210 |
TDblQueLink iLink;
|
williamr@2
|
211 |
};
|
williamr@2
|
212 |
|
williamr@2
|
213 |
|
williamr@2
|
214 |
|
williamr@2
|
215 |
/**
|
williamr@2
|
216 |
This class contains information about the pre-processing capabilities that an encoder or a pre-processor
|
williamr@2
|
217 |
hardware has. Although it mainly contains static data, it is defined as a complete CBase-derived class
|
williamr@2
|
218 |
since the data is relatively complex and proper memory management is necessary.
|
williamr@2
|
219 |
|
williamr@2
|
220 |
The objects are created by the pre-processor or encoder devices, and used by the MSL video client code.
|
williamr@2
|
221 |
|
williamr@2
|
222 |
@publishedAll
|
williamr@2
|
223 |
@released
|
williamr@2
|
224 |
*/
|
williamr@2
|
225 |
class CPreProcessorInfo : public CBase
|
williamr@2
|
226 |
{
|
williamr@2
|
227 |
public:
|
williamr@2
|
228 |
/**
|
williamr@2
|
229 |
Creates and returns a new CPreProcessorInfo object. All data passed into this method is copied.
|
williamr@2
|
230 |
@param "aUid" "The uid of the pre-processor."
|
williamr@2
|
231 |
@param "aManufacturer" "The manufacturer of the pre-processor."
|
williamr@2
|
232 |
@param "aIdentifier" "The manufacturer-specific identifier of the pre-processor."
|
williamr@2
|
233 |
@param "aVersion" "The version of the pre-processor."
|
williamr@2
|
234 |
@param "aAccelerated" "Whether the pre-processor is hw accelerated or not."
|
williamr@2
|
235 |
@param "aSupportsDirectCapture" "Whether the pre-processor supports direct capture."
|
williamr@2
|
236 |
@param "aInputFormats" "An array of the supported input formats."
|
williamr@2
|
237 |
@param "aOutputFormats" "An array of the supported output formats."
|
williamr@2
|
238 |
@param "aSupportedCombinations" "An array of the supported combinations."
|
williamr@2
|
239 |
@param "aSupportsArbitraryScaling" "Whether the pre-processor supports arbitrary scaling."
|
williamr@2
|
240 |
@param "aSupportsAntiAliasedScaling" "Whether the pre-processor supports anti-alias filtering on scaling.""
|
williamr@2
|
241 |
@param "aSupportedScaleFactors" "An array of the supported scale factors if arbitrary scaling isn't suported"
|
williamr@2
|
242 |
@param "aYuvToYuvCapabilities" "The yuv to yuv conversion capabilities of the pre-processor."
|
williamr@2
|
243 |
@param "aSupportedRgbRanges" "The supported rgb ranges."
|
williamr@2
|
244 |
@param "aSupportedRotations" "The supported rotations."
|
williamr@2
|
245 |
@param "aImplementationSpecificInfo" "Implementation-specific information."
|
williamr@2
|
246 |
@return"The newly created CPreProcessorInfo object."
|
williamr@2
|
247 |
@leave "This method may leave with one of the system-wide error codes.
|
williamr@2
|
248 |
*/
|
williamr@2
|
249 |
IMPORT_C static CPreProcessorInfo* NewL(TUid aUid,
|
williamr@2
|
250 |
const TDesC& aManufacturer,
|
williamr@2
|
251 |
const TDesC& aIdentifier,
|
williamr@2
|
252 |
TVersion aVersion,
|
williamr@2
|
253 |
TBool aAccelerated,
|
williamr@2
|
254 |
TBool aSupportsDirectCapture,
|
williamr@2
|
255 |
const TArray<TUncompressedVideoFormat>& aInputFormats,
|
williamr@2
|
256 |
const TArray<TUncompressedVideoFormat>& aOutputFormats,
|
williamr@2
|
257 |
const TArray<TUint32>& aSupportedCombinations,
|
williamr@2
|
258 |
TBool aSupportsArbitraryScaling,
|
williamr@2
|
259 |
TBool aSupportsAntiAliasedScaling,
|
williamr@2
|
260 |
const TArray<TScaleFactor>& aSupportedScaleFactors,
|
williamr@2
|
261 |
const TYuvToYuvCapabilities& aYuvToYuvCapabilities,
|
williamr@2
|
262 |
TUint32 aSupportedRgbRanges,
|
williamr@2
|
263 |
TUint32 aSupportedRotations,
|
williamr@2
|
264 |
const TDesC8& aImplementationSpecificInfo);
|
williamr@2
|
265 |
|
williamr@2
|
266 |
/**
|
williamr@2
|
267 |
Destructor.
|
williamr@2
|
268 |
*/
|
williamr@2
|
269 |
IMPORT_C ~CPreProcessorInfo();
|
williamr@2
|
270 |
|
williamr@2
|
271 |
/**
|
williamr@2
|
272 |
Returns the pre-processor UID.
|
williamr@2
|
273 |
@return "Pre-processor UID."
|
williamr@2
|
274 |
*/
|
williamr@2
|
275 |
IMPORT_C TUid Uid() const;
|
williamr@2
|
276 |
|
williamr@2
|
277 |
/**
|
williamr@2
|
278 |
Returns the hardware device manufacturer.
|
williamr@2
|
279 |
@return "The hardware device manufacturer. The reference is valid until this is destroyed."
|
williamr@2
|
280 |
*/
|
williamr@2
|
281 |
IMPORT_C const TDesC& Manufacturer() const;
|
williamr@2
|
282 |
|
williamr@2
|
283 |
/**
|
williamr@2
|
284 |
Returns the hardware device manufacturer-specific identifier. The combination of the manufacturer
|
williamr@2
|
285 |
and identifier uniquely identifies the plug-in.
|
williamr@2
|
286 |
@return "The hardware device identifier. The reference is valid until this object is destroyed."
|
williamr@2
|
287 |
*/
|
williamr@2
|
288 |
IMPORT_C const TDesC& Identifier() const;
|
williamr@2
|
289 |
|
williamr@2
|
290 |
/**
|
williamr@2
|
291 |
Returns the pre-processor version.
|
williamr@2
|
292 |
@return "Pre-processor version."
|
williamr@2
|
293 |
*/
|
williamr@2
|
294 |
IMPORT_C TVersion Version() const;
|
williamr@2
|
295 |
|
williamr@2
|
296 |
/**
|
williamr@2
|
297 |
Returns whether the plug-in is hardware-accelerated. Hardware-accelerated pre-processors can run on
|
williamr@2
|
298 |
an application DSP or dedicated hardware.
|
williamr@2
|
299 |
@return "True if the pre-processor is hardware-accelerated."
|
williamr@2
|
300 |
*/
|
williamr@2
|
301 |
IMPORT_C TBool Accelerated() const;
|
williamr@2
|
302 |
|
williamr@2
|
303 |
/**
|
williamr@2
|
304 |
Returns whether the hardware device supports direct capture. Pre-processors supporting direct capture
|
williamr@2
|
305 |
can get the input pictures directly from a camera, possibly using an efficient hardware-dependent data
|
williamr@2
|
306 |
path.
|
williamr@2
|
307 |
@return "True if the pre-processor supports direct capture."
|
williamr@2
|
308 |
*/
|
williamr@2
|
309 |
IMPORT_C TBool SupportsDirectCapture() const;
|
williamr@2
|
310 |
|
williamr@2
|
311 |
/**
|
williamr@2
|
312 |
Returns whether the pre-processor supports the given input format.
|
williamr@2
|
313 |
@param "aFormat" "The format to be checked."
|
williamr@2
|
314 |
@return "True if the pre-processor supports the given input format."
|
williamr@2
|
315 |
*/
|
williamr@2
|
316 |
IMPORT_C TBool SupportsInputFormat(const TUncompressedVideoFormat& aFormat) const;
|
williamr@2
|
317 |
|
williamr@2
|
318 |
/**
|
williamr@2
|
319 |
Returns the input formats that the pre-processor supports.
|
williamr@2
|
320 |
@return "An RArray table of supported video formats (TUncompressedVideoFormat). The reference is valid
|
williamr@2
|
321 |
until the CPreProcessorInfo object is destroyed."
|
williamr@2
|
322 |
*/
|
williamr@2
|
323 |
IMPORT_C const RArray<TUncompressedVideoFormat>& SupportedInputFormats() const;
|
williamr@2
|
324 |
|
williamr@2
|
325 |
/**
|
williamr@2
|
326 |
Returns whether the pre-processor supports the given output format.
|
williamr@2
|
327 |
@param "aFormat" "The format to be checked."
|
williamr@2
|
328 |
@return "True if the pre-processor supports the given input format."
|
williamr@2
|
329 |
*/
|
williamr@2
|
330 |
IMPORT_C TBool SupportsOutputFormat(const TUncompressedVideoFormat& aFormat) const;
|
williamr@2
|
331 |
|
williamr@2
|
332 |
/**
|
williamr@2
|
333 |
Returns the output formats that the pre-processor supports.
|
williamr@2
|
334 |
@return "An RArray table of supported video formats (TUncompressedVideoFormat). The reference is valid
|
williamr@2
|
335 |
until the CPreProcessorInfo object is destroyed."
|
williamr@2
|
336 |
*/
|
williamr@2
|
337 |
IMPORT_C const RArray<TUncompressedVideoFormat>& SupportedOutputFormats() const;
|
williamr@2
|
338 |
|
williamr@2
|
339 |
/**
|
williamr@2
|
340 |
Returns whether the pre-processor supports the given pre-processing combination.
|
williamr@2
|
341 |
@param "aCombination" "Pre-processing combination, a bitwise OR of values from TPrePostProcessType."
|
williamr@2
|
342 |
@return "True if the pre-processing combination is supported."
|
williamr@2
|
343 |
*/
|
williamr@2
|
344 |
IMPORT_C TBool SupportsCombination(TUint32 aCombination) const;
|
williamr@2
|
345 |
|
williamr@2
|
346 |
/**
|
williamr@2
|
347 |
Lists all supported pre-processing combinations.
|
williamr@2
|
348 |
@return "An RArray table of pre-processing combinations. Each value is a bitwise OR of values from
|
williamr@2
|
349 |
TPrePostProcessType. The reference is valid until the CPreProcessorInfo object is destroyed."
|
williamr@2
|
350 |
*/
|
williamr@2
|
351 |
IMPORT_C const RArray<TUint32>& SupportedCombinations() const;
|
williamr@2
|
352 |
|
williamr@2
|
353 |
/**
|
williamr@2
|
354 |
Returns whether the pre-processor supports arbitrary scaling.
|
williamr@2
|
355 |
@return "True if arbitrary scaling is supported. If arbitrary scaling is not supported, some specific
|
williamr@2
|
356 |
scale factors can still be available."
|
williamr@2
|
357 |
*/
|
williamr@2
|
358 |
IMPORT_C TBool SupportsArbitraryScaling() const;
|
williamr@2
|
359 |
|
williamr@2
|
360 |
/**
|
williamr@2
|
361 |
Returns whether the hardware device supports anti-aliasing filtering for scaling.
|
williamr@2
|
362 |
@return "True if anti-aliasing filtering is supported."
|
williamr@2
|
363 |
*/
|
williamr@2
|
364 |
IMPORT_C TBool SupportsAntiAliasedScaling() const;
|
williamr@2
|
365 |
|
williamr@2
|
366 |
/**
|
williamr@2
|
367 |
Returns the scaling factors the plug-in supports. If the plug-in supports arbitrary scaling the list
|
williamr@2
|
368 |
is empty - use SupportsArbitraryScaling() first.
|
williamr@2
|
369 |
@return "An RArray list of supported scale factors (TScaleFactor). The reference is valid until the
|
williamr@2
|
370 |
CPreProcessorInfo object is destroyed. If the pre-processor supports arbitrary scaling or
|
williamr@2
|
371 |
no scaling at all, the list is empty."
|
williamr@2
|
372 |
*/
|
williamr@2
|
373 |
IMPORT_C const RArray<TScaleFactor>& SupportedScaleFactors() const;
|
williamr@2
|
374 |
|
williamr@2
|
375 |
/**
|
williamr@2
|
376 |
Returns the YUV to YUV conversion capabilities for the pre-processor.
|
williamr@2
|
377 |
@return "The conversion capabilities, as a TYuvToYuvCapabilities structure. The reference is valid
|
williamr@2
|
378 |
until the CPreProcessorInfo object is destroyed."
|
williamr@2
|
379 |
*/
|
williamr@2
|
380 |
IMPORT_C const TYuvToYuvCapabilities& YuvToYuvCapabilities() const;
|
williamr@2
|
381 |
|
williamr@2
|
382 |
/**
|
williamr@2
|
383 |
Returns RGB value ranges the hardware device supports for RGB to YUV conversion.
|
williamr@2
|
384 |
@return "The supported RGB ranges as a bitwise OR of TRgbRange values."
|
williamr@2
|
385 |
*/
|
williamr@2
|
386 |
IMPORT_C TUint32 SupportedRgbRanges() const;
|
williamr@2
|
387 |
|
williamr@2
|
388 |
/**
|
williamr@2
|
389 |
Returns the rotation types the plug-in supports.
|
williamr@2
|
390 |
@return "The supported rotation types as a bitwise OR of TRotationType values. If the pre-processor
|
williamr@2
|
391 |
does not support rotation, the return value is zero."
|
williamr@2
|
392 |
*/
|
williamr@2
|
393 |
IMPORT_C TUint32 SupportedRotations() const;
|
williamr@2
|
394 |
|
williamr@2
|
395 |
/**
|
williamr@2
|
396 |
Returns implementation-specific information about the pre-processor.
|
williamr@2
|
397 |
@return "Implementation- specific information about the pre-processor. The data format is
|
williamr@2
|
398 |
implementation-specific, and defined separately by the pre-processor supplier. The reference
|
williamr@2
|
399 |
is valid until the CPreProcessorInfo object is destroyed."
|
williamr@2
|
400 |
*/
|
williamr@2
|
401 |
IMPORT_C const TDesC8& ImplementationSpecificInfo() const;
|
williamr@2
|
402 |
private:
|
williamr@2
|
403 |
CPreProcessorInfo(TUid aUid,
|
williamr@2
|
404 |
TVersion aVersion,
|
williamr@2
|
405 |
TBool aAccelerated,
|
williamr@2
|
406 |
TBool aSupportsDirectCapture,
|
williamr@2
|
407 |
TBool aSupportsArbitraryScaling,
|
williamr@2
|
408 |
TBool aSupportsAntiAliasedScaling,
|
williamr@2
|
409 |
const TYuvToYuvCapabilities& aYuvToYuvCapabilities,
|
williamr@2
|
410 |
TUint32 aSupportedRgbRanges,
|
williamr@2
|
411 |
TUint32 aSupportedRotations);
|
williamr@2
|
412 |
|
williamr@2
|
413 |
void ConstructL(const TDesC& aManufacturer,
|
williamr@2
|
414 |
const TDesC& aIdentifier,
|
williamr@2
|
415 |
const TArray<TUncompressedVideoFormat>& aInputFormats,
|
williamr@2
|
416 |
const TArray<TUncompressedVideoFormat>& aOutputFormats,
|
williamr@2
|
417 |
const TArray<TUint32>& aSupportedCombinations,
|
williamr@2
|
418 |
const TArray<TScaleFactor>& aSupportedScaleFactors,
|
williamr@2
|
419 |
const TDesC8& aImplementationSpecificInfo);
|
williamr@2
|
420 |
private:
|
williamr@2
|
421 |
TUid iUid;
|
williamr@2
|
422 |
HBufC* iManufacturer;
|
williamr@2
|
423 |
HBufC* iIdentifier;
|
williamr@2
|
424 |
TVersion iVersion;
|
williamr@2
|
425 |
TBool iAccelerated;
|
williamr@2
|
426 |
TBool iSupportsDirectCapture;
|
williamr@2
|
427 |
RArray<TUncompressedVideoFormat> iInputFormats;
|
williamr@2
|
428 |
RArray<TUncompressedVideoFormat> iOutputFormats;
|
williamr@2
|
429 |
RArray<TUint32> iSupportedCombinations;
|
williamr@2
|
430 |
TBool iSupportsArbitraryScaling;
|
williamr@2
|
431 |
TBool iSupportsAntiAliasedScaling;
|
williamr@2
|
432 |
RArray<TScaleFactor> iSupportedScaleFactors;
|
williamr@2
|
433 |
TYuvToYuvCapabilities iYuvToYuvCapabilities;
|
williamr@2
|
434 |
TUint32 iSupportedRgbRanges;
|
williamr@2
|
435 |
TUint32 iSupportedRotations;
|
williamr@2
|
436 |
HBufC8* iImplementationSpecificInfo;
|
williamr@2
|
437 |
};
|
williamr@2
|
438 |
|
williamr@2
|
439 |
/**
|
williamr@2
|
440 |
This class contains information about a video encoder hardware device and its capabilities.
|
williamr@2
|
441 |
Although it mainly contains static data, it is defined as a complete CBase-derived class since the
|
williamr@2
|
442 |
data is relatively complex and proper memory management is necessary.
|
williamr@2
|
443 |
|
williamr@2
|
444 |
The objects are created by the encoder devices, and used by the MSL video client code.
|
williamr@2
|
445 |
|
williamr@2
|
446 |
@publishedAll
|
williamr@2
|
447 |
@released
|
williamr@2
|
448 |
*/
|
williamr@2
|
449 |
class CVideoEncoderInfo : public CBase
|
williamr@2
|
450 |
{
|
williamr@2
|
451 |
public:
|
williamr@2
|
452 |
/**
|
williamr@2
|
453 |
Creates and returns a new CVideoEncoderInfo object.
|
williamr@2
|
454 |
All data passed in is copied on construction of the object.
|
williamr@2
|
455 |
|
williamr@2
|
456 |
@param aUid
|
williamr@2
|
457 |
The uid of the encoder.
|
williamr@2
|
458 |
@param aManufacturer
|
williamr@2
|
459 |
The video encoder manufacturer.
|
williamr@2
|
460 |
@param aIdentifier
|
williamr@2
|
461 |
The manufacturer-specific identifier for this encoder.
|
williamr@2
|
462 |
@param aVersion
|
williamr@2
|
463 |
The version of this encoder.
|
williamr@2
|
464 |
@param aAccelerated
|
williamr@2
|
465 |
Whether this encoder is accelerated.
|
williamr@2
|
466 |
@param aSupportsDirectCapture
|
williamr@2
|
467 |
Whether this encoder supports direct capture.
|
williamr@2
|
468 |
@param aSupportedInputFormats
|
williamr@2
|
469 |
An array of the supported input formats.
|
williamr@2
|
470 |
@param aSupportedOutputFormats
|
williamr@2
|
471 |
An array of the supported output formats.
|
williamr@2
|
472 |
@param aMaxPictureSize
|
williamr@2
|
473 |
The maximum supported picture size.
|
williamr@2
|
474 |
@param aSupportedDataUnitTypes
|
williamr@2
|
475 |
The supported data unit types.
|
williamr@2
|
476 |
@param aSupportedDataUnitEncapsulations
|
williamr@2
|
477 |
The supported data unit encapsulations.
|
williamr@2
|
478 |
@param aMaxBitrateLayers
|
williamr@2
|
479 |
The maximum number of bitrate layers supported.
|
williamr@2
|
480 |
@param aSupportsSupplementalEnhancementInfo
|
williamr@2
|
481 |
Whether supplemental enhancement info is supported.
|
williamr@2
|
482 |
@param aMaxUnequalErrorProtectionLevels
|
williamr@2
|
483 |
The maximum unequal error protection level supported.
|
williamr@2
|
484 |
@param aMaxBitRate
|
williamr@2
|
485 |
The maximum bit rate supported.
|
williamr@2
|
486 |
@param aMaxPictureRates
|
williamr@2
|
487 |
An array of the maximum picture size/rates supported.
|
williamr@2
|
488 |
@param aMaxInLayerScalabilitySteps
|
williamr@2
|
489 |
The maximum in-layer scalability steps supported.
|
williamr@2
|
490 |
@param aSupportedPictureOptions
|
williamr@2
|
491 |
The picture options supported.
|
williamr@2
|
492 |
@param aCodingStandardSpecificInfo
|
williamr@2
|
493 |
Coding standard specific info.
|
williamr@2
|
494 |
@param aImplementationSpecificInfo
|
williamr@2
|
495 |
Implementation specific info.
|
williamr@2
|
496 |
|
williamr@2
|
497 |
@return A new CVideoEncoderInfo object.
|
williamr@2
|
498 |
@leave This method may leave with one of the system-wide error codes.
|
williamr@2
|
499 |
*/
|
williamr@2
|
500 |
IMPORT_C static CVideoEncoderInfo* NewL(TUid aUid,
|
williamr@2
|
501 |
const TDesC& aManufacturer,
|
williamr@2
|
502 |
const TDesC& aIdentifier,
|
williamr@2
|
503 |
TVersion aVersion,
|
williamr@2
|
504 |
TBool aAccelerated,
|
williamr@2
|
505 |
TBool aSupportsDirectCapture,
|
williamr@2
|
506 |
const TArray<TUncompressedVideoFormat>& aSupportedInputFormats,
|
williamr@2
|
507 |
const TArray<CCompressedVideoFormat*>& aSupportedOutputFormats,
|
williamr@2
|
508 |
const TSize& aMaxPictureSize,
|
williamr@2
|
509 |
TUint32 aSupportedDataUnitTypes,
|
williamr@2
|
510 |
TUint32 aSupportedDataUnitEncapsulations,
|
williamr@2
|
511 |
TUint aMaxBitrateLayers,
|
williamr@2
|
512 |
TBool aSupportsSupplementalEnhancementInfo,
|
williamr@2
|
513 |
TUint aMaxUnequalErrorProtectionLevels,
|
williamr@2
|
514 |
TUint aMaxBitRate,
|
williamr@2
|
515 |
const TArray<TPictureRateAndSize>& aMaxPictureRates,
|
williamr@2
|
516 |
TUint aMaxInLayerScalabilitySteps,
|
williamr@2
|
517 |
TUint32 aSupportedPictureOptions,
|
williamr@2
|
518 |
TBool aSupportsPictureLoss,
|
williamr@2
|
519 |
TBool aSupportsSliceLoss,
|
williamr@2
|
520 |
const TDesC8& aCodingStandardSpecificInfo,
|
williamr@2
|
521 |
const TDesC8& aImplementationSpecificInfo);
|
williamr@2
|
522 |
|
williamr@2
|
523 |
/**
|
williamr@2
|
524 |
Destructor.
|
williamr@2
|
525 |
*/
|
williamr@2
|
526 |
IMPORT_C ~CVideoEncoderInfo();
|
williamr@2
|
527 |
|
williamr@2
|
528 |
/**
|
williamr@2
|
529 |
Returns the encoder UID.
|
williamr@2
|
530 |
@return "The encoder UID."
|
williamr@2
|
531 |
*/
|
williamr@2
|
532 |
IMPORT_C TUid Uid() const;
|
williamr@2
|
533 |
|
williamr@2
|
534 |
/**
|
williamr@2
|
535 |
Returns the encoder version.
|
williamr@2
|
536 |
@return "The encoder version."
|
williamr@2
|
537 |
*/
|
williamr@2
|
538 |
IMPORT_C TVersion Version() const;
|
williamr@2
|
539 |
|
williamr@2
|
540 |
/**
|
williamr@2
|
541 |
Returns the encoder hardware device manufacturer.
|
williamr@2
|
542 |
@return "The manufacturer name. The reference is valid until the CVideoEncoderInfo object is destroyed."
|
williamr@2
|
543 |
*/
|
williamr@2
|
544 |
IMPORT_C const TDesC& Manufacturer() const;
|
williamr@2
|
545 |
|
williamr@2
|
546 |
/**
|
williamr@2
|
547 |
Returns the encoder hardware device manufacturer-specific identifier. The combination of the
|
williamr@2
|
548 |
manufacturer and identifier uniquely identifies the plug-in.
|
williamr@2
|
549 |
@return "The identifier. The reference is valid until the CVideoEncoderInfo object is destroyed."
|
williamr@2
|
550 |
*/
|
williamr@2
|
551 |
IMPORT_C const TDesC& Identifier() const;
|
williamr@2
|
552 |
|
williamr@2
|
553 |
/**
|
williamr@2
|
554 |
Returns whether the encoder is hardware-accelerated. Hardware-accelerated encoders can run on an
|
williamr@2
|
555 |
application DSP or dedicated hardware.
|
williamr@2
|
556 |
@return "True if the encoder is hardware-accelerated."
|
williamr@2
|
557 |
*/
|
williamr@2
|
558 |
IMPORT_C TBool Accelerated() const;
|
williamr@2
|
559 |
|
williamr@2
|
560 |
/**
|
williamr@2
|
561 |
Returns whether the encoder supports direct capture. Encoders supporting direct capture can get the
|
williamr@2
|
562 |
input pictures directly from a camera, possibly using an efficient hardware-dependent data path.
|
williamr@2
|
563 |
@return "True if the encoder supports direct capture."
|
williamr@2
|
564 |
*/
|
williamr@2
|
565 |
IMPORT_C TBool SupportsDirectCapture() const;
|
williamr@2
|
566 |
|
williamr@2
|
567 |
/**
|
williamr@2
|
568 |
Returns whether the encoder supports the given input format.
|
williamr@2
|
569 |
@param "aFormat" "The format to check."
|
williamr@2
|
570 |
@return "True if the encoder supports the given input format."
|
williamr@2
|
571 |
*/
|
williamr@2
|
572 |
IMPORT_C TBool SupportsInputFormat(const TUncompressedVideoFormat& aFormat) const;
|
williamr@2
|
573 |
|
williamr@2
|
574 |
/**
|
williamr@2
|
575 |
Returns the input formats that the encoder supports.
|
williamr@2
|
576 |
@return "An RArray table of supported video formats (TUncompressedVideoFormat). The reference is
|
williamr@2
|
577 |
valid until the CVideoEncoderInfo object is destroyed."
|
williamr@2
|
578 |
*/
|
williamr@2
|
579 |
IMPORT_C const RArray<TUncompressedVideoFormat>& SupportedInputFormats() const;
|
williamr@2
|
580 |
|
williamr@2
|
581 |
/**
|
williamr@2
|
582 |
Returns whether the encoder supports the given output format.
|
williamr@2
|
583 |
@param "aFormat" "The format to check."
|
williamr@2
|
584 |
@return "True if the encoder supports the given output format."
|
williamr@2
|
585 |
*/
|
williamr@2
|
586 |
IMPORT_C TBool SupportsOutputFormat(const CCompressedVideoFormat& aFormat) const;
|
williamr@2
|
587 |
|
williamr@2
|
588 |
/**
|
williamr@2
|
589 |
Returns the output formats that the encoder supports.
|
williamr@2
|
590 |
@return "An RArray table of supported video formats (CCompressedVideoFormat). The reference is
|
williamr@2
|
591 |
valid until the CVideoEncoderInfo object is destroyed."
|
williamr@2
|
592 |
*/
|
williamr@2
|
593 |
IMPORT_C const RPointerArray<CCompressedVideoFormat>& SupportedOutputFormats() const;
|
williamr@2
|
594 |
|
williamr@2
|
595 |
/**
|
williamr@2
|
596 |
Returns the maximum picture size the encoder supports.
|
williamr@2
|
597 |
@return "The maximum picture size supported. The reference is valid until the CVideoEncoderInfo
|
williamr@2
|
598 |
object is destroyed."
|
williamr@2
|
599 |
*/
|
williamr@2
|
600 |
IMPORT_C const TSize& MaxPictureSize() const;
|
williamr@2
|
601 |
|
williamr@2
|
602 |
/**
|
williamr@2
|
603 |
Returns the data unit types supported by the encoder.
|
williamr@2
|
604 |
@return "Supported data unit types. The value is a binary OR of values from TVideoDataUnitType."
|
williamr@2
|
605 |
*/
|
williamr@2
|
606 |
IMPORT_C TUint32 SupportedDataUnitTypes() const;
|
williamr@2
|
607 |
|
williamr@2
|
608 |
/**
|
williamr@2
|
609 |
Returns the data unit encapsulation types that the encoder supports.
|
williamr@2
|
610 |
@return "Supported data unit encapsulation types. The value is a binary OR of values from
|
williamr@2
|
611 |
TVideoDataUnitEncapsulation."
|
williamr@2
|
612 |
*/
|
williamr@2
|
613 |
IMPORT_C TUint32 SupportedDataUnitEncapsulations() const;
|
williamr@2
|
614 |
|
williamr@2
|
615 |
/**
|
williamr@2
|
616 |
Returns the maximum number of bit-rate scalability layers supported.
|
williamr@2
|
617 |
@return "Maximum number of bit-rate scalability layers supported, one (1) if layered scalability
|
williamr@2
|
618 |
is not supported."
|
williamr@2
|
619 |
*/
|
williamr@2
|
620 |
IMPORT_C TUint MaxBitrateLayers() const;
|
williamr@2
|
621 |
|
williamr@2
|
622 |
/**
|
williamr@2
|
623 |
Returns whether the encoder implements SendSupplementalInfoL(). If SendSupplementalInfoL() is
|
williamr@2
|
624 |
implemented, the client can send supplemental enhancement information messages as binary strings
|
williamr@2
|
625 |
using that method. If SendSupplementalInfoL() is not implemented, this is not possible, but the
|
williamr@2
|
626 |
encoder can still generate and send coding standard or implementation specific supplemental
|
williamr@2
|
627 |
enhancement information automatically.
|
williamr@2
|
628 |
@return "True if the encoder supports supplemental enhancement information."
|
williamr@2
|
629 |
*/
|
williamr@2
|
630 |
IMPORT_C TBool SupportsSupplementalEnhancementInfo() const;
|
williamr@2
|
631 |
|
williamr@2
|
632 |
/**
|
williamr@2
|
633 |
Returns the maximum number of unequal error protection levels supported.
|
williamr@2
|
634 |
@return "Maximum number of unequal error protection levels supported, one (1) if unequal error
|
williamr@2
|
635 |
protection is not supported."
|
williamr@2
|
636 |
*/
|
williamr@2
|
637 |
IMPORT_C TUint MaxUnequalErrorProtectionLevels() const;
|
williamr@2
|
638 |
|
williamr@2
|
639 |
/**
|
williamr@2
|
640 |
Returns the maximum bit-rate supported by the encoder.
|
williamr@2
|
641 |
@return "Maximum bit-rate supported, in bits per second. KMaxTUint32 can be used if the encoder has no
|
williamr@2
|
642 |
bit-rate restrictions."
|
williamr@2
|
643 |
*/
|
williamr@2
|
644 |
IMPORT_C TUint MaxBitrate() const;
|
williamr@2
|
645 |
|
williamr@2
|
646 |
/**
|
williamr@2
|
647 |
Returns the maximum picture size/rate combinations supported by the encoder. Video encoders can have
|
williamr@2
|
648 |
different maximum picture rate limitations depending on the picture size used.
|
williamr@2
|
649 |
@return "A reference to an array of picture size/rate combinations. The reference remains valid until
|
williamr@2
|
650 |
this object is deleted."
|
williamr@2
|
651 |
*/
|
williamr@2
|
652 |
IMPORT_C const RArray<TPictureRateAndSize>& MaxPictureRates() const;
|
williamr@2
|
653 |
|
williamr@2
|
654 |
/**
|
williamr@2
|
655 |
Returns the maximum number of in-layer scalability steps supported.
|
williamr@2
|
656 |
@return "Maximum number of in-layer scalability steps supported, one (1) if in-layer scalability is
|
williamr@2
|
657 |
not supported."
|
williamr@2
|
658 |
*/
|
williamr@2
|
659 |
IMPORT_C TUint MaxInLayerScalabilitySteps() const;
|
williamr@2
|
660 |
|
williamr@2
|
661 |
/**
|
williamr@2
|
662 |
Returns the input picture options that the encoder supports.
|
williamr@2
|
663 |
@return "Supported input picture options, a bitwise OR of values from TVideoPicture::TVideoPictureOptions."
|
williamr@2
|
664 |
*/
|
williamr@2
|
665 |
IMPORT_C TUint32 SupportedPictureOptions() const;
|
williamr@2
|
666 |
|
williamr@2
|
667 |
/**
|
williamr@2
|
668 |
Returns whether the encoder supports picture loss indications. If true, the encoder implements
|
williamr@2
|
669 |
PictureLoss(), and recovers lost picture contents when it receives the indication.
|
williamr@2
|
670 |
@return "True if the encoder supports picture loss indications."
|
williamr@2
|
671 |
*/
|
williamr@2
|
672 |
IMPORT_C TBool SupportsPictureLoss() const;
|
williamr@2
|
673 |
|
williamr@2
|
674 |
/**
|
williamr@2
|
675 |
Returns whether the encoder supports slice loss indications. If true, the encoder implements
|
williamr@2
|
676 |
SliceLoss(), and recovers lost or damaged macroblocks when it receives the indication.
|
williamr@2
|
677 |
@return "True if the encoder supports slice loss indications."
|
williamr@2
|
678 |
*/
|
williamr@2
|
679 |
IMPORT_C TBool SupportsSliceLoss() const;
|
williamr@2
|
680 |
|
williamr@2
|
681 |
/**
|
williamr@2
|
682 |
Returns coding-standard specific information about the encoder.
|
williamr@2
|
683 |
@return "Coding-standard specific information about the encoder. The data format is coding-standard
|
williamr@2
|
684 |
specific, and defined separately. The reference is valid until the CVideoEncoderInfo object
|
williamr@2
|
685 |
is destroyed."
|
williamr@2
|
686 |
*/
|
williamr@2
|
687 |
IMPORT_C const TDesC8& CodingStandardSpecificInfo() const;
|
williamr@2
|
688 |
|
williamr@2
|
689 |
/**
|
williamr@2
|
690 |
Returns implementation-specific information about the encoder.
|
williamr@2
|
691 |
@return "Implementation-specific information about the encoder. The data format is
|
williamr@2
|
692 |
implementation-specific, and defined separately by the encoder supplier. The reference is valid until
|
williamr@2
|
693 |
the CVideoEncoderInfo object is destroyed."
|
williamr@2
|
694 |
*/
|
williamr@2
|
695 |
IMPORT_C const TDesC8& ImplementationSpecificInfo() const;
|
williamr@2
|
696 |
private:
|
williamr@2
|
697 |
CVideoEncoderInfo(TUid aUid,
|
williamr@2
|
698 |
TVersion aVersion,
|
williamr@2
|
699 |
TBool aAccelerated,
|
williamr@2
|
700 |
TBool aSupportsDirectCapture,
|
williamr@2
|
701 |
const TSize& aMaxPictureSize,
|
williamr@2
|
702 |
TUint32 aSupportedDataUnitTypes,
|
williamr@2
|
703 |
TUint32 aSupportedDataUnitEncapsulations,
|
williamr@2
|
704 |
TUint aMaxBitrateLayers,
|
williamr@2
|
705 |
TBool aSupportsSupplementalEnhancementInfo,
|
williamr@2
|
706 |
TUint aMaxUnequalErrorProtectionLevels,
|
williamr@2
|
707 |
TUint aMaxBitRate,
|
williamr@2
|
708 |
TUint aMaxInLayerScalabilitySteps,
|
williamr@2
|
709 |
TUint32 aSupportedPictureOptions,
|
williamr@2
|
710 |
TBool aSupportsPictureLoss,
|
williamr@2
|
711 |
TBool aSupportsSliceLoss);
|
williamr@2
|
712 |
void ConstructL(const TDesC& aManufacturer,
|
williamr@2
|
713 |
const TDesC& aIdentifier,
|
williamr@2
|
714 |
const TArray<TUncompressedVideoFormat>& aSupportedInputFormats,
|
williamr@2
|
715 |
const TArray<CCompressedVideoFormat*>& aSupportedOutputFormats,
|
williamr@2
|
716 |
const TArray<TPictureRateAndSize>& aMaxPictureRates,
|
williamr@2
|
717 |
const TDesC8& aCodingStandardSpecificInfo,
|
williamr@2
|
718 |
const TDesC8& aImplementationSpecificInfo);
|
williamr@2
|
719 |
private:
|
williamr@2
|
720 |
TUid iUid;
|
williamr@2
|
721 |
TVersion iVersion;
|
williamr@2
|
722 |
HBufC* iManufacturer;
|
williamr@2
|
723 |
HBufC* iIdentifier;
|
williamr@2
|
724 |
TBool iAccelerated;
|
williamr@2
|
725 |
TBool iSupportsDirectCapture;
|
williamr@2
|
726 |
RArray<TUncompressedVideoFormat> iSupportedInputFormats;
|
williamr@2
|
727 |
RPointerArray<CCompressedVideoFormat> iSupportedOutputFormats;
|
williamr@2
|
728 |
TSize iMaxPictureSize;
|
williamr@2
|
729 |
TUint32 iSupportedDataUnitTypes;
|
williamr@2
|
730 |
TUint32 iSupportedDataUnitEncapsulations;
|
williamr@2
|
731 |
TUint iMaxBitrateLayers;
|
williamr@2
|
732 |
TBool iSupportsSupplementalEnhancementInfo;
|
williamr@2
|
733 |
TUint iMaxUnequalErrorProtectionLevels;
|
williamr@2
|
734 |
TUint iMaxBitRate;
|
williamr@2
|
735 |
RArray<TPictureRateAndSize> iMaxPictureRates;
|
williamr@2
|
736 |
TUint iMaxInLayerScalabilitySteps;
|
williamr@2
|
737 |
TUint32 iSupportedPictureOptions;
|
williamr@2
|
738 |
TBool iSupportsPictureLoss;
|
williamr@2
|
739 |
TBool iSupportsSliceLoss;
|
williamr@2
|
740 |
HBufC8* iCodingStandardSpecificInfo;
|
williamr@2
|
741 |
HBufC8* iImplementationSpecificInfo;
|
williamr@2
|
742 |
};
|
williamr@2
|
743 |
|
williamr@2
|
744 |
|
williamr@2
|
745 |
/**
|
williamr@2
|
746 |
CMMFDevVideoRecord is the main client class of DevVideoRecord.
|
williamr@2
|
747 |
@publishedAll
|
williamr@2
|
748 |
@released
|
williamr@2
|
749 |
*/
|
williamr@2
|
750 |
class CMMFDevVideoRecord : public CBase, private MMMFDevVideoRecordProxy
|
williamr@2
|
751 |
{
|
williamr@2
|
752 |
public:
|
williamr@2
|
753 |
/**
|
williamr@2
|
754 |
Class to define the picture counters available through GetPictureCounters.
|
williamr@2
|
755 |
@publishedAll
|
williamr@2
|
756 |
@released
|
williamr@2
|
757 |
*/
|
williamr@2
|
758 |
class TPictureCounters
|
williamr@2
|
759 |
{
|
williamr@2
|
760 |
public:
|
williamr@2
|
761 |
/**
|
williamr@2
|
762 |
Default constructor. Zeros all members.
|
williamr@2
|
763 |
*/
|
williamr@2
|
764 |
inline TPictureCounters();
|
williamr@2
|
765 |
public:
|
williamr@2
|
766 |
/** The number of pictures skipped due to lack of output buffers. */
|
williamr@2
|
767 |
TUint iPicturesSkippedBufferOverflow;
|
williamr@2
|
768 |
|
williamr@2
|
769 |
/** The number of pictures skipped due to lack of processing power. */
|
williamr@2
|
770 |
TUint iPicturesSkippedProcPower;
|
williamr@2
|
771 |
|
williamr@2
|
772 |
/** The number of pictures skipped for bit-rate control purposes. */
|
williamr@2
|
773 |
TUint iPicturesSkippedRateControl;
|
williamr@2
|
774 |
|
williamr@2
|
775 |
/** The number of processed (i.e. pre-processed and encoded) input pictures. */
|
williamr@2
|
776 |
TUint iPicturesProcessed;
|
williamr@2
|
777 |
|
williamr@2
|
778 |
/** The total number of input pictures. When using direct capture, this is the total number of
|
williamr@2
|
779 |
pictures captured, otherwise it is the total number of input pictures written by the client. */
|
williamr@2
|
780 |
TUint iInputPictures;
|
williamr@2
|
781 |
};
|
williamr@2
|
782 |
|
williamr@2
|
783 |
|
williamr@2
|
784 |
public:
|
williamr@2
|
785 |
/**
|
williamr@2
|
786 |
Creates a new CMMFDevVideoRecord object.
|
williamr@2
|
787 |
@param "aObserver" "The observer object to use. The observer callbacks are used to return input buffers
|
williamr@2
|
788 |
back to the client."
|
williamr@2
|
789 |
@return "A new CMMFDevVideoRecord object.
|
williamr@2
|
790 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
791 |
- KErrHardwareNotAvailable - Not enough free video processing hardware resources
|
williamr@2
|
792 |
- KErrNoMemory - Not enough free memory available"
|
williamr@2
|
793 |
*/
|
williamr@2
|
794 |
IMPORT_C static CMMFDevVideoRecord* NewL(MMMFDevVideoRecordObserver& aObserver);
|
williamr@2
|
795 |
|
williamr@2
|
796 |
/**
|
williamr@2
|
797 |
Destructor.
|
williamr@2
|
798 |
*/
|
williamr@2
|
799 |
IMPORT_C ~CMMFDevVideoRecord();
|
williamr@2
|
800 |
|
williamr@2
|
801 |
/**
|
williamr@2
|
802 |
Finds all available encoders for a given video type with support for certain pre-processing operations.
|
williamr@2
|
803 |
The video type is specified using its MIME type, which may include parameters specifying the supported
|
williamr@2
|
804 |
level, version, and other information. Encoder hardware devices can use wildcards when listing the
|
williamr@2
|
805 |
supported video types in the ECom registration information, so it is possible that all the encoders
|
williamr@2
|
806 |
returned do not support the specified submode, e.g. profile and level, unless aExactMatch is set.
|
williamr@2
|
807 |
|
williamr@2
|
808 |
The encoder capabilities can be checked with VideoEncoderInfoLC().
|
williamr@2
|
809 |
|
williamr@2
|
810 |
@param "aMimeType" "The video type that will be encoded."
|
williamr@2
|
811 |
@param "aPreProcType" "The pre-processing types that the encoder has to support, a binary OR of
|
williamr@2
|
812 |
TPrePostProcessType values. If no pre-processing support is needed, set this
|
williamr@2
|
813 |
value to zero."
|
williamr@2
|
814 |
@param "aEncoders" "An array for the result encoder UIDs. The array must be created and destroyed
|
williamr@2
|
815 |
by the caller."
|
williamr@2
|
816 |
@param "aExactMatch" "True if exact matching should be used. In this case only encoders that support
|
williamr@2
|
817 |
exactly the MIME-type given will be returned. Since verifying this may require
|
williamr@2
|
818 |
loading the encoders into memory, this can be a fairly expensive operation, and
|
williamr@2
|
819 |
if the user needs to verify their capabilities further in any case this parameter
|
williamr@2
|
820 |
should be set to EFalse."
|
williamr@2
|
821 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
822 |
-KErrNotFound - No encoders were found matching the search parameters."
|
williamr@2
|
823 |
*/
|
williamr@2
|
824 |
IMPORT_C void FindEncodersL(const TDesC8& aMimeType,
|
williamr@2
|
825 |
TUint32 aPreProcType,
|
williamr@2
|
826 |
RArray<TUid>& aEncoders,
|
williamr@2
|
827 |
TBool aExactMatch=ETrue);
|
williamr@2
|
828 |
|
williamr@2
|
829 |
/**
|
williamr@2
|
830 |
Finds all available pre-processors for a given set of pre-processing operations.
|
williamr@2
|
831 |
|
williamr@2
|
832 |
@param "aPreProcType" "The pre-processing types that the device has to support, a binary OR of
|
williamr@2
|
833 |
TPrePostProcessType values."
|
williamr@2
|
834 |
@param "aPreProcessors" "An array for the result pre-processor UIDs. The array must be created and
|
williamr@2
|
835 |
destroyed by the caller."
|
williamr@2
|
836 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
837 |
- KErrNotFound - No pre-processors were found matching the search parameters."
|
williamr@2
|
838 |
*/
|
williamr@2
|
839 |
IMPORT_C void FindPreProcessorsL(TUint32 aPreProcType, RArray<TUid>& aPreProcessors);
|
williamr@2
|
840 |
|
williamr@2
|
841 |
/**
|
williamr@2
|
842 |
Retrieves a list of available video encoders in the system.
|
williamr@2
|
843 |
@param "aEncoders" "An array for the result encoder UIDs. The array must be created and destroyed by
|
williamr@2
|
844 |
the caller."
|
williamr@2
|
845 |
@leave "The method will leave if an error occurs. Not finding any encoders is not treated as an error
|
williamr@2
|
846 |
condition: in this situation, aEncoders will be empty."
|
williamr@2
|
847 |
*/
|
williamr@2
|
848 |
IMPORT_C void GetEncoderListL(RArray<TUid>& aEncoders);
|
williamr@2
|
849 |
|
williamr@2
|
850 |
/**
|
williamr@2
|
851 |
Retrieves a list of available video pre-processor hardware devices in the system.
|
williamr@2
|
852 |
@param "aPreProcessors" "An array for the result pre-processor UIDs. The array must be created and
|
williamr@2
|
853 |
destroyed by the caller."
|
williamr@2
|
854 |
@leave "The method will leave if an error occurs. Not finding any pre-processors is not treated as an
|
williamr@2
|
855 |
error condition: in this situation, aPreProcessors will be empty."
|
williamr@2
|
856 |
*/
|
williamr@2
|
857 |
IMPORT_C void GetPreProcessorListL(RArray<TUid>& aPreProcessors);
|
williamr@2
|
858 |
|
williamr@2
|
859 |
/**
|
williamr@2
|
860 |
Retrieves information about an installed video encoder. Note that this method will need to load the
|
williamr@2
|
861 |
encoder hardware device into memory, and can thus be relatively expensive.
|
williamr@2
|
862 |
@param "aVideoEncoder" "The video encoder device to query."
|
williamr@2
|
863 |
@return "Encoder information as a CVideoEncoderInfo object. The object is pushed to the cleanup stack,
|
williamr@2
|
864 |
and must be deallocated by the caller."
|
williamr@2
|
865 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
866 |
- KErrNotFound - No encoder was found with the given UID"
|
williamr@2
|
867 |
*/
|
williamr@2
|
868 |
IMPORT_C CVideoEncoderInfo* VideoEncoderInfoLC(TUid aVideoEncoder);
|
williamr@2
|
869 |
|
williamr@2
|
870 |
/**
|
williamr@2
|
871 |
Retrieves information about the pre-processing capabilities of an installed pre-processor or encoder
|
williamr@2
|
872 |
hardware device. Note that this method will need to load the device into memory, and can thus be
|
williamr@2
|
873 |
relatively expensive.
|
williamr@2
|
874 |
@param "aPreProcessor" "The device to query."
|
williamr@2
|
875 |
@return "Pre-processor information as a CPreProcessorInfo object. The object is pushed to the cleanupstack,
|
williamr@2
|
876 |
and must be deallocated by the caller."
|
williamr@2
|
877 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
878 |
- KErrNotFound - No pre-processor was found with the given UID"
|
williamr@2
|
879 |
*/
|
williamr@2
|
880 |
IMPORT_C CPreProcessorInfo* PreProcessorInfoLC(TUid aPreProcessor);
|
williamr@2
|
881 |
|
williamr@2
|
882 |
/**
|
williamr@2
|
883 |
Selects the video encoder to be used. This method must be called before any other video encoder related
|
williamr@2
|
884 |
methods are used. The encoder can be changed by calling this method again before the system has been
|
williamr@2
|
885 |
initialized with Initialize().
|
williamr@2
|
886 |
|
williamr@2
|
887 |
All video encoder settings are reset to their default values. By default no pre-processing is performed.
|
williamr@2
|
888 |
|
williamr@2
|
889 |
@param "aEncoder" "The video encoder to use."
|
williamr@2
|
890 |
@return "Hardware device ID, used in other methods for configuring the encoder."
|
williamr@2
|
891 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
892 |
- KErrNotFound - No encoder was found with the given UID"
|
williamr@2
|
893 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
894 |
*/
|
williamr@2
|
895 |
IMPORT_C THwDeviceId SelectEncoderL(TUid aEncoder);
|
williamr@2
|
896 |
|
williamr@2
|
897 |
/**
|
williamr@2
|
898 |
Selects the video pre-processor to be used. This method must be called before any other pre-processor
|
williamr@2
|
899 |
related methods are used. The pre-processor to use can be changed by calling this method again before
|
williamr@2
|
900 |
the API has been initialized with Initialize().
|
williamr@2
|
901 |
|
williamr@2
|
902 |
All pre-processor settings are reset to their default values. By default no pre-processing is performed.
|
williamr@2
|
903 |
|
williamr@2
|
904 |
@param "aPreProcessor" "The pre-processor to use."
|
williamr@2
|
905 |
@return "Hardware device ID, used in other methods for configuring the pre-processor."
|
williamr@2
|
906 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
907 |
- KErrNotFound - No pre-processor was found with the given UID"
|
williamr@2
|
908 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
909 |
*/
|
williamr@2
|
910 |
IMPORT_C THwDeviceId SelectPreProcessorL(TUid aPreProcessor);
|
williamr@2
|
911 |
|
williamr@2
|
912 |
/**
|
williamr@2
|
913 |
Sets the input format for a hardware device. If both a pre-processor and an encoder are used, the
|
williamr@2
|
914 |
pre-processor output format and the encoder input format must be the same. The input format for the
|
williamr@2
|
915 |
first device in the system is the input format for video input data.
|
williamr@2
|
916 |
|
williamr@2
|
917 |
The method has to be called for both direct capture as well as memory buffer input. The camera API
|
williamr@2
|
918 |
must be initialized by the device using it for capture, since there is no way to query the current
|
williamr@2
|
919 |
format from the camera API.
|
williamr@2
|
920 |
|
williamr@2
|
921 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
922 |
or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
923 |
@param "aFormat" "The input format to use."
|
williamr@2
|
924 |
@param "aPictureSize" "The input picture size in pixels."
|
williamr@2
|
925 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
926 |
- KErrNotSupported - The input format specified is not supported."
|
williamr@2
|
927 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
928 |
*/
|
williamr@2
|
929 |
IMPORT_C void SetInputFormatL(THwDeviceId aHwDevice,
|
williamr@2
|
930 |
const TUncompressedVideoFormat& aFormat,
|
williamr@2
|
931 |
const TSize& aPictureSize);
|
williamr@2
|
932 |
|
williamr@2
|
933 |
/**
|
williamr@2
|
934 |
Sets the data source to be a camera, and sets the system to use direct capture for input. The first
|
williamr@2
|
935 |
hardware device (pre-processor if both encoder and pre-processor are used, encoder otherwise) must
|
williamr@2
|
936 |
support direct capture.
|
williamr@2
|
937 |
|
williamr@2
|
938 |
@param "aCameraHandle" "A camera handle for the camera to use. The handle is passed to
|
williamr@2
|
939 |
CCamera::NewDuplicateL() in the camera API."
|
williamr@2
|
940 |
@param "aPictureRate" "Video capture picture rate."
|
williamr@2
|
941 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
942 |
- KErrNotSupported - Direct capture is not supported or the picture rate specified is not
|
williamr@2
|
943 |
supported."
|
williamr@2
|
944 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
945 |
*/
|
williamr@2
|
946 |
IMPORT_C void SetSourceCameraL(TInt aCameraHandle, TReal aPictureRate);
|
williamr@2
|
947 |
|
williamr@2
|
948 |
/**
|
williamr@2
|
949 |
Sets the data source to be memory buffers.
|
williamr@2
|
950 |
|
williamr@2
|
951 |
@param "aMaxPictureRate" "The maximum picture rate for input pictures."
|
williamr@2
|
952 |
@param "aConstantPictureRate" "True if the input picture rate is constant. In that case,
|
williamr@2
|
953 |
aMaxPictureRate specifies the picture rate. If pictures may be skipped
|
williamr@2
|
954 |
in the input data due to performance reasons, this flag cannot be set."
|
williamr@2
|
955 |
@param "aProcessRealtime" "True if real-time processing is needed, false if not. Real-time
|
williamr@2
|
956 |
processing is typically needed for video recording applications, while
|
williamr@2
|
957 |
video conversion and off-line processing applications do not require it."
|
williamr@2
|
958 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
959 |
- KErrNotSupported - The picture rate specified is not supported."
|
williamr@2
|
960 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
961 |
*/
|
williamr@2
|
962 |
IMPORT_C void SetSourceMemoryL(TReal aMaxPictureRate, TBool aConstantPictureRate, TBool aProcessRealtime);
|
williamr@2
|
963 |
|
williamr@2
|
964 |
/**
|
williamr@2
|
965 |
Sets the output format for a hardware device to a compressed video format. Only applicable for encoder
|
williamr@2
|
966 |
devices. The picture size depends on the input data format and possible scaling performed.
|
williamr@2
|
967 |
|
williamr@2
|
968 |
@param "aHwDevice" "The hardware device to configure. The value is returned from
|
williamr@2
|
969 |
SelectEncoderL()when the device is selected."
|
williamr@2
|
970 |
@param "aFormat" "The video format to use."
|
williamr@2
|
971 |
@param "aDataUnitType" "The type of output coded data units."
|
williamr@2
|
972 |
@param "aDataEncapsulation" "Data encapsulation type for output encoded data units."
|
williamr@2
|
973 |
@param "aSegmentationAllowed" "True if a coded data unit can be segmented into multiple output buffers
|
williamr@2
|
974 |
if a single buffer is not large enough."
|
williamr@2
|
975 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
976 |
- KErrNotSupported - The format specified is not supported."
|
williamr@2
|
977 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
978 |
*/
|
williamr@2
|
979 |
IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice,
|
williamr@2
|
980 |
const CCompressedVideoFormat& aFormat,
|
williamr@2
|
981 |
TVideoDataUnitType aDataUnitType,
|
williamr@2
|
982 |
TVideoDataUnitEncapsulation aDataEncapsulation,
|
williamr@2
|
983 |
TBool aSegmentationAllowed=EFalse);
|
williamr@2
|
984 |
|
williamr@2
|
985 |
/**
|
williamr@2
|
986 |
Sets the output format for a hardware device to an uncompressed video format. Only applicable for
|
williamr@2
|
987 |
pre-processor devices. The picture size depends on the input data format and possible scaling performed.
|
williamr@2
|
988 |
|
williamr@2
|
989 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectPreProcessorL()
|
williamr@2
|
990 |
when the device is selected."
|
williamr@2
|
991 |
@param "aFormat" "The video format to use."
|
williamr@2
|
992 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
993 |
- KErrNotSupported - The format specified is not supported."
|
williamr@2
|
994 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
995 |
*/
|
williamr@2
|
996 |
IMPORT_C void SetOutputFormatL(THwDeviceId aHwDevice, const TUncompressedVideoFormat& aFormat);
|
williamr@2
|
997 |
|
williamr@2
|
998 |
/**
|
williamr@2
|
999 |
Sets the clock source to use for video timing. When video recording is synchronized with audio, the clock
|
williamr@2
|
1000 |
source is implemented by the audio playback subsystem, otherwise the clock source should get the time
|
williamr@2
|
1001 |
from the system clock. This method can be called after all hardware devices have been selected, but
|
williamr@2
|
1002 |
before calling Initialize().
|
williamr@2
|
1003 |
|
williamr@2
|
1004 |
If no clock source is set, video recording will not be synchronized, but will proceed as fast as
|
williamr@2
|
1005 |
possible, depending on input data and output buffer availability. If direct capturing is used without a
|
williamr@2
|
1006 |
clock source, the timestamps in the output data may not be valid. All encoders must support
|
williamr@2
|
1007 |
synchronization with an external clock source, as well as unsynchronized non-realtime operation.
|
williamr@2
|
1008 |
|
williamr@2
|
1009 |
@param "aClock" "The clock source to use."
|
williamr@2
|
1010 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
1011 |
*/
|
williamr@2
|
1012 |
IMPORT_C void SetClockSource(MMMFClockSource* aClock);
|
williamr@2
|
1013 |
|
williamr@2
|
1014 |
/**
|
williamr@2
|
1015 |
Sets pre-processing options for RGB to YUV color space conversion. By default, input RGB data is
|
williamr@2
|
1016 |
assumed to use the full value range ([0…255]), and the output YUV format is the hardware device
|
williamr@2
|
1017 |
output format, so typically calling this method is not necessary.
|
williamr@2
|
1018 |
|
williamr@2
|
1019 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
1020 |
or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1021 |
@param "aRgbRange" "Input RGB data range"
|
williamr@2
|
1022 |
@param "aOutputFormat" "Conversion output YUV format."
|
williamr@2
|
1023 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1024 |
- KErrNotSupported - The formats specified are not supported"
|
williamr@2
|
1025 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
1026 |
*/
|
williamr@2
|
1027 |
IMPORT_C void SetRgbToYuvOptionsL(THwDeviceId aHwDevice, TRgbRange aRgbRange, const TYuvFormat& aOutputFormat);
|
williamr@2
|
1028 |
|
williamr@2
|
1029 |
/**
|
williamr@2
|
1030 |
Sets pre-processing options for YUV to YUV data format conversion. By default, the hardware device
|
williamr@2
|
1031 |
input and output data formats are used. For encoder devices, the device input format and the closest
|
williamr@2
|
1032 |
matching format supported by the encoding process are used. Typically calling this method is not
|
williamr@2
|
1033 |
necessary.
|
williamr@2
|
1034 |
|
williamr@2
|
1035 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
1036 |
or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1037 |
@param "aInputFormat" "Conversion input format."
|
williamr@2
|
1038 |
@param "aOutputFormat" "Conversion output format."
|
williamr@2
|
1039 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1040 |
- KErrNotSupported - The formats specified are not supported"
|
williamr@2
|
1041 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
1042 |
*/
|
williamr@2
|
1043 |
IMPORT_C void SetYuvToYuvOptionsL(THwDeviceId aHwDevice,
|
williamr@2
|
1044 |
const TYuvFormat& aInputFormat,
|
williamr@2
|
1045 |
const TYuvFormat& aOutputFormat);
|
williamr@2
|
1046 |
|
williamr@2
|
1047 |
/**
|
williamr@2
|
1048 |
Sets the number of bit-rate scalability layers to use. Set to 1 to disable layered scalability.
|
williamr@2
|
1049 |
|
williamr@2
|
1050 |
Bit-rate scalability refers to the ability of a coded stream to be decoded at different bit-rates.
|
williamr@2
|
1051 |
Scalable video is typically ordered into hierarchical layers of data. A base layer contains an
|
williamr@2
|
1052 |
individual representation of a video stream and enhancement layers contain refinement data in
|
williamr@2
|
1053 |
addition to the base layer. The quality of the encoded video stream progressively improves as
|
williamr@2
|
1054 |
enhancement layers are added to the base layer.
|
williamr@2
|
1055 |
|
williamr@2
|
1056 |
@param "aNumLayers" "The number of bit-rate scalability layers to use, set to 1 to disable
|
williamr@2
|
1057 |
scalability."
|
williamr@2
|
1058 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1059 |
- KErrNotSupported - The scalability layers are not supported or too many layers specified."
|
williamr@2
|
1060 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
1061 |
*/
|
williamr@2
|
1062 |
IMPORT_C void SetNumBitrateLayersL(TUint aNumLayers);
|
williamr@2
|
1063 |
|
williamr@2
|
1064 |
/**
|
williamr@2
|
1065 |
Sets the scalability type for a bit-rate scalability layer.
|
williamr@2
|
1066 |
|
williamr@2
|
1067 |
@param "aLayer" "Layer number. Layers are numbered [0…n-1], where n is the number of layers
|
williamr@2
|
1068 |
available. The first layer is the base layer, it can be decoded independently
|
williamr@2
|
1069 |
from the other layers, and it has the lowest total bitrate."
|
williamr@2
|
1070 |
@param "aScalabilityType" "Layer scalability type."
|
williamr@2
|
1071 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1072 |
- KErrNotSupported - The scalability layers or the specified scalability type are not supported."
|
williamr@2
|
1073 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
1074 |
*/
|
williamr@2
|
1075 |
IMPORT_C void SetScalabilityLayerTypeL(TUint aLayer, TScalabilityType aScalabilityType);
|
williamr@2
|
1076 |
|
williamr@2
|
1077 |
|
williamr@2
|
1078 |
/**
|
williamr@2
|
1079 |
Sets the reference picture options to be used for all scalability layers. The settings can be
|
williamr@2
|
1080 |
overridden for an individual scalability layer by using SetLayerReferenceOptions().
|
williamr@2
|
1081 |
|
williamr@2
|
1082 |
@param "aMaxReferencePictures" "The maximum number of reference pictures to be used. More than one
|
williamr@2
|
1083 |
reference frame can be used in the H.264 | MPEG-4 AVC and in some
|
williamr@2
|
1084 |
advanced profiles of MPEG-4 Part 2 and H.263. The minimum value is one."
|
williamr@2
|
1085 |
@param "aMaxPictureOrderDelay" "The maximum picture order delay, in number of pictures. This specifies
|
williamr@2
|
1086 |
the maximum number of pictures that precede any picture in the sequence
|
williamr@2
|
1087 |
in decoding order and follow the picture in presentation order. Pictures
|
williamr@2
|
1088 |
may be coded/decoded in different order from their capture/display order.
|
williamr@2
|
1089 |
Thus, decoded pictures have to be buffered to order them in correct
|
williamr@2
|
1090 |
display order. For example, if one conventional B picture is coded
|
williamr@2
|
1091 |
between P pictures, a one-picture display ordering delay has to be
|
williamr@2
|
1092 |
applied in the decoder. The minimum value is zero, which indicates that
|
williamr@2
|
1093 |
pictures must be coded in capture/display order."
|
williamr@2
|
1094 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
1095 |
*/
|
williamr@2
|
1096 |
IMPORT_C void SetGlobalReferenceOptions(TUint aMaxReferencePictures, TUint aMaxPictureOrderDelay);
|
williamr@2
|
1097 |
|
williamr@2
|
1098 |
/**
|
williamr@2
|
1099 |
Sets the reference picture options to be used for a single scalability layer. These settings override
|
williamr@2
|
1100 |
those set with SetGlobalReferenceOptions().
|
williamr@2
|
1101 |
|
williamr@2
|
1102 |
@param "aLayer" "Layer number."
|
williamr@2
|
1103 |
@param "aMaxReferencePictures" "The maximum number of reference pictures to be used."
|
williamr@2
|
1104 |
@param "aMaxPictureOrderDelay" "The maximum picture order delay, in number of pictures."
|
williamr@2
|
1105 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
1106 |
*/
|
williamr@2
|
1107 |
IMPORT_C void SetLayerReferenceOptions(TUint aLayer, TUint aMaxReferencePictures, TUint aMaxPictureOrderDelay);
|
williamr@2
|
1108 |
|
williamr@2
|
1109 |
/**
|
williamr@2
|
1110 |
Sets encoder buffering options.
|
williamr@2
|
1111 |
|
williamr@2
|
1112 |
@param "aOptions" "The buffering options."
|
williamr@2
|
1113 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1114 |
- KErrNotSupported - The specified settings are not supported."
|
williamr@2
|
1115 |
@pre "This method can only be called before the API has been initialized with Initialize()."
|
williamr@2
|
1116 |
*/
|
williamr@2
|
1117 |
IMPORT_C void SetBufferOptionsL(const TEncoderBufferOptions& aOptions);
|
williamr@2
|
1118 |
|
williamr@2
|
1119 |
/**
|
williamr@2
|
1120 |
Sets the encoder output rectangle for encoded video output. This rectangle specifies the part of the
|
williamr@2
|
1121 |
input and output pictures which is displayed after encoding. Many video codecs process data in 16x16
|
williamr@2
|
1122 |
pixel units but enable specifying and coding the decoder output rectangle for image sizes that are not
|
williamr@2
|
1123 |
multiple of 16 pixels (e.g 160x120).
|
williamr@2
|
1124 |
|
williamr@2
|
1125 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
1126 |
when the device is selected."
|
williamr@2
|
1127 |
@param "aRect" "The encoder output rectangle."
|
williamr@2
|
1128 |
@leave "The method will leave if an error occurs."
|
williamr@2
|
1129 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1130 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1131 |
*/
|
williamr@2
|
1132 |
IMPORT_C void SetOutputRectL(THwDeviceId aHwDevice, const TRect& aRect);
|
williamr@2
|
1133 |
|
williamr@2
|
1134 |
/**
|
williamr@2
|
1135 |
Sets the pre-processing types to be used in a hardware device. [1 #191] If separate encoder and
|
williamr@2
|
1136 |
pre-processor devices are used, both can be configured to perform different pre-processing operations.
|
williamr@2
|
1137 |
|
williamr@2
|
1138 |
Pre-processing operations are carried out in the following order:
|
williamr@2
|
1139 |
|
williamr@2
|
1140 |
1. Frame stabilisation
|
williamr@2
|
1141 |
2. Input cropping
|
williamr@2
|
1142 |
3. Mirroring
|
williamr@2
|
1143 |
4. Rotating
|
williamr@2
|
1144 |
5. Scaling
|
williamr@2
|
1145 |
6. Output cropping
|
williamr@2
|
1146 |
7. Output padding
|
williamr@2
|
1147 |
|
williamr@2
|
1148 |
Color space conversion and color enhancement can be performed at any point in the pre-processing flow.
|
williamr@2
|
1149 |
|
williamr@2
|
1150 |
@param "aHwDevice" "The hardware device to configure. The value is returned from
|
williamr@2
|
1151 |
SelectEncoderL() or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1152 |
@param "aPreProcessTypes" "The pre-processing steps to perform, a bitwise OR of values from
|
williamr@2
|
1153 |
TPrePostProcessType."
|
williamr@2
|
1154 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1155 |
- KErrNotSupported - The pre-processing combination is not supported"
|
williamr@2
|
1156 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1157 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1158 |
*/
|
williamr@2
|
1159 |
IMPORT_C void SetPreProcessTypesL(THwDeviceId aHwDevice, TUint32 aPreProcessTypes);
|
williamr@2
|
1160 |
|
williamr@2
|
1161 |
/**
|
williamr@2
|
1162 |
Sets pre-processing options for rotation.
|
williamr@2
|
1163 |
|
williamr@2
|
1164 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
1165 |
or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1166 |
@param "aRotationType" "The rotation to perform."
|
williamr@2
|
1167 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1168 |
- KErrNotSupported - The rotation type is not supported."
|
williamr@2
|
1169 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1170 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1171 |
*/
|
williamr@2
|
1172 |
IMPORT_C void SetRotateOptionsL(THwDeviceId aHwDevice, TRotationType aRotationType);
|
williamr@2
|
1173 |
|
williamr@2
|
1174 |
/**
|
williamr@2
|
1175 |
Sets pre-processing options for scaling.
|
williamr@2
|
1176 |
|
williamr@2
|
1177 |
@param "aHwDevice" "The hardware device to configure. The value is returned from
|
williamr@2
|
1178 |
SelectEncoderL() or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1179 |
@param "aTargetSize" "Target picture size. If a fixed scale factor size is used, the new
|
williamr@2
|
1180 |
dimensions must be set to:
|
williamr@2
|
1181 |
width=floor(factor*width), height=floor(factor*height).
|
williamr@2
|
1182 |
For example, scaling a QCIF (176x144) picture up by a factor of 4/3
|
williamr@2
|
1183 |
yields a size of 234x192."
|
williamr@2
|
1184 |
@param "aAntiAliasFiltering" "True if anti-aliasing filtering should be used. If the pre-processor
|
williamr@2
|
1185 |
does not support anti-aliased scaling, or supports anti-aliased scaling
|
williamr@2
|
1186 |
only, this argument is ignored."
|
williamr@2
|
1187 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1188 |
- KErrNotSupported - The specified target size is not supported."
|
williamr@2
|
1189 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1190 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1191 |
*/
|
williamr@2
|
1192 |
IMPORT_C void SetScaleOptionsL(THwDeviceId aHwDevice, const TSize& aTargetSize, TBool aAntiAliasFiltering);
|
williamr@2
|
1193 |
|
williamr@2
|
1194 |
/**
|
williamr@2
|
1195 |
Sets pre-processing options for input cropping. Input cropping is typically used for digital zooming.
|
williamr@2
|
1196 |
|
williamr@2
|
1197 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL() or
|
williamr@2
|
1198 |
SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1199 |
@param "aRect" "The input cropping rectangle specifying the area of the picture to use. The
|
williamr@2
|
1200 |
rectangle must fit completely inside the input picture."
|
williamr@2
|
1201 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1202 |
- KErrNotSupported - The specified cropping rectangle is not supported."
|
williamr@2
|
1203 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1204 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1205 |
*/
|
williamr@2
|
1206 |
IMPORT_C void SetInputCropOptionsL(THwDeviceId aHwDevice, const TRect& aRect);
|
williamr@2
|
1207 |
|
williamr@2
|
1208 |
/**
|
williamr@2
|
1209 |
Sets pre-processing options for output cropping. Output cropping is performed after other pre-processing
|
williamr@2
|
1210 |
operations but before output padding. Output cropping and padding can be used in combination to prepare
|
williamr@2
|
1211 |
the picture size to suit the encoder, typically video encoders only support picture sizes that are
|
williamr@2
|
1212 |
multiples of 16 pixels.
|
williamr@2
|
1213 |
|
williamr@2
|
1214 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL() or
|
williamr@2
|
1215 |
SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1216 |
@param "aRect" "The output cropping rectangle specifying the area of the picture to use. The
|
williamr@2
|
1217 |
rectangle must fit completely inside the picture."
|
williamr@2
|
1218 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1219 |
- KErrNotSupported - The specified cropping rectangle is not supported."
|
williamr@2
|
1220 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1221 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1222 |
*/
|
williamr@2
|
1223 |
IMPORT_C void SetOutputCropOptionsL(THwDeviceId aHwDevice, const TRect& aRect);
|
williamr@2
|
1224 |
|
williamr@2
|
1225 |
/**
|
williamr@2
|
1226 |
Sets pre-processing options for output padding. Output padding is performed as the last pre-processing
|
williamr@2
|
1227 |
operation, and typically used to prepare the picture size to suit the encoder. The image is padded with
|
williamr@2
|
1228 |
black pixels.
|
williamr@2
|
1229 |
|
williamr@2
|
1230 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
1231 |
or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1232 |
@param "aOutputSize" "The padded output picture size. The output size must be large enough for the
|
williamr@2
|
1233 |
picture in its new position."
|
williamr@2
|
1234 |
@param "aPicturePos" "The position for the original picture in the new padded picture. The original
|
williamr@2
|
1235 |
picture in its new position must fit completely inside the new picture."
|
williamr@2
|
1236 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1237 |
- KErrNotSupported - The specified padding settings are not supported."
|
williamr@2
|
1238 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1239 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1240 |
*/
|
williamr@2
|
1241 |
IMPORT_C void SetOutputPadOptionsL(THwDeviceId aHwDevice, const TSize& aOutputSize, const TPoint& aPicturePos);
|
williamr@2
|
1242 |
|
williamr@2
|
1243 |
/**
|
williamr@2
|
1244 |
Sets color enhancement pre-processing options.
|
williamr@2
|
1245 |
|
williamr@2
|
1246 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
1247 |
or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1248 |
@param "aOptions" "Color enchancement options."
|
williamr@2
|
1249 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1250 |
- KErrNotSupported - The specified settings are not supported."
|
williamr@2
|
1251 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1252 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1253 |
*/
|
williamr@2
|
1254 |
IMPORT_C void SetColorEnhancementOptionsL(THwDeviceId aHwDevice, const TColorEnhancementOptions& aOptions);
|
williamr@2
|
1255 |
|
williamr@2
|
1256 |
/**
|
williamr@2
|
1257 |
Sets frame stabilisation options.
|
williamr@2
|
1258 |
|
williamr@2
|
1259 |
Frame stabilisation is performed as the first pre-processing operation in the hardware device. The
|
williamr@2
|
1260 |
stabilisation process gets the complete hardware device input picture as its input, and it produces a
|
williamr@2
|
1261 |
smaller stabilised output picture. The rest of the processing in the hardware device is done using the
|
williamr@2
|
1262 |
stabilisation output picture.
|
williamr@2
|
1263 |
|
williamr@2
|
1264 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
1265 |
or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1266 |
@param "aOutputSize" "Output picture size. The output picture must size must be smaller than
|
williamr@2
|
1267 |
or equal to the hardware device input picture size."
|
williamr@2
|
1268 |
@param "aFrameStabilisation" "True if frame stabilisation should be used. By default stabilisation
|
williamr@2
|
1269 |
is not used."
|
williamr@2
|
1270 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1271 |
- KErrNotSupported - The specified settings are not supported."
|
williamr@2
|
1272 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1273 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1274 |
*/
|
williamr@2
|
1275 |
IMPORT_C void SetFrameStabilisationOptionsL(THwDeviceId aHwDevice,
|
williamr@2
|
1276 |
const TSize& aOutputSize,
|
williamr@2
|
1277 |
TBool aFrameStabilisation);
|
williamr@2
|
1278 |
|
williamr@2
|
1279 |
/**
|
williamr@2
|
1280 |
Sets custom implementation-specific pre-processing options.
|
williamr@2
|
1281 |
|
williamr@2
|
1282 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL()
|
williamr@2
|
1283 |
or SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1284 |
@param "aOptions" "Post-processing options. The data format is implementation-specific."
|
williamr@2
|
1285 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1286 |
- KErrNotSupported - The options are not supported."
|
williamr@2
|
1287 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1288 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1289 |
*/
|
williamr@2
|
1290 |
IMPORT_C void SetCustomPreProcessOptionsL(THwDeviceId aHwDevice, const TDesC8& aOptions);
|
williamr@2
|
1291 |
|
williamr@2
|
1292 |
/**
|
williamr@2
|
1293 |
Sets whether bit errors or packets losses can be expected in the video transmission channel. The
|
williamr@2
|
1294 |
video encoder can use this information to optimize the bitstream.
|
williamr@2
|
1295 |
|
williamr@2
|
1296 |
@param "aBitErrors" "True if bit errors can be expected."
|
williamr@2
|
1297 |
@param "aPacketLosses" "True if packet losses can be expected."
|
williamr@2
|
1298 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1299 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1300 |
*/
|
williamr@2
|
1301 |
IMPORT_C void SetErrorsExpected(TBool aBitErrors, TBool aPacketLosses);
|
williamr@2
|
1302 |
|
williamr@2
|
1303 |
/**
|
williamr@2
|
1304 |
Sets the minimum frequency (in time) for instantaneous random access points in the bitstream.
|
williamr@2
|
1305 |
An instantaneous random access point is such where the encoder can achieve a full output picture
|
williamr@2
|
1306 |
immediately by encoding data starting from the random access point. The random access point frequency
|
williamr@2
|
1307 |
may be higher than signalled, if the sequence contains scene cuts which typically cause a coding of
|
williamr@2
|
1308 |
a random access point.
|
williamr@2
|
1309 |
|
williamr@2
|
1310 |
@param "aRate" "Random access point rate, in pictures per second. For example, to request a random
|
williamr@2
|
1311 |
access point every ten seconds, set the value to 0.1."
|
williamr@2
|
1312 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1313 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1314 |
*/
|
williamr@2
|
1315 |
IMPORT_C void SetMinRandomAccessRate(TReal aRate);
|
williamr@2
|
1316 |
|
williamr@2
|
1317 |
/**
|
williamr@2
|
1318 |
Sets coding-standard specific encoder options.
|
williamr@2
|
1319 |
|
williamr@2
|
1320 |
@param "aOptions" "The options to use. The data format for the options is coding-standard specific,
|
williamr@2
|
1321 |
and defined seperately."
|
williamr@2
|
1322 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1323 |
- KErrNotSupported - The specified settings are not supported."
|
williamr@2
|
1324 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1325 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1326 |
*/
|
williamr@2
|
1327 |
IMPORT_C void SetCodingStandardSpecificOptionsL(const TDesC8& aOptions);
|
williamr@2
|
1328 |
|
williamr@2
|
1329 |
/**
|
williamr@2
|
1330 |
Sets implementation-specific encoder options.
|
williamr@2
|
1331 |
|
williamr@2
|
1332 |
@param "aOptions" "The options to use. The data format for the options is specific to the encoder
|
williamr@2
|
1333 |
implementation, and defined separately by the encoder implementor."
|
williamr@2
|
1334 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1335 |
- KErrNotSupported - The specified settings are not supported."
|
williamr@2
|
1336 |
@pre "This method can be called either before or after the API has been initialized with Initialize().
|
williamr@2
|
1337 |
If called after initialization, the change will only be committed once CommitL() is called."
|
williamr@2
|
1338 |
*/
|
williamr@2
|
1339 |
IMPORT_C void SetImplementationSpecificEncoderOptionsL(const TDesC8& aOptions);
|
williamr@2
|
1340 |
|
williamr@2
|
1341 |
/**
|
williamr@2
|
1342 |
Initializes the video devices, and reserves hardware resources. This method is asynchronous,
|
williamr@2
|
1343 |
DevVideoRecord will call MMMFDevVideoRecordObserver::MdvroInitializeComplete() after initialization has
|
williamr@2
|
1344 |
completed. If direct capture is used, this method also prepares the camera API for capture by calling
|
williamr@2
|
1345 |
PrepareVideoCaptureL(). No DevVideoRecord method may be called while initialization is in progress, the
|
williamr@2
|
1346 |
initialization process can only be cancelled by destroying the DevVideoRecord object.
|
williamr@2
|
1347 |
|
williamr@2
|
1348 |
After initialization has successfully been completed, video capturing and encoding can be started with
|
williamr@2
|
1349 |
Start() with a relatively low delay since the hardware has already been set up.
|
williamr@2
|
1350 |
|
williamr@2
|
1351 |
If Initialize() fails, the DevVideoRecord object must be destroyed, and set up from scratch.
|
williamr@2
|
1352 |
|
williamr@2
|
1353 |
Error handling: Errors are reported using the MdvroInitializeComplete() callback method. Typical error
|
williamr@2
|
1354 |
codes used:
|
williamr@2
|
1355 |
- KErrHardwareNotAvailable - Not enough free video processing hardware resources
|
williamr@2
|
1356 |
- KErrNotSupported - The current configuration is not supported.
|
williamr@2
|
1357 |
|
williamr@2
|
1358 |
@pre "This method can only be called before the API has been initialized."
|
williamr@2
|
1359 |
*/
|
williamr@2
|
1360 |
IMPORT_C void Initialize();
|
williamr@2
|
1361 |
|
williamr@2
|
1362 |
/**
|
williamr@2
|
1363 |
Commit all configuration changes since the last CommitL(), Revert() or Initialize(). This only applies
|
williamr@2
|
1364 |
to methods that can be called both before AND after DevVideoRecord has been initialized.
|
williamr@2
|
1365 |
See the following methods for details.
|
williamr@2
|
1366 |
|
williamr@2
|
1367 |
@see SetOutputRectL
|
williamr@2
|
1368 |
@see SetPreProcessTypesL
|
williamr@2
|
1369 |
@see SetRotateOptionsL
|
williamr@2
|
1370 |
@see SetScaleOptionsL
|
williamr@2
|
1371 |
@see SetInputCropOptionsL
|
williamr@2
|
1372 |
@see SetOutputCropOptionsL
|
williamr@2
|
1373 |
@see SetOutputPadOptionsL
|
williamr@2
|
1374 |
@see SetColorEnhancementOptionsL
|
williamr@2
|
1375 |
@see SetFrameStabilisationOptionsL
|
williamr@2
|
1376 |
@see SetCustomPreProcessOptionsL
|
williamr@2
|
1377 |
@see SetCodingStandardSpecificOptionsL
|
williamr@2
|
1378 |
@see SetImplementationSpecificEncoderOptionsL
|
williamr@2
|
1379 |
|
williamr@2
|
1380 |
@leave "The method will leave if an error occurs."
|
williamr@2
|
1381 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1382 |
*/
|
williamr@2
|
1383 |
IMPORT_C void CommitL();
|
williamr@2
|
1384 |
|
williamr@2
|
1385 |
/**
|
williamr@2
|
1386 |
Revert any configuration changes that have not yet been committed using CommitL(). This only applies
|
williamr@2
|
1387 |
to methods that can be called both before AND after DevVideoRecord has been initialized.
|
williamr@2
|
1388 |
See the following methods for details.
|
williamr@2
|
1389 |
|
williamr@2
|
1390 |
@see SetOutputRectL
|
williamr@2
|
1391 |
@see SetPreProcessTypesL
|
williamr@2
|
1392 |
@see SetRotateOptionsL
|
williamr@2
|
1393 |
@see SetScaleOptionsL
|
williamr@2
|
1394 |
@see SetInputCropOptionsL
|
williamr@2
|
1395 |
@see SetOutputCropOptionsL
|
williamr@2
|
1396 |
@see SetOutputPadOptionsL
|
williamr@2
|
1397 |
@see SetColorEnhancementOptionsL
|
williamr@2
|
1398 |
@see SetFrameStabilisationOptionsL
|
williamr@2
|
1399 |
@see SetCustomPreProcessOptionsL
|
williamr@2
|
1400 |
@see SetCodingStandardSpecificOptionsL
|
williamr@2
|
1401 |
@see SetImplementationSpecificEncoderOptionsL
|
williamr@2
|
1402 |
|
williamr@2
|
1403 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1404 |
*/
|
williamr@2
|
1405 |
IMPORT_C void Revert();
|
williamr@2
|
1406 |
|
williamr@2
|
1407 |
/**
|
williamr@2
|
1408 |
Returns coding-standard specific initialization output from the encoder. The information can contain,
|
williamr@2
|
1409 |
for example, the MPEG-4 VOL header. This method can be called after Initialize() has been called.
|
williamr@2
|
1410 |
|
williamr@2
|
1411 |
@return "Coding-standard specific initialization output. The data format is coding-standard specific
|
williamr@2
|
1412 |
and defined separately. The buffer is pushed to the cleanup stack, and the caller is responsible
|
williamr@2
|
1413 |
for deallocating it."
|
williamr@2
|
1414 |
@leave "The method will leave if an error occurs."
|
williamr@2
|
1415 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1416 |
*/
|
williamr@2
|
1417 |
IMPORT_C HBufC8* CodingStandardSpecificInitOutputLC();
|
williamr@2
|
1418 |
|
williamr@2
|
1419 |
/**
|
williamr@2
|
1420 |
Returns implementation-specific initialization output from the encoder. This method can be called after
|
williamr@2
|
1421 |
Initialize() has been called.
|
williamr@2
|
1422 |
|
williamr@2
|
1423 |
@return "Implementation-specific initialization output. The data format is specific to the encoder
|
williamr@2
|
1424 |
implementation, and defined by the encoder supplier. The buffer is pushed to the cleanup stack,
|
williamr@2
|
1425 |
and the caller is responsible for deallocating it."
|
williamr@2
|
1426 |
@leave "The method will leave if an error occurs."
|
williamr@2
|
1427 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1428 |
*/
|
williamr@2
|
1429 |
IMPORT_C HBufC8* ImplementationSpecificInitOutputLC();
|
williamr@2
|
1430 |
|
williamr@2
|
1431 |
/**
|
williamr@2
|
1432 |
Sets the number of unequal error protection levels. By default unequal error protection is not used.
|
williamr@2
|
1433 |
|
williamr@2
|
1434 |
@param "aNumLevels" "The number of unequal error protection levels. To disable unequal error
|
williamr@2
|
1435 |
protection, set this value to one. When unequal error protection is used,
|
williamr@2
|
1436 |
the encoder should code pictures so that they can be divided into number of
|
williamr@2
|
1437 |
unequal error protection levels having an ascending order of importance in
|
williamr@2
|
1438 |
the quality of decoded pictures, with level zero indicating the least important level.
|
williamr@2
|
1439 |
The encoder should map the requested bit-rate scalability layers and in-layer
|
williamr@2
|
1440 |
bit-rate scalability steps to the unequal error protection levels. In
|
williamr@2
|
1441 |
addition, the encoder may use coded sub-pictures to divide coded pictures
|
williamr@2
|
1442 |
to different regions of interest or data partitions to divide coded segments
|
williamr@2
|
1443 |
into pieces of different importance."
|
williamr@2
|
1444 |
@param "aSeparateBuffers" "True if each unequal error protection level of a coded data unit shall be
|
williamr@2
|
1445 |
encapsulated in its own output buffer. Ignored if unequal error protection
|
williamr@2
|
1446 |
is not used. If each unequal error protection level (e.g. a data partition)
|
williamr@2
|
1447 |
of coded data unit is encapsulated in its own output buffer, the caller can
|
williamr@2
|
1448 |
transmit the output buffers in different logical channels or can apply a
|
williamr@2
|
1449 |
different amount of application-level forward error coding for different
|
williamr@2
|
1450 |
output buffers. If all unequal error protection levels (e.g. data partitions)
|
williamr@2
|
1451 |
of coded data unit are encapsulated in the same output buffer, the caller can
|
williamr@2
|
1452 |
apply a forward error control mechanism that protects the beginning of the
|
williamr@2
|
1453 |
output buffer better than the remaining of the output buffer."
|
williamr@2
|
1454 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1455 |
- KErrNotSupported - Unequal error protection is not supported."
|
williamr@2
|
1456 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1457 |
*/
|
williamr@2
|
1458 |
IMPORT_C void SetErrorProtectionLevelsL(TUint aNumLevels, TBool aSeparateBuffers);
|
williamr@2
|
1459 |
|
williamr@2
|
1460 |
/**
|
williamr@2
|
1461 |
Sets up an unequal error protection level. If unequal error protection is not used, this method can be
|
williamr@2
|
1462 |
used to control settings for the whole encoded bitstream.
|
williamr@2
|
1463 |
|
williamr@2
|
1464 |
@param "aLevel" "Error protection level number. This argument is ignored if unequal error
|
williamr@2
|
1465 |
protection is not in use."
|
williamr@2
|
1466 |
@param "aBitrate" "Target bit-rate for this error protection level."
|
williamr@2
|
1467 |
@param "aStrength" "Forward error control strength for this error protection level. The strength can be
|
williamr@2
|
1468 |
specified using values from TErrorControlStrength (EFecStrengthNone, EFecStrengthLow,
|
williamr@2
|
1469 |
EFecStrengthNormal, EFecStrengthHigh), or with intermediate values between those
|
williamr@2
|
1470 |
constants."
|
williamr@2
|
1471 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1472 |
- KErrNotSupported - The specified bit-rate cannot be supported. "
|
williamr@2
|
1473 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1474 |
*/
|
williamr@2
|
1475 |
IMPORT_C void SetErrorProtectionLevelL(TUint aLevel, TUint aBitrate, TUint aStrength);
|
williamr@2
|
1476 |
|
williamr@2
|
1477 |
/**
|
williamr@2
|
1478 |
Sets the expected or prevailing channel conditions for an unequal error protection level, in terms of
|
williamr@2
|
1479 |
expected packet loss rate. The video encoder can use this information to optimize the generated
|
williamr@2
|
1480 |
bitstream.
|
williamr@2
|
1481 |
|
williamr@2
|
1482 |
@param "aLevel" "Error protection level number. This argument is ignored if unequal error
|
williamr@2
|
1483 |
protection is not in use."
|
williamr@2
|
1484 |
@param "aLossRate" "Packet loss rate, in number of packets lost per second. Set to 0.0 if
|
williamr@2
|
1485 |
packet losses are not expected."
|
williamr@2
|
1486 |
@param "aLossBurstLength" "Expected average packet loss burst length. Set to zero if the information
|
williamr@2
|
1487 |
is not available."
|
williamr@2
|
1488 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1489 |
*/
|
williamr@2
|
1490 |
IMPORT_C void SetChannelPacketLossRate(TUint aLevel, TReal aLossRate, TTimeIntervalMicroSeconds32 aLossBurstLength);
|
williamr@2
|
1491 |
|
williamr@2
|
1492 |
/**
|
williamr@2
|
1493 |
Sets the expected or prevailing channel conditions for an unequal error protection level, in terms of
|
williamr@2
|
1494 |
expected bit error rate. The video encoder can use this information to optimize the generated bitstream.
|
williamr@2
|
1495 |
|
williamr@2
|
1496 |
@param "aLevel" "Error protection level number. This argument is ignored if unequal error
|
williamr@2
|
1497 |
protection is not in use."
|
williamr@2
|
1498 |
@param "aErrorRate" "Expected bit error rate, as a fraction of the total bits transmitted. Set
|
williamr@2
|
1499 |
to 0.0 if bit errors are not expected."
|
williamr@2
|
1500 |
@param "aStdDeviation" "Expected bit error rate standard deviation."
|
williamr@2
|
1501 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1502 |
*/
|
williamr@2
|
1503 |
IMPORT_C void SetChannelBitErrorRate(TUint aLevel, TReal aErrorRate, TReal aStdDeviation);
|
williamr@2
|
1504 |
|
williamr@2
|
1505 |
/**
|
williamr@2
|
1506 |
Sets the target size of each coded video segment. The segment target size can be specified in terms
|
williamr@2
|
1507 |
of number of bytes per segment, number of macroblocks per segment, or both.
|
williamr@2
|
1508 |
|
williamr@2
|
1509 |
@param "aLayer" "Layer number. Layers are numbered [0…n-1], where n is the number of layers
|
williamr@2
|
1510 |
available. Use zero if layered bit-rate scalability is not used."
|
williamr@2
|
1511 |
@param "aSizeBytes" "Segment target size in bytes. Set to zero to use unlimited segment size. The
|
williamr@2
|
1512 |
segment size in bytes should include all data that is typically stored or
|
williamr@2
|
1513 |
transmitted for each segment in the format currently in use. This includes all
|
williamr@2
|
1514 |
related headers."
|
williamr@2
|
1515 |
@param "aSizeMacroblocks" "Segment target size in number of macroblocks per segment. Set to zero to
|
williamr@2
|
1516 |
use unlimited segment size."
|
williamr@2
|
1517 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1518 |
*/
|
williamr@2
|
1519 |
IMPORT_C void SetSegmentTargetSize(TUint aLayer, TUint aSizeBytes, TUint aSizeMacroblocks);
|
williamr@2
|
1520 |
|
williamr@2
|
1521 |
/**
|
williamr@2
|
1522 |
Sets the bit-rate control options for a layer. If layered bit-rate scalability is not used, the options
|
williamr@2
|
1523 |
are set for the whole bitstream.
|
williamr@2
|
1524 |
|
williamr@2
|
1525 |
@param "aLayer" "Layer number. Layers are numbered [0…n-1], where n is the number of layers available.
|
williamr@2
|
1526 |
Use zero if layered bit-rate scalability is not used."
|
williamr@2
|
1527 |
@param "aOptions" "Bit-rate control options."
|
williamr@2
|
1528 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1529 |
*/
|
williamr@2
|
1530 |
IMPORT_C void SetRateControlOptions(TUint aLayer, const TRateControlOptions& aOptions);
|
williamr@2
|
1531 |
|
williamr@2
|
1532 |
/**
|
williamr@2
|
1533 |
Sets in-layer scalability options for a layer. In-layer bit-rate scalability refers to techniques where
|
williamr@2
|
1534 |
a specific part of a single-layer coded stream can be decoded correctly without decoding the leftover
|
williamr@2
|
1535 |
part. For example, B-pictures can be used for this. By default in-layer scalability is not used.
|
williamr@2
|
1536 |
|
williamr@2
|
1537 |
@param "aLayer" "Layer number. Layers are numbered [0…n-1], where n is the number of layers
|
williamr@2
|
1538 |
available. Use zero if layered bit-rate scalability is not used."
|
williamr@2
|
1539 |
@param "aNumSteps" "The number of in-layer scalability steps to use. Set to one to disable
|
williamr@2
|
1540 |
in-layer scalability."
|
williamr@2
|
1541 |
@param "aScalabilityType" "The scalability type to use. See the definition of TInLayerScalabilityType
|
williamr@2
|
1542 |
for more information."
|
williamr@2
|
1543 |
@param "aBitrateShare" "Bit-rate share for each scalability step. The bit-rate shares are defined
|
williamr@2
|
1544 |
as fractions of total layer bit-rate, with the share for one layer being
|
williamr@2
|
1545 |
aBitrateShare[i]/sum(aBitrateShare). For example, to use 2/3 of the total
|
williamr@2
|
1546 |
bitrate for the first layer and the remaining 1/3 for the second, the array
|
williamr@2
|
1547 |
contents would be {2,1}."
|
williamr@2
|
1548 |
@param "aPictureShare" "Picture rate share for each scalability step. The picture rate shares are
|
williamr@2
|
1549 |
defined similarly to the bit-rate shares. For example, a client wishing to
|
williamr@2
|
1550 |
use two B-pictures between each pair of reference pictures should set the
|
williamr@2
|
1551 |
array contents to {1,2}."
|
williamr@2
|
1552 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1553 |
- KErrNotSupported - In-layer scalability is not supported.
|
williamr@2
|
1554 |
- KErrArgument - Some of the arguments are out of range. For example, it is not possible
|
williamr@2
|
1555 |
to use the specified in-layer scalability setup due to other
|
williamr@2
|
1556 |
constraints (such as the maximum picture order delay)."
|
williamr@2
|
1557 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1558 |
*/
|
williamr@2
|
1559 |
IMPORT_C void SetInLayerScalabilityL(TUint aLayer,
|
williamr@2
|
1560 |
TUint aNumSteps,
|
williamr@2
|
1561 |
TInLayerScalabilityType aScalabilityType,
|
williamr@2
|
1562 |
const TArray<TUint>& aBitrateShare,
|
williamr@2
|
1563 |
const TArray<TUint>& aPictureShare);
|
williamr@2
|
1564 |
|
williamr@2
|
1565 |
/**
|
williamr@2
|
1566 |
Sets the period for layer promotions points for a scalability layer. A layer promotion point is a
|
williamr@2
|
1567 |
picture where it is possible to start encoding this enhancement layer if only the lower layers were
|
williamr@2
|
1568 |
encoded earlier.
|
williamr@2
|
1569 |
|
williamr@2
|
1570 |
@param "aLayer" "Layer number."
|
williamr@2
|
1571 |
@param "aPeriod" "Layer promotion point period. A value of one signals that each picture should be a
|
williamr@2
|
1572 |
layer promotion point, value two that there is one picture between each promotion
|
williamr@2
|
1573 |
point etc."
|
williamr@2
|
1574 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1575 |
*/
|
williamr@2
|
1576 |
IMPORT_C void SetLayerPromotionPointPeriod(TUint aLayer, TUint aPeriod);
|
williamr@2
|
1577 |
|
williamr@2
|
1578 |
/**
|
williamr@2
|
1579 |
Returns coding-standard specific settings output from the encoder. The information can contain, for
|
williamr@2
|
1580 |
example, some bitstream headers that can change based on settings modified while encoding is in progress.
|
williamr@2
|
1581 |
|
williamr@2
|
1582 |
@return "Coding-standard specific output. The data format is coding-standard specific and defined
|
williamr@2
|
1583 |
separately. The buffer is pushed to the cleanup stack, and the caller is responsible for
|
williamr@2
|
1584 |
deallocating it."
|
williamr@2
|
1585 |
@leave "The method will leave if an error occurs."
|
williamr@2
|
1586 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1587 |
*/
|
williamr@2
|
1588 |
IMPORT_C HBufC8* CodingStandardSpecificSettingsOutputLC();
|
williamr@2
|
1589 |
|
williamr@2
|
1590 |
/**
|
williamr@2
|
1591 |
Returns implementation-specific settings output from the encoder. The information can contain, for
|
williamr@2
|
1592 |
example, some bitstream headers that can change based on settings modified while encoding is in progress.
|
williamr@2
|
1593 |
|
williamr@2
|
1594 |
@return "Implementation-specific initialization output. The data format is implementation-specific and
|
williamr@2
|
1595 |
defined separately by the encoder supplier. The buffer is pushed to the cleanup stack, and the
|
williamr@2
|
1596 |
caller is responsible for deallocating it."
|
williamr@2
|
1597 |
@leave "The method will leave if an error occurs."
|
williamr@2
|
1598 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1599 |
*/
|
williamr@2
|
1600 |
IMPORT_C HBufC8* ImplementationSpecificSettingsOutputLC();
|
williamr@2
|
1601 |
|
williamr@2
|
1602 |
/**
|
williamr@2
|
1603 |
Writes an uncompressed input picture. The picture must remain valid and unmodified until it is returned
|
williamr@2
|
1604 |
with the MdvroReturnPicture() callback. This method must not be called if direct capture is used.
|
williamr@2
|
1605 |
|
williamr@2
|
1606 |
@param "aPicture" "The picture to write."
|
williamr@2
|
1607 |
@leave "The method will leave if an error occurs."
|
williamr@2
|
1608 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1609 |
*/
|
williamr@2
|
1610 |
IMPORT_C void WritePictureL(TVideoPicture* aPicture);
|
williamr@2
|
1611 |
|
williamr@2
|
1612 |
/**
|
williamr@2
|
1613 |
Requests the encoder to sends supplemental information in the bitstream. The information data format is
|
williamr@2
|
1614 |
coding-standard dependent. Only one supplemental information send request can be active at a time.
|
williamr@2
|
1615 |
This variant encodes the information to the next possible picture.
|
williamr@2
|
1616 |
|
williamr@2
|
1617 |
@param "aData" "Supplemental information data to send. The buffer can be reused immediately after the
|
williamr@2
|
1618 |
method returns."
|
williamr@2
|
1619 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1620 |
- KErrNotSupported - Supplemental information is not supported"
|
williamr@2
|
1621 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1622 |
*/
|
williamr@2
|
1623 |
IMPORT_C void SendSupplementalInfoL(const TDesC8& aData);
|
williamr@2
|
1624 |
|
williamr@2
|
1625 |
/**
|
williamr@2
|
1626 |
Requests the encoder to send supplemental information in the bitstream. The information data format is
|
williamr@2
|
1627 |
coding-standard dependent. Only one supplemental information send request can be active at a time. This
|
williamr@2
|
1628 |
variant encodes the information to the picture whose presentation timestamp is equal to or greater than
|
williamr@2
|
1629 |
and closest to the value of aTimestamp.
|
williamr@2
|
1630 |
|
williamr@2
|
1631 |
@param "aData" "Supplemental information data to send. The buffer can be reused immediately
|
williamr@2
|
1632 |
after the method returns."
|
williamr@2
|
1633 |
@param "aTimestamp" "Timestamp for the picture in which the supplemental information should be
|
williamr@2
|
1634 |
included. If the timestamp is in the past, the supplemental information will
|
williamr@2
|
1635 |
not be sent."
|
williamr@2
|
1636 |
@leave "The method will leave if an error occurs. Typical error codes used:
|
williamr@2
|
1637 |
- KErrNotSupported - Supplemental information is not supported"
|
williamr@2
|
1638 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1639 |
*/
|
williamr@2
|
1640 |
IMPORT_C void SendSupplementalInfoL(const TDesC8& aData, const TTimeIntervalMicroSeconds& aTimestamp);
|
williamr@2
|
1641 |
|
williamr@2
|
1642 |
/**
|
williamr@2
|
1643 |
Cancels the current supplemental information send request. The memory buffer reserved for supplemental
|
williamr@2
|
1644 |
information data can be reused or deallocated after the method returns.
|
williamr@2
|
1645 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1646 |
*/
|
williamr@2
|
1647 |
IMPORT_C void CancelSupplementalInfo();
|
williamr@2
|
1648 |
|
williamr@2
|
1649 |
/**
|
williamr@2
|
1650 |
Notifies the system that the end of input data has been reached. No more input data can be written
|
williamr@2
|
1651 |
through the API. The encoder and pre-processor can use this signal to ensure that the remaining data
|
williamr@2
|
1652 |
gets processed, without waiting for new data. After the remaining data has been processed, the client
|
williamr@2
|
1653 |
gets notified by the MdvroStreamEnd() callback.
|
williamr@2
|
1654 |
|
williamr@2
|
1655 |
This method is mainly useful for file-to-file conversions and other non-realtime processing. For
|
williamr@2
|
1656 |
real-time recording all pictures are processed or discarded according to their timestamps.
|
williamr@2
|
1657 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1658 |
*/
|
williamr@2
|
1659 |
IMPORT_C void InputEnd();
|
williamr@2
|
1660 |
|
williamr@2
|
1661 |
/**
|
williamr@2
|
1662 |
Starts recording video. This includes capturing pictures from the camera (if direct capture is used),
|
williamr@2
|
1663 |
pre-processing and encoding. Recording will proceed until it is stopped or paused. Initally recording
|
williamr@2
|
1664 |
is stopped.
|
williamr@2
|
1665 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1666 |
*/
|
williamr@2
|
1667 |
IMPORT_C void Start();
|
williamr@2
|
1668 |
|
williamr@2
|
1669 |
/**
|
williamr@2
|
1670 |
Stops recording video. No new pictures will be captured, pre-processed, or encoded. If input pictures
|
williamr@2
|
1671 |
are written while recording is stopped, they will be returned immediately.
|
williamr@2
|
1672 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1673 |
*/
|
williamr@2
|
1674 |
IMPORT_C void Stop();
|
williamr@2
|
1675 |
|
williamr@2
|
1676 |
/**
|
williamr@2
|
1677 |
Pauses video recording. Recording can be resumed using Resume().
|
williamr@2
|
1678 |
|
williamr@2
|
1679 |
While video is paused, new pictures are not captured, and input pictures written using WritePictureL()
|
williamr@2
|
1680 |
are discarded. Timestamps are not incremented - the encoder assumes that the clock source is paused as
|
williamr@2
|
1681 |
well, and input picture timestamps are adjusted accordingly. Pause is typically used in video recording
|
williamr@2
|
1682 |
applications to pause recording, conversational applications should use Freeze() instead.
|
williamr@2
|
1683 |
|
williamr@2
|
1684 |
Note: The client has to ensure that the clock source is paused properly. If the paused picture should
|
williamr@2
|
1685 |
be shown longer than normal, the client should either adjust input picture timestamps, or start
|
williamr@2
|
1686 |
recording (when using direct capture) some time after restarting the clock source.
|
williamr@2
|
1687 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1688 |
*/
|
williamr@2
|
1689 |
IMPORT_C void Pause();
|
williamr@2
|
1690 |
|
williamr@2
|
1691 |
/**
|
williamr@2
|
1692 |
Resumes video recording after a pause.
|
williamr@2
|
1693 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1694 |
*/
|
williamr@2
|
1695 |
IMPORT_C void Resume();
|
williamr@2
|
1696 |
|
williamr@2
|
1697 |
/**
|
williamr@2
|
1698 |
Freezes the input picture. Freezing is similar to a pause, except that timestamps are incremented
|
williamr@2
|
1699 |
normally during a freeze. Normal encoding can be continued using ReleaseFreeze().
|
williamr@2
|
1700 |
|
williamr@2
|
1701 |
Freeze is typically used in video telephony applications to stop sending new pictures. In that situation
|
williamr@2
|
1702 |
the audio encoding can still continue normally, and thus the clock source timestamps are incremented
|
williamr@2
|
1703 |
normally. When the freeze is released, the encoder assumes that input picture timestamps have been
|
williamr@2
|
1704 |
incremented normally. If direct capture is used, the picture timestamps are updated as if encoding had
|
williamr@2
|
1705 |
been going on throughout the freeze.
|
williamr@2
|
1706 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1707 |
*/
|
williamr@2
|
1708 |
IMPORT_C void Freeze();
|
williamr@2
|
1709 |
|
williamr@2
|
1710 |
/**
|
williamr@2
|
1711 |
Releases a frozen input picture. Video capturing and encoding continues normally.
|
williamr@2
|
1712 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1713 |
*/
|
williamr@2
|
1714 |
IMPORT_C void ReleaseFreeze();
|
williamr@2
|
1715 |
|
williamr@2
|
1716 |
/**
|
williamr@2
|
1717 |
Returns the current recording position. The position is the capture timestamp from the latest input
|
williamr@2
|
1718 |
picture, or the capture timestamp for the latest picture captured from the camera when direct capture
|
williamr@2
|
1719 |
is used.
|
williamr@2
|
1720 |
|
williamr@2
|
1721 |
@return "The current recording position."
|
williamr@2
|
1722 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1723 |
*/
|
williamr@2
|
1724 |
IMPORT_C TTimeIntervalMicroSeconds RecordingPosition();
|
williamr@2
|
1725 |
|
williamr@2
|
1726 |
/**
|
williamr@2
|
1727 |
Gets the current output buffer status. The information includes the number of free output buffers and
|
williamr@2
|
1728 |
the total size of free buffers in bytes.
|
williamr@2
|
1729 |
|
williamr@2
|
1730 |
@param "aNumFreeBuffers" "Target for the number of free output buffers."
|
williamr@2
|
1731 |
@param "aTotalFreeBytes" "Target for the total free buffer size in bytes."
|
williamr@2
|
1732 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1733 |
*/
|
williamr@2
|
1734 |
IMPORT_C void GetOutputBufferStatus(TUint& aNumFreeBuffers, TUint& aTotalFreeBytes);
|
williamr@2
|
1735 |
|
williamr@2
|
1736 |
/**
|
williamr@2
|
1737 |
Reads various counters related to processed video pictures. See the definition of TPictureCounters
|
williamr@2
|
1738 |
for a description of the counters. The counters are reset when Initialize() or this method is called,
|
williamr@2
|
1739 |
and thus they only include pictures processed since the last call.
|
williamr@2
|
1740 |
|
williamr@2
|
1741 |
@param "aCounters" "The counter structure to fill."
|
williamr@2
|
1742 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1743 |
*/
|
williamr@2
|
1744 |
IMPORT_C void GetPictureCounters(TPictureCounters& aCounters);
|
williamr@2
|
1745 |
|
williamr@2
|
1746 |
/**
|
williamr@2
|
1747 |
Reads the frame stabilisation output picture position. This information can be used for positioning
|
williamr@2
|
1748 |
the viewfinder. The position returned is the stabilisation result for the most recent input picture.
|
williamr@2
|
1749 |
|
williamr@2
|
1750 |
@param "aHwDevice" "The hardware device to query. The value is returned from SelectEncoderL() or
|
williamr@2
|
1751 |
SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1752 |
@param "aRect" "The position of the stabilisation output picture inside the input picture. If
|
williamr@2
|
1753 |
frame stabilisation is not used, the rectangle is set to cover the entire input
|
williamr@2
|
1754 |
picture."
|
williamr@2
|
1755 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1756 |
*/
|
williamr@2
|
1757 |
IMPORT_C void GetFrameStabilisationOutput(THwDeviceId aHwDevice, TRect& aRect);
|
williamr@2
|
1758 |
|
williamr@2
|
1759 |
/**
|
williamr@2
|
1760 |
Returns the number of output buffers currently containing valid output data.
|
williamr@2
|
1761 |
|
williamr@2
|
1762 |
@return "The number of output buffers with valid output data."
|
williamr@2
|
1763 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1764 |
*/
|
williamr@2
|
1765 |
IMPORT_C TUint NumDataBuffers();
|
williamr@2
|
1766 |
|
williamr@2
|
1767 |
/**
|
williamr@2
|
1768 |
Retrieves the next output buffer, in coding order. The buffer must be returned using ReturnBuffer() when
|
williamr@2
|
1769 |
it is no longer used. The maximum amount of buffers that the caller can keep in its use is controlled by
|
williamr@2
|
1770 |
the iMinNumOutputBuffers and iMinTotalOutputBufferSize fields in the TEncoderBufferOptions settings.
|
williamr@2
|
1771 |
|
williamr@2
|
1772 |
@return "The next output buffer, in coding order. If no new buffers are available, the return value
|
williamr@2
|
1773 |
is NULL."
|
williamr@2
|
1774 |
@leave "The method will leave if an error occurs."
|
williamr@2
|
1775 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1776 |
*/
|
williamr@2
|
1777 |
IMPORT_C TVideoOutputBuffer* NextBufferL();
|
williamr@2
|
1778 |
|
williamr@2
|
1779 |
/**
|
williamr@2
|
1780 |
Returns a used output buffer back to the encoder. The buffer can no longer be used by the client.
|
williamr@2
|
1781 |
|
williamr@2
|
1782 |
@param "aBuffer" "The buffer to return."
|
williamr@2
|
1783 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1784 |
*/
|
williamr@2
|
1785 |
IMPORT_C void ReturnBuffer(TVideoOutputBuffer* aBuffer);
|
williamr@2
|
1786 |
|
williamr@2
|
1787 |
/**
|
williamr@2
|
1788 |
Indicates a picture loss to the encoder, without specifying the lost picture. The encoder can react to
|
williamr@2
|
1789 |
this by transmitting an intra-picture.
|
williamr@2
|
1790 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1791 |
*/
|
williamr@2
|
1792 |
IMPORT_C void PictureLoss();
|
williamr@2
|
1793 |
|
williamr@2
|
1794 |
/**
|
williamr@2
|
1795 |
Indicates to the encoder the pictures that have been lost. The encoder can react to this by
|
williamr@2
|
1796 |
transmitting an intra-picture.
|
williamr@2
|
1797 |
|
williamr@2
|
1798 |
@param "aPictures" "Picture identifiers for the lost pictures. See [6] for a definition of TPictureId."
|
williamr@2
|
1799 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1800 |
*/
|
williamr@2
|
1801 |
IMPORT_C void PictureLoss(const TArray<TPictureId>& aPictures);
|
williamr@2
|
1802 |
|
williamr@2
|
1803 |
/**
|
williamr@2
|
1804 |
Indicates a loss of consecutive macroblocks in raster scan order to the encoder.
|
williamr@2
|
1805 |
|
williamr@2
|
1806 |
@param "aFirstMacroblock" "The first lost macroblock. The macroblocks are numbered such
|
williamr@2
|
1807 |
that the macroblock in the upper left corner of the picture is considered
|
williamr@2
|
1808 |
macroblock number 1 and the number for each macroblock increases from left
|
williamr@2
|
1809 |
to right and then from top to bottom in raster-scan order."
|
williamr@2
|
1810 |
@param "aNumMacroblocks" "The number of lost macroblocks that are consecutive in raster scan order."
|
williamr@2
|
1811 |
@param "aPicture" "The picture number for the picture where the macroblocks were lost.
|
williamr@2
|
1812 |
If the picture is not known, aPicture.iIdType is set to ENone."
|
williamr@2
|
1813 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1814 |
*/
|
williamr@2
|
1815 |
IMPORT_C void SliceLoss(TUint aFirstMacroblock, TUint aNumMacroblocks, const TPictureId& aPicture);
|
williamr@2
|
1816 |
|
williamr@2
|
1817 |
/**
|
williamr@2
|
1818 |
Sends a reference picture selection request to the encoder. The request is delivered as a coding-standard
|
williamr@2
|
1819 |
specific binary message. Reference picture selection can be used to select a previous correctly
|
williamr@2
|
1820 |
transmitted picture to use as a reference in case later pictures have been lost.
|
williamr@2
|
1821 |
|
williamr@2
|
1822 |
@param "aSelectionData" "The reference picture selection request message. The message format is
|
williamr@2
|
1823 |
coding-standard specific, and defined separately."
|
williamr@2
|
1824 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1825 |
*/
|
williamr@2
|
1826 |
IMPORT_C void ReferencePictureSelection(const TDesC8& aSelectionData);
|
williamr@2
|
1827 |
|
williamr@2
|
1828 |
/**
|
williamr@2
|
1829 |
Retrieves the number of complexity control levels available for a hardware device. Devices can support
|
williamr@2
|
1830 |
processing the same input data with different computational complexity levels. The complexity level
|
williamr@2
|
1831 |
can affect, for example, the motion vector search range used in an encoder.
|
williamr@2
|
1832 |
|
williamr@2
|
1833 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL() or
|
williamr@2
|
1834 |
SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1835 |
@return "The number of complexity control levels available, one if multiple levels are not supported."
|
williamr@2
|
1836 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1837 |
*/
|
williamr@2
|
1838 |
IMPORT_C TUint NumComplexityLevels(THwDeviceId aHwDevice);
|
williamr@2
|
1839 |
|
williamr@2
|
1840 |
/**
|
williamr@2
|
1841 |
Sets the complexity level to use for video processing in a hardware device. The level can be changed at
|
williamr@2
|
1842 |
any time.
|
williamr@2
|
1843 |
|
williamr@2
|
1844 |
@param "aHwDevice" "The hardware device to configure. The value is returned from SelectEncoderL() or
|
williamr@2
|
1845 |
SelectPreProcessorL() when the device is selected."
|
williamr@2
|
1846 |
@param "aLevel" "The computational complexity level to use. Level zero (0) is the most complex one,
|
williamr@2
|
1847 |
with the highest quality. Higher level numbers require less processing and may have
|
williamr@2
|
1848 |
lower quality."
|
williamr@2
|
1849 |
@pre "This method can only be called after the API has been initialized with Initialize()."
|
williamr@2
|
1850 |
*/
|
williamr@2
|
1851 |
IMPORT_C void SetComplexityLevel(THwDeviceId aHwDevice, TUint aLevel);
|
williamr@2
|
1852 |
|
williamr@2
|
1853 |
/**
|
williamr@2
|
1854 |
Retrieves a custom interface to the specified hardware device.
|
williamr@2
|
1855 |
@param "aHwDevice" "The hardware device from which the custom interface shall be requested.
|
williamr@2
|
1856 |
The value is returned from SelectDecoderL() or SelectPostProcessorL() when
|
williamr@2
|
1857 |
the device is selected."
|
williamr@2
|
1858 |
@param "aInterface" "Interface UID, defined with the custom interface."
|
williamr@2
|
1859 |
@return "Pointer to the interface implementation, or NULL if the device does not
|
williamr@2
|
1860 |
implement the interface requested. The return value must be cast to the
|
williamr@2
|
1861 |
correct type by the user."
|
williamr@2
|
1862 |
*/
|
williamr@2
|
1863 |
IMPORT_C TAny* CustomInterface(THwDeviceId aHwDevice, TUid aInterface);
|
williamr@2
|
1864 |
|
williamr@2
|
1865 |
private:
|
williamr@2
|
1866 |
enum TInitializationState
|
williamr@2
|
1867 |
{
|
williamr@2
|
1868 |
ENotInitialized = 0x01,
|
williamr@2
|
1869 |
EInitializing = 0x02,
|
williamr@2
|
1870 |
EInitialized = 0x04,
|
williamr@2
|
1871 |
EInitializationFailed = 0x08
|
williamr@2
|
1872 |
};
|
williamr@2
|
1873 |
|
williamr@2
|
1874 |
private:
|
williamr@2
|
1875 |
CMMFDevVideoRecord(MMMFDevVideoRecordObserver& aObserver);
|
williamr@2
|
1876 |
|
williamr@2
|
1877 |
// Methods to check aHwDevice is valid and return the appropriate HwDevice
|
williamr@2
|
1878 |
CMMFVideoRecordHwDevice& VideoRecordHwDevice(THwDeviceId aHwDevice) const;
|
williamr@2
|
1879 |
CMMFVideoRecordHwDevice& CapturingHwDevice() const; //returns the first plugin in the chain
|
williamr@2
|
1880 |
CMMFVideoEncodeHwDevice& VideoEncodeHwDevice(THwDeviceId aHwDevice) const;// Checks that aHwDevice is valid
|
williamr@2
|
1881 |
CMMFVideoPreProcHwDevice& VideoPreProcHwDevice(THwDeviceId aHwDevice) const;// Checks that aHwDevice is valid
|
williamr@2
|
1882 |
CMMFVideoEncodeHwDevice& VideoEncodeHwDevice() const;
|
williamr@2
|
1883 |
CMMFVideoPreProcHwDevice& VideoPreProcHwDevice() const;
|
williamr@2
|
1884 |
CMMFVideoHwDevice& VideoHwDevice(THwDeviceId aHwDevice) const;
|
williamr@2
|
1885 |
|
williamr@2
|
1886 |
// Connects the plugins together
|
williamr@2
|
1887 |
void ConnectPlugins();
|
williamr@2
|
1888 |
|
williamr@2
|
1889 |
// Check that we are in a valid initialization state
|
williamr@2
|
1890 |
// Panics if iInitializationState is not one of aExpected
|
williamr@2
|
1891 |
void CheckInitializationState(TUint aExpected);
|
williamr@2
|
1892 |
|
williamr@2
|
1893 |
// Methods to handle init complete callbacks from the hw devices
|
williamr@2
|
1894 |
void HandlePreProcInitializeComplete(TInt aError);
|
williamr@2
|
1895 |
void HandleEncoderInitializeComplete(TInt aError);
|
williamr@2
|
1896 |
|
williamr@2
|
1897 |
CMMFVideoEncodeHwDevice* CreateEncoderL(TUid aVideoEncoder);
|
williamr@2
|
1898 |
|
williamr@2
|
1899 |
// from MMMFDevVideoRecordProxy
|
williamr@2
|
1900 |
virtual void MdvrpNewBuffer(TVideoOutputBuffer* aBuffer);
|
williamr@2
|
1901 |
virtual void MdvrpReturnPicture(TVideoPicture* aPicture);
|
williamr@2
|
1902 |
virtual void MdvrpSupplementalInfoSent();
|
williamr@2
|
1903 |
virtual void MdvrpFatalError(CMMFVideoHwDevice* aDevice, TInt aError);
|
williamr@2
|
1904 |
virtual void MdvrpInitializeComplete(CMMFVideoHwDevice* aDevice, TInt aError);
|
williamr@2
|
1905 |
virtual void MdvrpStreamEnd();
|
williamr@2
|
1906 |
|
williamr@2
|
1907 |
private:
|
williamr@2
|
1908 |
MMMFDevVideoRecordObserver& iObserver;
|
williamr@2
|
1909 |
CMMFVideoEncodeHwDevice* iVideoEncodeHwDevice;
|
williamr@2
|
1910 |
CMMFVideoPreProcHwDevice* iVideoPreProcHwDevice;
|
williamr@2
|
1911 |
TUint iInitializationState;
|
williamr@2
|
1912 |
TUint iNumberOfMdvrpStreamEndCallbacks;
|
williamr@2
|
1913 |
|
williamr@2
|
1914 |
TDblQue<TVideoOutputBuffer> iVideoOutputBufferQue;
|
williamr@2
|
1915 |
TDblQueIter<TVideoOutputBuffer> iVideoOutputBufferQueIter;
|
williamr@2
|
1916 |
TUint iNumberOfVideoOutputBuffers;
|
williamr@2
|
1917 |
TBool iIsPreProcComplete;
|
williamr@2
|
1918 |
|
williamr@2
|
1919 |
#ifdef SYMBIAN_MULTIMEDIA_CODEC_API
|
williamr@2
|
1920 |
TBool iPuListCreated;
|
williamr@2
|
1921 |
RImplInfoPtrArray iPuImplementations;
|
williamr@2
|
1922 |
#endif // SYMBIAN_MULTIMEDIA_CODEC_API
|
williamr@2
|
1923 |
};
|
williamr@2
|
1924 |
|
williamr@2
|
1925 |
|
williamr@2
|
1926 |
/**
|
williamr@2
|
1927 |
The MMMFDevVideoObserver class defines the observer mixin-interface that any client using CMMFDevVideoRecord
|
williamr@2
|
1928 |
must implement.
|
williamr@2
|
1929 |
@publishedAll
|
williamr@2
|
1930 |
@released
|
williamr@2
|
1931 |
*/
|
williamr@2
|
1932 |
class MMMFDevVideoRecordObserver
|
williamr@2
|
1933 |
{
|
williamr@2
|
1934 |
public:
|
williamr@2
|
1935 |
/**
|
williamr@2
|
1936 |
Returns a used input video picture back to the caller. The picture memory can be re-used or freed.
|
williamr@2
|
1937 |
@param "aPicture" "The picture to return."
|
williamr@2
|
1938 |
*/
|
williamr@2
|
1939 |
virtual void MdvroReturnPicture(TVideoPicture* aPicture) = 0;
|
williamr@2
|
1940 |
|
williamr@2
|
1941 |
/**
|
williamr@2
|
1942 |
Signals that the supplemental info send request has completed. The buffer used for supplemental
|
williamr@2
|
1943 |
information can be re-used or freed.
|
williamr@2
|
1944 |
*/
|
williamr@2
|
1945 |
virtual void MdvroSupplementalInfoSent() = 0;
|
williamr@2
|
1946 |
|
williamr@2
|
1947 |
/**
|
williamr@2
|
1948 |
Notifies the client that one or more new output buffers are available. The client can then use
|
williamr@2
|
1949 |
NextBufferL() and related methods to fetch the data.
|
williamr@2
|
1950 |
*/
|
williamr@2
|
1951 |
virtual void MdvroNewBuffers() = 0;
|
williamr@2
|
1952 |
|
williamr@2
|
1953 |
/**
|
williamr@2
|
1954 |
Reports a fatal encoding or capturing error to the client. When these
|
williamr@2
|
1955 |
errors occur, capturing and encoding is stopped automatically. The client
|
williamr@2
|
1956 |
must destroy the CMMFDevVideoRecord object and create a new instance before
|
williamr@2
|
1957 |
attempting to continue. Note that scenarios have been identified where
|
williamr@2
|
1958 |
MdvroFatalError may get referenced at some point during the execution of a
|
williamr@2
|
1959 |
CMMFDevVideoRecord procedure. Therefore CMMFDevVideoRecord object should be
|
williamr@2
|
1960 |
deleted outside of MdvroFatalError context in order to avoid accidental
|
williamr@2
|
1961 |
access to de-allocated CMMFDevVideoRecord data members.
|
williamr@2
|
1962 |
@param "aError" "The error code."
|
williamr@2
|
1963 |
*/
|
williamr@2
|
1964 |
virtual void MdvroFatalError(TInt aError) = 0;
|
williamr@2
|
1965 |
|
williamr@2
|
1966 |
/**
|
williamr@2
|
1967 |
Reports that DevVideoRecord initialization has completed. The interface can now be used for video
|
williamr@2
|
1968 |
recording.
|
williamr@2
|
1969 |
@param "aError" "Initialization error code, KErrNone if no error occurred."
|
williamr@2
|
1970 |
*/
|
williamr@2
|
1971 |
virtual void MdvroInitializeComplete(TInt aError) = 0;
|
williamr@2
|
1972 |
|
williamr@2
|
1973 |
/**
|
williamr@2
|
1974 |
Reports that the input video data end has been reached and all pictures have been processed. This
|
williamr@2
|
1975 |
method is only called after the client has called InputEnd(). No more output data will be available.
|
williamr@2
|
1976 |
*/
|
williamr@2
|
1977 |
virtual void MdvroStreamEnd() = 0;
|
williamr@2
|
1978 |
};
|
williamr@2
|
1979 |
|
williamr@2
|
1980 |
|
williamr@2
|
1981 |
#include <mmf/devvideo/devvideorecord.inl>
|
williamr@2
|
1982 |
|
williamr@2
|
1983 |
#endif
|