Multithreading

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I posted this last week and didnt get any reply from anyone.

Out team is developing a GUI Application. This application will display
multiple images at a time. These images must be rotated, zoomed and do
various post processing tools. One of the requirement is to play back
multiple images at a time.
I have few queries here,

I developed a Windows control library Component in VC.NET. This component
is used in C# application to display images and play back. Multiple instance
of the component is created in the C# and used. When I play back any of the
component what happens is the control doesnt come out from it. I do display
each frame in loop. So at a time only one instance of the component play
back. But I need to display multiple components simultaneously. What should I
do it make it play independently.

or

Can I do this as a SDI application instead of C# and use the component or
code as such. But here too if I call the play function the control will not
return back until that play function is fully completed. So what should I do
here to make it work as required.


If I am going to use TIMER, am not sure how many components will be put on
it and how should i proceed.

If I use Multithreaded application, I have single global function to play
back a file. How can I call this global function multiple times
simultaneously. If I have this function as class member I got to have this as
static function and that too not sure will help me out.

So what would be the best option.

How does Windows Media Player do this ?
Waiting for your ideas..

Thanks a lot
Sudharsan
 
Sudharsan said:
Hello,

I posted this last week and didnt get any reply from anyone.

Out team is developing a GUI Application. This application will display
multiple images at a time. These images must be rotated, zoomed and do
various post processing tools. One of the requirement is to play back
multiple images at a time.
I have few queries here,

I developed a Windows control library Component in VC.NET. This component
is used in C# application to display images and play back. Multiple
instance
of the component is created in the C# and used. When I play back any of
the
component what happens is the control doesnt come out from it. I do
display
each frame in loop. So at a time only one instance of the component play
back. But I need to display multiple components simultaneously. What
should I
do it make it play independently.

or

Can I do this as a SDI application instead of C# and use the component or
code as such. But here too if I call the play function the control will
not
return back until that play function is fully completed. So what should I
do
here to make it work as required.


If I am going to use TIMER, am not sure how many components will be put on
it and how should i proceed.

If I use Multithreaded application, I have single global function to play
back a file. How can I call this global function multiple times
simultaneously. If I have this function as class member I got to have this
as
static function and that too not sure will help me out.

So what would be the best option.

How does Windows Media Player do this ?
Waiting for your ideas..

Thanks a lot
Sudharsan

In your case I would try to use multiple threads. each component playing
video in 1 thread.
Thread functions can receive 1 parameter when they are started (a void * in
C++).
you can use that to pass a pointer to your component or another class to the
thread function.
I don't know the syntax by heart, but it should be similar in C#.

--

Kind regards,
Bruno van Dooren
(e-mail address removed)
Remove only "_nos_pam"
 
Back
Top