I trying to modify SimpleMovieExporter from the "QuickTime for Java:
Developer's Notebook" to not prompt the user for the output file
information. I keep getting fnferr from MovieExporter.toFile when I
pass it a QTFile I create.
saveFile = new QTFile("C:/test.mov") fails. It makes no sense to
get
You need to specify the path in a platform specific way.
saveFile = new QTFile("C:\\test.mov"); // should do the trick
Thanks for the reply. Alas, I still get fnferr. As a sanity check
Here's another (in)sanity check. As I said the QTFile returned by
standardGetFilePreview works, but if I do the following it doesn't work
saveFile =
QTFile.standardGetFilePreview(QTFile.kStandardQTFileTypes);
saveFile = new QTFile(saveFile);
So, the QTFile from standardGetFilePreview is somehow different than
any QTFile I create, even when I copying it!
I haven't used QTJava to do this particular operation, but in plain ol'
QT, you need a particular kind of file reference in order to refer to a
file that you want QT to create. Is there more than one way to create a
QTFile? Remember that standardGetFilePreview is returning a reference
to an existing file, so that's not quite the same thing.
In plain QT, you need an FSSpec in order to reference a file that
doesn't yet exist. Taking a quick look at QTFile, there might be
something along the AliasHandle - DataRef path that will allow you to
do this.
It's definitely nonintuitive, so you'll have to experiment. My code for
this is on my laptop; I'll post it when I get home if nobody else
provides a solution.
I'm definitely looking forward to QT7... some of the QT API is showing
its age.
-- Bruce
------------------------------------------------------------------------
Bruce Toback (602) 996-8601| My candle burns at both ends;
OPT, Inc. (800) 858-4507| It will not last the night;
11801 N. Tatum Blvd. Ste. 142 | But ah, my foes, and oh, my friends -
Phoenix AZ 85028 | It gives a lovely light.
email@hidden | -- Edna St. Vincent Millay