Changeset 1979 for trunk/examples/video


Ignore:
Timestamp:
Dec 8, 2010, 12:39:39 AM (14 years ago)
Author:
dkearney
Message:

video widget updates

RpVideo?.c - adding support for seeking backwards one frame.
previously, seeking backwards left us at the closest previous
key frame. we now seek forward again to get to the frame we
really wanted.

switch.tcl - added -showtext and -showimage flags so we can
use this widget as a checkbox. used in video drawing tool's
popup menus.

Location:
trunk/examples/video
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/video/dial/dialdemo.tcl

    r1928 r1979  
    3535    -min $min\
    3636    -max $max \
     37    -minortick 1 \
     38    -majortick 5 \
    3739    -knobimage "" \
    3840    -knobposition ne@bottom
     
    4345after 200 {
    4446    update idletasks
    45 #    .f.d3 mark start 5
    46 #    .f.d3 mark end 10
    47 #    .f.d3 mark particle0 17
    48 #    .f.d3 mark particle1 10
    49 #    .f.d3 mark particle2 4
    50 #    .f.d3 mark particle3 54
    51 #    .f.d3 mark particle2 33
    52 #    .f.d3 mark arrow 17
    53     .f.d3 bball
     47    .f.d3 mark add loopstart 5
     48    .f.d3 mark add loopend 10
     49    .f.d3 mark add particle0 17
     50    .f.d3 mark add particle1 10
     51    .f.d3 mark add particle2 4
     52    .f.d3 mark add particle3 54
     53    .f.d3 mark add particle2 33
     54    .f.d3 mark add particle1000 1000
     55    .f.d3 mark add particle1100 1100
     56    .f.d3 mark add particle1200 1200
     57    .f.d3 mark add particle1300 1300
     58    .f.d3 mark add particle1400 1400
     59    .f.d3 mark add particle1500 1500
     60    .f.d3 mark add particle1600 1600
     61    .f.d3 mark add particle1700 1700
     62    .f.d3 mark add particle1800 1800
     63    .f.d3 mark add particle1900 1900
     64    .f.d3 mark add particle2000 2000
     65    .f.d3 mark add arrow 17
     66#    .f.d3 bball
    5467}
    5568
  • trunk/examples/video/piv/piv.tcl

    r1928 r1979  
    7979$intro.scroller.html load $html
    8080
    81 # about page controls
    82 set aboutcntls [frame $f.aboutcntls]
    83 button $aboutcntls.next -text "Mark Particles" -command {$nb current next>}
    84 pack $aboutcntls.next -side left -expand yes -padx 4 -pady 1
     81set demo [frame $f.demo]
    8582
    8683blt::table $f \
    8784    0,0 $intro -rowspan 3 -fill both \
    88     1,1 $loader -fill x \
    89     2,1 $aboutcntls -fill x
     85    0,1 $demo -fill x \
     86    1,1 $loader -fill x
    9087
    9188blt::table configure $f c* -resize both
     
    9693# ------------------------------------------------------------------
    9794
    98 set f [$nb insert end main]
    99 $f configure -width 830 -height 530
    100 Rappture::VideoScreen $f.viewer -width 830 -height 530
    101 $loader.go configure -command {$nb current next>; $f.viewer loadcb}
     95set f [$nb insert end video]
     96set movieViewer [Rappture::VideoScreen $f.viewer]
     97$loader.go configure -command {$nb current next>; $movieViewer loadcb}
    10298
    103 #Rappture::VideoViewer $f.viewer
    104 #$f.viewer load "/home/derrick/projects/piv/video/TOPHAT_06-03-10_16-05-55.mp4"
    105 #$f.viewer load "/home/derrick/projects/piv/video/TOPHAT_06-03-10_16-09-56.mp4"
    106 #$f.viewer load "/home/derrick/projects/piv/video/TOPHAT_06-03-10_16-13-56.mp4"
    107 #$f.viewer load "/home/derrick/junk/coa360download56Kbps240x160.mpg"
    108 pack $f.viewer -expand yes -fill both
     99pack $movieViewer -expand yes -fill both
    109100
    110101# ------------------------------------------------------------------
     
    112103# ------------------------------------------------------------------
    113104
    114 $f configure -width 2 -height 2
    115105$nb current about
     106wm geometry . 900x600
    116107wm deiconify .
     108update idletasks
     109
     110# for testing we automatically load a video
     111array set videoFiles [list \
     112    1 "/home/derrick/projects/piv/video/TOPHAT_06-03-10_16-05-55.mp4" \
     113    2 "/home/derrick/projects/piv/video/TOPHAT_06-03-10_16-09-56.mp4" \
     114    3 "/home/derrick/projects/piv/video/TOPHAT_06-03-10_16-13-56.mp4" \
     115    4 "/home/derrick/junk/coa360download56Kbps240x160.mpg" \
     116]
     117$nb current video
     118update idletasks
     119$movieViewer load file $videoFiles(1)
Note: See TracChangeset for help on using the changeset viewer.