@@ -84,35 +84,17 @@ static int get_device_model()
8484 }
8585 }
8686
87+ if (device_model > 0 )
88+ {
89+ fprintf (stderr, " opencv-mobile MIPI CSI camera with cvi\n " );
90+ }
91+
8792 return device_model;
8893}
8994
9095static bool is_device_whitelisted ()
9196{
92- const int device_model = get_device_model ();
93-
94- if (device_model == 1 )
95- {
96- // milkv duo
97- return true ;
98- }
99- if (device_model == 2 )
100- {
101- // milkv duo 256
102- return true ;
103- }
104- if (device_model == 3 )
105- {
106- // licheerv nano
107- return true ;
108- }
109- if (device_model == 4 )
110- {
111- // milkv duo s
112- return true ;
113- }
114-
115- return false ;
97+ return get_device_model () > 0 ;
11698}
11799
118100extern " C"
@@ -258,7 +240,6 @@ static int load_sys_library()
258240 bool whitelisted = is_device_whitelisted ();
259241 if (!whitelisted)
260242 {
261- fprintf (stderr, " this device is not whitelisted for capture cvi\n " );
262243 return -1 ;
263244 }
264245
@@ -975,7 +956,6 @@ static int load_vpu_library()
975956 bool whitelisted = is_device_whitelisted ();
976957 if (!whitelisted)
977958 {
978- fprintf (stderr, " this device is not whitelisted for capture cvi\n " );
979959 return -1 ;
980960 }
981961
@@ -1827,7 +1807,6 @@ static int load_sns_obj_library()
18271807 bool whitelisted = is_device_whitelisted ();
18281808 if (!whitelisted)
18291809 {
1830- fprintf (stderr, " this device is not whitelisted for capture cvi\n " );
18311810 return -1 ;
18321811 }
18331812
@@ -2199,7 +2178,6 @@ static int load_ae_library()
21992178 bool whitelisted = is_device_whitelisted ();
22002179 if (!whitelisted)
22012180 {
2202- fprintf (stderr, " this device is not whitelisted for capture cvi\n " );
22032181 return -1 ;
22042182 }
22052183
@@ -2266,7 +2244,6 @@ static int load_awb_library()
22662244 bool whitelisted = is_device_whitelisted ();
22672245 if (!whitelisted)
22682246 {
2269- fprintf (stderr, " this device is not whitelisted for capture cvi\n " );
22702247 return -1 ;
22712248 }
22722249
@@ -2346,7 +2323,6 @@ static int load_isp_library()
23462323 bool whitelisted = is_device_whitelisted ();
23472324 if (!whitelisted)
23482325 {
2349- fprintf (stderr, " this device is not whitelisted for capture cvi\n " );
23502326 return -1 ;
23512327 }
23522328
@@ -2454,7 +2430,6 @@ static int load_cvi_bin_library()
24542430 bool whitelisted = is_device_whitelisted ();
24552431 if (!whitelisted)
24562432 {
2457- fprintf (stderr, " this device is not whitelisted for capture cvi\n " );
24582433 return -1 ;
24592434 }
24602435
0 commit comments