comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to display live Video in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to display live Video in IDL [message #45842] Tue, 11 October 2005 14:39
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Mark Hadfield wrote:
> Rick Towler wrote:
>
>> About the best you can use the win API's GetActiveWindow() function to
>> get a handle to the active window. If you create the window in IDL
>> then immediately call a function to get the handle then you should be
>> fine 99.9% of the time :)
>
>
> Those sound like good odds to me! But I'm curious: what is likely to
> happen in the other 0.1%?

Well, say you run this IDL program and then click on your email client
to check for the latest gossip on comp.lang.idl-pvwave at just the right
moment after IDL has created the window but before the program has
called the DLM to make the GetActiveWindow() call. Now you'll get a
handle to your email client window, not your new IDL window, and is this
case it would most likely bring IDL down.

I use this in my directInput dlm and to be honest, I haven't had a
problem. But I'm pretty sure that at least theoretically this is an issue.

-Rick
Re: How to display live Video in IDL [message #45843 is a reply to message #45842] Tue, 11 October 2005 14:03 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Rick Towler wrote:
> About the best you can use the win API's GetActiveWindow() function to
> get a handle to the active window. If you create the window in IDL then
> immediately call a function to get the handle then you should be fine
> 99.9% of the time :)

Those sound like good odds to me! But I'm curious: what is likely to
happen in the other 0.1%?


--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: How to display live Video in IDL [message #45846 is a reply to message #45843] Tue, 11 October 2005 10:22 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
Marc Reinig wrote:
> Alternatively, can I get a
> Windows handle to a window created by IDL so I can blit directly there?

About the best you can use the win API's GetActiveWindow() function to
get a handle to the active window. If you create the window in IDL then
immediately call a function to get the handle then you should be fine
99.9% of the time :)

-Rick
Re: How to display live Video in IDL [message #45849 is a reply to message #45846] Tue, 11 October 2005 06:39 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Marc Reinig wrote:
> I would like to display a video stream from a camera in IDL, as part of my
> application. Does IDL have facilities for that? Alternatively, can I get a
> Windows handle to a window created by IDL so I can blit directly there?
>

Hi,

If your camera API provides easy interface with IDL via a DLM that you
can code up (this is beginning to look like alphabet soup!) then yes. I
have done this kind of thing with the SCION frame grabber. After you
have your DLM set up, you can simply call for a new image ala newImage =
MyDLM_GetImage() or some such call. Then use object graphics to render
the image to screen (which I think is faster for images than direct
graphics). I never achieved full frame rate video display, but it was
fast enough for my purposes.

I'll bet there are faster/better ways to do this but I found it pretty
easy to manage.

I have no idea about passing an IDL graphics window to MS Windows - but
isn't there some kind of ActiveX thing for IDL connection to Windows?

Cheers,
Ben
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Tab Widgets changes at runtime?
Next Topic: Re: Asynchronous reading

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 13:04:14 PDT 2025

Total time taken to generate the page: 0.17804 seconds