Changeset 6d96102abf3f7ee6b569ea339017fc279dd107c0

Show
Ignore:
Timestamp:
02/12/07 00:41:40 (1 year ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1196552500 +0000
git-parent:

[599cf09858843cd2cd97a022b942205c14184f0d]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1196552500 +0000
Message:

Don't fail launching the video device if a video control failed. Update the hue/saturation/brightness/contrast values in the callback before issue the video control. (I haven't been able to test yet due to lack of hardware)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/v4l2.c

    r599cf09 r6d96102  
    15301530    VideoControlList( p_demux, i_fd ); 
    15311531 
    1532     if( VideoControl( p_demux, i_fd, 
    1533                       "brightness", V4L2_CID_BRIGHTNESS, p_sys->i_brightness ) 
    1534      || VideoControl( p_demux, i_fd, 
    1535                       "contrast", V4L2_CID_CONTRAST, p_sys->i_contrast ) 
    1536      || VideoControl( p_demux, i_fd, 
    1537                       "saturation", V4L2_CID_SATURATION, p_sys->i_saturation ) 
    1538      || VideoControl( p_demux, i_fd, "hue", V4L2_CID_HUE, p_sys->i_hue ) ) 
    1539         goto open_failed; 
     1532    VideoControl( p_demux, i_fd, 
     1533                  "brightness", V4L2_CID_BRIGHTNESS, p_sys->i_brightness ); 
     1534    VideoControl( p_demux, i_fd, 
     1535                  "contrast", V4L2_CID_CONTRAST, p_sys->i_contrast ); 
     1536    VideoControl( p_demux, i_fd, 
     1537                  "saturation", V4L2_CID_SATURATION, p_sys->i_saturation ); 
     1538    VideoControl( p_demux, i_fd, "hue", V4L2_CID_HUE, p_sys->i_hue ); 
    15401539 
    15411540    /* Init vout Picture */ 
     
    24232422 
    24242423    if( !strcmp( psz_var, "brightness" ) ) 
     2424    { 
     2425        p_sys->i_brightness = newval.i_int; 
    24252426        return VideoControl( p_demux, i_fd, 
    24262427                    "brightness", V4L2_CID_BRIGHTNESS, p_sys->i_brightness ); 
     2428    } 
    24272429    else if( !strcmp( psz_var, "contrast" ) ) 
     2430    { 
     2431        p_sys->i_contrast = newval.i_int; 
    24282432        return VideoControl( p_demux, i_fd, 
    24292433                    "contrast", V4L2_CID_CONTRAST, p_sys->i_contrast ); 
     2434    } 
    24302435    else if( !strcmp( psz_var, "saturation" ) ) 
     2436    { 
     2437        p_sys->i_saturation = newval.i_int; 
    24312438        return VideoControl( p_demux, i_fd, 
    24322439                    "saturation", V4L2_CID_SATURATION, p_sys->i_saturation ); 
     2440    } 
    24332441    else if( !strcmp( psz_var, "hue" ) ) 
     2442    { 
     2443        p_sys->i_hue = newval.i_int; 
    24342444        return VideoControl( p_demux, i_fd, 
    24352445                    "hue", V4L2_CID_HUE, p_sys->i_hue ); 
     2446    } 
    24362447    else 
    24372448        return VLC_EGENERIC;