sl@0
|
1 |
// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
|
sl@0
|
17 |
#ifndef DEVVIDEOCLIENTBUFFERSUPPORT_H
|
sl@0
|
18 |
#define DEVVIDEOCLIENTBUFFERSUPPORT_H
|
sl@0
|
19 |
|
sl@0
|
20 |
#include <e32def.h>
|
sl@0
|
21 |
|
sl@0
|
22 |
class TVideoFrameBuffer;
|
sl@0
|
23 |
|
sl@0
|
24 |
/**
|
sl@0
|
25 |
DevVideo Client Buffer Support Custom Interface UID.
|
sl@0
|
26 |
|
sl@0
|
27 |
@publishedPartner
|
sl@0
|
28 |
@released
|
sl@0
|
29 |
*/
|
sl@0
|
30 |
const TUid KUidMMFVideoClientBufferSupport = { 0x10283417 };
|
sl@0
|
31 |
|
sl@0
|
32 |
/**
|
sl@0
|
33 |
In implementations where the controller creates and manages surfaces, this
|
sl@0
|
34 |
DevVideo custom interface lets the decoder decode into those client-supplied
|
sl@0
|
35 |
surface buffers.
|
sl@0
|
36 |
|
sl@0
|
37 |
@publishedPartner
|
sl@0
|
38 |
@released
|
sl@0
|
39 |
*/
|
sl@0
|
40 |
class MMMFVideoClientBufferSupport
|
sl@0
|
41 |
{
|
sl@0
|
42 |
public:
|
sl@0
|
43 |
/**
|
sl@0
|
44 |
Enables client buffer mode. This method must be called before Initialize() with
|
sl@0
|
45 |
aClientBuffers=ETrue to use client-supplied buffers. When client-supplied buffers
|
sl@0
|
46 |
are used the decoder will not allocate output buffers, but will instead expect to
|
sl@0
|
47 |
receive them from the client using MvcbsSupplyBuffer().
|
sl@0
|
48 |
|
sl@0
|
49 |
@param aClientBuffers ETrue to enable using client-supplied buffers, EFalse to
|
sl@0
|
50 |
disable this.
|
sl@0
|
51 |
*/
|
sl@0
|
52 |
virtual void MvcbsUseClientBuffers(TBool aClientBuffers) = 0;
|
sl@0
|
53 |
|
sl@0
|
54 |
/**
|
sl@0
|
55 |
Supplies a buffer to be used for decoder output. The decoder will decode a
|
sl@0
|
56 |
picture into the buffer and return it to the client through the standard
|
sl@0
|
57 |
DevVideoPlay data flow (MdvppNewPicture() and NextPictureL()). The client can
|
sl@0
|
58 |
identify the buffer by comparing TVideoPicture.iData.iRawData in the output
|
sl@0
|
59 |
picture to TVideoFrameBuffer.Buffer() in the supplied buffer.
|
sl@0
|
60 |
|
sl@0
|
61 |
Clients can queue multiple buffers in a decoder by calling this method several
|
sl@0
|
62 |
times before receiving output pictures.
|
sl@0
|
63 |
|
sl@0
|
64 |
The client must call ReturnPicture() for each decoder output picture even when
|
sl@0
|
65 |
using client-supplied buffers, since the decoder must still be able to free other
|
sl@0
|
66 |
DevVideo-related data structures such as the TVideoPicture object itself.
|
sl@0
|
67 |
|
sl@0
|
68 |
@param aBuffer A TVideoFrameBuffer structure describing the buffer. The buffer
|
sl@0
|
69 |
must remain accessible and the reference valid until the client receives the
|
sl@0
|
70 |
buffer through NextPictureL() or calls MvcbsReleaseBuffers().
|
sl@0
|
71 |
*/
|
sl@0
|
72 |
virtual void MvcbsSupplyBuffer(TVideoFrameBuffer& aBuffer) = 0;
|
sl@0
|
73 |
|
sl@0
|
74 |
/**
|
sl@0
|
75 |
Requests the decoder to release all buffers previously supplied with
|
sl@0
|
76 |
MvcbsSupplyBuffer() but not yet used. The decoder must synchronously stop using
|
sl@0
|
77 |
any such buffers before returning from this method.
|
sl@0
|
78 |
|
sl@0
|
79 |
This method is typically used when the client must delete a surface unexpectedly.
|
sl@0
|
80 |
|
sl@0
|
81 |
Note that decoded buffers may also be buffered in DevVideoPlay. Therefore, in
|
sl@0
|
82 |
addition to calling this method the client must also receive all decoded pictures
|
sl@0
|
83 |
from DevVideoPlay by calling NextPictureL() repeatedly until no more pictures are
|
sl@0
|
84 |
available.
|
sl@0
|
85 |
*/
|
sl@0
|
86 |
virtual void MvcbsReleaseBuffers() = 0;
|
sl@0
|
87 |
};
|
sl@0
|
88 |
|
sl@0
|
89 |
#endif // DEVVIDEOCLIENTBUFFERSUPPORT_H
|