summaryrefslogtreecommitdiff
path: root/gst/camerabin2
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-04-27 13:41:44 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2015-04-27 21:14:09 -0300
commit2690cd33ce463029c74eaee1fcc43d6b0158eaaf (patch)
tree801f2f4493a596ff9332553b13c4e7e9dd731f23 /gst/camerabin2
parent5e0e02553d467922d88e1fd72cac166156d69a74 (diff)
wrappercamerabinsrc: remove unused code
The structure is created and never used anymore. Remove it.
Diffstat (limited to 'gst/camerabin2')
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index ee08f82992..8e661b83ff 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -655,19 +655,6 @@ done:
return ret;
}
-static gboolean
-copy_missing_fields (GQuark field_id, const GValue * value, gpointer user_data)
-{
- GstStructure *st = (GstStructure *) user_data;
- const GValue *val = gst_structure_id_get_value (st, field_id);
-
- if (G_UNLIKELY (val == NULL)) {
- gst_structure_id_set_value (st, field_id, value);
- }
-
- return TRUE;
-}
-
/**
* adapt_image_capture:
* @self: camerasrc object
@@ -681,7 +668,7 @@ copy_missing_fields (GQuark field_id, const GValue * value, gpointer user_data)
static void
adapt_image_capture (GstWrapperCameraBinSrc * self, GstCaps * in_caps)
{
- GstStructure *in_st, *new_st, *req_st;
+ GstStructure *in_st, *req_st;
gint in_width = 0, in_height = 0, req_width = 0, req_height = 0, crop = 0;
gdouble ratio_w, ratio_h;
@@ -700,15 +687,6 @@ adapt_image_capture (GstWrapperCameraBinSrc * self, GstCaps * in_caps)
GST_INFO_OBJECT (self, "we requested %dx%d, and got %dx%d", req_width,
req_height, in_width, in_height);
- new_st = gst_structure_copy (req_st);
- /* If new fields have been added, we need to copy them */
- gst_structure_foreach (in_st, copy_missing_fields, new_st);
-
- gst_structure_set (new_st, "width", G_TYPE_INT, in_width, "height",
- G_TYPE_INT, in_height, NULL);
-
- GST_LOG_OBJECT (self, "new image capture caps: %" GST_PTR_FORMAT, new_st);
-
/* Crop if requested aspect ratio differs from incoming frame aspect ratio */
if (self->src_crop) {
gint base_crop_top = 0, base_crop_bottom = 0;