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 VIDEOFRAMEBUFFER_H
|
sl@0
|
18 |
#define VIDEOFRAMEBUFFER_H
|
sl@0
|
19 |
|
sl@0
|
20 |
#include <e32def.h>
|
sl@0
|
21 |
#include <mmf/devvideo/devvideobase.h> // for TUncompressedVideoFormat
|
sl@0
|
22 |
|
sl@0
|
23 |
/**
|
sl@0
|
24 |
TVideoFrameBuffer represents a buffer for a single decoded video picture. The
|
sl@0
|
25 |
buffer must be contained within a chunk that can be shared across processes.
|
sl@0
|
26 |
|
sl@0
|
27 |
The frame buffer class is used both for video renderer data flow and with the
|
sl@0
|
28 |
MMMFVideoClientBufferSupport extension.
|
sl@0
|
29 |
|
sl@0
|
30 |
@publishedPartner
|
sl@0
|
31 |
@released
|
sl@0
|
32 |
*/
|
sl@0
|
33 |
class TVideoFrameBuffer
|
sl@0
|
34 |
{
|
sl@0
|
35 |
public:
|
sl@0
|
36 |
IMPORT_C TVideoFrameBuffer(const TUncompressedVideoFormat& aFormat,
|
sl@0
|
37 |
TInt aStride,
|
sl@0
|
38 |
TInt aBufferId,
|
sl@0
|
39 |
const RChunk& aChunk,
|
sl@0
|
40 |
TInt aOffsetInChunk);
|
sl@0
|
41 |
|
sl@0
|
42 |
IMPORT_C TUncompressedVideoFormat Format() const;
|
sl@0
|
43 |
IMPORT_C TUint Stride() const;
|
sl@0
|
44 |
IMPORT_C TInt BufferId() const;
|
sl@0
|
45 |
IMPORT_C const RChunk& Chunk() const;
|
sl@0
|
46 |
IMPORT_C TUint8* Buffer() const;
|
sl@0
|
47 |
|
sl@0
|
48 |
/** Status used by video renderer
|
sl@0
|
49 |
@internalComponent
|
sl@0
|
50 |
*/
|
sl@0
|
51 |
enum TBufferStatus
|
sl@0
|
52 |
{
|
sl@0
|
53 |
EAvailable,
|
sl@0
|
54 |
EUsedByClient,
|
sl@0
|
55 |
EWaiting,
|
sl@0
|
56 |
ESubmitted
|
sl@0
|
57 |
};
|
sl@0
|
58 |
|
sl@0
|
59 |
TBufferStatus BufferStatus() const;
|
sl@0
|
60 |
void SetBufferStatus(TBufferStatus aStatus);
|
sl@0
|
61 |
TDblQueLink& DblQueLink();
|
sl@0
|
62 |
void SetPresentationTime(const TTime& aTime);
|
sl@0
|
63 |
TTime PresentationTime() const;
|
sl@0
|
64 |
|
sl@0
|
65 |
public:
|
sl@0
|
66 |
/** Offset for link list
|
sl@0
|
67 |
@internalComponent
|
sl@0
|
68 |
*/
|
sl@0
|
69 |
static const TInt iOffset;
|
sl@0
|
70 |
|
sl@0
|
71 |
private:
|
sl@0
|
72 |
TUncompressedVideoFormat iFormat;
|
sl@0
|
73 |
TInt iStride;
|
sl@0
|
74 |
TInt iBufferId;
|
sl@0
|
75 |
RChunk iChunk;
|
sl@0
|
76 |
TInt iOffsetInChunk;
|
sl@0
|
77 |
TDblQueLink iDblQueLink;
|
sl@0
|
78 |
TBufferStatus iStatus;
|
sl@0
|
79 |
TTime iPresentationTime;
|
sl@0
|
80 |
};
|
sl@0
|
81 |
|
sl@0
|
82 |
#endif // VIDEOFRAMEBUFFER_H
|