libs: encoder: delete properties_get_default for base class

This commit is contained in:
He Junyan 2019-08-29 15:59:43 +08:00
parent 258719e0ed
commit 69f7c95a29
2 changed files with 0 additions and 127 deletions

View file

@ -111,129 +111,6 @@ error_allocation_failed:
}
}
/* Generate the common set of encoder properties */
GPtrArray *
gst_vaapi_encoder_properties_get_default (const GstVaapiEncoderClassData *
cdata)
{
GPtrArray *props = NULL;
g_assert (cdata->rate_control_get_type != NULL);
/**
* GstVaapiEncoder:rate-control:
*
* The desired rate control mode, expressed as a #GstVaapiRateControl.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_ENCODER_PROP_RATECONTROL,
g_param_spec_enum ("rate-control",
"Rate Control", "Rate control mode",
cdata->rate_control_get_type (), cdata->default_rate_control,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiEncoder:bitrate:
*
* The desired bitrate, expressed in kbps.
* This is available when rate-control is CBR or VBR.
*
* CBR: This applies equally to minimum, maximum and target bitrate in the driver.
* VBR: This applies to maximum bitrate in the driver.
* Minimum bitrate will be calculated like the following in the driver.
* if (target percentage < 50) minimum bitrate = 0
* else minimum bitrate = maximum bitrate * (2 * target percentage -100) / 100
* Target bitrate will be calculated like the following in the driver.
* target bitrate = maximum bitrate * target percentage / 100
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_ENCODER_PROP_BITRATE,
g_param_spec_uint ("bitrate",
"Bitrate (kbps)",
"The desired bitrate expressed in kbps (0: auto-calculate)",
0, 2000 * 1024, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiEncoder:target-percentage:
*
* The desired target percentage of bitrate for variable rate controls.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_ENCODER_PROP_TARGET_PERCENTAGE,
g_param_spec_uint ("target-percentage",
"Target Percentage",
"The desired target percentage of bitrate for variable rate "
"controls.", 1, 100, 70, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiEncoder:keyframe-period:
*
* The maximal distance between two keyframes.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_ENCODER_PROP_KEYFRAME_PERIOD,
g_param_spec_uint ("keyframe-period",
"Keyframe Period",
"Maximal distance between two keyframes (0: auto-calculate)", 0,
G_MAXUINT32, 30, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiEncoder:tune:
*
* The desired encoder tuning option.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_ENCODER_PROP_TUNE,
g_param_spec_enum ("tune",
"Encoder Tuning",
"Encoder tuning option",
cdata->encoder_tune_get_type (), cdata->default_encoder_tune,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiEncoder:quality-level:
*
* The Encoding quality level.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_ENCODER_PROP_QUALITY_LEVEL,
g_param_spec_uint ("quality-level",
"Quality Level", "Encoding Quality Level "
"(lower value means higher-quality/slow-encode, "
" higher value means lower-quality/fast-encode)",
1, 7, 4, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVapiEncoder:roi-default-delta-qp
*
* Default delta-qp to apply to each Region of Interest
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_ENCODER_PROP_DEFAULT_ROI_VALUE,
g_param_spec_int ("default-roi-delta-qp", "Default ROI delta QP",
"The default delta-qp to apply to each Region of Interest"
"(lower value means higher-quality, "
"higher value means lower-quality)",
-10, 10, -10, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiEncoder: trellis:
*
* The trellis quantization method the encoder can use.
* Trellis is an improved quantization algorithm.
*
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_ENCODER_PROP_TRELLIS,
g_param_spec_boolean ("trellis",
"Trellis Quantization",
"The Trellis Quantization Method of Encoder",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
return props;
}
gboolean
gst_vaapi_encoder_ensure_param_quality_level (GstVaapiEncoder * encoder,
GstVaapiEncPicture * picture)

View file

@ -238,10 +238,6 @@ GPtrArray *
gst_vaapi_encoder_properties_append (GPtrArray * props, gint prop_id,
GParamSpec *pspec);
G_GNUC_INTERNAL
GPtrArray *
gst_vaapi_encoder_properties_get_default (const GstVaapiEncoderClassData *cdata);
struct _GstVaapiEncoder
{
/*< private >*/