32 const char *valueAsString =
"";
33 if (json_object_get_type(js) == json_type_string)
34 valueAsString = json_object_get_string(js);
38 if (!strcmp(valueAsString,
"rec709"))
39 value = VuoThresholdType_Rec709;
40 else if (!strcmp(valueAsString,
"desaturate"))
41 value = VuoThresholdType_Desaturate;
42 else if (!strcmp(valueAsString,
"rgb"))
43 value = VuoThresholdType_RGB;
44 else if (!strcmp(valueAsString,
"rgb-average"))
45 value = VuoThresholdType_RGBAverage;
46 else if (!strcmp(valueAsString,
"rgb-maximum"))
47 value = VuoThresholdType_RGBMaximum;
48 else if (!strcmp(valueAsString,
"rgb-minimum"))
49 value = VuoThresholdType_RGBMinimum;
50 else if( !strcmp(valueAsString,
"red"))
51 value = VuoThresholdType_Red;
52 else if( !strcmp(valueAsString,
"green"))
53 value = VuoThresholdType_Green;
54 else if (!strcmp(valueAsString,
"blue"))
55 value = VuoThresholdType_Blue;
56 else if(!strcmp(valueAsString,
"alpha"))
57 value = VuoThresholdType_Alpha;
72 case VuoThresholdType_Rec709:
73 valueAsString =
"rec709";
76 case VuoThresholdType_Desaturate:
77 valueAsString =
"desaturate";
80 case VuoThresholdType_RGB:
81 valueAsString =
"rgb";
84 case VuoThresholdType_RGBAverage:
85 valueAsString =
"rgb-average";
88 case VuoThresholdType_RGBMaximum:
89 valueAsString =
"rgb-maximum";
92 case VuoThresholdType_RGBMinimum:
93 valueAsString =
"rgb-minimum";
96 case VuoThresholdType_Red:
97 valueAsString =
"red";
100 case VuoThresholdType_Green:
101 valueAsString =
"green";
104 case VuoThresholdType_Blue:
105 valueAsString =
"blue";
108 case VuoThresholdType_Alpha:
109 valueAsString =
"alpha";
113 valueAsString =
"rec601";
115 return json_object_new_string(valueAsString);