From 7992233522f6fe60c54cbdaa7f7e8ea9ce9fb398 Mon Sep 17 00:00:00 2001 From: Andoni Morales Date: Sun, 22 Feb 2009 18:41:08 +0100 Subject: camerabin: Fix compilation on Windows with Visual Studio Windows doesn't have strcasecmp so we should use g_ascii_strcasecmp here instead. Also Windows doesn't have sys/time.h so we first need to check if it actually exists and if not we should not include it. Fixes bug #572315. --- gst/camerabin/gstcamerabin.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gst/camerabin/gstcamerabin.c') diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 6a7bbb06..c54a909b 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -1165,7 +1165,7 @@ gst_camerabin_get_internal_tags (GstCameraBin * camera) mid_value = min_value + ((max_value - min_value) / 2); cur_value = gst_color_balance_get_value (balance, channel); - if (!strcasecmp (channel->label, "brightness")) { + if (!g_ascii_strcasecmp (channel->label, "brightness")) { /* The value of brightness. The unit is the APEX value (Additive System of Photographic Exposure). * Ordinarily it is given in the range of -99.99 to 99.99. Note that * if the numerator of the recorded value is 0xFFFFFFFF, Unknown shall be indicated. @@ -1178,20 +1178,20 @@ gst_camerabin_get_internal_tags (GstCameraBin * camera) */ gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, "capture-brightness", cur_value, 1, NULL); - } else if (!strcasecmp (channel->label, "contrast")) { + } else if (!g_ascii_strcasecmp (channel->label, "contrast")) { /* 0 = Normal, 1 = Soft, 2 = Hard */ gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, "capture-contrast", (cur_value == mid_value) ? 0 : ((cur_value < mid_value) ? 1 : 2), NULL); - } else if (!strcasecmp (channel->label, "gain")) { + } else if (!g_ascii_strcasecmp (channel->label, "gain")) { /* 0 = Normal, 1 = Low Up, 2 = High Up, 3 = Low Down, 4 = Hight Down */ gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, "capture-gain", (guint) (cur_value == mid_value) ? 0 : ((cur_value < mid_value) ? 1 : 3), NULL); - } else if (!strcasecmp (channel->label, "saturation")) { + } else if (!g_ascii_strcasecmp (channel->label, "saturation")) { /* 0 = Normal, 1 = Low, 2 = High */ gst_tag_list_add (list, GST_TAG_MERGE_REPLACE, "capture-saturation", -- cgit v1.2.1