|
1 /* |
|
2 * Copyright (c) 2009 Aricent and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "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 * Aricent - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * Header file to the H264 Decoder wrapper Implementation. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef ARIH264DECWRAPPER_H |
|
20 #define ARIH264DECWRAPPER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32def.h> |
|
24 #include <e32base.h> |
|
25 #include <devvideoconstants.h> |
|
26 #include "aribasecodec.h" |
|
27 #include "ariprint.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 class TUncompressedVideoFormat; |
|
31 class TVideoInputBuffer; |
|
32 class TVideoPictureHeader; |
|
33 |
|
34 enum TSetCommands |
|
35 { |
|
36 CONTROL_CMD_SET_TIMESTAMP |
|
37 }; |
|
38 |
|
39 enum TGetCommands |
|
40 { |
|
41 CONTROL_CMD_GET_SLICELOSSINFO, |
|
42 CONTROL_CMD_GET_PICTURELOSSINFO, |
|
43 CONTROL_CMD_GET_OUTPUTBUFFERLENGTH |
|
44 }; |
|
45 |
|
46 const TInt KMaxFrameWidth = 640;//should be 1280 for enabling 720P decoding; |
|
47 const TInt KMaxFrameHeight = 480;//should be 720 for enabling 720P decoding; |
|
48 |
|
49 /** |
|
50 * Class CAriH264decWrapper |
|
51 * This class is part of Aricent's H264 decoder wrapper used by the H264 |
|
52 * This HwDevice Plugin to decode H264 content to yuv420. |
|
53 * |
|
54 */ |
|
55 class CAriH264decWrapper: public CBase, public MBaseCodec |
|
56 { |
|
57 |
|
58 public:// Constructor and Destructor |
|
59 |
|
60 /** |
|
61 * Two-phased constructor. |
|
62 @param "aInputFormat" "type of input format, decides packetmode |
|
63 or framemode". |
|
64 @param "aOutputFormat" "supported output formats". |
|
65 @param "aInpBuf" "configuration data required to create the |
|
66 decoder". |
|
67 |
|
68 @leave "The method will leave if an error occurs". |
|
69 |
|
70 * @return pointer to an instance of CAriH264decWrapper |
|
71 */ |
|
72 IMPORT_C static CAriH264decWrapper* NewL( |
|
73 TVideoDataUnitType &aInputFormat, |
|
74 TUncompressedVideoFormat &aOutputFormat, |
|
75 const TDesC8* aInpBuf, TInt aStreamType); |
|
76 |
|
77 /** |
|
78 * Destructor |
|
79 */ |
|
80 virtual ~CAriH264decWrapper(); |
|
81 |
|
82 |
|
83 public:// MBaseCodec functions |
|
84 |
|
85 /** |
|
86 Retrieves a custom interface to the specified hardware device |
|
87 |
|
88 @param "aInpBuf" "Coded input data passed by Engine". |
|
89 @param "aOutBuf" "Decoded output data". |
|
90 |
|
91 @leave "The method will leave if an error occurs". |
|
92 |
|
93 @return one of the TCodecState |
|
94 */ |
|
95 virtual TInt DoProcessL ( TAny *aInpBuf, TAny* aOutBuf = NULL ) = 0; |
|
96 |
|
97 /** |
|
98 Resets the Decoder |
|
99 @return None |
|
100 */ |
|
101 virtual void Reset () = 0; |
|
102 |
|
103 public: // New Functions |
|
104 virtual TInt SetParam (TInt aCommand, TAny* aCmdData) = 0; |
|
105 virtual TInt GetParam (TInt aCommand, TAny* aCmdData) = 0; |
|
106 |
|
107 /** |
|
108 Gets the header info |
|
109 @param "aDataUnit" "Input stream data". |
|
110 @param "aHeaderPtr" "Output header information returned". |
|
111 |
|
112 @leave "The method will leave if an error occurs |
|
113 KErrArgument - input data is null or zero length |
|
114 KErrCorrupt - input stream is corrupt |
|
115 KErrUnderflow - input stream is insufficient". |
|
116 */ |
|
117 IMPORT_C |
|
118 static void GetHeaderInfoL(TVideoInputBuffer& aDataUnit, |
|
119 TVideoPictureHeader& aHeaderPtr); |
|
120 }; |
|
121 |
|
122 #endif //ARIH264DECWRAPPER_H |