camera/drv-v4l2.c
static int capture_query_norm(V4L2Capture *dev){
  struct v4l2_standard std;
	
  int i=0,n;
  int fd = dev->fd;
  int res;
	
  while (1){
    std.index = i;
    res = ioctl(fd,VIDIOC_ENUMSTD,&std);
    if (res)
      break;
    i++;
  }
	
  n = i;
		
  if (i){
    dev->norm_list = realloc(dev->norm_list,sizeof(char*) * (i+1));
    dev->std_list =  realloc(dev->std_list,sizeof(v4l2_std_id) * (i+1));
		
    for (i=0;i<n;i++){
      std.index = i;
      //	res = ioctl(fd,VIDIOC_ENUMINPUT,&argp);
			
      res = v4l_ioctl(dev,VIDIOC_ENUMSTD,&std);
		
      //capture_log(dev,"%s::norm[%s] id = %d\n",__func__,std.name,std.id);
					
      dev->norm_list[i] = strdup((char *)std.name);
      dev->std_list[i] = std.id;
					
    }
    dev->norm_list[i] = 0;
  }
	
  dev->nNorms = n;	
		
  return n;	
}
/**  Internal function. Should be involved by v4l2CaptureOpen only.
 * Return: no. of norm supported
 */
Internal function. Should be involved by v4l2CaptureOpen only.
Return: no. of norm supported
Internal function . Should be involved by v4l2CaptureOpen only . Return : no . of norm supported
static int capture_query_norm(V4L2Capture *dev){
  struct v4l2_standard std;
  int i=0,n;
  int fd = dev->fd;
  int res;
  while (1){
    std.index = i;
    res = ioctl(fd,VIDIOC_ENUMSTD,&std);
    if (res)
      break;
    i++;
  }
  n = i;
  if (i){
    dev->norm_list = realloc(dev->norm_list,sizeof(char*) * (i+1));
    dev->std_list =  realloc(dev->std_list,sizeof(v4l2_std_id) * (i+1));
    for (i=0;i<n;i++){
      std.index = i;
      res = v4l_ioctl(dev,VIDIOC_ENUMSTD,&std);
      dev->norm_list[i] = strdup((char *)std.name);
      dev->std_list[i] = std.id;
    }
    dev->norm_list[i] = 0;
  }
  dev->nNorms = n;	
  return n;	
}
static int capture_query_norm ( V4L2Capture * dev ) { struct v4l2_standard std ; int i = 0 , n ; int fd = dev -> fd ; int res ; while ( 1 ) { std . index = i ; res = ioctl ( fd , VIDIOC_ENUMSTD , & std ) ; if ( res ) break ; i ++ ; } n = i ; if ( i ) { dev -> norm_list = realloc ( dev -> norm_list , sizeof ( char * ) * ( i + 1 ) ) ; dev -> std_list = realloc ( dev -> std_list , sizeof ( v4l2_std_id ) * ( i + 1 ) ) ; for ( i = 0 ; i < n ; i ++ ) { std . index = i ; res = v4l_ioctl ( dev , VIDIOC_ENUMSTD , & std ) ; dev -> norm_list [ i ] = strdup ( ( char * ) std . name ) ; dev -> std_list [ i ] = std . id ; } dev -> norm_list [ i ] = 0 ; } dev -> nNorms = n ; return n ; }
Internal function.
Internal function .
//	res = ioctl(fd,VIDIOC_ENUMINPUT,&argp); //capture_log(dev,"%s::norm[%s] id = %d\n",__func__,std.name,std.id);