mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
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.
This commit is contained in:
parent
5bdb5c4de1
commit
7992233522
3 changed files with 9 additions and 4 deletions
|
@ -133,6 +133,9 @@ if test "x$HAVE_UNISTD_H" != "xyes"; then
|
|||
GST_PLUGINS_SELECTED=`echo $GST_PLUGINS_SELECTED | $SED -e s/festival//`
|
||||
fi
|
||||
|
||||
dnl used by camerabin
|
||||
AC_CHECK_HEADERS([sys/time.h])
|
||||
|
||||
dnl used by ext/dts
|
||||
AX_CREATE_STDINT_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>
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue