Mailing Lists: Apple Mailing Lists

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

Movie Export Dialog/Atom Get-Set hell..



Hi all..

Ok, this is not making any sense..

My component is creating a custom file format, and I am using ThreadsExportMovie as my test rig.

I've set up an user dialog in my movie exporter, and I have it doing its thing. It populates my globals structure with all sorts of user data.
I have also set up my MovieExportGetSettingsAsAtomContainer to create a new QTAtomContainer, and send the settings back out.


eg:

pascal ComponentResult My_MovieExportGetSettingsAsAtomContainer (My_MovieExportGlobals store, QTAtomContainer *settings)
{
QTAtom atom;
Fixed tempFPS;
UInt8 tempConv;
char tempProjInfo[200];
QTAtomContainer theSettings = NULL;
OSErr err = noErr;


if(!settings)
return paramErr;

err = QTNewAtomContainer(&theSettings);
if (err) goto bail;

// Add the conversion setting
tempConv = store->conversionType;
err = QTInsertChild(theSettings, kParentAtomIsContainer, kMy_MovieExportSettingsConv, 1, 0, sizeof(tempConv), &tempConv, NULL);
if (err) goto bail;

// Add the frames per second setting
err = QTInsertChild(theSettings, kParentAtomIsContainer, kQTSettingsTime, 1, 0, 0, NULL, &atom);
if (err) goto bail;


// FPS
tempFPS = EndianU32_NtoB(store->fps);
err = QTInsertChild(theSettings, atom, kMy_MovieExportSettingsFPS, 1, 0, sizeof(tempFPS), &tempFPS, NULL);
if (err) goto bail;


// Add the Project Info setting
strncpy((char *)tempProjInfo, store->slateInfo,200);
err = QTInsertChild(theSettings, kParentAtomIsContainer, kMy_MovieExportSettingsPInf, 1, 0, 200, &tempProjInfo, NULL);
if (err) goto bail;


bail:
	if (err && theSettings) {
		QTDisposeAtomContainer(theSettings);
		theSettings = NULL;
	}

	*settings = theSettings;	

	return err;
}

No errors are returned.

However, when ConfigureQuickTimeMovieExporter (I am basing this on electric image), MovieExportSetSettingsFromAtomContainer isn't seeing any
of the Atoms I've set up.


eg:

pascal ComponentResult My_MovieExportSetSettingsFromAtomContainer (My_MovieExportGlobals store, QTAtomContainer settings)
{
QTAtom atom;
OSErr err = noErr;



if(!settings) return paramErr;

// Set Conversion setting
atom = QTFindChildByID(settings, kParentAtomIsContainer, kMy_MovieExportSettingsConv, 1, NULL);
if (atom) {
UInt8 tempConv;

err = QTCopyAtomDataToPtr(settings, atom, false, sizeof(tempConv), &tempConv, NULL);
if (err) goto bail;
store->conversionType = tempConv;
}
....


atom comes back as 0. (along with my subsequent settings, as well.)

I have no idea where to look..

Any suggestions?

bob.

_______________________________________________
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.