|
@@ -19,7 +19,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
-int videocap_get_device_count()
|
|
|
+int rvc_videocap_get_device_count()
|
|
|
{
|
|
|
int icount = 0;
|
|
|
int fd = -1;
|
|
@@ -79,7 +79,7 @@ int videocap_get_device_count()
|
|
|
}
|
|
|
|
|
|
|
|
|
-int videocap_get_device_name(int device_id, char* buf, int len)
|
|
|
+int rvc_videocap_get_device_name(int device_id, char* buf, int len)
|
|
|
{
|
|
|
int iret = -1;
|
|
|
|
|
@@ -133,13 +133,13 @@ int videocap_get_device_name(int device_id, char* buf, int len)
|
|
|
}
|
|
|
|
|
|
|
|
|
-int videocap_get_device_path(int device_id, char* buf, int len)
|
|
|
+int rvc_videocap_get_device_path(int device_id, char* buf, int len)
|
|
|
{
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
|
|
|
-int videocap_get_device_info(int device_id, char* namebuf, int namelen, char* pathbuf, int pathlen)
|
|
|
+int rvc_videocap_get_device_info(int device_id, char* namebuf, int namelen, char* pathbuf, int pathlen)
|
|
|
{
|
|
|
int iret = -1;
|
|
|
|
|
@@ -213,7 +213,7 @@ static int bin2str(unsigned char* x, int xlen, char* str, int str_size)
|
|
|
}
|
|
|
|
|
|
|
|
|
-int videocap_get_device_fullpathname(int device_id, char* fullnamebuf, int fulllen)
|
|
|
+int rvc_videocap_get_device_fullpathname(int device_id, char* fullnamebuf, int fulllen)
|
|
|
{
|
|
|
int iret = -1;
|
|
|
|
|
@@ -280,19 +280,20 @@ int videocap_get_device_fullpathname(int device_id, char* fullnamebuf, int fulll
|
|
|
return iret;
|
|
|
}
|
|
|
|
|
|
-int videocap_get_video_device_id(const char* dev_name)
|
|
|
+int rvc_videocap_get_video_device_id(const char* dev_name)
|
|
|
{
|
|
|
int iret = -1;
|
|
|
- if (NULL == dev_name)
|
|
|
- {
|
|
|
+ if (NULL == dev_name){
|
|
|
return iret;
|
|
|
}
|
|
|
|
|
|
- int n = videocap_get_device_count();
|
|
|
+ int n = rvc_videocap_get_device_count();
|
|
|
+ printf("device count is %d.\n", n);
|
|
|
for (int i = 0; i < 2*n; ++i) {
|
|
|
char strfullname[2*MAX_PATH] = { 0 };
|
|
|
- if (0 == videocap_get_device_fullpathname(i, strfullname, 2 * MAX_PATH))
|
|
|
- {
|
|
|
+ if (0 == rvc_videocap_get_device_fullpathname(i, strfullname, 2 * MAX_PATH)){
|
|
|
+ printf("camera name is: %s\n", strfullname);
|
|
|
+ printf(" dev name is: %s\n", dev_name);
|
|
|
if (0 == strcasecmp(strfullname, dev_name))
|
|
|
{
|
|
|
iret = i;
|