Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Format String ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Format String ...




On Jan 26, 2008, at 10:36 AM, ptfigg wrote:

Can I alter this code so that it only reads and displays the Video and Sound track? In fact this is how the QT Inspector handles multi track clips. It omits everything except the Video and Sound data.

Hello Paul,

What you could do is create an array of audio and video tracks only. Try the following. HTH.

Jaime


if (movie)
{
[mFormat setStringValue:@""];
NSMutableString *trackFormatStr = [NSMutableString string];

NSMutableArray *tracksArray = [NSMutableArray array];
[tracksArray addObjectsFromArray: [movie tracksOfMediaType:QTMediaTypeVideo]];
[tracksArray addObjectsFromArray: [movie tracksOfMediaType:QTMediaTypeSound]];


int i, tracks = [tracksArray count];
for (i=0; i<tracks; ++i)
{
QTTrack *track = [tracksArray objectAtIndex:i];
if ([track attributeForKey:QTTrackFormatSummaryAttribute] && ([track isEnabled] == YES))
{
NSString *formatStr = [track attributeForKey:QTTrackFormatSummaryAttribute];
if (formatStr)
{
[trackFormatStr appendString:formatStr];
[trackFormatStr appendString:@" "];
}
}
}
[mFormat setStringValue:trackFormatStr];

Jaime Magiera

Sensory Research
http://www.sensoryresearch.net

_______________________________________________
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: 
 >Format String ... (From: ptfigg <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.