Re: How to play 2 or more movies asynchronously?
From: Chris P. [MVP] (msdn_at_chrisnet.net)
Date: 04/22/04
- Next message: Chris P. [MVP]: "Re: How to play 2 or more movies asynchronously?"
- Previous message: Archana2004: "Re: How to play 2 or more movies asynchronously?"
- In reply to: Archana2004: "Re: How to play 2 or more movies asynchronously?"
- Next in thread: Archana2004: "Re: How to play 2 or more movies asynchronously?"
- Reply: Archana2004: "Re: How to play 2 or more movies asynchronously?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Apr 2004 17:37:30 -0400
Archana2004 wrote:
> OK. Let me explain my objective first. I am writing this code for a
> neurocognitive experiment. This is what I am trying to achieve:
>
> 1) I want to run 2 movies simultaneously for a given duration of time.
> Lets assume 2 seconds, in this case.
> 2) At the same time, while watching movies, I want to get some
> response from the viewer(user). Lets say, he presses 1 each time he
> views an object1 and 2 when he views an object2. This response should
> be given while he is watching the movie. And movies must not stop on
> kbhit(). 3) The movies should stop after the specified duration. The
> windows must close automatically when movies stop.
>
> I am trying this code at home on XP home edition. I am not aware if
> it has any limitations on multi-threading. I suspect it has because
> the code that you have suggested doesn`t work the way you say it
> should. It still doesnt take in my response until movies stop.
What do you want to do with the responses? Right now I set it to stop the
video as an example but you can make it do anything you want, that was just
an *example* as I'm not here to write your software.
I think you need to kick it up a notch. Create a windows application and
embed 2 MCI control windows on a dialog. You will have tighter control over
the playback and can set yourself a timer to stop and close the video after
x seconds. Additionally you will be able to trap all keyboard input in the
PreTranslateMessage handler without interfering with the program operation.
- Next message: Chris P. [MVP]: "Re: How to play 2 or more movies asynchronously?"
- Previous message: Archana2004: "Re: How to play 2 or more movies asynchronously?"
- In reply to: Archana2004: "Re: How to play 2 or more movies asynchronously?"
- Next in thread: Archana2004: "Re: How to play 2 or more movies asynchronously?"
- Reply: Archana2004: "Re: How to play 2 or more movies asynchronously?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|