<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>roobasoft blog &#187; QuickTime</title>
	<atom:link href="http://roobasoft.com/blog/category/quicktime/feed/" rel="self" type="application/rss+xml" />
	<link>http://roobasoft.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 18 Nov 2011 14:33:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>rooVid 1.0 beta 1</title>
		<link>http://roobasoft.com/blog/2006/02/13/roovid-10-beta-1/</link>
		<comments>http://roobasoft.com/blog/2006/02/13/roovid-10-beta-1/#comments</comments>
		<pubDate>Mon, 13 Feb 2006 10:45:58 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[3rd Party Apps]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[QuickTime]]></category>
		<category><![CDATA[roobasoft]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2006/02/13/roovid-10-beta-1/</guid>
		<description><![CDATA[rooVid 1.0 beta 1 was released today. In short, rooVid makes it easy to take one video and convert it for multiple purposes. I use rooVid [1] to convert family movies I edit in iMovie and export them in two different formats for the web, one in h.264 the other in MPEG-4. I also export [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://roobasoft.com/rooVid/rooVid.jpeg" border="0" height="64" width="64" alt="rooVid.jpeg" align="right" />
<a href="http://roobasoft.com/rooVid">rooVid</a> 1.0 beta 1 was released today.</p>

<p>In short, rooVid makes it easy to take one video and convert it for multiple purposes.  I use rooVid [1] to convert family movies I edit in iMovie and export them in two different formats for the web, one in h.264 the other in MPEG-4.  I also export these family videos to iTunes so they&#8217;re always available and backed up on my iPod.</p>

<p>Head over to the <a href="http://roobasoft.com/rooVid">rooVid&#8217;s page</a> for more info.</p>

<p>[1] Just in case it&#8217;s not clear, I wrote rooVid so I better have a use for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/02/13/roovid-10-beta-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MPEG-4 Audio == AAC</title>
		<link>http://roobasoft.com/blog/2006/01/20/mpeg-4-audio-aac/</link>
		<comments>http://roobasoft.com/blog/2006/01/20/mpeg-4-audio-aac/#comments</comments>
		<pubDate>Fri, 20 Jan 2006 11:48:53 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[QuickTime]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=39</guid>
		<description><![CDATA[In QuickTime&#8217;s export dialog, &#8220;MPEG-4 Audio&#8221; is &#8220;AAC&#8221;. Somehow iMovie and QuickTime are using a different dialog for their export &#8220;sound&#8221; options. Compare the two lists of compressors below: Default Sound options when using &#8216;MovieExportDoUserDialog&#8217; QuickTime 7 and iMovie&#8217;s dialog The QT7/iMovie dialog has some clear advantages. Shorter MPEG-4 Audio is re-worded as AAC (as [...]]]></description>
			<content:encoded><![CDATA[<p>In QuickTime&#8217;s export dialog, &#8220;MPEG-4 Audio&#8221; is &#8220;AAC&#8221;.  Somehow iMovie and QuickTime are using a different dialog for their export &#8220;sound&#8221; options.  Compare the two lists of compressors below:</p>

<table><tr><td align='center' valign='top'>Default Sound options when using &#8216;MovieExportDoUserDialog&#8217;<br />
<img src="http://roobasoft.com/blog/wp-content//DoUserDialogSound.png" border="0" height="305" width="196" alt="DoUserDialogSound.png" align="" />
</td><td align='center' valign='top'>
QuickTime 7 and iMovie&#8217;s dialog<br />
<img src="http://roobasoft.com/blog/wp-content//QTPro and iMovie Sound.png" border="0" height="229" width="198" alt="QTPro and iMovie Sound.png" align="" />
<br /></td></tr></table>

<p>The QT7/iMovie dialog has some clear advantages.</p>

<ol>
<li>Shorter
</li><li>MPEG-4 Audio is re-worded as AAC (as far as I can tell that&#8217;s the only difference).  People that see this dialog know what AAC is (most?) and know when they want it.  However, I&#8217;m doubtful that all know that MPEG-4 Audio gets you AAC (I wasn&#8217;t, hence this post).
</li><li>&#8220;None&#8221; is not an option.
</li><li>&#8220;Linear PCM&#8221; takes the place of &#8220;None&#8221; and the four int and floating point options.
</li></ol>

<p>Do we, as QuickTime developers, have access to this friendlier dialog?  Do we have to role our own?  Those are questions I&#8217;m trying to answer on the side.  I did minimal research and found nothing. Right now I can&#8217;t devote the time required to keep digging.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/01/20/mpeg-4-audio-aac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I&#8217;ll be Subscribing to ADC soon</title>
		<link>http://roobasoft.com/blog/2006/01/11/ill-be-subscribing-to-adc-soon/</link>
		<comments>http://roobasoft.com/blog/2006/01/11/ill-be-subscribing-to-adc-soon/#comments</comments>
		<pubDate>Wed, 11 Jan 2006 05:14:14 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[QuickTime]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=34</guid>
		<description><![CDATA[When I sat down tonight to work on my app, it just kept crashing. Seems a new exception, QTMovieInitializedOnWrongThread, was added to QuickTime. Searching on ADC produced 0 results. Google couldn&#8217;t even find anything about it. Fortunately, the error needs little explaining: I need to initialize my QTMovie object in the main thread. That&#8217;s easy [...]]]></description>
			<content:encoded><![CDATA[<p>When I sat down tonight to work on my app, it just kept crashing.  Seems a new exception, QTMovieInitializedOnWrongThread, was added to QuickTime.  Searching on <a href="http://developer.apple.com">ADC</a> produced 0 results.  Google couldn&#8217;t even find anything about it.  Fortunately, the error needs little explaining:  I need to initialize my QTMovie object in the main thread.  That&#8217;s easy enough for my scenario.  done.</p>

<p>If my app was shipping, I&#8217;d have mud on my face.  I guess I&#8217;ll have to scrounge up the 500 clams for the select ADC membership so I can get more of a heads up when these things are coming.  We&#8217;ll see.</p>

<p>For now I need to figure out if I missed something that said QTMovie initialization needs to be done in the main thread and why.</p>

<p><b>update:</b>  Thankfully, I&#8217;m not alone.  <a href="http://www.felix-schwarz.org">Felix Schwarz</a> <a href="http://www.felix-schwarz.org/2005/11/24/qtkit-thread-safety/">writes</a>:</p>

<blockquote>
In short: every developer who wants to background Quicktime operations in threads in order to not block the user interface for the duration of Quicktime calls has a tough time.
</blockquote>

<p><b>update 2:</b>  Tim Monroe of QT engineering <a href="http://lists.apple.com/archives/QuickTime-API/2005/Aug/msg00100.html">states</a>:</p>

<blockquote>However, we have recently uncovered some issues when working with QTMovie objects on a background thread, even when doing things the &#8220;right way&#8221;. We are hoping to provide a more thread-safe QTKit soon.</blockquote>

<p>Although I like my current use of NSThread&#8217;s, I can&#8217;t afford to test, debug and deal with &#8220;issues&#8221;.  So, back to the drawing board.  Right now I&#8217;m looking at using a helper application (that&#8217;s actually how QuickTime Player does it&#8217;s export) communicating via <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/DistrObjects/index.html#//apple_ref/doc/uid/10000102i">distributed objects</a>.  Live and learn.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2006/01/11/ill-be-subscribing-to-adc-soon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>.iMovieProject/Cache/Timeline Movie.mov</title>
		<link>http://roobasoft.com/blog/2005/12/17/imovieprojectcachetimeline-moviemov/</link>
		<comments>http://roobasoft.com/blog/2005/12/17/imovieprojectcachetimeline-moviemov/#comments</comments>
		<pubDate>Sun, 18 Dec 2005 03:38:08 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[QuickTime]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=22</guid>
		<description><![CDATA[I&#8217;m interested in being able to take an iMovie project and directly transcode that to some other movie type from within my software. My first thought was to learn how to parse the .iMovieProject and put the movie together myself. This scared me. After depressingly staring at a sample project&#8217;s XML for some time I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m interested in being able to take an iMovie project and directly transcode that to some other movie type from within my software.  My first thought was to learn how to parse the .iMovieProject and put the movie together myself.  This scared me. After depressingly staring at a sample project&#8217;s XML for some time I hoped there was an easier way.  Well, I found some <a href="http://www.cocoadev.com/index.pl?ILifeMediaBrowser">example code</a> to get a thumbnail from an iMovie project and I noticed it was looking at &#8220;Cache/Timeline Movie.mov&#8221;.  I looked into a few of my projects.  Sure enough, each project has a Timeline Movie.mov in it&#8217;s Cache directory.  This .mov is the current state of the iMovie&#8217;s timeline.  So all I need to do is use that file as the input for the transcode and all will be well.  This was a nice surprise.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2005/12/17/imovieprojectcachetimeline-moviemov/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Note to self:  Nothing&#8217;s easy</title>
		<link>http://roobasoft.com/blog/2005/12/05/note-to-self-nothings-easy/</link>
		<comments>http://roobasoft.com/blog/2005/12/05/note-to-self-nothings-easy/#comments</comments>
		<pubDate>Tue, 06 Dec 2005 04:35:21 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Other]]></category>
		<category><![CDATA[QuickTime]]></category>
		<category><![CDATA[roobasoft]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=14</guid>
		<description><![CDATA[Reminder: A QTAtomContainer is a Handle, a Handle is a Ptr *, a Ptr is a char *, so a Ptr * is a char **. If you want the data that a Handle points to you get it via *yourHandle. Yowza. Yes, I&#8217;m new here. So, remember: typedef Handle QTAtomContainer; typedef Ptr * Handle; [...]]]></description>
			<content:encoded><![CDATA[<p>Reminder:  A QTAtomContainer is a Handle, a Handle is a Ptr *, a Ptr is a char *, so a Ptr * is  a char **.  If you want the data that a Handle points to you get it via *yourHandle.  Yowza.  Yes, I&#8217;m new here.</p>

<p>
So, remember:

<pre class="code">
typedef Handle                      QTAtomContainer;
typedef Ptr *                       Handle;
typedef char *                      Ptr;

// QTAtomContainer is really just
// char **

</pre>

I&#8217;m comfortable working with pointers and pointers to pointers, but if you didn&#8217;t notice that the typedef chain made what looked like a pointer really a pointer to a pointer well, I&#8217;m not so good at that.  In reality I should have seen &#8216;Ptr *&#8217; and read &#8220;pointer to a pointer&#8221;.  Ugh.  This seriously cost me close to whole night.

On a more positive note, <a href="http://developer.apple.com/macosx/coredata.html">CoreData</a> is *the* cat&#8217;s meow.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2005/12/05/note-to-self-nothings-easy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>QT Export Dialog &#8211; So What Did They Choose?</title>
		<link>http://roobasoft.com/blog/2005/12/05/qt-export-dialog-so-what-did-they-choose/</link>
		<comments>http://roobasoft.com/blog/2005/12/05/qt-export-dialog-so-what-did-they-choose/#comments</comments>
		<pubDate>Mon, 05 Dec 2005 11:01:59 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[QuickTime]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=13</guid>
		<description><![CDATA[In the previous post, &#8220;Show user QT&#8217;s Export Video Dialog&#8220;, I showed how to present the user with the standard QuickTime export settings dialog. The next question should be &#8220;How can I figure out what they selected?&#8221;. For me, I only want to know certain settings for display purposes. If the user chooses h.264 @ [...]]]></description>
			<content:encoded><![CDATA[<p>In the previous post, &#8220;<a href="http://roobasoft.com/blog/2005/12/02/show-user-qts-export-video-dialog/">Show user QT&#8217;s Export Video Dialog</a>&#8220;, I showed how to present the user with the standard QuickTime export settings dialog.  The next question should be &#8220;How can I figure out what they selected?&#8221;.  For me, I only want to know certain settings for display purposes.  If the user chooses h.264 @ 320&#215;240 I&#8217;d like to be able to remind them of that later.  The settings useful for display purposes are minimal, and that&#8217;s all I cover here.  To get dirtier, I&#8217;ll leave some links throughout the doc and a summary at the end.</p>

<p>

I wrote a QTSettingsParser that stores the following:
<br />
<pre class="code">
@interface QTSettingsParser : NSObject {
    CodecType   codecType;
    Fixed       width;
    Fixed       height;
    Fixed       frameRate;
    long        dataRateBytes;
}
</pre>
<br />

To parse the data I have one static initializer function and one, should be private but I&#8217;m lazy, helper function:

<pre class="code">
+ (QTSettingsParser *) initWithContainer:(QTAtomContainer) 
                    aContainer;

- (void) parseAtom:(QTAtomContainer) container 
                    withAtom:(QTAtom) atom 
                    ofType:(QTAtomType) type;
</pre>

<br />

At the end of the previously mentioned <a href="http://roobasoft.com/blog/2005/12/02/show-user-qts-export-video-dialog/">post</a> we had a QTAtomContainer.  Now we have an QTSettingsParser with the details of what I care about easily accessible.  The interesting code is in initWithContainer and parseAtom, let&#8217;s take a look.

</p>

<p>

The static initializer is easy:
<pre class="code">
+ (QTSettingsParser *) initWithContainer:(QTAtomContainer) 
                                              aContainer
{
    QTSettingsParser *settings = 
                     [[QTSettingsParser alloc] init];
    [settings parseAtom:aContainer withAtom:nil ofType:nil];
    return settings;
}
</pre>

The more interesting code is in the recursive function, parseAtom:
<pre class="code">
- (void) parseAtom:(QTAtomContainer) container 
                   withAtom:(QTAtom) atom 
                   ofType:(QTAtomType) type 
{
    QTAtomType cur = nil;

    // do we have any data?
    Ptr data;
    long dataSize;
    OSErr result = QTGetAtomDataPtr(container,atom,&#038;dataSize,&#038;data);

    // yes, we could conditionally GetAtomDataPtr, 
    // but this keeps things nice and simple.
    if( result == noErr )
    {
        if( type == movieExportWidth )
        {
            [self setWidth:*(Fixed*)data];
        }
        else if( type == movieExportHeight )
        {
            [self setHeight:*(Fixed*)data];
        }
        else if( type == scSpatialSettingsType )
        {
            SCSpatialSettings *settings = 
                      (SCSpatialSettings *)data;
            [self setCodecType:settings->codecType];
        }
        else if( type == scDataRateSettingsType )
        {
            SCDataRateSettings *settings = 
                      (SCDataRateSettings *)data;
            [self setDataRateBytes:settings->dataRate];
        }
        else if( type == scTemporalSettingsType )
        {
            SCTemporalSettings *tempSettings =
                      (SCTemporalSettings *)data;
            [self setFrameRate:tempSettings->frameRate];
        }
    }

    // go through all the children hunting for more.
    while( cur = QTGetNextChildType (  container,  
                                       atom,  cur ) )
    {
        // we have children
        int childCount = QTCountChildrenOfType( 
                                 container, atom, cur );
        int i;
        for(i = 1; i < = childCount; i++)
        {
            QTAtom nested_atom;
            nested_atom = QTFindChildByIndex( 
                               container, atom, cur, i, nil );
            [self parseAtom:container 
                             withAtom:nested_atom ofType:cur];
        }
    }
}

</pre>

What's going on here?  The function call to QTGetAtomDataPtr get's us a pointer to the current atom.  When the static function called this, it passed in a nil atom which will cause QTGetAtomDataPtr to error out.  So we skip the err == noErr block and end up at the while loop.  The while loop ensures we see every atom.  QTGetNextChildType returns a type.  A QTAtomType is an array of four characters defining some type.  Next we get the children of that type and call parseAtom again to look at its contents as well to parse its potential children.  This just happens over and over until we see every individual atom.  Next question is, "OK, we have an atom, it's data ptr and a length, what the heck's inside?"
<p>
I spent a lot of time trying to figure out what the data pointed to for each QTAtomType that I found.  The doc that finally got me on the right path was the <a href="http://developer.apple.com/documentation/QuickTime/APIREF/scgetinfo.htm">SCGetInfo</a> doc.  Unfortunatly, SCGetInfo didn't work for me (otherwise I wouldn't need this recursion).
</p><p>
How to find out more:  When I started this I didn't know where the CodecType or the frame rate or anything would be stored.  So I had to dump the QTAtomType's I saw as a string (remember, it's just a character code) and try to fumble through docs to figure out what was what.  Fortunately most of the character codes make sense and most are defined in <a href="http://developer.apple.com/samplecode/SlideShowImporter/listing2.html">QuickTimeComponents.h</a>.  At first I saw that the movieExportHeight was a 4 byte value.  I assumed it was a unsigned int.  That was wrong.  Turns out the height and width are a 'Fixed' value (FixedToFloat() is handy).  I found this out by finding some sample code in <a href="http://developer.apple.com/samplecode/BackgroundExporter/BackgroundExporter.html">BackgroundExporter</a> or <a href="http://developer.apple.com/samplecode/ThreadsExportMovie/ThreadsExportMovie.html">ThreadsExportMovie</a>.  I forget which one.

</p><p>
Unfortunately, trial and error and the dumping of hex characters seems to be the only route we have to figure out what's in these pointers.  Well, that and looking at sample code.  In reality, I hope that statement is wrong.  I really hope somewhere there is a nice doc explaining each type and its payload definition and that I just couldn't find it.  If that document doesn't exist then I either don't understand something important, or it's just crazy.
</p><p>
<b>Links:</b>
<br />
<a href="http://developer.apple.com/documentation/QuickTime/APIREF/WorkingWithQTAtoms.htm">Working with QT Atoms</a>
<br />
<a href="http://developer.apple.com/documentation/QuickTime/APIREF/scgetinfo.htm">SCGetInfo</a> - just remember, the actual function didn't work for me, but some payload types are in the doc.
<br />

</p><p>
<b>Useful sample code:</b>
<br />
<a href="http://developer.apple.com/samplecode/BackgroundExporter/BackgroundExporter.html">BackgroundExporter</a>
<br />
<a href="http://developer.apple.com/samplecode/ThreadsExportMovie/ThreadsExportMovie.html">ThreadsExportMovie</a>

</p><p>
<b>What's Next?</b>
<br />
I can now present the user with the QuickTime export settings and programmatically figure out what items of interest they selected.  The next work item for me on this project is to get some settings persisted and touch up the UI a bit.  I look forward to spending some quality time back with Cocoa.  Seriously, these QuickTime API's make me feel dumb.  Cocoa makes me feel smart.  Anyway, I don't plan to post about persisting data or fumbling with UI's, that's already <a href="http://cocoadevcentral.com/">all over</a> <a href="http://www.cocoabuilder.com/archive/bydate">the</a> <a href="http://cocoadev.com/">place</a> and, <a href="http://readingrainbow.com/">you don't have to take my word for it</a>.</p></pre></p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2005/12/05/qt-export-dialog-so-what-did-they-choose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show user QT&#8217;s Export Video Dialog</title>
		<link>http://roobasoft.com/blog/2005/12/02/show-user-qts-export-video-dialog/</link>
		<comments>http://roobasoft.com/blog/2005/12/02/show-user-qts-export-video-dialog/#comments</comments>
		<pubDate>Fri, 02 Dec 2005 05:07:12 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[QuickTime]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=9</guid>
		<description><![CDATA[I want to write down how I&#8217;m presenting the QuickTime compression dialog. This post will be followed by another post describing how to figure out some of the information of what the user selected from the presented dialog. First things first, displaying the dialog: ComponentInstance component = OpenDefaultComponent(MovieExportType, kQTFileTypeMovie); Boolean canceled; MovieExportDoUserDialog(component, NULL, NULL, 0, [...]]]></description>
			<content:encoded><![CDATA[<p>I want to write down how I&#8217;m presenting the QuickTime compression dialog.  This post will be followed by another post describing how to figure out some of the information of what the user selected from the presented dialog.  First things first, displaying the dialog:
<code><br />
    ComponentInstance component = OpenDefaultComponent(MovieExportType, kQTFileTypeMovie);
    Boolean canceled;
    MovieExportDoUserDialog(component, NULL, NULL, 0, 0, &#38;canceled);
    QTAtomContainer settings = nil;</code></p>

<pre><code>MovieExportGetSettingsAsAtomContainer(component, &amp;#38;settings);
</code></pre>

<p></p>

<p>That wasn&#8217;t so bad.  If we wanted to use something other than the defaults, it gets a lot messier quickly, but that&#8217;s not me.  With this, the user is presented with the default &#8216;export settings&#8217; dialog.  At the end of those five lines, we&#8217;re left with a QTAtomContainer that describes what the user selected.  What&#8217;s a QTAtomContainer?  Good question.  While researching this I found a very fitting quote on a cocoa mailing list:</p>

<p>&#8220;Hang in there, QT Programming can be frustrating in the beginning but soon you go AHA!&#8221;</p>

<p>I&#8217;m still waiting for my AHA.  I&#8217;m certainly getting closer daily, but I think I&#8217;m still a ways out.  Oh, right, QTAtomContainer.  Here&#8217;s my understanding:</p>

<p>A QTAtomContainer is a chunk(s) of memory[1] that describes some QT settings.  A QTAtom points inside that region of memory.  The container contains many QTAtoms.  You use funky functions to navigate, add, remove, get and set QTAtoms.  See <a href="http://developer.apple.com/documentation/QuickTime/APIREF/WorkingWithQTAtoms.htm">http://developer.apple.com/documentation/QuickTime/APIREF/WorkingWithQTAtoms.htm</a>.</p>

<p>[1] it&#8217;s unclear to me if the memory is one contiguous chunk or a linked list of chunks</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2005/12/02/show-user-qts-export-video-dialog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s my first day</title>
		<link>http://roobasoft.com/blog/2005/11/30/its-my-first-day/</link>
		<comments>http://roobasoft.com/blog/2005/11/30/its-my-first-day/#comments</comments>
		<pubDate>Thu, 01 Dec 2005 03:56:31 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[QuickTime]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/?p=7</guid>
		<description><![CDATA[As previously stated, I&#8217;m working with the QuickTime API&#8217;s. Well, one thing I want to do is display a QuickTime compression settings dialog and be able to get some information about what the user selected. Today I wanted to get the selected compressions codec in the nice, human readable, string. First stop, the docs. Oh [...]]]></description>
			<content:encoded><![CDATA[<p>As previously stated, I&#8217;m working with the QuickTime API&#8217;s.  Well, one thing I want to do is display a QuickTime compression settings dialog and be able to get some information about what the user selected.  Today I wanted to get the selected compressions codec in the nice, human readable, string.  First stop, the docs.  Oh nice, a <span style="font-family:monospace;font-size:10pt;">GetCompressionName</span> function.  That <strong>has</strong> to be what I need.  Whip up a quick test, run it.  Results?  Error, -223.  What!?  Quick error code lookup says -223 is &#8220;<span style="font-family:monospace;font-size:10pt;">siInvalidCompression</span>&#8220;.  Odd, I passed in a codec I know exists on my machine.  I&#8217;m even using a constant defined in the QuickTime headers.</p>

<p>Many hours pass.  Heads hit keyboards.</p>

<p>I&#8217;ve given up.  When I get more experience I plan to post this question to the QuickTime API&#8217;s mailing list, but for now I&#8217;m going to call it a bug and move on.  Of course I only gave up after finding an alternative solution:
<pre>+ (void) GetCompressionName:(CodecType) type name:(Str31)aName
{
    aName[0] = 0;</pre></p>

<pre><code>CodecNameSpecListPtr    list;
OSErr err = GetCodecNameList(&amp;#38;list, 1); 

if( err != noErr )
{
    NSLog(@"GetCodecNameList err=%d", err);
    return;
}

int i;
for( i = 0; i &amp;lt; list-&amp;gt;count; i++ )
{
    if( list-&amp;gt;list[i].cType == type )
    {
        memcpy(aName, list-&amp;gt;list[i].typeName, list-&amp;gt;list[i].typeName[0]+1);
        return;
    }
}

NSLog("No match found");
return;
</code></pre>

<p>}
Use this like:
<pre>
Str31 sname;
[YourOBJ GetCompressionName:kDVCPALCodecType name:sname];</pre></p>

<p>Where kDVCPALCodecType is a <a href="http://developer.apple.com/documentation/QuickTime/APIREF/CodecIdentifiers.htm">Codec Identifier</a>.  Also of interest is the fact that the h.264 codec is not listed in that document.  It&#8217;s identifier is &#8216;avc1&#8242; and it&#8217;s enum name is <span style="font-family:monospace;font-size:10pt;">kH264CodecType</span>.  Although not documented, it works fine if passed into the above <span style="font-family:monospace;font-size:10pt;">GetCompressionName</span>, spitting out &#8220;h.264&#8243;.</p>

<p><strong>Disclaimer:  </strong>It&#8217;s my first day.  If someone can explain why <span style="font-family:monospace;font-size:10pt;">GetCompressionName(kH264CodecType, name) </span>is failing I&#8217;d love to know.  I imagine it&#8217;s something I&#8217;m missing, but just what, I&#8217;m not sure.  Like I mentioned earlier, I&#8217;ll post this to the QuickTime mailing list later, when I feel more educated.  No one wants to get flamed on their first day.</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2005/11/30/its-my-first-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://roobasoft.com/blog/2005/11/26/welcome/</link>
		<comments>http://roobasoft.com/blog/2005/11/26/welcome/#comments</comments>
		<pubDate>Sun, 27 Nov 2005 00:13:26 +0000</pubDate>
		<dc:creator>BrianC</dc:creator>
				<category><![CDATA[Cocoa]]></category>
		<category><![CDATA[QuickTime]]></category>
		<category><![CDATA[roobasoft]]></category>

		<guid isPermaLink="false">http://roobasoft.com/blog/2005/11/26/welcome/</guid>
		<description><![CDATA[I&#8217;m starting a blog. For my current project, RooVert, I&#8217;m fumbling through QuickTime API&#8217;s. Normally when I&#8217;m doing something new, the web has most of the answers. If the full answer is not there, I&#8217;m often pointed in the right direction. Well, the area of the QuickTime API I&#8217;m playing with has little to no [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m starting a blog.  For my current project, RooVert, I&#8217;m fumbling through QuickTime API&#8217;s.  Normally when I&#8217;m doing something new, the web has most of the answers.  If the full answer is not there, I&#8217;m often pointed in the right direction.  Well, the area of the QuickTime API I&#8217;m playing with has little to no presence on the web.  Although thoroughly documented, I&#8217;m finding the documentation to be hard to grok (the reference PDF is 2000+ pages) and am only getting small pointers of information from example applications.  The initial goal of this blog is to document my journey through the QuickTime API&#8217;s, jotting down lessons learned, bugs found and what to use when, where and how.  The hope is that someone will find this information useful, if not, that&#8217;s O.K., it will at least provide me with some reminders.  I may also write down other quips here and have no idea where it will go when I&#8217;m done mucking with the QuickTime API&#8217;s.  Time will tell.</p>

<p>All code mentioned will be <a href='http://developer.apple.com/cocoa/'>Cocoa</a>.  That&#8217;s what I do (well, am trying to do).</p>
]]></content:encoded>
			<wfw:commentRss>http://roobasoft.com/blog/2005/11/26/welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

