Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Newbie trouble using Movie.convertToFile()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie trouble using Movie.convertToFile()



Hey QFJ Experts!

I am new to Quicktime and am having trouble learning it via Java, so sorry if my mistakes are obvious or I am taking the wrong approach. Anyway, here's the deal:

- I have an audio app with a major Java component that needs to read audio files in either WAV or AIFF formats, but, obviously, users may want to import other formats, so I need to convert from various formats to AIFF/WAV. Quicktime for Java seemed a good choice.

- Most operations like importing and exporting in my software proceed in the background, letting the user continue to work on other stuff, and I'd like to maintain that for file conversion, if possible, even at the cost of some performance.

- I tried creating a movie from the source file and then using movie.convertToFile(). Here's what I tried:
* The simplest approach works, but blocks my thread (in this case the Swing event dispatching thread) until it's done, which is no good.
* I tried putting the copy operation in another thread. This works, but my gui becomes insanely unresponsive on my iBook, even when I set the thread priority to a minimum. (Perhaps this is unrelated, but I recall that one time I got similar behavior when I tried doing a file copy using NIO -- even in a low priority background thread.)
* Giving up on backgrounding this, I tried calling movie.setProgressProc(), which would block user input but at least tell the user what was going on, so they knew to wait, and it even gives them a chance to cancel, which is easy to get working. Nice idea, but the text in the dialog says "Exporting Movie", which is not what I want on an *import* dialog. I don't see any way to configure this.
* The I tried showing and hiding my own progress bar dialog box by calling movie.setProgressProc( myProgressProc ), but that just gave me the spinning pizza o' death.


Is there some way around this? It seems weird that I am having such trouble simply converting a file!

A less pressing issue is that I'd like to (optionally) do sample rate conversion while I import, but I don't see anything in the docs about that. I can only imagine that I am missing something obvious, so a pointer in the right direction would be a big help!

Okay, thanks in advance!

	bjorn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.