00001
00020 #ifndef GSTSHVIDEOENC_H
00021 #define GSTSHVIDEOENC_H
00022
00023 #include <gst/gst.h>
00024 #include <uiomux/uiomux.h>
00025 #include <shcodecs/shcodecs_encoder.h>
00026
00027 #include "ControlFileUtil.h"
00028
00029 G_BEGIN_DECLS
00030 #define GST_TYPE_SH_VIDEO_ENC \
00031 (gst_sh_video_enc_get_type())
00032 #define GST_SH_VIDEO_ENC(obj) \
00033 (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_SH_VIDEO_ENC,GstSHVideoEnc))
00034 #define GST_SH_VIDEO_ENC_CLASS(klass) \
00035 (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_SH_VIDEO_ENC,GstSHVideoEnc))
00036 #define GST_IS_SH_VIDEO_ENC(obj) \
00037 (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_SH_VIDEO_ENC))
00038 #define GST_IS_SH_VIDEO_ENC_CLASS(obj) \
00039 (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_SH_VIDEO_ENC))
00040 typedef struct _GstSHVideoEnc GstSHVideoEnc;
00041 typedef struct _GstSHVideoEncClass GstSHVideoEncClass;
00042
00046 struct _GstSHVideoEnc
00047 {
00048 GstElement element;
00049 GstPad *sinkpad, *srcpad;
00050
00051 UIOMux *uiomux;
00052 gint offset;
00053 SHCodecs_Format format;
00054 SHCodecs_Encoder *encoder;
00055 gint width;
00056 gint height;
00057 gint fps_numerator;
00058 gint fps_denominator;
00059
00060 APPLI_INFO ainfo;
00061
00062 GstCaps *out_caps;
00063 gboolean caps_set;
00064 glong frame_number;
00065 GstClockTime timestamp_offset;
00066
00067 gboolean stream_stopped;
00068 gboolean eos;
00069
00070 GstBuffer *buffered_output;
00071
00072
00073
00074 glong bitrate;
00075 glong i_vop_interval;
00076 glong mv_mode;
00077 glong fcode_forward;
00078 glong search_mode;
00079 glong search_time_fixed;
00080 glong ratecontrol_skip_enable;
00081 glong ratecontrol_use_prevquant;
00082 glong ratecontrol_respect_type;
00083 glong ratecontrol_intra_thr_changeable;
00084 glong control_bitrate_length;
00085 glong intra_macroblock_refresh_cycle;
00086 glong video_format;
00087 glong frame_num_resolution;
00088 glong noise_reduction;
00089 glong reaction_param_coeff;
00090 glong weighted_q_mode;
00091 gulong i_vop_quant_initial_value;
00092 gulong p_vop_quant_initial_value;
00093 gulong use_d_quant;
00094 gulong clip_d_quant_frame;
00095 gulong quant_min;
00096 gulong quant_min_i_vop_under_range;
00097 gulong quant_max;
00098 gulong param_changeable;
00099 gulong changeable_max_bitrate;
00100
00101 gulong out_vos;
00102 gulong out_gov;
00103 gulong aspect_ratio_info_type;
00104 gulong aspect_ratio_info_value;
00105 gulong vos_profile_level_type;
00106 gulong vos_profile_level_value;
00107 gulong out_visual_object_identifier;
00108 gulong visual_object_verid;
00109 gulong visual_object_priority;
00110 gulong video_object_type_indication;
00111 gulong out_object_layer_identifier;
00112 gulong video_object_layer_verid;
00113 gulong video_object_layer_priority;
00114 gulong error_resilience_mode;
00115 gulong video_packet_size_mb;
00116 gulong video_packet_size_bit;
00117 gulong video_packet_header_extention;
00118 gulong data_partitioned;
00119 gulong reversible_vlc;
00120 gulong high_quality;
00121 gulong ratecontrol_vbv_skipcheck_enable;
00122 gulong ratecontrol_vbv_i_vop_noskip;
00123 gulong ratecontrol_vbv_remain_zero_skip_enable;
00124 gulong ratecontrol_vbv_buffer_unit_size;
00125 gulong ratecontrol_vbv_buffer_mode;
00126 gulong ratecontrol_vbv_max_size;
00127 gulong ratecontrol_vbv_offset;
00128 gulong ratecontrol_vbv_offset_rate;
00129 gulong quant_type;
00130 gulong use_ac_prediction;
00131 gulong vop_min_mode;
00132 gulong vop_min_size;
00133 gulong intra_thr;
00134 gulong b_vop_num;
00135
00136 gint ref_frame_num;
00137 gint output_filler_enable;
00138 gulong clip_d_quant_next_mb;
00139 gulong ratecontrol_cpb_skipcheck_enable;
00140 gulong ratecontrol_cpb_i_vop_noskip;
00141 gulong ratecontrol_cpb_remain_zero_skip_enable;
00142 gulong ratecontrol_cpb_buffer_unit_size;
00143 gulong ratecontrol_cpb_buffer_mode;
00144 gulong ratecontrol_cpb_max_size;
00145 gulong ratecontrol_cpb_offset;
00146 gulong ratecontrol_cpb_offset_rate;
00147 gulong intra_thr_1;
00148 gulong intra_thr_2;
00149 gulong sad_intra_bias;
00150 gulong regularly_inserted_i_type;
00151 gulong call_unit;
00152 gulong use_slice;
00153 gulong slice_size_mb;
00154 gulong slice_size_bit;
00155 gulong slice_type_value_pattern;
00156 gulong use_mb_partition;
00157 gulong mb_partition_vector_thr;
00158 gulong deblocking_mode;
00159 gulong use_deblocking_filter_control;
00160 glong deblocking_alpha_offset;
00161 glong deblocking_beta_offset;
00162 gulong me_skip_mode;
00163 gulong put_start_code;
00164 gulong seq_param_set_id;
00165 gulong profile;
00166 gulong constraint_set_flag;
00167 gulong level_type;
00168 gulong level_value;
00169 gulong out_vui_parameters;
00170 gulong chroma_qp_index_offset;
00171 gulong constrained_intra_pred;
00172
00173 };
00174
00178 struct _GstSHVideoEncClass
00179 {
00180 GstElementClass parent;
00181 };
00182
00187 GType gst_sh_video_enc_get_type (void);
00188
00193 void gst_sh_video_enc_init_encoder(GstSHVideoEnc * enc);
00194
00199 void gst_sh_video_enc_read_sink_caps(GstSHVideoEnc * enc);
00200
00205 void gst_sh_video_enc_read_src_caps(GstSHVideoEnc * enc);
00206
00212 gboolean gst_sh_video_enc_set_src_caps(GstSHVideoEnc * enc);
00213
00218 gboolean gst_sh_video_enc_set_encoding_properties(GstSHVideoEnc *enc);
00219
00220 G_END_DECLS
00221 #endif