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_VIDEOCONFIGPARAMSDEC_H__
10 #define __MIX_VIDEOCONFIGPARAMSDEC_H__
11 
12 #include <mixvideoconfigparams.h>
13 #include "mixvideodef.h"
14 
15 /**
16  * MIX_TYPE_VIDEOCONFIGPARAMSDEC:
17  *
18  * Get type of class.
19  */
20 #define MIX_TYPE_VIDEOCONFIGPARAMSDEC (mix_videoconfigparamsdec_get_type ())
21 
22 /**
23  * MIX_VIDEOCONFIGPARAMSDEC:
24  * @obj: object to be type-casted.
25  */
26 #define MIX_VIDEOCONFIGPARAMSDEC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIX_TYPE_VIDEOCONFIGPARAMSDEC, MixVideoConfigParamsDec))
27 
28 /**
29  * MIX_IS_VIDEOCONFIGPARAMSDEC:
30  * @obj: an object.
31  *
32  * Checks if the given object is an instance of #MixParams
33  */
34 #define MIX_IS_VIDEOCONFIGPARAMSDEC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIX_TYPE_VIDEOCONFIGPARAMSDEC))
35 
36 /**
37  * MIX_VIDEOCONFIGPARAMSDEC_CLASS:
38  * @klass: class to be type-casted.
39  */
40 #define MIX_VIDEOCONFIGPARAMSDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIX_TYPE_VIDEOCONFIGPARAMSDEC, MixVideoConfigParamsDecClass))
41 
42 /**
43  * MIX_IS_VIDEOCONFIGPARAMSDEC_CLASS:
44  * @klass: a class.
45  *
46  * Checks if the given class is #MixParamsClass
47  */
48 #define MIX_IS_VIDEOCONFIGPARAMSDEC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIX_TYPE_VIDEOCONFIGPARAMSDEC))
49 
50 /**
51  * MIX_VIDEOCONFIGPARAMSDEC_GET_CLASS:
52  * @obj: a #MixParams object.
53  *
54  * Get the class instance of the object.
55  */
56 #define MIX_VIDEOCONFIGPARAMSDEC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIX_TYPE_VIDEOCONFIGPARAMSDEC, MixVideoConfigParamsDecClass))
57 
58 typedef struct _MixVideoConfigParamsDec MixVideoConfigParamsDec;
59 typedef struct _MixVideoConfigParamsDecClass MixVideoConfigParamsDecClass;
60 
61 /**
62  * MixVideoConfigParamsDec:
63  *
64  * MI-X VideoConfig Parameter object
65  */
66 struct _MixVideoConfigParamsDec {
67 	/*< public > */
68 	MixVideoConfigParams parent;
69 
70 	/*< public > */
71 	MixFrameOrderMode frame_order_mode;
72 	MixIOVec header;
73 
74 	/* the type of the following members will be changed after MIX API doc is ready */
75 	GString * mime_type;
76 	guint frame_rate_num;
77 	guint frame_rate_denom;
78 	gulong picture_width;
79 	gulong picture_height;
80 	guint raw_format;
81 	guint rate_control;
82 
83 	guint mixbuffer_pool_size;
84 	guint extra_surface_allocation;
85 
86 	void *reserved1;
87 	void *reserved2;
88 	void *reserved3;
89 	void *reserved4;
90 };
91 
92 /**
93  * MixVideoConfigParamsDecClass:
94  *
95  * MI-X VideoConfig object class
96  */
97 struct _MixVideoConfigParamsDecClass {
98 	/*< public > */
99 	MixVideoConfigParamsClass parent_class;
100 
101 	/* class members */
102 };
103 
104 /**
105  * mix_videoconfigparamsdec_get_type:
106  * @returns: type
107  *
108  * Get the type of object.
109  */
110 GType mix_videoconfigparamsdec_get_type(void);
111 
112 /**
113  * mix_videoconfigparamsdec_new:
114  * @returns: A newly allocated instance of #MixVideoConfigParamsDec
115  *
116  * Use this method to create new instance of #MixVideoConfigParamsDec
117  */
118 MixVideoConfigParamsDec *mix_videoconfigparamsdec_new(void);
119 /**
120  * mix_videoconfigparamsdec_ref:
121  * @mix: object to add reference
122  * @returns: the MixVideoConfigParamsDec instance where reference count has been increased.
123  *
124  * Add reference count.
125  */
126 MixVideoConfigParamsDec *mix_videoconfigparamsdec_ref(MixVideoConfigParamsDec * mix);
127 
128 /**
129  * mix_videoconfigparamsdec_unref:
130  * @obj: object to unref.
131  *
132  * Decrement reference count of the object.
133  */
134 #define mix_videoconfigparamsdec_unref(obj) mix_params_unref(MIX_PARAMS(obj))
135 
136 /* Class Methods */
137 
138 MIX_RESULT mix_videoconfigparamsdec_set_frame_order_mode(
139 		MixVideoConfigParamsDec * obj, MixFrameOrderMode frame_order_mode);
140 
141 MIX_RESULT mix_videoconfigparamsdec_get_frame_order_mode(
142 		MixVideoConfigParamsDec * obj, MixFrameOrderMode * frame_order_mode);
143 
144 MIX_RESULT mix_videoconfigparamsdec_set_header(MixVideoConfigParamsDec * obj,
145 		MixIOVec *header);
146 
147 /* caller is responsible to g_free MixIOVec::data field */
148 MIX_RESULT mix_videoconfigparamsdec_get_header(MixVideoConfigParamsDec * obj,
149 		MixIOVec ** header);
150 
151 MIX_RESULT mix_videoconfigparamsdec_set_mime_type(MixVideoConfigParamsDec * obj,
152 		const gchar * mime_type);
153 
154 MIX_RESULT mix_videoconfigparamsdec_get_mime_type(MixVideoConfigParamsDec * obj,
155 		gchar ** mime_type);
156 
157 MIX_RESULT mix_videoconfigparamsdec_set_frame_rate(MixVideoConfigParamsDec * obj,
158 		guint frame_rate_num, guint frame_rate_denom);
159 
160 MIX_RESULT mix_videoconfigparamsdec_get_frame_rate(MixVideoConfigParamsDec * obj,
161 		guint * frame_rate_num, guint * frame_rate_denom);
162 
163 MIX_RESULT mix_videoconfigparamsdec_set_picture_res(MixVideoConfigParamsDec * obj,
164 		guint picture_width, guint picture_height);
165 
166 MIX_RESULT mix_videoconfigparamsdec_get_picture_res(MixVideoConfigParamsDec * obj,
167 		guint * picture_width, guint * picture_height);
168 
169 MIX_RESULT mix_videoconfigparamsdec_set_raw_format(MixVideoConfigParamsDec * obj,
170 		guint raw_format);
171 
172 MIX_RESULT mix_videoconfigparamsdec_get_raw_format(MixVideoConfigParamsDec * obj,
173 		guint *raw_format);
174 
175 MIX_RESULT mix_videoconfigparamsdec_set_rate_control(MixVideoConfigParamsDec * obj,
176 		guint rate_control);
177 
178 MIX_RESULT mix_videoconfigparamsdec_get_rate_control(MixVideoConfigParamsDec * obj,
179 		guint *rate_control);
180 
181 MIX_RESULT mix_videoconfigparamsdec_set_buffer_pool_size(MixVideoConfigParamsDec * obj,
182 		guint bufpoolsize);
183 
184 MIX_RESULT mix_videoconfigparamsdec_get_buffer_pool_size(MixVideoConfigParamsDec * obj,
185 		guint *bufpoolsize);
186 
187 MIX_RESULT mix_videoconfigparamsdec_set_extra_surface_allocation(MixVideoConfigParamsDec * obj,
188 		guint extra_surface_allocation);
189 
190 MIX_RESULT mix_videoconfigparamsdec_get_extra_surface_allocation(MixVideoConfigParamsDec * obj,
191 		guint *extra_surface_allocation);
192 
193 /* TODO: Add getters and setters for other properties */
194 
195 #endif /* __MIX_VIDEOCONFIGPARAMSDEC_H__ */
196