mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-28 18:18:38 +00:00
va: baseenc: Fix gobject style for chained method.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3035>
This commit is contained in:
parent
a45273aaeb
commit
f4260ecdc5
3 changed files with 14 additions and 5 deletions
|
@ -59,7 +59,7 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstVaBaseEnc, gst_va_base_enc,
|
|||
/* *INDENT-ON* */
|
||||
|
||||
static void
|
||||
gst_va_base_enc_reset_state (GstVaBaseEnc * base)
|
||||
gst_va_base_enc_reset_state_default (GstVaBaseEnc * base)
|
||||
{
|
||||
GstVaBaseEncClass *klass = GST_VA_BASE_ENC_GET_CLASS (base);
|
||||
|
||||
|
@ -119,9 +119,8 @@ static gboolean
|
|||
gst_va_base_enc_start (GstVideoEncoder * venc)
|
||||
{
|
||||
GstVaBaseEnc *base = GST_VA_BASE_ENC (venc);
|
||||
GstVaBaseEncClass *klass = GST_VA_BASE_ENC_GET_CLASS (base);
|
||||
|
||||
klass->reset_state (base);
|
||||
gst_va_base_enc_reset_state (base);
|
||||
|
||||
base->input_frame_count = 0;
|
||||
base->output_frame_count = 0;
|
||||
|
@ -902,7 +901,7 @@ gst_va_base_enc_class_init (GstVaBaseEncClass * klass)
|
|||
encoder_class->finish = GST_DEBUG_FUNCPTR (gst_va_base_enc_finish);
|
||||
encoder_class->flush = GST_DEBUG_FUNCPTR (gst_va_base_enc_flush);
|
||||
|
||||
klass->reset_state = GST_DEBUG_FUNCPTR (gst_va_base_enc_reset_state);
|
||||
klass->reset_state = GST_DEBUG_FUNCPTR (gst_va_base_enc_reset_state_default);
|
||||
|
||||
properties[PROP_DEVICE_PATH] = g_param_spec_string ("device-path",
|
||||
"Device Path", "DRM device path", NULL,
|
||||
|
@ -1101,6 +1100,15 @@ gst_va_base_enc_add_codec_tag (GstVaBaseEnc * base, const gchar * codec_name)
|
|||
gst_tag_list_unref (tags);
|
||||
}
|
||||
|
||||
void
|
||||
gst_va_base_enc_reset_state (GstVaBaseEnc * base)
|
||||
{
|
||||
GstVaBaseEncClass *klass = GST_VA_BASE_ENC_GET_CLASS (base);
|
||||
|
||||
g_assert (klass->reset_state);
|
||||
klass->reset_state (base);
|
||||
}
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#define UPDATE_PROPERTY \
|
||||
GST_OBJECT_LOCK (base); \
|
||||
|
|
|
@ -128,6 +128,7 @@ gboolean gst_va_base_enc_add_trellis_parameter (GstVaBaseEnc * base
|
|||
gboolean use_trellis);
|
||||
void gst_va_base_enc_add_codec_tag (GstVaBaseEnc * base,
|
||||
const gchar * codec_name);
|
||||
void gst_va_base_enc_reset_state (GstVaBaseEnc * base);
|
||||
|
||||
void gst_va_base_enc_update_property_uint (GstVaBaseEnc * base,
|
||||
guint32 * old_val,
|
||||
|
|
|
@ -1517,7 +1517,7 @@ gst_va_h264_enc_reconfig (GstVaBaseEnc * base)
|
|||
guint max_ref_frames;
|
||||
GstVideoCodecState *output_state;
|
||||
|
||||
gst_va_h264_enc_reset_state (base);
|
||||
gst_va_base_enc_reset_state (base);
|
||||
|
||||
base->width = GST_VIDEO_INFO_WIDTH (&base->input_state->info);
|
||||
base->height = GST_VIDEO_INFO_HEIGHT (&base->input_state->info);
|
||||
|
|
Loading…
Reference in a new issue