On Sat, 22 Oct 2005 email@hidden wrote:
> I am trying to store preset export settings using some very simple code
> provided by Chris Adamson.
>
> The problem with this approach is one of the values stored in the
> serialized object is the name and location of the resultant exported file.
> I would like to store the encoder settings but choose the name and
> location every time I call "convertToFile()".
>
> 1) Does anyone have any suggestions about how I can get around my problem?
> 2) Ideally, I am looking for a way to pass in pre-defined exporter
> settings without going this serialization/deserialization. From what I
> understand this is NOT possible at this point in time with QT4J. True?
I do something similar.
I create an exporter and set its export settings.
I keep the export settings in a file in the jar.
I create a movie from the input file.
I convert the movie, specifying the output file and exporter.
I think my code is just various parts from Adamson's book.
Here are snippets from my code.
Good luck,
Ron
// get the export settings from the file "cam" in the jar
InputStream acStream = getClass().getResourceAsStream("/cam");
byte[] inbuf = new byte[acStream.available()];
acStream.read(inbuf);
AtomContainer eac = AtomContainer.fromQTHandle(new QTHandle(inbuf));
MovieExporter exporter =
new MovieExporter(StdQTConstants.kQTFileTypeMovie);
exporter.setExportSettingsFromAtomContainer(eac);
Movie movie = Movie.fromFile (omFile);
movie.convertToFile (null,
saveFile,
StdQTConstants.kQTFileTypeMovie,
StdQTConstants.kMoviePlayer,
IOConstants.smSystemScript,
//StdQTConstants.showUserSettingsDialog |
StdQTConstants.movieToFileOnlyExport |
StdQTConstants.movieFileSpecValid, // flags
exporter);
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-java mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-java/email@hidden
This email sent to email@hidden