summaryrefslogtreecommitdiffstats
path: root/gst
diff options
context:
space:
mode:
authorAndoni Morales <ylatuya@gmail.com>2009-02-22 18:41:08 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2009-02-22 18:41:08 +0100
commit7992233522f6fe60c54cbdaa7f7e8ea9ce9fb398 (patch)
tree6cc4bb40c0f99b6b0aa46433222054e0c5d2e4b2 /gst
parent5bdb5c4de142e2fe2ec920faea07a6f8d270a8bc (diff)
downloadgst-plugins-bad-7992233522f6fe60c54cbdaa7f7e8ea9ce9fb398.tar.gz
gst-plugins-bad-7992233522f6fe60c54cbdaa7f7e8ea9ce9fb398.tar.bz2
gst-plugins-bad-7992233522f6fe60c54cbdaa7f7e8ea9ce9fb398.zip
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.
Diffstat (limited to 'gst')
-rw-r--r--gst/camerabin/camerabingeneral.h2
-rw-r--r--gst/camerabin/gstcamerabin.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/gst/camerabin/camerabingeneral.h b/gst/camerabin/camerabingeneral.h
index e05bb1f2..a84ab64b 100644
--- a/gst/camerabin/camerabingeneral.h
+++ b/gst/camerabin/camerabingeneral.h
@@ -21,7 +21,9 @@
#ifndef __CAMERABIN_GENERAL_H_
#define __CAMERABIN_GENERAL_H_
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
#include <time.h>
#include <gst/gst.h>
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",