Changeset 2035


Ignore:
Timestamp:
Jan 16, 2011 10:09:17 AM (13 years ago)
Author:
dkearney
Message:

adding aspect ratio calculations.
disable analyze button when no movie has been choosen in piv
rename some functions

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/video/piv/piv.tcl

    r2028 r2035  
    139139button $analyze.go \
    140140    -text "Analyze" \
     141    -state disabled \
    141142    -command {
    142143        $vp video stop
     
    148149pack $analyze.step3 -side left -anchor w
    149150pack $analyze.go -anchor center
     151
     152proc buttonState {b var args} {
     153    upvar #0 $var v
     154    set state disabled
     155    if {"" != $v} {
     156       set state normal
     157    }
     158    $b configure -state $state
     159}
     160
     161trace add variable previewVar write "buttonState $analyze.go previewVar"
    150162
    151163
  • trunk/gui/scripts/videopreview.tcl

    r2028 r2035  
    246246    set _movie [Rappture::Video $type $data]
    247247    file delete $fname
    248     set _framerate [${_movie} get framerate]
     248    set _framerate [${_movie} framerate]
    249249    set _mspf [expr round(((1.0/${_framerate})*1000))]
    250250    set _delay [expr {${_mspf} - ${_ofrd}}]
     
    265265    }
    266266
    267     set _lastFrame [$_movie get position end]
     267    set _lastFrame [${_movie} get position end]
    268268
    269269    # update the dial with video information
     
    426426        # because the underlying c lib is too slow at reading.
    427427        $_movie seek $cur
    428         $_imh put [$_movie get image ${_width} ${_height}]
     428        $_imh put [${_movie} get image ${_width} ${_height}]
    429429    } 1]
    430430    regexp {(\d+\.?\d*) microseconds per iteration} ${_ofrd} match _ofrd
     
    439439    }
    440440
    441     set cur [$_movie get position cur]
     441    set cur [${_movie} get position cur]
    442442
    443443    # update the dial and framenum widgets
     
    469469        error "bad value: \"$val\": should be \"seek value\""
    470470    }
    471     set cur [$_movie get position cur]
     471    set cur [${_movie} get position cur]
    472472    if {[string compare $cur $val] == 0} {
    473473        # already at the frame to seek to
     
    478478
    479479    # update the dial and framenum widgets
    480     set _settings($this-framenum) [$_movie get position cur]
     480    set _settings($this-framenum) [${_movie} get position cur]
    481481    event generate $itk_component(main) <<Frame>>
    482482
     
    505505                # no play pending schedule one
    506506                set _pendings(play) 1
    507                 set _nextframe [expr {[$_movie get position cur] + 1}]
     507                set _nextframe [expr {[${_movie} get position cur] + 1}]
    508508                after idle [itcl::code $this Play]
    509509            } else {
  • trunk/gui/scripts/videoscreen.tcl

    r2029 r2035  
    1616package require RapptureGUI
    1717
    18 option add *Video.width 300 widgetDefault
    19 option add *Video.height 300 widgetDefault
     18option add *Video.width -1 widgetDefault
     19option add *Video.height -1 widgetDefault
    2020option add *Video.foreground black widgetDefault
    2121option add *Video.controlBackground gray widgetDefault
     
    7070    private common   _counters
    7171
    72     private variable _width -1      ;# start x for rubberbanding
    73     private variable _height -1     ;# start x for rubberbanding
     72    private variable _width -1      ;# width of the movie
     73    private variable _height -1     ;# height of the movie
    7474    private variable _movie ""      ;# movie we grab images from
    7575    private variable _lastFrame 0   ;# last frame in the movie
     
    120120
    121121    itk_component add main {
    122         canvas $itk_interior.main \
    123             -background black
     122        canvas $itk_interior.main
    124123    } {
    125124        usual
     
    128127    bind $itk_component(main) <Configure> [itcl::code $this fixSize]
    129128
     129    # setup the image display
    130130    # hold the video frames in an image on the canvas
    131131    set _imh [image create photo]
    132     $itk_component(main) create image 0 0 -anchor nw -image $_imh
     132
     133    $itk_component(main) create image 0 0 \
     134        -anchor center \
     135        -image ${_imh} \
     136        -tags videoframe
    133137
    134138    # setup movie controls
     
    311315
    312316    itk_component add framenumlabel {
    313         label $itk_component(frnumfr).framenuml -text "Frame:" -font $fg \
     317        label $itk_component(frnumfr).framenuml -text "Frame:" -font "arial 9" \
    314318            -highlightthickness 0
    315319    } {
     
    376380        1,3 $itk_component(seekforward) -padx {4 0} \
    377381        1,4 $itk_component(loop) -padx {4 0} \
    378         2,0 $itk_component(frnumfr) -padx {2 0} -columnspan 3 \
     382        2,0 $itk_component(frnumfr) -padx {0 0} -columnspan 3 \
    379383        2,3 $itk_component(speed) -padx {2 0} -columnspan 2
    380384
     
    392396
    393397    eval itk_initialize $args
     398
     399    $itk_component(main) configure -background black
    394400}
    395401
     
    404410
    405411
    406     if {[info exists _imh]} {
     412    if {[info exists _imh] && ("" != ${_imh})} {
    407413        image delete ${_imh}
    408414        set _imh ""
     
    466472itcl::body Rappture::VideoScreen::load {type data} {
    467473
     474    video stop
     475
    468476    # open the file
    469477    set fname ""
     
    493501    }
    494502
    495     video stop
    496 
    497503    if {"file" == $type} {
    498504        if {("" != [info commands ${_movie}])} {
     
    502508            # if they are different, close the old movie
    503509            # and clear out all old drawings from the canvas.
    504             set err [catch {${_movie} get filename} filename]
     510            set err [catch {${_movie} filename} filename]
    505511            if {($err == 0)&& ($data == $filename)} {
    506512                # video file already open, don't reopen it.
     
    509515                # clear the old movie
    510516                ${_movie} release
     517                set _width -1
     518                set _height -1
    511519
    512520                # delete drawings objects from canvas
     
    520528        file delete $fname
    521529    }
    522     set _framerate [${_movie} get framerate]
     530    set _framerate [${_movie} framerate]
    523531    video speed
    524 
    525     video seek 0
    526 
    527     # update the dial and framenum widgets
    528     set _settings(framenum) 0
    529 
    530 
    531     # setup the image display
    532 
    533     foreach {w h} [query dimensions] break
    534     if {${_width} == -1} {
    535         set _width $w
    536     }
    537     if {${_height} == -1} {
    538         set _height $h
    539     }
    540 
    541     set _lastFrame [$_movie get position end]
     532    puts stderr "framerate: ${_framerate}"
     533
     534    set _lastFrame [${_movie} get position end]
    542535
    543536    # update the dial with video information
     
    559552
    560553    fixSize
     554
     555    # goto the first frame
     556    # update the dial and framenum widgets
     557    video seek 0
     558    set _settings(framenum) 0
    561559}
    562560
     
    600598    }
    601599
    602 #    set _width [winfo width $itk_component(main)]
    603 #    set _height [winfo height $itk_component(main)]
    604 #
    605 #    # get an image with the new size
    606 #    ${_imh} put [${_movie} get image ${_width} ${_height}]
    607 #
    608 #    # fix the dimesions of the canvas
    609 #    #$itk_component(main) configure -width ${_width} -height ${_height}
    610 #
    611 #    $itk_component(main) configure -scrollregion [$itk_component(main) bbox all]
    612 
    613 ######################
     600    # get dimensions for the new image
     601    # adjust the aspect ratio, if necessary
     602
     603    puts stderr "aspect ratio: [query aspectratio]"
     604
     605    foreach {w h} [query dimensions] break
     606    foreach {num den} [query aspectratio] break
     607
     608    if {[expr 1.0*$w/$h] != [expr 1.0*$num/$den]} {
     609        # we need to adjust the frame height and width
     610        # to keep the correct aspect ratio
     611        # hold the height constant,
     612        # adjust the width as close as we can
     613        # to the correct aspect ratio
     614        set w [expr int(1.0*$num/$den*$h)]
     615    }
     616
     617    if {-1 == ${_width}} {
     618        set _width $w
     619    }
     620    if {-1 == ${_height}} {
     621        set _height $h
     622    }
    614623
    615624    # get an image with the new size
     625    ${_imh} blank
     626    ${_imh} configure -width 1 -height 1
     627    ${_imh} configure -width 0 -height 0
    616628    ${_imh} put [${_movie} get image ${_width} ${_height}]
    617     puts stderr "${_width} ${_height}"
    618 
    619     # fix the dimesions of the video canvas
    620     $itk_component(main) configure -width ${_width} -height ${_height}
     629
     630    # place the image in the center of the canvas
     631    set ccw [winfo width $itk_component(main)]
     632    set cch [winfo height $itk_component(main)]
     633    $itk_component(main) coords videoframe [expr $ccw/2.0] [expr $cch/2.0]
     634
     635    puts stderr "----------------------------"
     636    puts stderr "adjusted = $w $h"
     637    puts stderr "data     = ${_width} ${_height}"
     638    puts stderr "image    = [image width ${_imh}] [image height ${_imh}]"
     639    foreach {x0 y0 x1 y1} [$itk_component(main) bbox videoframe] break
     640    puts stderr "bbox     = $x0 $y0 $x1 $y1"
     641    puts stderr "ccw cch  = [expr $ccw/2.0] [expr $cch/2.0]"
     642    puts stderr "main     = [winfo width $itk_component(main)] [winfo height $itk_component(main)]"
     643    puts stderr "hull     = [winfo width $itk_component(hull)] [winfo height $itk_component(hull)]"
    621644}
    622645
     
    670693    set ret ""
    671694    switch -- $type {
     695        "aspectratio" {
     696            set ret [${_movie} aspect display]
     697        }
    672698        "dimensions" {
    673699            set ret [${_movie} size]
     
    698724        # not the current frame+1. this happens when we skip frames
    699725        # because the underlying c lib is too slow at reading.
    700         $_movie seek $cur
    701         $_imh put [$_movie get image ${_width} ${_height}]
     726        ${_movie} seek $cur
     727        ${_imh} put [${_movie} get image ${_width} ${_height}]
    702728    } 1]
    703729    regexp {(\d+\.?\d*) microseconds per iteration} ${_ofrd} match _ofrd
     
    712738    }
    713739
    714     set cur [$_movie get position cur]
     740    set cur [${_movie} get position cur]
    715741
    716742    # update the dial and framenum widgets
     
    751777        error "bad value: \"$val\": should be \"seek value\""
    752778    }
    753     set cur [$_movie get position cur]
     779    set cur [${_movie} get position cur]
    754780    if {[string compare $cur $val] == 0} {
    755781        # already at the frame to seek to
     
    761787
    762788    # update the dial and framenum widgets
    763     set _settings(framenum) [$_movie get position cur]
     789    set _settings(framenum) [${_movie} get position cur]
    764790    event generate $itk_component(main) <<Frame>>
    765791
     
    790816                # no play pending schedule one
    791817                set _pendings(play) 1
    792                 set _nextframe [expr {[$_movie get position cur] + 1}]
     818                set _nextframe [expr {[${_movie} get position cur] + 1}]
    793819                after idle [itcl::code $this Play]
    794820            } else {
     
    12171243        $itk_component(dialminor) loop disable
    12181244    } else {
    1219         set cur [$_movie get position cur]
    1220         set end [$_movie get position end]
     1245        set cur [${_movie} get position cur]
     1246        set end [${_movie} get position end]
    12211247
    12221248        set startframe [expr $cur-10]
     
    12361262
    12371263# ----------------------------------------------------------------------
    1238 # OPTION: -width
     1264# OPTION: -width - width of the video
    12391265# ----------------------------------------------------------------------
    12401266itcl::configbody Rappture::VideoScreen::width {
     
    12481274
    12491275# ----------------------------------------------------------------------
    1250 # OPTION: -height
     1276# OPTION: -height - height of the video
    12511277# ----------------------------------------------------------------------
    12521278itcl::configbody Rappture::VideoScreen::height {
  • trunk/lang/tcl/src/RpVideoTclInterface.cc

    r2028 r2035  
    2828static Tcl_ObjCmdProc SizeOp;
    2929static Tcl_ObjCmdProc ReleaseOp;
     30static Tcl_ObjCmdProc FilenameOp;
     31static Tcl_ObjCmdProc FramerateOp;
     32static Tcl_ObjCmdProc AspectOp;
    3033
    3134static Rp_OpSpec rpVideoOps[] = {
    32     {"get",   1, (void *)GetOp, 3, 5, "[image ?width height?]|[position cur|end]|[framerate]",},
    33     {"next",  1, (void *)NextOp, 2, 2, "",},
    34     {"release", 1, (void *)ReleaseOp, 2, 2, "",},
    35     {"seek",  1, (void *)SeekOp, 3, 3, "+n|-n|n",},
    36     {"size",  1, (void *)SizeOp, 2, 2, "",},
     35    {"aspect",    1, (void *)AspectOp, 3, 3, "type",},
     36    {"filename",  1, (void *)FilenameOp, 2, 2, "",},
     37    {"framerate", 1, (void *)FramerateOp, 2, 2, "",},
     38    {"get",       1, (void *)GetOp, 3, 5, "[image ?width height?]|[position cur|end]",},
     39    {"next",      1, (void *)NextOp, 2, 2, "",},
     40    {"release",   1, (void *)ReleaseOp, 2, 2, "",},
     41    {"seek",      1, (void *)SeekOp, 3, 3, "+n|-n|n",},
     42    {"size",      1, (void *)SizeOp, 2, 2, "",},
    3743};
    3844
     
    8187    // create a new command
    8288    VideoObj *movie = NULL;
    83     movie = VideoInitCmd();
     89    movie = VideoInit();
    8490    if (movie == NULL) {
    8591        Tcl_AppendResult(interp, "error while creating movie object", "\n",
    86                          "VideoInitCmd(movie);", (char*)NULL);
     92                         "VideoInit(movie);", (char*)NULL);
    8793        return TCL_ERROR;
    8894    }
     
    9096    if ((*type == 'd') && (strcmp(type,"data") == 0)) {
    9197        Tcl_AppendResult(interp, "error while creating movie: type == data not supported",
    92                          "\n", "VideoInitCmd(movie);", (char*)NULL);
     98                         "\n", "VideoInit(movie);", (char*)NULL);
    9399        return TCL_ERROR;
    94100    } else if ((*type == 'f') && (strcmp(type,"file") == 0)) {
     
    96102        if (err) {
    97103            Tcl_AppendResult(interp, "error while creating movie object: ",
    98                              "\n", "VideoInitCmd(movie);", (char*)NULL);
     104                             "\n", "VideoInit(movie);", (char*)NULL);
    99105            return TCL_ERROR;
    100106        }
     
    138144 * get framerate
    139145 * get filename
     146 * get aspectratio
    140147 *
    141148 */
     
    201208                            (const unsigned char*)img, bufSize);
    202209    }
     210/*
    203211    else if ((*info == 'f') && (strcmp(info,"framerate") == 0)) {
    204212        if (objc != 3) {
     
    237245        Tcl_AppendResult(interp, fname, (char*)NULL);
    238246    }
     247    else if ((*info == 'a') && (strcmp(info,"aspectratio") == 0)) {
     248        if (objc != 3) {
     249            Tcl_AppendResult(interp, "wrong # args: should be \"", cmd,
     250                " aspectratio\"", (char*)NULL);
     251            return TCL_ERROR;
     252        }
     253
     254        int num = 0;
     255        int den = 0;
     256        int err = 0;
     257
     258        err = VideoGetAspectRatio((VideoObj *)clientData, &num, &den);
     259        if (err) {
     260            Tcl_AppendResult(interp, "error while retrieving aspectratio",
     261                (char*)NULL);
     262            return TCL_ERROR;
     263        }
     264
     265        Tcl_Obj *dim = NULL;
     266        dim = Tcl_NewListObj(0, NULL);
     267        Tcl_ListObjAppendElement(interp, dim, Tcl_NewIntObj(num));
     268        Tcl_ListObjAppendElement(interp, dim, Tcl_NewIntObj(den));
     269        Tcl_SetObjResult(interp, dim);
     270    }
     271*/
    239272    else {
    240273        Tcl_AppendResult(interp, "unrecognized command \"", info, "\": should be \"", cmd,
     
    325358/**********************************************************************/
    326359// FUNCTION: SizeOp()
    327 /// Get the size of the video
    328 /**
    329  * Return the original size of the video frame
     360/// Get the width height of the video
     361/**
     362 * Return the original width and height of the video frame
    330363 *
    331364 * Full function call:
     
    345378
    346379
    347     err = VideoSizeCmd((VideoObj *)clientData,&width,&height);
     380    err = VideoSize((VideoObj *)clientData,&width,&height);
    348381
    349382    if (err) {
     
    363396
    364397/**********************************************************************/
     398// FUNCTION: FilenameOp()
     399/// Get the filename of the video
     400/**
     401 * Return the original filename of the video
     402 *
     403 * Full function call:
     404 *
     405 * filename
     406 *
     407 */
     408static int
     409FilenameOp (ClientData clientData, Tcl_Interp *interp, int objc,
     410         Tcl_Obj *const *objv)
     411{
     412    const char *fname = NULL;
     413    int err = 0;
     414
     415    err = VideoFileName((VideoObj *)clientData, &fname);
     416    if (err) {
     417        Tcl_AppendResult(interp, "error while retrieving filename",
     418            (char*)NULL);
     419        return TCL_ERROR;
     420    }
     421    Tcl_AppendResult(interp, fname, (char*)NULL);
     422
     423    return TCL_OK;
     424}
     425
     426/**********************************************************************/
     427// FUNCTION: FramerateOp()
     428/// Get the framerate of the video
     429/**
     430 * Return the framerate of the video
     431 *
     432 * Full function call:
     433 *
     434 * framerate
     435 *
     436 */
     437static int
     438FramerateOp (ClientData clientData, Tcl_Interp *interp, int objc,
     439         Tcl_Obj *const *objv)
     440{
     441    double fr = 0;
     442    int err = 0;
     443
     444    err = VideoFrameRate((VideoObj *)clientData, &fr);
     445    if (err) {
     446        Tcl_AppendResult(interp, "error while calculating framerate",
     447            (char*)NULL);
     448        return TCL_ERROR;
     449    }
     450    Tcl_SetObjResult(interp, Tcl_NewDoubleObj(fr));
     451
     452    return TCL_OK;
     453}
     454
     455/**********************************************************************/
     456// FUNCTION: AspectOp()
     457/// Get the aspect ratio of the video
     458/**
     459 * Return either the pixel or display aspect ratio of the video
     460 * Full function call:
     461 *
     462 * aspect pixel
     463 * aspect display
     464 *
     465 */
     466static int
     467AspectOp (ClientData clientData, Tcl_Interp *interp, int objc,
     468         Tcl_Obj *const *objv)
     469{
     470    int err = 0;
     471    int num = 0;
     472    int den = 1;
     473    Tcl_Obj *dim = NULL;
     474
     475    const char *cmd = Tcl_GetString(objv[1]);
     476    const char *info = Tcl_GetString(objv[2]);
     477
     478    if ((*cmd == 'p') && (strcmp(info,"pixel") == 0)) {
     479        err = VideoPixelAspectRatio((VideoObj *)clientData, &num, &den);
     480    }
     481    else if ((*info == 'd') && (strcmp(info,"display") == 0)) {
     482        err = VideoDisplayAspectRatio((VideoObj *)clientData, &num, &den);
     483    }
     484    else {
     485        Tcl_AppendResult(interp, "unrecognized command \"", info, "\": should be \"", cmd,
     486            " pixel|display\"", (char*)NULL);
     487        return TCL_ERROR;
     488    }
     489
     490    if (err) {
     491        Tcl_AppendResult(interp, "error while retrieving ", info,
     492            " aspect ratio", (char*)NULL);
     493        return TCL_ERROR;
     494    }
     495
     496    dim = Tcl_NewListObj(0, NULL);
     497    Tcl_ListObjAppendElement(interp, dim, Tcl_NewIntObj(num));
     498    Tcl_ListObjAppendElement(interp, dim, Tcl_NewIntObj(den));
     499    Tcl_SetObjResult(interp, dim);
     500
     501    return TCL_OK;
     502}
     503/**********************************************************************/
    365504// FUNCTION: ReleaseOp()
    366505/// Clean up memory from an open video in a movie player object
  • trunk/src/objects/RpVideo.c

    r2028 r2035  
    768768/*
    769769 * ------------------------------------------------------------------------
    770  *  VideoInitCmd()
     770 *  VideoInit()
    771771 *
    772772 *  Implements the body of the _ffmpeg_init method in the "video" class.
     
    776776 */
    777777VideoObj *
    778 VideoInitCmd()
     778VideoInit()
    779779{
    780780    /*
     
    790790/*
    791791 * ------------------------------------------------------------------------
    792  *  VideoCleanupCmd()
     792 *  VideoCleanup()
    793793 *
    794794 *  Implements the body of the _ffmpeg_cleanup method in the "video" class.
     
    798798 */
    799799int
    800 VideoCleanupCmd(vidPtr)
     800VideoCleanup(vidPtr)
    801801    VideoObj *vidPtr;
    802802{
     
    826826/*
    827827 * ------------------------------------------------------------------------
    828  *  VideoSizeCmd()
     828 *  VideoSize()
    829829 *
    830830 *  Implements the body of the "size" method in the "video" class.
     
    833833 */
    834834int
    835 VideoSizeCmd(vidPtr, width, height)
     835VideoSize(vidPtr, width, height)
    836836    VideoObj *vidPtr;
    837837    int *width;
     
    863863/*
    864864 * ------------------------------------------------------------------------
    865  *  VideoGoCmd()
     865 *  VideoGo()
    866866 *
    867867 *  Implements the body of the "go" method in the "video" class.
     
    996996/*
    997997 * ------------------------------------------------------------------------
    998  *  VideoGetCmd()
     998 *  VideoGet()
    999999 *
    10001000 *  Implements the body of the "get" method in the "video" class.
     
    11231123
    11241124int
    1125 VideoGetFrameRate (vidPtr, fr)
     1125VideoFrameRate (vidPtr, fr)
    11261126    VideoObj *vidPtr;
    11271127    double *fr;
     
    11551155
    11561156int
    1157 VideoGetFileName (vidPtr, fname)
     1157VideoFileName (vidPtr, fname)
    11581158    VideoObj *vidPtr;
    11591159    const char **fname;
     
    11751175
    11761176    *fname = vidPtr->fileName;
     1177
     1178    return 0;
     1179}
     1180
     1181int
     1182VideoPixelAspectRatio (vidPtr, num, den)
     1183    VideoObj *vidPtr;
     1184    int *num;
     1185    int *den;
     1186{
     1187    AVCodecContext *vcodecCtx;
     1188
     1189    if (vidPtr == NULL) {
     1190        return -1;
     1191    }
     1192
     1193    if ((num == NULL) || (den == NULL)) {
     1194        return -1;
     1195    }
     1196
     1197    if (vidPtr->pFormatCtx == NULL) {
     1198        // vidPtr->pFormatCtx is NULL, video not open
     1199        return -1;
     1200    }
     1201
     1202    vcodecCtx = vidPtr->pFormatCtx->streams[vidPtr->videoStream]->codec;
     1203
     1204    *num = vcodecCtx->sample_aspect_ratio.num;
     1205    *den = vcodecCtx->sample_aspect_ratio.den;
     1206
     1207    return 0;
     1208}
     1209
     1210int
     1211VideoDisplayAspectRatio (vidPtr, num, den)
     1212    VideoObj *vidPtr;
     1213    int *num;
     1214    int *den;
     1215{
     1216    AVCodecContext *vcodecCtx;
     1217    int width = 0;
     1218    int height = 0;
     1219    int64_t gcd = 0;
     1220    int64_t gcd2 = 0;
     1221
     1222    if (vidPtr == NULL) {
     1223        return -1;
     1224    }
     1225
     1226    if ((num == NULL) || (den == NULL)) {
     1227        return -1;
     1228    }
     1229
     1230    if (vidPtr->pFormatCtx == NULL) {
     1231        // vidPtr->pFormatCtx is NULL, video not open
     1232        return -1;
     1233    }
     1234
     1235    VideoSize(vidPtr, &width, &height);
     1236    VideoPixelAspectRatio(vidPtr, num, den);
     1237
     1238    width = (*num)*width;
     1239    height = (*den)*height;
     1240    gcd = av_gcd(FFABS(width), FFABS(height));
     1241
     1242    *num = width/gcd;
     1243    *den = height/gcd;
     1244
     1245    if (*den == 0) {
     1246        *num = 0;
     1247        *den = 1;
     1248    }
    11771249
    11781250    return 0;
     
    12671339///*
    12681340// * ------------------------------------------------------------------------
    1269 // *  VideoPutCmd()
     1341// *  VideoPut()
    12701342// *
    12711343// *  Implements the body of the "put" method in the "video" class.
     
    12751347// */
    12761348//int
    1277 //VideoPutCmd(cdata, interp, argc, argv)
     1349//VideoPut(cdata, interp, argc, argv)
    12781350//    ClientData cdata;      /* not used */
    12791351//    Tcl_Interp *interp;    /* interpreter */
  • trunk/src/objects/RpVideo.h

    r2028 r2035  
    2323typedef struct VideoObjRec VideoObj;
    2424
    25 VideoObj *VideoInitCmd ();
    26 int VideoCleanupCmd (VideoObj *vidPtr);
     25VideoObj *VideoInit ();
     26int VideoCleanup (VideoObj *vidPtr);
    2727int VideoOpenFile (VideoObj *vidPtr,
    2828    const char *fileName, const char *mode);
     
    3131int VideoGetPositionCur (VideoObj *vidPtr, int *pos);
    3232int VideoGetPositionEnd (VideoObj *vidPtr, int *pos);
    33 int VideoGetFrameRate (VideoObj *vidPtr, double *fr);
    34 int VideoGetFileName (VideoObj *vidPtr, const char **fname);
    35 // static int VideoPutCmd (ClientData clientData,
     33int VideoFrameRate (VideoObj *vidPtr, double *fr);
     34int VideoFileName (VideoObj *vidPtr, const char **fname);
     35int VideoPixelAspectRatio (VideoObj *vidPtr, int *num, int *den);
     36int VideoDisplayAspectRatio (VideoObj *vidPtr, int *num, int *den);
     37// static int VideoPut (ClientData clientData,
    3638//     Tcl_Interp  *interp, int argc, CONST84 char *argv[]);
    3739int VideoGoNext (VideoObj *vidPtr);
    3840int VideoGoPlusMinusN (VideoObj *vidPtr, int n);
    3941int VideoGoToN (VideoObj *vidPtr, int n);
    40 int VideoSizeCmd (VideoObj *vidPtr, int *width, int *height);
     42int VideoSize (VideoObj *vidPtr, int *width, int *height);
    4143int VideoClose (VideoObj *vidPtr);
    4244
Note: See TracChangeset for help on using the changeset viewer.