You are here

TMCI - Tcl Media Control Interface

admin의 아바타

홈페이지 : http://www2.cmp.uea.ac.uk/~fuzz/tmci/default.html

TMCI is an extension for Tcl under windows that allows access to the Media Control Interface (MCI) for Windows. The MCI layer is an abstraction over several types of media (sound and video) both for recording and playback. The current range of MCI drivers allow for handling:

  • Control of VDR and VCR recorders.
  • Playback and recording of
    - Video files for formats such as avi, mpeg and QuickTime.
    - Sound files such as wave, mp3 and others.
  • Live video capture.

    TMCI introduces two new commands: mci and mci_notify. TMCI does not require Tk, but can be configured to display its output in a Tk widget. The library requires the Win32 libraries and should work well with Win32s.

    load mci 
    ## variables - set these for your own configuration 
    # 
    set moviefile uxmas97.avi 
    set alias uxmas 
    ## Set up GUI 
    # 
    foreach w [winfo child .] {destroy $w} 
    
    frame .f -bd 2 -relief sunken 
    label .f.movie -bg darkGreen 
    pack .f.movie -fill both -expand 1 
    frame .divider -bd 1 -relief sunken -height 3 
    frame .buttons 
    pack .buttons -side bottom -fill x 
    pack propagate .divider 
    pack .divider -side bottom -fill x 
    set b .buttons 
    button $b.start -text "Start" -command "mci \{play $alias from 0:0:0\}" 
    button $b.stop -text "Stop" -command "mci \{stop $alias\}" 
    button $b.console -text "Show Console" -command {console show} 
    pack $b.start $b.stop $b.console -side left 
    pack .f -side top -fill both -expand 1 
    
    ## make sure to update so as to allow for the windows to be created 
    update 
    
    bind .f.movie  { 
        mci {close all} 
        puts {video closed} 
    } 
    
    ### mci stuff 
    ## first open the movie 
    # 
    mci "open $moviefile alias $alias" 
    ## now specify the window for rendering 
    # 
    scan [winfo id .f.movie] %x id 
    mci "window $alias handle $id"
    

  • 첨부 파일파일 크기
    Image icon 1.png20.96 KB
    Image icon 2.png81.09 KB
    Package icon tmci.zip198.58 KB