summaryrefslogtreecommitdiff
path: root/gst/deinterlace
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2016-01-26 11:34:40 +0100
committerSebastian Dröge <sebastian@centricular.com>2016-01-27 16:45:29 +0100
commit1053af6d0c450e8996a7dda56fb487ae2d861a28 (patch)
treec730b952e689888e22518126f27d89b9175bfa67 /gst/deinterlace
parente7460d9c0610eb4c233eb27c582d6a1d6ef78f32 (diff)
deinterlace: Remove unused, obsolete bufferalloc code
Diffstat (limited to 'gst/deinterlace')
-rw-r--r--gst/deinterlace/gstdeinterlace.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c
index fa0c5f4a0..36746c271 100644
--- a/gst/deinterlace/gstdeinterlace.c
+++ b/gst/deinterlace/gstdeinterlace.c
@@ -2854,77 +2854,6 @@ gst_deinterlace_src_query (GstPad * pad, GstObject * parent, GstQuery * query)
return res;
}
-/* FIXME: buffer alloc */
-#if 0
-static GstFlowReturn
-gst_deinterlace_alloc_buffer (GstPad * pad, guint64 offset, guint size,
- GstCaps * caps, GstBuffer ** buf)
-{
- GstDeinterlace *self = GST_DEINTERLACE (gst_pad_get_parent (pad));
- GstFlowReturn ret = GST_FLOW_OK;
-
- *buf = NULL;
-
- GST_DEBUG_OBJECT (pad, "alloc with caps %" GST_PTR_FORMAT ", size %u", caps,
- size);
-
- if (self->still_frame_mode || self->passthrough) {
- ret = gst_pad_alloc_buffer (self->srcpad, offset, size, caps, buf);
- } else if (G_LIKELY (!self->request_caps)) {
- *buf = gst_buffer_try_new_and_alloc (size);
- if (G_UNLIKELY (!*buf)) {
- ret = GST_FLOW_ERROR;
- } else {
- gst_buffer_set_caps (*buf, caps);
- GST_BUFFER_OFFSET (*buf) = offset;
- }
- } else {
- gint width, height;
- GstVideoFormat fmt;
- guint new_frame_size;
- GstCaps *new_caps = gst_caps_copy (self->request_caps);
-
- if (self->fields == GST_DEINTERLACE_ALL) {
- gint n, d;
- GstStructure *s = gst_caps_get_structure (new_caps, 0);
-
- gst_structure_get_fraction (s, "framerate", &n, &d);
-
- if (!gst_fraction_double (&n, &d, TRUE)) {
- gst_object_unref (self);
- gst_caps_unref (new_caps);
- return GST_FLOW_OK;
- }
-
- gst_structure_set (s, "framerate", GST_TYPE_FRACTION, n, d, NULL);
- }
-
- if (G_UNLIKELY (!gst_video_format_parse_caps (new_caps, &fmt, &width,
- &height))) {
- gst_object_unref (self);
- gst_caps_unref (new_caps);
- return GST_FLOW_OK;
- }
-
- new_frame_size = gst_video_format_get_size (fmt, width, height);
-
- *buf = gst_buffer_try_new_and_alloc (new_frame_size);
- if (G_UNLIKELY (!*buf)) {
- ret = GST_FLOW_ERROR;
- } else {
- gst_buffer_set_caps (*buf, new_caps);
- gst_caps_unref (self->request_caps);
- self->request_caps = NULL;
- gst_caps_unref (new_caps);
- }
- }
-
- gst_object_unref (self);
-
- return ret;
-}
-#endif
-
static gboolean
plugin_init (GstPlugin * plugin)
{