Open ssfrr opened 10 years ago
Excellent idea! Right now, we have no audio, no control, and the command just blocks, so we have a little work to do.
I'll be traveling today, so not sure if I'll get to this doon. PRs welcome.
Gotcha. Do you have a preference between blocking/asynchronous play
? One thing that I've found handy is to add a wait
implementation so that you can easily simulate blocking behavior from the nonblocking API:
x = play(vid)
wait(x) # blocks until the video is complete
No preference. Asynchronous with wait does seem like a nice interface.
On Wednesday, August 13, 2014, Spencer Russell notifications@github.com wrote:
Gotcha. Do you have a preference between blocking/asynchronous play? One thing that I've found handy is to add a wait implementation so that you can easily simulate blocking behavior from the nonblocking API:
x = play(vid)wait(x) # blocks until the video is complete
— Reply to this email directly or view it on GitHub https://github.com/kmsquire/VideoIO.jl/issues/15#issuecomment-52068861.
In the spirit of generic function names for generic functionality and leveraging dispatch, might I suggest
play
instead ofplayvideo
for playing a video object?Currently that's what I use in AudioIO, so if you
play
an audio object it gets played over the default audio stream. That would keep the general interface the same:and
Also note that in AudioIO
play
returns an AudioPlayer object so you can do playback control: