1 /*
2  INTEL CONFIDENTIAL
3  Copyright 2009 Intel Corporation All Rights Reserved.
4  The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intel’s prior express written permission.
5 
6  No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing.
7  */
8 
9 #ifndef __MIX_VIDEOCONFIGPARAMSENC_H__
10 #define __MIX_VIDEOCONFIGPARAMSENC_H__
11 
12 #include <mixvideoconfigparams.h>
13 #include "mixvideodef.h"
14 
15 /**
16  * MIX_TYPE_VIDEOCONFIGPARAMSENC:
17  *
18  * Get type of class.
19  */
20 #define MIX_TYPE_VIDEOCONFIGPARAMSENC (mix_videoconfigparamsenc_get_type ())
21 
22 /**
23  * MIX_VIDEOCONFIGPARAMSENC:
24  * @obj: object to be type-casted.
25  */
26 #define MIX_VIDEOCONFIGPARAMSENC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIX_TYPE_VIDEOCONFIGPARAMSENC, MixVideoConfigParamsEnc))
27 
28 /**
29  * MIX_IS_VIDEOCONFIGPARAMSENC:
30  * @obj: an object.
31  *
32  * Checks if the given object is an instance of #MixParams
33  */
34 #define MIX_IS_VIDEOCONFIGPARAMSENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIX_TYPE_VIDEOCONFIGPARAMSENC))
35 
36 /**
37  * MIX_VIDEOCONFIGPARAMSENC_CLASS:
38  * @klass: class to be type-casted.
39  */
40 #define MIX_VIDEOCONFIGPARAMSENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIX_TYPE_VIDEOCONFIGPARAMSENC, MixVideoConfigParamsEncClass))
41 
42 /**
43  * MIX_IS_VIDEOCONFIGPARAMSENC_CLASS:
44  * @klass: a class.
45  *
46  * Checks if the given class is #MixParamsClass
47  */
48 #define MIX_IS_VIDEOCONFIGPARAMSENC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIX_TYPE_VIDEOCONFIGPARAMSENC))
49 
50 /**
51  * MIX_VIDEOCONFIGPARAMSENC_GET_CLASS:
52  * @obj: a #MixParams object.
53  *
54  * Get the class instance of the object.
55  */
56 #define MIX_VIDEOCONFIGPARAMSENC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIX_TYPE_VIDEOCONFIGPARAMSENC, MixVideoConfigParamsEncClass))
57 
58 typedef struct _MixVideoConfigParamsEnc MixVideoConfigParamsEnc;
59 typedef struct _MixVideoConfigParamsEncClass MixVideoConfigParamsEncClass;
60 
61 /**
62  * MixVideoConfigParamsEnc:
63  *
64  * MI-X VideoConfig Parameter object
65  */
66 struct _MixVideoConfigParamsEnc {
67 	/*< public > */
68 	MixVideoConfigParams parent;
69 
70 	/*< public > */
71 	//MixIOVec header;
72 
73 	/* the type of the following members will be changed after MIX API doc is ready */
74 
75        MixProfile profile;
76        MixRawTargetFormat raw_format;
77        MixRateControl rate_control;
78 
79 	guint bitrate;
80 	guint frame_rate_num;
81 	guint frame_rate_denom;
82 	guint initial_qp;
83 	guint min_qp;
84 	guint intra_period;
85 	guint16 picture_width;
86 	guint16 picture_height;
87 
88 	GString * mime_type;
89 	MixEncodeTargetFormat encode_format;
90 
91 	guint mixbuffer_pool_size;
92 
93 	gboolean share_buf_mode;
94 
95 	gulong *	ci_frame_id;
96 	guint	ci_frame_num;
97 
98 	gulong draw;
99 	gboolean need_display;
100 
101 	void *reserved1;
102 	void *reserved2;
103 	void *reserved3;
104 	void *reserved4;
105 };
106 
107 /**
108  * MixVideoConfigParamsEncClass:
109  *
110  * MI-X VideoConfig object class
111  */
112 struct _MixVideoConfigParamsEncClass {
113 	/*< public > */
114 	MixVideoConfigParamsClass parent_class;
115 
116 	/* class members */
117 };
118 
119 /**
120  * mix_videoconfigparamsenc_get_type:
121  * @returns: type
122  *
123  * Get the type of object.
124  */
125 GType mix_videoconfigparamsenc_get_type(void);
126 
127 /**
128  * mix_videoconfigparamsenc_new:
129  * @returns: A newly allocated instance of #MixVideoConfigParamsEnc
130  *
131  * Use this method to create new instance of #MixVideoConfigParamsEnc
132  */
133 MixVideoConfigParamsEnc *mix_videoconfigparamsenc_new(void);
134 /**
135  * mix_videoconfigparamsenc_ref:
136  * @mix: object to add reference
137  * @returns: the MixVideoConfigParamsEnc instance where reference count has been increased.
138  *
139  * Add reference count.
140  */
141 MixVideoConfigParamsEnc *mix_videoconfigparamsenc_ref(MixVideoConfigParamsEnc * mix);
142 
143 /**
144  * mix_videoconfigparamsenc_unref:
145  * @obj: object to unref.
146  *
147  * Decrement reference count of the object.
148  */
149 #define mix_videoconfigparamsenc_unref(obj) mix_params_unref(MIX_PARAMS(obj))
150 
151 /* Class Methods */
152 
153 
154 MIX_RESULT mix_videoconfigparamsenc_set_mime_type(MixVideoConfigParamsEnc * obj,
155 		const gchar * mime_type);
156 
157 MIX_RESULT mix_videoconfigparamsenc_get_mime_type(MixVideoConfigParamsEnc * obj,
158 		gchar ** mime_type);
159 
160 MIX_RESULT mix_videoconfigparamsenc_set_frame_rate(MixVideoConfigParamsEnc * obj,
161 		guint frame_rate_num, guint frame_rate_denom);
162 
163 MIX_RESULT mix_videoconfigparamsenc_get_frame_rate(MixVideoConfigParamsEnc * obj,
164 		guint * frame_rate_num, guint * frame_rate_denom);
165 
166 MIX_RESULT mix_videoconfigparamsenc_set_picture_res(MixVideoConfigParamsEnc * obj,
167 		guint picture_width, guint picture_height);
168 
169 MIX_RESULT mix_videoconfigparamsenc_get_picture_res(MixVideoConfigParamsEnc * obj,
170 		guint * picture_width, guint * picture_height);
171 
172 MIX_RESULT mix_videoconfigparamsenc_set_encode_format (MixVideoConfigParamsEnc * obj,
173 		MixEncodeTargetFormat encode_format);
174 
175 MIX_RESULT mix_videoconfigparamsenc_get_encode_format (MixVideoConfigParamsEnc * obj,
176 		MixEncodeTargetFormat * encode_format);
177 
178 MIX_RESULT mix_videoconfigparamsenc_set_bit_rate (MixVideoConfigParamsEnc * obj,
179         guint bps);
180 
181 MIX_RESULT mix_videoconfigparamsenc_get_bit_rate (MixVideoConfigParamsEnc * obj,
182         guint *bps);
183 
184 MIX_RESULT mix_videoconfigparamsenc_set_init_qp (MixVideoConfigParamsEnc * obj,
185         guint initial_qp);
186 
187 MIX_RESULT mix_videoconfigparamsenc_get_init_qp (MixVideoConfigParamsEnc * obj,
188         guint *initial_qp);
189 
190 MIX_RESULT mix_videoconfigparamsenc_set_min_qp (MixVideoConfigParamsEnc * obj,
191         guint min_qp);
192 
193 MIX_RESULT mix_videoconfigparamsenc_get_min_qp(MixVideoConfigParamsEnc * obj,
194         guint *min_qp);
195 
196 MIX_RESULT mix_videoconfigparamsenc_set_intra_period (MixVideoConfigParamsEnc * obj,
197         guint intra_period);
198 
199 MIX_RESULT mix_videoconfigparamsenc_get_intra_period (MixVideoConfigParamsEnc * obj,
200         guint *intra_period);
201 
202 MIX_RESULT mix_videoconfigparamsenc_set_buffer_pool_size(MixVideoConfigParamsEnc * obj,
203 		guint bufpoolsize);
204 
205 MIX_RESULT mix_videoconfigparamsenc_get_buffer_pool_size(MixVideoConfigParamsEnc * obj,
206 		guint *bufpoolsize);
207 
208 MIX_RESULT mix_videoconfigparamsenc_set_share_buf_mode (MixVideoConfigParamsEnc * obj,
209 		gboolean share_buf_mod);
210 
211 MIX_RESULT mix_videoconfigparamsenc_get_share_buf_mode(MixVideoConfigParamsEnc * obj,
212 		gboolean *share_buf_mod);
213 
214 MIX_RESULT mix_videoconfigparamsenc_set_ci_frame_info(MixVideoConfigParamsEnc * obj,
215 		gulong *	ci_frame_id, guint  ci_frame_num);
216 
217 MIX_RESULT mix_videoconfigparamsenc_get_ci_frame_info (MixVideoConfigParamsEnc * obj,
218 		gulong * *ci_frame_id, guint *ci_frame_num);
219 
220 MIX_RESULT mix_videoconfigparamsenc_set_drawable (MixVideoConfigParamsEnc * obj,
221 		gulong draw);
222 
223 MIX_RESULT mix_videoconfigparamsenc_get_drawable (MixVideoConfigParamsEnc * obj,
224         gulong *draw);
225 
226 MIX_RESULT mix_videoconfigparamsenc_set_need_display (
227         MixVideoConfigParamsEnc * obj, gboolean need_display);
228 
229 MIX_RESULT mix_videoconfigparamsenc_get_need_display(MixVideoConfigParamsEnc * obj,
230 		gboolean *need_display);
231 
232 
233 MIX_RESULT mix_videoconfigparamsenc_set_rate_control(MixVideoConfigParamsEnc * obj,
234 		MixRateControl rcmode);
235 
236 MIX_RESULT mix_videoconfigparamsenc_get_rate_control(MixVideoConfigParamsEnc * obj,
237 		MixRateControl * rcmode);
238 
239 MIX_RESULT mix_videoconfigparamsenc_set_raw_format (MixVideoConfigParamsEnc * obj,
240 		MixRawTargetFormat raw_format);
241 
242 MIX_RESULT mix_videoconfigparamsenc_get_raw_format (MixVideoConfigParamsEnc * obj,
243 		MixRawTargetFormat * raw_format);
244 
245 MIX_RESULT mix_videoconfigparamsenc_set_profile (MixVideoConfigParamsEnc * obj,
246 		MixProfile profile);
247 
248 MIX_RESULT mix_videoconfigparamsenc_get_profile (MixVideoConfigParamsEnc * obj,
249 		MixProfile * profile);
250 
251 /* TODO: Add getters and setters for other properties */
252 
253 #endif /* __MIX_VIDEOCONFIGPARAMSENC_H__ */
254 
255