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

Home » Public Forums » archive » working with IDLtoAVI.dlm
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
working with IDLtoAVI.dlm [message #36228] Thu, 28 August 2003 09:48 Go to next message
edwardg is currently offline  edwardg
Messages: 5
Registered: August 2003
Junior Member
Hi all,

I've been trying to read in the frames of an AVI file, do some simple
image processing, and write them into a new AVI file. I downloaded Ronn
Kling's dll which has been great, but now I'm running into problems.
(Specs: IDL 5.4 running under Windows XP).

This:

1. Open AVI for writing
2. Write frames
3. Close AVI for writing

Works wonderfully. However, this:

1. Open AVI1 for writing
2. Open AVI2 for reading
3. Write frames
4. Close AVI2 for reading
5. Close AVI1 for writing

Causes the whole of IDLDE to crash when executing command 5 (closing AVI1
for writing), sans error message. I've tried opening and closing the
AVIs in different orders, but it always crashes when trying to close the
write AVI. The only way it works is if the read AVI is closed before the
write AVI is opened, however that doesn't help me because it's not
feasible for me to read in all frames of the read AVI at once. I need to
read and write frame-by-frame.

Any ideas or workarounds?






Ted
graves@reyes.stanford.edu
Re: working with IDLtoAVI.dlm [message #36309 is a reply to message #36228] Thu, 28 August 2003 18:55 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Edward Graves" wrote in message...
>> After a quick browsing of the source, I think your problem is that you
can't
>> reliably have 2 AVI streams open at once. There are a few global vars
that
>> seem to clash.
>
> That was my assessment also, but it's curious because the IDLtoAVI
> documentation makes a point of mentioning how the file identifiers
> returned by the open routines are unique and allow multiple AVI files to
> be open at once.

Documentation... What's that? :)

Well, maybe I need to look at that code more closely. IDLtoAVI creates a
bunch of global structures and I don't see the mechanism to protect the
contents from subsequent calls from different streams. But it could be
right in front of my nose.


>> What happens when you:
>>
>> Open AVI1 for read
>> Open AVI2 for write (set different dimensions than source)
>> Read AVI1 and display on screen.
>
> This actually works, it is only the close operation that causes the crash.
> Your workaround is doable though. Thanks.

Not an elegant solution but it should keep you busy until someone comes up
with a better one. Hopefully you don't have too many files to process...

-Rick
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: graphics formats, triangulisation & coordinate systems
Next Topic: greater than X and less than Y

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

Current Time: Fri Oct 10 16:31:56 PDT 2025

Total time taken to generate the page: 1.03942 seconds