Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 27, 2009, 07:38 PM   #1
Chirone
macrumors 6502
 
Join Date: Mar 2009
Location: NZ
Interpreting QTAtomContainer

i found this code here:
http://roobasoft.com/blog/2005/12/05...d-they-choose/
which claims to read what the export settings are and store them so they can be displayed.
however, upon trying this code out and doing a print statement instead of setting values i get nothing printed out

how does one print out as a string what the atoms are?
Chirone is offline   0 Reply With Quote
Old Jul 27, 2009, 08:13 PM   #2
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
That post is from 2005, about 2 years before Leopard was released. Since the C QuickTime API is basically obsolete (for 64-bit), there's a good chance that specific code is not working in Leopard, or the data you're working with is in a different format.

Anyways, what are you trying to do?
kainjow is offline   0 Reply With Quote
Old Jul 27, 2009, 08:23 PM   #3
Chirone
Thread Starter
macrumors 6502
 
Join Date: Mar 2009
Location: NZ
hah, yeah, it seems like a lot of the stuff out there is old and uses deprecated things including the ol' quickdraw... heck, i'm not even sure if the atoms a yet deprecated or still in use, nothing in the docs has pointed out to me that it is so i assume it's still in use..

anyway, to be more specific about what i'm trying to do...
i want a button that will make an object, this object will have all the export settings for a qtmovie
i want to get the settings in two possible ways,
1, use the dialog to create the settings
2, create the settings with code

also, i want to reflect a few of those settings in the interface. so if the encoded mov is going to be 320x480 at 24 fps with a particular video codec and audio codec then it will be displayed on the interface

what i was originally thinking (and feel free to suggest alternatives) was to open the export dialog obtain the settings from that (via the atoms) then i could determine what atoms i need to set for 2

i've been opening the dialog with the MovieExportDoUserDialog method
Chirone is offline   0 Reply With Quote
Old Jul 28, 2009, 10:46 AM   #4
kainjow
Moderator emeritus
 
kainjow's Avatar
 
Join Date: Jun 2000
I'm not sure if what you're doing is possible with QTKit, but I'd suggest looking into QTMovie's writeToFile:withAttributes: method and the QTMovieExportSettings key (if you want to be future proof, otherwise stick with the C APIs and 32-bit ).

Last edited by kainjow; Jul 28, 2009 at 10:55 AM.
kainjow is offline   0 Reply With Quote
Old Jul 28, 2009, 04:34 PM   #5
Chirone
Thread Starter
macrumors 6502
 
Join Date: Mar 2009
Location: NZ
i will look again at those attributes then

it's quite annoying that not all the old functions are up in the new stuff
Chirone is offline   0 Reply With Quote
Old Jul 28, 2009, 05:48 PM   #6
Chirone
Thread Starter
macrumors 6502
 
Join Date: Mar 2009
Location: NZ
hmmm, ok so it looks like the Attributes thing is the new way of QTAtoms... not sure why i didn't realise this sooner...

is there an automated dialog that pops up when you choose the export settings still?
i tried the old way and it didn't change the QTMovie.. or it didn't appear to, i went to see if i could change the size
and I can't see how you determine the frame rate either, or a way to change it.
i thought maybe i'd have to change the QTTrack, and change that frame rate, but all there is a timescale that doesn't even print.
Code:
long timeScale = [[track attributeForKey: QTTrackTimeScaleAttribute] longValue];
	printf("track time scale: %l\n", timeScale);
prints no value... it prints the "tack time scale:" part, but not the value of it
i set a break point and timeScale had the value 2997 when i mouse overed it.
Chirone is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Interpreting Geekbench scores 76ShovelHead Mac Applications and Mac App Store 2 Jan 12, 2013 09:36 PM
Interpreting RAM usage stats from Activity Monitor macbook123 MacBook Pro 11 Jul 14, 2012 08:09 PM
interpreting errors. IDMah iPhone/iPad Programming 2 Jul 14, 2012 04:57 PM

Forum Jump

All times are GMT -5. The time now is 03:54 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC