diff options
author | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-12-15 12:57:53 -0500 |
---|---|---|
committer | Nicolas Dufresne <nicolas.dufresne@collabora.com> | 2015-12-15 12:57:53 -0500 |
commit | 90dcc3921a62d766c7e3ddb0fe21884af6e73910 (patch) | |
tree | 45c746833c3c774dbfd15eb603d8fb5358c9446a /ext | |
parent | 75fb614c1e9dea78389533f3009b0259a2b9bf8e (diff) | |
download | gstreamer-plugins-good-90dcc3921a62d766c7e3ddb0fe21884af6e73910.tar.gz |
vpxdec: Remove unneeded add video_meta
This also remove copies for VP8, which was not correctly in place
in previous related patch.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/vpx/gstvp9dec.c | 9 | ||||
-rw-r--r-- | ext/vpx/gstvpxdec.c | 22 | ||||
-rw-r--r-- | ext/vpx/gstvpxdec.h | 2 |
3 files changed, 5 insertions, 28 deletions
diff --git a/ext/vpx/gstvp9dec.c b/ext/vpx/gstvp9dec.c index 5c9e727fc..d08a2f7e8 100644 --- a/ext/vpx/gstvp9dec.c +++ b/ext/vpx/gstvp9dec.c @@ -62,7 +62,6 @@ static gboolean gst_vp9_dec_get_valid_format (GstVPXDec * dec, vpx_image_t * img, GstVideoFormat * fmt); static void gst_vp9_dec_handle_resolution_change (GstVPXDec * dec, vpx_image_t * img, GstVideoFormat fmt); -static void gst_vp9_dec_add_video_meta (GstVPXDec * dec, GstBuffer * buffer); static GstStaticPadTemplate gst_vp9_dec_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", @@ -108,7 +107,6 @@ gst_vp9_dec_class_init (GstVP9DecClass * klass) GST_DEBUG_FUNCPTR (gst_vp9_dec_get_valid_format); vpx_class->handle_resolution_change = GST_DEBUG_FUNCPTR (gst_vp9_dec_handle_resolution_change); - vpx_class->add_video_meta = GST_DEBUG_FUNCPTR (gst_vp9_dec_add_video_meta); GST_DEBUG_CATEGORY_INIT (gst_vp9dec_debug, "vp9dec", 0, "VP9 Decoder"); } @@ -179,11 +177,4 @@ gst_vp9_dec_handle_resolution_change (GstVPXDec * dec, vpx_image_t * img, } } -static void -gst_vp9_dec_add_video_meta (GstVPXDec * dec, GstBuffer * buffer) -{ - gst_buffer_add_video_meta (buffer, GST_VIDEO_FRAME_FLAG_NONE, - GST_VIDEO_FORMAT_ENCODED, 0, 0); -} - #endif /* HAVE_VP9_DECODER */ diff --git a/ext/vpx/gstvpxdec.c b/ext/vpx/gstvpxdec.c index d48014a4f..fc75a7bd1 100644 --- a/ext/vpx/gstvpxdec.c +++ b/ext/vpx/gstvpxdec.c @@ -109,10 +109,6 @@ static gboolean gst_vpx_dec_default_frame_format (GstVPXDec * dec, vpx_image_t * img, GstVideoFormat * fmt); static void gst_vpx_dec_handle_resolution_change (GstVPXDec * dec, vpx_image_t * img, GstVideoFormat fmt); -#ifdef HAVE_VPX_1_4 -static void gst_vpx_dec_default_add_video_meta (GstVPXDec * dec, - GstBuffer * buffer); -#endif //HAVE_VPX_1_4 #define parent_class gst_vpx_dec_parent_class G_DEFINE_TYPE (GstVPXDec, gst_vpx_dec, GST_TYPE_VIDEO_DECODER); @@ -176,7 +172,6 @@ gst_vpx_dec_class_init (GstVPXDecClass * klass) klass->handle_resolution_change = NULL; klass->get_frame_format = GST_DEBUG_FUNCPTR (gst_vpx_dec_default_frame_format); - klass->add_video_meta = NULL; GST_DEBUG_CATEGORY_INIT (gst_vpxdec_debug, "vpxdec", 0, "VPX Decoder"); } @@ -460,7 +455,9 @@ gst_vpx_dec_get_buffer_cb (gpointer priv, gsize min_size, return -1; } - gst_vpx_dec_default_add_video_meta (dec, buffer); + /* Add it now, while the buffer is writable */ + gst_buffer_add_video_meta (buffer, GST_VIDEO_FRAME_FLAG_NONE, + GST_VIDEO_FORMAT_ENCODED, 0, 0); frame = g_new0 (struct Frame, 1); if (!gst_buffer_map (buffer, &frame->info, GST_MAP_READWRITE)) { @@ -727,10 +724,10 @@ gst_vpx_dec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame) return ret; } - static gboolean gst_vpx_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query) { + GstVPXDec *dec = GST_VPX_DEC (bdec); GstBufferPool *pool; GstStructure *config; @@ -745,6 +742,7 @@ gst_vpx_dec_decide_allocation (GstVideoDecoder * bdec, GstQuery * query) if (gst_query_find_allocation_meta (query, GST_VIDEO_META_API_TYPE, NULL)) { gst_buffer_pool_config_add_option (config, GST_BUFFER_POOL_OPTION_VIDEO_META); + dec->have_video_meta = TRUE; } gst_buffer_pool_set_config (pool, config); gst_object_unref (pool); @@ -795,14 +793,4 @@ gst_vpx_dec_handle_resolution_change (GstVPXDec * dec, vpx_image_t * img, } } -#ifdef HAVE_VPX_1_4 -static void -gst_vpx_dec_default_add_video_meta (GstVPXDec * dec, GstBuffer * buffer) -{ - GstVPXDecClass *vpxclass = GST_VPX_DEC_GET_CLASS (dec); - if (vpxclass->add_video_meta != NULL) { - vpxclass->add_video_meta (dec, buffer); - } -} -#endif //HAVE_VPX_1_4 #endif /* HAVE_VP8_DECODER || HAVE_VP9_DECODER */ diff --git a/ext/vpx/gstvpxdec.h b/ext/vpx/gstvpxdec.h index 825a3d36e..6852f860a 100644 --- a/ext/vpx/gstvpxdec.h +++ b/ext/vpx/gstvpxdec.h @@ -102,8 +102,6 @@ struct _GstVPXDecClass void (*handle_resolution_change) (GstVPXDec *dec, vpx_image_t *img, GstVideoFormat fmt); /*virtual function to check valid format*/ gboolean (*get_frame_format)(GstVPXDec *dec, vpx_image_t *img, GstVideoFormat* fmt); - /*virtual function to write video meta data to buffer*/ - void (*add_video_meta)(GstVPXDec *dec, GstBuffer* buffer); }; GType gst_vpx_dec_get_type (void); |