[comp.sys.mac.hypercard] playVideo videodisc command

garl@nlm-mcs.arpa (Gary Letourneau) (05/14/89)

I have a question concerning the video command playVideo. 
A typical call of playVideo is:

    playVideo here, stopFrame 

where here < stopFrame. This works fine. However, if I try the 
same command with stopFrame < here (in order to play backwards),
it just plays forward. Why did it not play backwards? Is the 
keyword 'here' only allowed for playing forward? 

How can I play backwards from the current frame? I tried the
following:

    playVideo videoframe(), startFrame

This worked, but it did not give a smooth motion.

Again how I play backwards from the current frame? By the way, 
I am using user XCMD version 2.2d9, and serial port XCMD version 
2.5d1. Unfortunately, at the time I am writing this message, I do 
not have available the version number of the videodisc driver 
for a Pioneer 4200 that I am using.

                                 Gary Letourneau
                                 letourneau@mcs.nlm.nih.gov

chesley@goofy.apple.com (Harry Chesley) (05/16/89)

In article <9487@nlm-mcs.arpa> garl@nlm-mcs.arpa (Gary Letourneau) writes:
> How can I play backwards from the current frame? I tried the
> following:
> 
>     playVideo videoframe(), startFrame
> 
> This worked, but it did not give a smooth motion.

There are two ways to play backward from the current frame. The first is 
the one shown above. It queries the player for the current frame number 
(videoFrame()) and then plays from there to the frame number given. But 
since the player continues to play after the query, it results in a jump 
back to the frame returned by videoFrame (i.e., isn't smooth). The other 
way is to say:

   playVideo here,1

This will play from the current frame to the beginning of the disc, and 
will be smooth.

Why can't you say something like this?

   playVideo here,1200

Because the XCMDs don't have any idea what frame the player is currently 
playing, so it can't know whether 1200 is before or after the current 
frame, and therefore it can't know whether to play forward or backward. To 
find out, it would have to query the player, which is just what you're 
doing with the videoFrame version. By specifying frame number 1 (or 0), it 
knows that it's playing to the start of the disc and therefore must be 
playing backward.

In some players, you can actually give it a player control sequence to 
play from the current frame to a particular frame number and it figures 
out whether to go forward or backward. But other players need to be told 
explicitly whether it's forward or backward. So if the XCMDs used that 
feature, they wouldn't work on all players...

I suppose I've said more than enough about this. It's just that I spent a 
lot of time thinking about it while writing the XCMDs, so...

ns@cat.cmu.edu (Nicholas Spies) (05/23/89)

Speaking of the videodisc XCMDs, has anyone at Apple (or elsewhere) written
a genuine videodisc <driver> (DRVR) that could be used for _any_ Mac
application that wants to talk to videodiscs.

I would image that one would be able to choose the player type in the 
Control Panel, that the driver would present a common interface for those
commands that apply to all players but would permit you to invoke _any_
special functions on special players, and that the driver would handle requests
to the disc player on an asynchronis manner so timeouts are handled gracefully.

The current videodisc XCMDs are a wonderful step in the right direction, but
why doesn't Apple follow its own advise and package this functionality so
any Mac application can make use of it... 

-- 
Nicholas Spies			ns@cat.cmu.edu.arpa
Center for Design of Educational Computing
Carnegie Mellon University
--