g_slice_free (GstVaEncodePicture, pic);
}
+
+/**
+ * GstVaEncoderRateControl:
+ *
+ * Since: 1.22
+ */
+GType
+gst_va_encoder_rate_control_get_type (void)
+{
+ static gsize type = 0;
+ static const GEnumValue values[] = {
+ {VA_RC_CBR, "Constant Bitrate", "cbr"},
+ {VA_RC_VBR, "Variable Bitrate", "vbr"},
+ {VA_RC_VCM, "Video Conferencing Mode (Non HRD compliant)", "vcm"},
+ {VA_RC_CQP, "Constant Quantizer", "cqp"},
+ /* {VA_RC_VBR_CONSTRAINED, "VBR with peak rate higher than average bitrate", */
+ /* "vbr-constrained"}, */
+ /* {VA_RC_ICQ, "Intelligent Constant Quality", "icq"}, */
+ /* {VA_RC_MB, "Macroblock based rate control", "mb"}, */
+ /* {VA_RC_CFS, "Constant Frame Size", "cfs"}, */
+ /* {VA_RC_PARALLEL, "Parallel BRC", "parallel"}, */
+ /* {VA_RC_QVBR, "Quality defined VBR", "qvbr"}, */
+ /* {VA_RC_AVBR, "Average VBR", "avbr"}, */
+ {0, NULL, NULL}
+ };
+
+ if (g_once_init_enter (&type)) {
+ GType _type = g_enum_register_static ("GstVaEncoderRateControl", values);
+ g_once_init_leave (&type, _type);
+ }
+
+ return type;
+}
VABufferID coded_buffer;
};
+#define GST_TYPE_VA_ENCODER_RATE_CONTROL (gst_va_encoder_rate_control_get_type())
+GType gst_va_encoder_rate_control_get_type (void);
+
gboolean gst_va_encoder_is_open (GstVaEncoder * self);
gboolean gst_va_encoder_open (GstVaEncoder * self,
VAProfile profile,
}
/**
- * GstVaH264EncRateControl:
- *
- * Since: 1.22
- */
-static GType
-gst_va_h264_enc_rate_control_get_type (void)
-{
- static gsize type = 0;
-
- static const GEnumValue values[] = {
- {VA_RC_CBR, "Constant Bitrate", "cbr"},
- {VA_RC_VBR, "Variable Bitrate", "vbr"},
- {VA_RC_VCM, "Video Conferencing Mode (Non HRD compliant)", "vcm"},
- {VA_RC_CQP, "Constant Quantizer", "cqp"},
- {0, NULL, NULL}
- };
-
- if (g_once_init_enter (&type)) {
- GType _type;
-
- _type = g_enum_register_static ("GstVaH264EncRateControl", values);
- g_once_init_leave (&type, _type);
- }
-
- return type;
-}
-
-/**
* GstVaH264Mbbrc:
*
* Since: 1.22
*/
properties[PROP_RATE_CONTROL] = g_param_spec_enum ("rate-control",
"rate control mode", "The desired rate control mode for the encoder",
- gst_va_h264_enc_rate_control_get_type (), VA_RC_CBR,
+ GST_TYPE_VA_ENCODER_RATE_CONTROL, VA_RC_CBR,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT);
properties[PROP_DEVICE_PATH] = g_param_spec_string ("device-path",
g_object_class_install_properties (object_class, N_PROPERTIES, properties);
- gst_type_mark_as_plugin_api (gst_va_h264_enc_rate_control_get_type (), 0);
+ gst_type_mark_as_plugin_api (gst_va_encoder_rate_control_get_type (), 0);
gst_type_mark_as_plugin_api (gst_va_h264_enc_mbbrc_get_type (), 0);
}