Changeset 4676

Show
Ignore:
Timestamp:
03/06/10 09:07:35 (4 years ago)
Author:
douglask
Message:

Invoke restart command when a software radio button resize button is pressed.

Fix for non-CIF/QCIF "normal" and "small" captures

Location:
vic/branches/mpeg4
Files:
2 modified

Legend:

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

    r4674 r4676  
    203203 
    204204    if {$::tk_version > 8.4 && [windowingsystem] != "x11"} { 
    205         ttk::radiobutton $w.f.b0 -text "none" -command "grabber setSoftwareScale none" \ 
     205        ttk::radiobutton $w.f.b0 -text "none" -command "restart" \ 
    206206           -variable setSoftwareScale -value "none" 
    207         ttk::radiobutton $w.f.b1 -text "960p" -command "grabber setSoftwareScale 960p" \ 
     207        ttk::radiobutton $w.f.b1 -text "960p" -command "restart" \ 
    208208            -variable setSoftwareScale -value "960p" 
    209         ttk::radiobutton $w.f.b2 -text "720p" -command "grabber setSoftwareScale 720p" \ 
     209        ttk::radiobutton $w.f.b2 -text "720p" -command "restart" \ 
    210210            -variable setSoftwareScale -value "720p" 
    211         ttk::radiobutton $w.f.b3 -text "576p" -command "grabber setSoftwareScale 576p" \ 
     211        ttk::radiobutton $w.f.b3 -text "576p" -command "restart" \ 
    212212            -variable setSoftwareScale -value "576p" 
    213         ttk::radiobutton $w.f.b4 -text "480p" -command "grabber setSoftwareScale 480p" \ 
     213        ttk::radiobutton $w.f.b4 -text "480p" -command "restart" \ 
    214214            -variable setSoftwareScale -value "480p" 
    215215    } else { 
  • vic/branches/mpeg4/video/grabber-decklink.cpp

    r4673 r4676  
    602602 
    603603    if (argc == 3) { 
    604         if (strcmp(argv[1], "setSoftwareScale") == 0) { 
    605             if (running_) { 
    606                 stop(); start(); 
    607             } 
    608             return (TCL_OK); 
    609  
    610         } else if (strcmp(argv[1], "decimate") == 0) { 
     604        if (strcmp(argv[1], "decimate") == 0) { 
    611605            decimate_ = atoi(argv[2]); 
    612606 
     
    877871 
    878872    case 2: // CIF-size 
    879         if (cformat_ == CF_422) { 
    880             planarYUYV422_to_planarYUYV422((char *)frame_, CIF_WIDTH, CIF_HEIGHT, (char *)fr, width_, height_); 
    881         } else { 
    882             planarYUYV420_to_planarYUYV420((char *)frame_, CIF_WIDTH, CIF_HEIGHT, (char *)fr, width_, height_); 
    883         } 
    884         break; 
    885  
    886873    case 4: // QCIF-size 
    887874        if (cformat_ == CF_422) { 
    888             planarYUYV422_to_planarYUYV422((char *)frame_, QCIF_WIDTH, QCIF_HEIGHT, (char *)fr, width_, height_); 
     875            planarYUYV422_to_planarYUYV422((char *)frame_, outw_, outh_, (char *)fr, width_, height_); 
    889876        } else { 
    890             planarYUYV420_to_planarYUYV420((char *)frame_, QCIF_WIDTH, QCIF_HEIGHT, (char *)fr, width_, height_); 
     877            planarYUYV420_to_planarYUYV420((char *)frame_, outw_, outh_, (char *)fr, width_, height_); 
    891878        } 
    892879        break;