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