theoraenc: Update for video encoder API changes and propose video-meta for allocation
This commit is contained in:
parent
76f47979c1
commit
261188ae68
@ -65,6 +65,7 @@
|
|||||||
|
|
||||||
#include <gst/tag/tag.h>
|
#include <gst/tag/tag.h>
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
#include <gst/video/gstvideometa.h>
|
||||||
|
|
||||||
#define GST_CAT_DEFAULT theoraenc_debug
|
#define GST_CAT_DEFAULT theoraenc_debug
|
||||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
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,
|
static GstFlowReturn theora_enc_pre_push (GstVideoEncoder * benc,
|
||||||
GstVideoCodecFrame * frame);
|
GstVideoCodecFrame * frame);
|
||||||
static GstFlowReturn theora_enc_finish (GstVideoEncoder * enc);
|
static GstFlowReturn theora_enc_finish (GstVideoEncoder * enc);
|
||||||
|
static gboolean theora_enc_propose_allocation (GstVideoEncoder * encoder,
|
||||||
|
GstQuery * query);
|
||||||
|
|
||||||
static GstCaps *theora_enc_getcaps (GstVideoEncoder * encoder,
|
static GstCaps *theora_enc_getcaps (GstVideoEncoder * encoder,
|
||||||
GstCaps * filter);
|
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->pre_push = GST_DEBUG_FUNCPTR (theora_enc_pre_push);
|
||||||
gstvideo_encoder_class->finish = GST_DEBUG_FUNCPTR (theora_enc_finish);
|
gstvideo_encoder_class->finish = GST_DEBUG_FUNCPTR (theora_enc_finish);
|
||||||
gstvideo_encoder_class->getcaps = GST_DEBUG_FUNCPTR (theora_enc_getcaps);
|
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 */
|
/* general encoding stream options */
|
||||||
g_object_class_install_property (gobject_class, PROP_BITRATE,
|
g_object_class_install_property (gobject_class, PROP_BITRATE,
|
||||||
@ -1038,6 +1043,15 @@ theora_enc_finish (GstVideoEncoder * benc)
|
|||||||
return TRUE;
|
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
|
static void
|
||||||
theora_enc_set_property (GObject * object, guint prop_id,
|
theora_enc_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user