|
1 /* |
|
2 * Copyright (c) 2010 Ixonos Plc. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "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 * Ixonos Plc |
|
14 * |
|
15 * Description: |
|
16 * A header file for external usage of the services provided by |
|
17 * the Video Renderer engine. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef _RENAPI_H_ |
|
23 #define _RENAPI_H_ |
|
24 |
|
25 /* |
|
26 * Includes |
|
27 */ |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 /* |
|
33 * Defines |
|
34 */ |
|
35 |
|
36 /* Return values */ |
|
37 #define REN_ERROR_BAD_IMAGE_SIZE -4 |
|
38 #define REN_ERROR_BAD_FORMAT -3 |
|
39 #define REN_ERROR_HALTED -2 |
|
40 #define REN_ERROR -1 |
|
41 #define REN_OK 1 |
|
42 #define REN_OK_PLAYING_COMPLETE 2 |
|
43 #define REN_OK_RESOURCE_LEAK 3 |
|
44 |
|
45 /* Defines for the flags member of renExtDrawParam_t */ |
|
46 #define REN_EXTDRAW_NEW_SOURCE 1 |
|
47 #define REN_EXTDRAW_COPY_NOT_CODED 2 |
|
48 #define REN_EXTDRAW_NO_STATUS_CALLBACK 32 |
|
49 |
|
50 |
|
51 |
|
52 /* |
|
53 * Structs and typedefs |
|
54 */ |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 /* {{-output"renbmihi.txt" -ignore"*" -noCR}} |
|
60 renBitmapInfoHeader_t is used to store the header information of |
|
61 (device-independent) bitmaps such as individual video frames. |
|
62 {{-output"renbmihi.txt"}} */ |
|
63 |
|
64 /* {{-output"renbmiht.txt"}} */ |
|
65 |
|
66 typedef struct { |
|
67 u_int32 biSize; |
|
68 int32 biWidth; |
|
69 int32 biHeight; |
|
70 u_int32 biSizeImage; |
|
71 } renBitmapInfoHeader_t; |
|
72 /* {{-output"renbmiht.txt"}} */ |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 /* {{-output"renExtDrawParam_t_info.txt" -ignore"*" -noCR}} |
|
78 renExtDrawParam_t is used in a renDrawItem_t structure to provide |
|
79 additional information which cannot be included in a renDrawParam_t |
|
80 structure. |
|
81 {{-output"renExtDrawParam_t_info.txt"}} */ |
|
82 |
|
83 /* {{-output"renExtDrawParam_t.txt"}} */ |
|
84 typedef struct { |
|
85 u_int32 size; /* The size of this structure in bytes, |
|
86 if 0, no macroblock information is used |
|
87 and the whole frame is converted */ |
|
88 |
|
89 u_int32 flags; /* REN_EXTDRAW_NEW_SOURCE = use this frame as |
|
90 a new source for macroblock copying |
|
91 (for subsequent frames until a new source |
|
92 frame appears), |
|
93 REN_EXTDRAW_COPY_NOT_CODED = use copying of |
|
94 not coded macroblocks from the source frame, |
|
95 REN_EXTDRAW_SNAPSHOT = mark this frame as |
|
96 a snapshot |
|
97 REN_EXTDRAW_NO_STATUS_CALLBACK = no status callback |
|
98 function is called after this frame has been |
|
99 processed |
|
100 */ |
|
101 |
|
102 u_int32 rate; /* Frames / second = rate / scale, */ |
|
103 u_int32 scale; /* These values replace the current values and affect |
|
104 the subsequent frames. */ |
|
105 |
|
106 /* The values in this section are valid only if |
|
107 the REN_EXTDRAW_COPY_NOT_CODED flag is on. */ |
|
108 int numOfMBs; /* The number of macroblocks (16 x 16 blocks) in the |
|
109 frame. */ |
|
110 int numOfCodedMBs; /* The number of coded macroblocks in the frame |
|
111 (compared to the previous reference frame) */ |
|
112 u_char *fCodedMBs; /* one-dimensional array of u_char |
|
113 flags indicating if the corresponding macroblock |
|
114 in the normal scan-order is coded (1) or not (0) */ |
|
115 |
|
116 } renExtDrawParam_t; |
|
117 /* {{-output"renExtDrawParam_t.txt"}} */ |
|
118 |
|
119 |
|
120 #define RENDRAWPARAM_NOSTATUSCALLBACK 0x00000001L |
|
121 /* Do not call the status callback function after |
|
122 the processing of this frame */ |
|
123 |
|
124 /* {{-output"renDrawParam_t_info.txt" -ignore"*" -noCR}} |
|
125 renDrawParam_t contains parameters for drawing video data to the screen. |
|
126 This structure is used with the renDraw function. |
|
127 renDrawParam_t is compatible with the ICDRAW type introduced by |
|
128 the Win32 Video Compression Manager. The lpData member of renBasicDrawParam_t |
|
129 must point to an address where the upper-left corner pixel of the Y frame |
|
130 to be shown lies. The Y frame data must be in scanning order. The U frame |
|
131 data must follow the Y frame data in scanning order, and similarly |
|
132 the V frame data must follow the U frame data. |
|
133 {{-output"renDrawParam_t_info.txt"}} */ |
|
134 |
|
135 /* {{-output"renDrawParam_t.txt"}} */ |
|
136 typedef struct { |
|
137 u_int32 dwFlags; /* Flags */ |
|
138 void *lpFormat; /* Pointer to a renBitmapInfoHeader_t structure */ |
|
139 void *lpData; /* Address of the data to render */ |
|
140 u_int32 cbData; /* Ignored */ |
|
141 int32 lTime; /* The frame number telling the time when this frame |
|
142 should be drawn */ |
|
143 } renDrawParam_t; |
|
144 /* {{-output"renDrawParam_t.txt"}} */ |
|
145 |
|
146 |
|
147 |
|
148 /* {{-output"renDrawItem_t_info.txt" -ignore"*" -noCR}} |
|
149 renDrawItem_t contains parameters for drawing video image to the screen. |
|
150 In addition, it holds the returning information for the image. |
|
151 This structure is used with the renDraw function. |
|
152 {{-output"renDrawItem_t_info.txt"}} */ |
|
153 |
|
154 /* {{-output"renDrawItem_t.txt"}} */ |
|
155 typedef struct { |
|
156 renDrawParam_t param; |
|
157 /* Basic, ICDRAW compatible parameters */ |
|
158 |
|
159 renExtDrawParam_t extParam; |
|
160 /* Extended parameters */ |
|
161 |
|
162 } renDrawItem_t; |
|
163 /* {{-output"renDrawItem_t.txt"}} */ |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 #endif |
|
169 // End of File |