Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QTExporter.BeginExport blocks UI thread even when run in background thread



I am using the Quicktime COM API via C#, and I need to use the
QTExporter to export a movie file.  I would like to provide my own
progress dialog to the user, rather than using the built-in progress
dialog.

Contrary to what the name would seem to indicate, the
QTExporter.BeginExport method blocks for the duration of the export
process.  Even when I try running it in a background thread (using the
System.ComponentModel.BackgroundWorker object), the UI remains
unresponsive during the export process.  Is there a way to prevent
this?  My code is as follows:

                   QTQuickTime qt = _quickTime.QuickTime;

                   // create exporter
                   if (qt.Exporters.Count == 0) qt.Exporters.Add();
                   _exporter = qt.Exporters[1];

                   // Set exporter type: AVI, 3G, MPEG-4, PNG, etc.
                   _exporter.TypeName = "QuickTime Movie";

                   // add event listeners

_exporter.EventListeners.Add(QTEventClassesEnum.qtEventClassProgress,
QTEventIDsEnum.qtEventExportProgress, 0, null);

                   _exporter.ShowProgressDialog = false;

               _exporter.SetDataSource(_quickTime.Movie);
               _exporter.DestinationFileName = _exportFile;
               _exporter.BeginExport();

Any help would be greatly appreciated.

Thanks,
-Jonathan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden

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 © 2007 Apple Inc. All rights reserved.