1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmhais/videohai/devvideo/inc/devvideoclientbuffersupport.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,89 @@
1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +#ifndef DEVVIDEOCLIENTBUFFERSUPPORT_H
1.21 +#define DEVVIDEOCLIENTBUFFERSUPPORT_H
1.22 +
1.23 +#include <e32def.h>
1.24 +
1.25 +class TVideoFrameBuffer;
1.26 +
1.27 +/**
1.28 +DevVideo Client Buffer Support Custom Interface UID.
1.29 +
1.30 +@publishedPartner
1.31 +@released
1.32 +*/
1.33 +const TUid KUidMMFVideoClientBufferSupport = { 0x10283417 };
1.34 +
1.35 +/**
1.36 +In implementations where the controller creates and manages surfaces, this
1.37 +DevVideo custom interface lets the decoder decode into those client-supplied
1.38 +surface buffers.
1.39 +
1.40 +@publishedPartner
1.41 +@released
1.42 +*/
1.43 +class MMMFVideoClientBufferSupport
1.44 + {
1.45 +public:
1.46 + /**
1.47 + Enables client buffer mode. This method must be called before Initialize() with
1.48 + aClientBuffers=ETrue to use client-supplied buffers. When client-supplied buffers
1.49 + are used the decoder will not allocate output buffers, but will instead expect to
1.50 + receive them from the client using MvcbsSupplyBuffer().
1.51 +
1.52 + @param aClientBuffers ETrue to enable using client-supplied buffers, EFalse to
1.53 + disable this.
1.54 + */
1.55 + virtual void MvcbsUseClientBuffers(TBool aClientBuffers) = 0;
1.56 +
1.57 + /**
1.58 + Supplies a buffer to be used for decoder output. The decoder will decode a
1.59 + picture into the buffer and return it to the client through the standard
1.60 + DevVideoPlay data flow (MdvppNewPicture() and NextPictureL()). The client can
1.61 + identify the buffer by comparing TVideoPicture.iData.iRawData in the output
1.62 + picture to TVideoFrameBuffer.Buffer() in the supplied buffer.
1.63 +
1.64 + Clients can queue multiple buffers in a decoder by calling this method several
1.65 + times before receiving output pictures.
1.66 +
1.67 + The client must call ReturnPicture() for each decoder output picture even when
1.68 + using client-supplied buffers, since the decoder must still be able to free other
1.69 + DevVideo-related data structures such as the TVideoPicture object itself.
1.70 +
1.71 + @param aBuffer A TVideoFrameBuffer structure describing the buffer. The buffer
1.72 + must remain accessible and the reference valid until the client receives the
1.73 + buffer through NextPictureL() or calls MvcbsReleaseBuffers().
1.74 + */
1.75 + virtual void MvcbsSupplyBuffer(TVideoFrameBuffer& aBuffer) = 0;
1.76 +
1.77 + /**
1.78 + Requests the decoder to release all buffers previously supplied with
1.79 + MvcbsSupplyBuffer() but not yet used. The decoder must synchronously stop using
1.80 + any such buffers before returning from this method.
1.81 +
1.82 + This method is typically used when the client must delete a surface unexpectedly.
1.83 +
1.84 + Note that decoded buffers may also be buffered in DevVideoPlay. Therefore, in
1.85 + addition to calling this method the client must also receive all decoded pictures
1.86 + from DevVideoPlay by calling NextPictureL() repeatedly until no more pictures are
1.87 + available.
1.88 + */
1.89 + virtual void MvcbsReleaseBuffers() = 0;
1.90 + };
1.91 +
1.92 +#endif // DEVVIDEOCLIENTBUFFERSUPPORT_H