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_VIDEOFRAME_H__ 10 #define __MIX_VIDEOFRAME_H__ 11 12 #include <mixparams.h> 13 #include "mixvideodef.h" 14 15 /** 16 * MIX_TYPE_VIDEOFRAME: 17 * 18 * Get type of class. 19 */ 20 #define MIX_TYPE_VIDEOFRAME (mix_videoframe_get_type ()) 21 22 /** 23 * MIX_VIDEOFRAME: 24 * @obj: object to be type-casted. 25 */ 26 #define MIX_VIDEOFRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MIX_TYPE_VIDEOFRAME, MixVideoFrame)) 27 28 /** 29 * MIX_IS_VIDEOFRAME: 30 * @obj: an object. 31 * 32 * Checks if the given object is an instance of #MixVideoFrame 33 */ 34 #define MIX_IS_VIDEOFRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MIX_TYPE_VIDEOFRAME)) 35 36 /** 37 * MIX_VIDEOFRAME_CLASS: 38 * @klass: class to be type-casted. 39 */ 40 #define MIX_VIDEOFRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MIX_TYPE_VIDEOFRAME, MixVideoFrameClass)) 41 42 /** 43 * MIX_IS_VIDEOFRAME_CLASS: 44 * @klass: a class. 45 * 46 * Checks if the given class is #MixVideoFrameClass 47 */ 48 #define MIX_IS_VIDEOFRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MIX_TYPE_VIDEOFRAME)) 49 50 /** 51 * MIX_VIDEOFRAME_GET_CLASS: 52 * @obj: a #MixVideoFrame object. 53 * 54 * Get the class instance of the object. 55 */ 56 #define MIX_VIDEOFRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MIX_TYPE_VIDEOFRAME, MixVideoFrameClass)) 57 58 typedef struct _MixVideoFrame MixVideoFrame; 59 typedef struct _MixVideoFrameClass MixVideoFrameClass; 60 61 /** 62 * MixVideoFrame: 63 * 64 * MI-X VideoConfig Parameter object 65 */ 66 struct _MixVideoFrame { 67 /*< public > */ 68 MixParams parent; 69 70 /*< public > */ 71 gulong frame_id; 72 guint ci_frame_idx; 73 guint64 timestamp; 74 gboolean discontinuity; 75 guint32 frame_structure; // 0: frame, 1: top field, 2: bottom field 76 77 void *reserved1; 78 void *reserved2; 79 void *reserved3; 80 void *reserved4; 81 }; 82 83 /** 84 * MixVideoFrameClass: 85 * 86 * MI-X VideoConfig object class 87 */ 88 struct _MixVideoFrameClass { 89 /*< public > */ 90 MixParamsClass parent_class; 91 92 /* class members */ 93 }; 94 95 /** 96 * mix_videoframe_get_type: 97 * @returns: type 98 * 99 * Get the type of object. 100 */ 101 GType mix_videoframe_get_type(void); 102 103 /** 104 * mix_videoframe_new: 105 * @returns: A newly allocated instance of #MixVideoFrame 106 * 107 * Use this method to create new instance of #MixVideoFrame 108 */ 109 MixVideoFrame *mix_videoframe_new(void); 110 /** 111 * mix_videoframe_ref: 112 * @mix: object to add reference 113 * @returns: the MixVideoFrame instance where reference count has been increased. 114 * 115 * Add reference count. 116 */ 117 MixVideoFrame *mix_videoframe_ref(MixVideoFrame * obj); 118 119 /** 120 * mix_videoframe_unref: 121 * @obj: object to unref. 122 * 123 * Decrement reference count of the object. 124 */ 125 void mix_videoframe_unref(MixVideoFrame * obj); 126 127 /* Class Methods */ 128 129 MIX_RESULT mix_videoframe_set_frame_id(MixVideoFrame * obj, gulong frame_id); 130 MIX_RESULT mix_videoframe_get_frame_id(MixVideoFrame * obj, gulong * frame_id); 131 132 MIX_RESULT mix_videoframe_set_ci_frame_idx(MixVideoFrame * obj, guint ci_frame_idx); 133 MIX_RESULT mix_videoframe_get_ci_frame_idx(MixVideoFrame * obj, guint * ci_frame_idx); 134 135 MIX_RESULT mix_videoframe_set_timestamp(MixVideoFrame * obj, guint64 timestamp); 136 MIX_RESULT mix_videoframe_get_timestamp(MixVideoFrame * obj, guint64 * timestamp); 137 138 MIX_RESULT mix_videoframe_set_discontinuity(MixVideoFrame * obj, gboolean discontinuity); 139 MIX_RESULT mix_videoframe_get_discontinuity(MixVideoFrame * obj, gboolean * discontinuity); 140 141 MIX_RESULT mix_videoframe_set_frame_structure(MixVideoFrame * obj, guint32 frame_structure); 142 MIX_RESULT mix_videoframe_get_frame_structure(MixVideoFrame * obj, guint32* frame_structure); 143 144 #endif /* __MIX_VIDEOFRAME_H__ */ 145