|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef VIDEOBUFFERSINKHANDLER_H |
|
21 #define VIDEOBUFFERSINKHANDLER_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <e32msgqueue.h> |
|
25 #include <f32file.h> |
|
26 #include <openmax/il/extensions/omxilsymbianbuffersextensions.h> |
|
27 #include <multimedia/mmfbuffershared.h> |
|
28 #include <openmax/il/khronos/v1_x/OMX_Component.h> |
|
29 |
|
30 NONSHARABLE_CLASS(CVideoBufferSinkHandler) : public CActive |
|
31 { |
|
32 public: |
|
33 ~CVideoBufferSinkHandler(); |
|
34 static CVideoBufferSinkHandler* NewL(TDesC& aFilename, OMX_SYMBIAN_PARAM_3PLANE_CHUNK_DATA& aChunkDataMsg, const OMX_SYMBIAN_PARAM_BUFFER_SIZE& aBufferSize, OMX_PARAM_PORTDEFINITIONTYPE& portDef); |
|
35 |
|
36 |
|
37 public: |
|
38 void Start(); |
|
39 |
|
40 private: |
|
41 CVideoBufferSinkHandler(TDesC& aFilename); |
|
42 void ConstructL(OMX_SYMBIAN_PARAM_3PLANE_CHUNK_DATA& aChunkDataMsg, const OMX_SYMBIAN_PARAM_BUFFER_SIZE& aBufferSize, OMX_PARAM_PORTDEFINITIONTYPE& portDef); |
|
43 |
|
44 // From CActive |
|
45 void RunL(); |
|
46 void DoCancel(); |
|
47 |
|
48 private: |
|
49 RMsgQueue<TFilledBufferHeaderV2> iReceiveBuffer; |
|
50 RMsgQueue<TFilledBufferHeaderV2> iSendBuffer; |
|
51 TMMSharedChunkBufConfig iBufConfig; |
|
52 TPtr8 iWriteDes; |
|
53 |
|
54 |
|
55 RChunk iBufferChunk; |
|
56 TBuf<KMaxFileName> iFileName; |
|
57 RFile iFileSink; |
|
58 RFs iFs; |
|
59 }; |
|
60 |
|
61 #endif // VIDEOBUFFERSINKHANDLER_H |