Skip to content

Commit e6d9526

Browse files
committed
gst: remove dead code
1 parent 8d21716 commit e6d9526

2 files changed

Lines changed: 1 addition & 34 deletions

File tree

gst/gstaravis.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,9 @@ gst_aravis_set_caps (GstBaseSrc *src, GstCaps *caps)
215215
gint current_height, current_width;
216216
int depth = 0, bpp = 0;
217217
const GValue *frame_rate = NULL;
218-
const char *caps_string;
219218
const char *format_string;
220219
unsigned int i;
221220
ArvStream *orig_stream = NULL;
222-
GstCaps *orig_fixed_caps = NULL;
223221
gboolean result = FALSE;
224222
gboolean is_frame_rate_available;
225223
gboolean is_gain_available;
@@ -342,29 +340,6 @@ gst_aravis_set_caps (GstBaseSrc *src, GstCaps *caps)
342340
GST_DEBUG_OBJECT (gst_aravis, "Actual exposure = %g µs", arv_camera_get_exposure_time (gst_aravis->camera, NULL));
343341
}
344342

345-
orig_fixed_caps = g_steal_pointer (&gst_aravis->fixed_caps);
346-
347-
caps_string = arv_pixel_format_to_gst_caps_string (pixel_format);
348-
if (caps_string != NULL) {
349-
GstStructure *structure;
350-
GstCaps *caps;
351-
352-
caps = gst_caps_new_empty ();
353-
structure = gst_structure_from_string (caps_string, NULL);
354-
gst_structure_set (structure,
355-
"width", G_TYPE_INT, width,
356-
"height", G_TYPE_INT, height,
357-
NULL);
358-
359-
if (frame_rate != NULL)
360-
gst_structure_set_value (structure, "framerate", frame_rate);
361-
362-
gst_caps_append_structure (caps, structure);
363-
364-
gst_aravis->fixed_caps = caps;
365-
} else
366-
gst_aravis->fixed_caps = NULL;
367-
368343
if (!error) arv_device_set_features_from_string (arv_camera_get_device (gst_aravis->camera), gst_aravis->features, &error);
369344

370345
if (!error) gst_aravis->payload = arv_camera_get_payload (gst_aravis->camera, &error);
@@ -412,8 +387,6 @@ gst_aravis_set_caps (GstBaseSrc *src, GstCaps *caps)
412387
unref:
413388
if (orig_stream != NULL)
414389
g_object_unref (orig_stream);
415-
if (orig_fixed_caps != NULL)
416-
gst_caps_unref (orig_fixed_caps);
417390
return result;
418391
}
419392

@@ -682,7 +655,6 @@ gst_aravis_init (GstAravis *gst_aravis)
682655
gst_aravis->stream = NULL;
683656

684657
gst_aravis->all_caps = NULL;
685-
gst_aravis->fixed_caps = NULL;
686658
}
687659

688660
static void
@@ -692,13 +664,11 @@ gst_aravis_finalize (GObject * object)
692664
ArvCamera *camera;
693665
ArvStream *stream;
694666
GstCaps *all_caps;
695-
GstCaps *fixed_caps;
696667

697668
GST_OBJECT_LOCK (gst_aravis);
698669
camera = g_steal_pointer (&gst_aravis->camera);
699670
stream = g_steal_pointer (&gst_aravis->stream);
700671
all_caps = g_steal_pointer (&gst_aravis->all_caps);
701-
fixed_caps = g_steal_pointer (&gst_aravis->fixed_caps);
702672
g_clear_pointer (&gst_aravis->camera_name, g_free);
703673
g_clear_pointer (&gst_aravis->features, g_free);
704674
GST_OBJECT_UNLOCK (gst_aravis);
@@ -709,8 +679,6 @@ gst_aravis_finalize (GObject * object)
709679
g_object_unref (stream);
710680
if (all_caps != NULL)
711681
gst_caps_unref (all_caps);
712-
if (fixed_caps != NULL)
713-
gst_caps_unref (fixed_caps);
714682

715683
G_OBJECT_CLASS (gst_aravis_parent_class)->finalize (object);
716684
}

gst/gstaravis.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,12 @@ struct _GstAravis {
6868
gint payload;
6969

7070
guint64 buffer_timeout_us;
71-
gdouble frame_rate;
71+
gdouble frame_rate;
7272

7373
ArvCamera *camera;
7474
ArvStream *stream;
7575

7676
GstCaps *all_caps;
77-
GstCaps *fixed_caps;
7877

7978
guint64 timestamp_offset;
8079
guint64 last_timestamp;

0 commit comments

Comments
 (0)