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_VIDEORENDERPARAMS_H__ 10 #define __MIX_VIDEORENDERPARAMS_H__ 11 12 #include <mixparams.h> 13 #include "mixvideodef.h" 14 #include "mixdisplay.h" 15 #include "mixvideoframe.h" 16 17 /** 18 * MIX_TYPE_VIDEORENDERPARAMS: 19 * 20 * Get type of class. 21 */ 22 #define MIX_TYPE_VIDEORENDERPARAMS (mix_videorenderparams_get_type ()) 23 24 /** 25 * MIX_VIDEORENDERPARAMS: 26 * @obj: object to be type-casted. 27 */ 28 #define MIX_VIDEORENDERPARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIX_TYPE_VIDEORENDERPARAMS, MixVideoRenderParams)) 29 30 /** 31 * MIX_IS_VIDEORENDERPARAMS: 32 * @obj: an object. 33 * 34 * Checks if the given object is an instance of #MixParams 35 */ 36 #define MIX_IS_VIDEORENDERPARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIX_TYPE_VIDEORENDERPARAMS)) 37 38 /** 39 * MIX_VIDEORENDERPARAMS_CLASS: 40 * @klass: class to be type-casted. 41 */ 42 #define MIX_VIDEORENDERPARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIX_TYPE_VIDEORENDERPARAMS, MixVideoRenderParamsClass)) 43 44 /** 45 * MIX_IS_VIDEORENDERPARAMS_CLASS: 46 * @klass: a class. 47 * 48 * Checks if the given class is #MixParamsClass 49 */ 50 #define MIX_IS_VIDEORENDERPARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIX_TYPE_VIDEORENDERPARAMS)) 51 52 /** 53 * MIX_VIDEORENDERPARAMS_GET_CLASS: 54 * @obj: a #MixParams object. 55 * 56 * Get the class instance of the object. 57 */ 58 #define MIX_VIDEORENDERPARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIX_TYPE_VIDEORENDERPARAMS, MixVideoRenderParamsClass)) 59 60 typedef struct _MixVideoRenderParams MixVideoRenderParams; 61 typedef struct _MixVideoRenderParamsClass MixVideoRenderParamsClass; 62 63 /** 64 * MixVideoRenderParams: 65 * 66 * MI-X VideoRender Parameter object 67 */ 68 struct _MixVideoRenderParams { 69 /*< public > */ 70 MixParams parent; 71 72 /*< public > */ 73 MixDisplay *display; 74 75 MixRect src_rect; 76 MixRect dst_rect; 77 78 MixRect *clipping_rects; 79 guint number_of_clipping_rects; 80 81 guint post_proc; 82 83 gpointer reserved; 84 gpointer reserved1; 85 gpointer reserved2; 86 gpointer reserved3; 87 gpointer reserved4; 88 }; 89 90 /** 91 * MixVideoRenderParamsClass: 92 * 93 * MI-X VideoRender object class 94 */ 95 struct _MixVideoRenderParamsClass { 96 /*< public > */ 97 MixParamsClass parent_class; 98 99 /* class members */ 100 }; 101 102 /** 103 * mix_videorenderparams_get_type: 104 * @returns: type 105 * 106 * Get the type of object. 107 */ 108 GType mix_videorenderparams_get_type(void); 109 110 /** 111 * mix_videorenderparams_new: 112 * @returns: A newly allocated instance of #MixVideoRenderParams 113 * 114 * Use this method to create new instance of #MixVideoRenderParams 115 */ 116 MixVideoRenderParams *mix_videorenderparams_new(void); 117 /** 118 * mix_videorenderparams_ref: 119 * @mix: object to add reference 120 * @returns: the MixVideoRenderParams instance where reference count has been increased. 121 * 122 * Add reference count. 123 */ 124 MixVideoRenderParams *mix_videorenderparams_ref(MixVideoRenderParams * mix); 125 126 /** 127 * mix_videorenderparams_unref: 128 * @obj: object to unref. 129 * 130 * Decrement reference count of the object. 131 */ 132 #define mix_videorenderparams_unref(obj) mix_params_unref(MIX_PARAMS(obj)) 133 134 /* Class Methods */ 135 136 MIX_RESULT mix_videorenderparams_set_display(MixVideoRenderParams * obj, 137 MixDisplay * display); 138 MIX_RESULT mix_videorenderparams_get_display(MixVideoRenderParams * obj, 139 MixDisplay ** display); 140 141 MIX_RESULT mix_videorenderparams_set_src_rect(MixVideoRenderParams * obj, 142 MixRect src_rect); 143 MIX_RESULT mix_videorenderparams_get_src_rect(MixVideoRenderParams * obj, 144 MixRect * src_rect); 145 146 MIX_RESULT mix_videorenderparams_set_dest_rect(MixVideoRenderParams * obj, 147 MixRect dst_rect); 148 MIX_RESULT mix_videorenderparams_get_dest_rect(MixVideoRenderParams * obj, 149 MixRect * dst_rect); 150 151 MIX_RESULT mix_videorenderparams_set_clipping_rects(MixVideoRenderParams * obj, 152 MixRect* clipping_rects, guint number_of_clipping_rects); 153 MIX_RESULT mix_videorenderparams_get_clipping_rects(MixVideoRenderParams * obj, 154 MixRect ** clipping_rects, guint* number_of_clipping_rects); 155 156 /* TODO: Add getters and setters for other properties */ 157 158 #endif /* __MIX_VIDEORENDERPARAMS_H__ */ 159