From: John Cromie <email@hidden>
To: email@hidden
CC: "Nuno Magalhaes" <email@hidden>
Subject: Re: QuickTime for .NET and COM developers
Date: Fri, 17 Feb 2006 17:19:04 +0000
At 16:11 17/02/2006, Nuno Magalhaes wrote:
I checked all the source code in the book referred by this link:
http://www.skylark.ie/qt4.net/samplecode.asp
And all I saw was ShowExportMovieDialog's.
I would like to ask the author of this book, how to export a movie without
showing the ExportDialog interface: since we've got the Settings and the
BeginExport function.
The book that you mention contains a full explanation of how to persist and
reuse QuickTime exporter settings without export or settings dialogs, for
example, in batch export.
In a nutshell: (in C# but easily translatable)
* First save the export settings of an already configured QTExporter
object. ShowSettingsDialog() allows you to configure the exporter. Its
Settings.XML can then be saved:
// ex is the QTExporter object
StreamWriter sw = File.CreateText(exporterSettingsFileName);
sw.Write(ex.Settings.XML);
sw.Close();
* You can then reload the exporter settings and configure a QTExporter
object:
ex.TypeName = "3G";
ex.SetDataSource(axQTControl1.Movie);
if (File.Exists(exporterSettingsFileName))
{
StreamReader sr = new StreamReader(exporterSettingsFileName);
CFObject cf = new CFObject();
cf.XML = sr.ReadToEnd();
ex.Settings = cf;
sr.Close();
}
* And finally you can export the movie:
//Export movie
ex.DestinationFileName = "C:\Movies\Exported.mov";
ex.ShowProgressDialog = true;
ex.BeginExport();
_________________________________________________________
John Cromie
Skylark Associates Ltd. http://www.skylark.ie