Show
Ignore:
Timestamp:
06/07/07 10:34:12 (7 years ago)
Author:
piers
Message:

Patches for tcl/tk-80 compatibility
- One bug report/patch from Christoph Willing <willing@…> but I modified it to use a catch statement as it's nice to have the zero padding for video windows. It seems that there's xero padding on tcl/tck-80 anyway.
- Patch from Doug Kosovic (6june07) for his updates to V4L controls

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vic/branches/mpeg4/tcl/ui-ctrlmenu.tcl

    r4043 r4060  
    177177                } 
    178178        } 
    179         if { [string equal -nocase -length 5 $d "V4L2:"] } { 
     179        if { [string toupper [string range $d 0 4]] == "V4L2:" } { 
    180180                set d [string range $d 5 end] 
    181                 set k [string length $d] 
    182                 incr k -1 
    183181                foreach v $inputDeviceList { 
    184                         if { [string equal -length 5 [$v nickname] "V4L2-"] && \ 
    185                                 [string range [$v nickname] end-$k end] == "$d" && \ 
     182                        set k [expr [string length [$v nickname]] - [string length $d]] 
     183                        if { [string range [$v nickname] 0 4] == "V4L2-" && \ 
     184                                [string range [$v nickname] $k end] == "$d" && \ 
    186185                                [$v attributes] != "disabled" } { 
    187186                                set videoDevice $v 
     
    191190                } 
    192191        } 
    193         if { [string equal -nocase -length 4 $d "V4L:"] } { 
     192        if { [string toupper [string range $d 0 3]] == "V4L:" } { 
    194193                set d [string range $d 4 end] 
    195                 set k [string length $d] 
    196                 incr k -1 
    197194                foreach v $inputDeviceList { 
    198                         if { [string equal -length 4 [$v nickname] "V4L-"] && \ 
    199                                 [string range [$v nickname] end-$k end] == "$d" && \ 
     195                        set k [expr [string length [$v nickname]] - [string length $d]] 
     196                        if { [string range [$v nickname] 0 3] == "V4L-" && \ 
     197                                [string range [$v nickname] $k end] == "$d" && \ 
    200198                                [$v attributes] != "disabled" } { 
    201199                                set videoDevice $v