mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
wrappercamerabinsrc: remove unused code
The structure is created and never used anymore. Remove it.
This commit is contained in:
parent
5e0e02553d
commit
2690cd33ce
1 changed files with 1 additions and 23 deletions
|
@ -655,19 +655,6 @@ done:
|
||||||
return ret;
|
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:
|
* adapt_image_capture:
|
||||||
* @self: camerasrc object
|
* @self: camerasrc object
|
||||||
|
@ -681,7 +668,7 @@ copy_missing_fields (GQuark field_id, const GValue * value, gpointer user_data)
|
||||||
static void
|
static void
|
||||||
adapt_image_capture (GstWrapperCameraBinSrc * self, GstCaps * in_caps)
|
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;
|
gint in_width = 0, in_height = 0, req_width = 0, req_height = 0, crop = 0;
|
||||||
gdouble ratio_w, ratio_h;
|
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,
|
GST_INFO_OBJECT (self, "we requested %dx%d, and got %dx%d", req_width,
|
||||||
req_height, in_width, in_height);
|
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 */
|
/* Crop if requested aspect ratio differs from incoming frame aspect ratio */
|
||||||
if (self->src_crop) {
|
if (self->src_crop) {
|
||||||
gint base_crop_top = 0, base_crop_bottom = 0;
|
gint base_crop_top = 0, base_crop_bottom = 0;
|
||||||
|
|
Loading…
Reference in a new issue