From 261188ae68e8eb4e37a7fb68712582fff45f90af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 25 Apr 2012 12:43:28 +0200 Subject: [PATCH] theoraenc: Update for video encoder API changes and propose video-meta for allocation --- ext/theora/gsttheoraenc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ext/theora/gsttheoraenc.c b/ext/theora/gsttheoraenc.c index 0f70ee6..92965dd 100644 --- a/ext/theora/gsttheoraenc.c +++ b/ext/theora/gsttheoraenc.c @@ -65,6 +65,7 @@ #include #include +#include #define GST_CAT_DEFAULT theoraenc_debug GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); @@ -183,6 +184,8 @@ static GstFlowReturn theora_enc_handle_frame (GstVideoEncoder * enc, static GstFlowReturn theora_enc_pre_push (GstVideoEncoder * benc, GstVideoCodecFrame * frame); static GstFlowReturn theora_enc_finish (GstVideoEncoder * enc); +static gboolean theora_enc_propose_allocation (GstVideoEncoder * encoder, + GstQuery * query); static GstCaps *theora_enc_getcaps (GstVideoEncoder * encoder, GstCaps * filter); @@ -225,6 +228,8 @@ gst_theora_enc_class_init (GstTheoraEncClass * klass) gstvideo_encoder_class->pre_push = GST_DEBUG_FUNCPTR (theora_enc_pre_push); gstvideo_encoder_class->finish = GST_DEBUG_FUNCPTR (theora_enc_finish); gstvideo_encoder_class->getcaps = GST_DEBUG_FUNCPTR (theora_enc_getcaps); + gstvideo_encoder_class->propose_allocation = + GST_DEBUG_FUNCPTR (theora_enc_propose_allocation); /* general encoding stream options */ g_object_class_install_property (gobject_class, PROP_BITRATE, @@ -1038,6 +1043,15 @@ theora_enc_finish (GstVideoEncoder * benc) return TRUE; } +static gboolean +theora_enc_propose_allocation (GstVideoEncoder * encoder, GstQuery * query) +{ + gst_query_add_allocation_meta (query, GST_VIDEO_META_API_TYPE); + + return GST_VIDEO_ENCODER_CLASS (parent_class)->propose_allocation (encoder, + query); +} + static void theora_enc_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) -- 2.7.4