Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
RE: Programmatic Export using QTControl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Programmatic Export using QTControl



There seems to be something with the event queue. I had the same problem
with the Music dialog freezing with JEDI-QuickTime for Delphi (that doesn't
use the apple activex control, but talks to qt api directly). See the music
demo in the JEDI-QuickTime distro at http://www.delphi-jedi.org, at the
QuickTime section for the freeze.

Wonder if it's related by chance to the FPU flag issues that QT has with
Delphi, see mention at the page of JEDI QuickTime, or some post by John (I
think) on this list sometime ago with way to bypass that. Maybe bypassing it
solves the dialog freeze issue too, maybe not (you may need some extra
thread to work as message pump for that dialog or something).

All QuickTime dialogs seem to have this problem with Delphi

----------------
George Birbilis (email@hidden)
Computer & Informatics Engineer
Microsoft MVP J# for 2004-2006
Borland "Spirit of Delphi"
++ QuickTime, Delphi, ActiveX, .NET components ++
http://www.kagi.com/birbilis
++ Robotics ++
http://www.mech.upatras.gr/~Robotics
http://www.mech.upatras.gr/~robgroup


> -----Original Message-----
> From: quicktime-api-bounces+birbilis=email@hidden
> [mailto:quicktime-api-bounces+birbilis=email@hidden
> m] On Behalf Of Glenn Anderson
> Sent: Friday, October 06, 2006 12:58 AM
> To: email@hidden; John Cromie
> Subject: Re: Programmatic Export using QTControl
>
> It does, but when I call ShowSettingsDialog (in delphi) the
> dialog is unclickable, and keyboard is nearly useless, as
> explained in a following email. I can call ShowExportDialog,
> but when it is done, the settings of the exporter don't seem
> to match what I just exported. I don't have another
> programming environment from which to create an XML blob. Do
> you have a compiled version of this code i can just run?
>
>       ----- Original Message -----
>       From: John Cromie <mailto:email@hidden>
>       To: email@hidden
>       Cc: Glenn Anderson <mailto:email@hidden>
>       Sent: Thursday, October 05, 2006 2:13 PM
>       Subject: Re: Programmatic Export using QTControl
>
>       At 20:04 05/10/2006, Glenn Anderson wrote:
>
>
>               So, I want to use the QTControl COM Control to
> export a generated AVI file to a specific format, without any
> user intervention. I can see how to present the user with a
> settings dialog, but I want to set these settings within the
> program instead. Specifically, I want to export as a
> QuickTime movie with H.264 video compression and AAC audio.
> Does anybody know how to do this?
>
>
>       There isn't a COM interface that allows access to
> individual exporter settings. However the QTControl does
> allow you to save the current configuration of a QTExporter
> object via its Settings.XML property. Once you do this for a
> specific export configuration, you can reload the settings
> and configure the QTExporter object.
>
>       Here's some C# code that you can easily rework in
> whatever language you're using. First you need to save the
> export settings of the QTExporter object.
> ShowSettingsDialog() allows you to configure the exporter and
> the XML settings can then be saved:
>
>                QTQuickTime qt = axQTControl1.QuickTime;
>               if (qt.Exporters.Count == 0) qt.Exporters.Add();
>               QTExporter ex = qt.Exporters[1];
>
>                ex.TypeName = "mpg4";
>                ex.SetDataSource(axQTControl1.Movie);
>
>               String exporterSettingsPath =
> Application.StartupPath + "\\Settings";
>               String exporterSettingsFileName =
> exporterSettingsPath + "\\" + ex.TypeName + ".xml";
>
>                //Configure Exporter
>                ex.ShowSettingsDialog();
>
>               //Export movie
>                ex.DestinationFileName = "C:\Movies\Exported.mov";
>                ex.ShowProgressDialog = true;
>                ex.BeginExport();
>
>               //Save exporter settings
>               if (!Directory.Exists(exporterSettingsPath))
>
> Directory.CreateDirectory(exporterSettingsPath);
>                StreamWriter sw =
> File.CreateText(exporterSettingsFileName);
>                sw.Write(ex.Settings.XML);
>                sw.Close();
>
>       Next time you can reload these settings and reuse them:
>
>                QTQuickTime qt = axQTControl1.QuickTime;
>               if (qt.Exporters.Count == 0) qt.Exporters.Add();
>               QTExporter ex = qt.Exporters[1];
>
>                ex.TypeName = "mpg4";
>                ex.SetDataSource(axQTControl1.Movie);
>
>               // Load previous exporter settings if available
>               String exporterSettingsPath =
> Application.StartupPath + "\\Settings";
>               String exporterSettingsFileName =
> exporterSettingsPath + "\\" + ex.TypeName + ".xml";
>
>               if (File.Exists(exporterSettingsFileName))
>               {
>                        StreamReader sr = new
> StreamReader(exporterSettingsFileName);
>                        CFObject cf = new CFObject();
>                        cf.XML = sr.ReadToEnd();
>                        ex.Settings = cf;
>                        sr.Close();
>               }
>               else
>                         ex.ShowSettingsDialog();
>
>               //Export movie
>                ex.DestinationFileName = "C:\Movies\Exported.mov";
>                ex.ShowProgressDialog = true;
>                ex.BeginExport();
>
>       Hope this helps,
>
>       John.
>
>
>
>       _________________________________________________________
>       John Cromie
>       Skylark Associates Ltd.
> http://www.skylark.ie <http://www.skylark.ie/>
>
>



  _____

avast! Antivirus <http://www.avast.com> : Outbound message clean.


Virus Database (VPS): 0640-6, 08/10/2006
Tested on: 9/10/2006 12:08:13 ??
avast! - copyright (c) 1988-2006 ALWIL Software.



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

This email sent to email@hidden

References: 
 >Re: Programmatic Export using QTControl (From: "Glenn Anderson" <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.