From c028d7a4139d8dcc16a3834092c4e541a7241580 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Thu, 29 Aug 2019 18:30:07 +0800 Subject: [PATCH] libs: encoder: delete old set_property and property enum in h264 --- gst-libs/gst/vaapi/gstvaapiencoder_h264.c | 72 ----------------------- gst-libs/gst/vaapi/gstvaapiencoder_h264.h | 49 --------------- 2 files changed, 121 deletions(-) diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c index 294892694f..13295a2fd4 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ -3587,77 +3587,6 @@ enum static GParamSpec *properties[ENCODER_H264_N_PROPERTIES]; -static GstVaapiEncoderStatus -_gst_vaapi_encoder_h264_set_property (GstVaapiEncoder * base_encoder, - gint prop_id, const GValue * value) -{ - GstVaapiEncoderH264 *const encoder = GST_VAAPI_ENCODER_H264 (base_encoder); - - switch (prop_id) { - case GST_VAAPI_ENCODER_H264_PROP_MAX_BFRAMES: - encoder->num_bframes = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_INIT_QP: - encoder->init_qp = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_MIN_QP: - encoder->min_qp = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_QP_IP: - encoder->qp_ip = g_value_get_int (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_QP_IB: - encoder->qp_ib = g_value_get_int (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_NUM_SLICES: - encoder->num_slices = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_CABAC: - encoder->use_cabac = g_value_get_boolean (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_DCT8X8: - encoder->use_dct8x8 = g_value_get_boolean (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_CPB_LENGTH: - encoder->cpb_length = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_NUM_VIEWS: - encoder->num_views = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_VIEW_IDS: - set_view_ids (encoder, value); - break; - case GST_VAAPI_ENCODER_H264_PROP_AUD: - encoder->use_aud = g_value_get_boolean (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_COMPLIANCE_MODE: - encoder->compliance_mode = g_value_get_enum (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_NUM_REF_FRAMES: - encoder->num_ref_frames = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_MBBRC: - encoder->mbbrc = g_value_get_enum (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_TEMPORAL_LEVELS: - encoder->temporal_levels = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_PREDICTION_TYPE: - encoder->prediction_type = g_value_get_enum (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_MAX_QP: - encoder->max_qp = g_value_get_uint (value); - break; - case GST_VAAPI_ENCODER_H264_PROP_QUALITY_FACTOR: - encoder->quality_factor = g_value_get_uint (value); - break; - - default: - return GST_VAAPI_ENCODER_STATUS_ERROR_INVALID_PARAMETER; - } - return GST_VAAPI_ENCODER_STATUS_SUCCESS; -} - static void gst_vaapi_encoder_h264_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) @@ -3830,7 +3759,6 @@ gst_vaapi_encoder_h264_class_init (GstVaapiEncoderH264Class * klass) encoder_class->reordering = gst_vaapi_encoder_h264_reordering; encoder_class->encode = gst_vaapi_encoder_h264_encode; encoder_class->flush = gst_vaapi_encoder_h264_flush; - encoder_class->set_property = _gst_vaapi_encoder_h264_set_property; encoder_class->get_codec_data = gst_vaapi_encoder_h264_get_codec_data; encoder_class->get_pending_reordered = gst_vaapi_encoder_h264_get_pending_reordered; diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.h b/gst-libs/gst/vaapi/gstvaapiencoder_h264.h index 93d874b937..31a6f7aeee 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.h +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.h @@ -39,55 +39,6 @@ G_BEGIN_DECLS typedef struct _GstVaapiEncoderH264 GstVaapiEncoderH264; typedef struct _GstVaapiEncoderH264Class GstVaapiEncoderH264Class; -/** - * GstVaapiEncoderH264Prop: - * @GST_VAAPI_ENCODER_H264_PROP_MAX_BFRAMES: Number of B-frames between I - * and P (uint). - * @GST_VAAPI_ENCODER_H264_PROP_INIT_QP: Initial quantizer value (uint). - * @GST_VAAPI_ENCODER_H264_PROP_MIN_QP: Minimal quantizer value (uint). - * @GST_VAAPI_ENCODER_H264_PROP_NUM_SLICES: Number of slices per frame (uint). - * @GST_VAAPI_ENCODER_H264_PROP_CABAC: Enable CABAC entropy coding mode (bool). - * @GST_VAAPI_ENCODER_H264_PROP_DCT8X8: Enable adaptive use of 8x8 - * transforms in I-frames (bool). - * @GST_VAAPI_ENCODER_H264_PROP_CPB_LENGTH: Length of the CPB buffer - * in milliseconds (uint). - * @GST_VAAPI_ENCODER_H264_PROP_NUM_VIEWS: Number of views per frame. - * @GST_VAAPI_ENCODER_H264_PROP_VIEW_IDS: View IDs - * @GST_VAAPI_ENCODER_H264_PROP_AUD: Insert AUD as first NAL per frame. - * @GST_VAAPI_ENCODER_H264_PROP_COMPLIANCE_MODE: Relax Compliance restrictions - * @GST_VAAPI_ENCODER_H264_PROP_NUM_REF_FRAMES: Maximum number of reference frames. - * @GST_VAAPI_ENCODER_H264_PROP_MBBRC: Macroblock level Bitrate Control. - * @GST_VAAPI_ENCODER_H264_PROP_QP_IP: Difference of QP between I and P frame. - * @GST_VAAPI_ENCODER_H264_PROP_QP_IB: Difference of QP between I and B frame. - * @GST_VAAPI_ENCODER_H264_PROP_TEMPORAL_LEVELS: Number of temporal levels - * @GST_VAAPI_ENCODER_H264_PROP_PREDICTION_TYPE: Reference picture selection modes - * @GST_VAAPI_ENCODER_H264_PROP_MAX_QP: Maximal quantizer value (uint). - * @GST_VAAPI_ENCODER_H264_PROP_QUALITY_FACTOR: Factor for ICQ/QVBR bitrate control mode. - * - * The set of H.264 encoder specific configurable properties. - */ -typedef enum { - GST_VAAPI_ENCODER_H264_PROP_MAX_BFRAMES = -1, - GST_VAAPI_ENCODER_H264_PROP_INIT_QP = -2, - GST_VAAPI_ENCODER_H264_PROP_MIN_QP = -3, - GST_VAAPI_ENCODER_H264_PROP_NUM_SLICES = -4, - GST_VAAPI_ENCODER_H264_PROP_CABAC = -5, - GST_VAAPI_ENCODER_H264_PROP_DCT8X8 = -6, - GST_VAAPI_ENCODER_H264_PROP_CPB_LENGTH = -7, - GST_VAAPI_ENCODER_H264_PROP_NUM_VIEWS = -8, - GST_VAAPI_ENCODER_H264_PROP_VIEW_IDS = -9, - GST_VAAPI_ENCODER_H264_PROP_AUD = -10, - GST_VAAPI_ENCODER_H264_PROP_COMPLIANCE_MODE = -11, - GST_VAAPI_ENCODER_H264_PROP_NUM_REF_FRAMES = -12, - GST_VAAPI_ENCODER_H264_PROP_MBBRC = -13, - GST_VAAPI_ENCODER_H264_PROP_QP_IP = -14, - GST_VAAPI_ENCODER_H264_PROP_QP_IB = -15, - GST_VAAPI_ENCODER_H264_PROP_TEMPORAL_LEVELS = -16, - GST_VAAPI_ENCODER_H264_PROP_PREDICTION_TYPE = -17, - GST_VAAPI_ENCODER_H264_PROP_MAX_QP = -18, - GST_VAAPI_ENCODER_H264_PROP_QUALITY_FACTOR = -19, -} GstVaapiEncoderH264Prop; - GType gst_vaapi_encoder_h264_get_type (void) G_GNUC_CONST;