Re: Re: How to access to clip format description from QuickTime API?
Re: Re: How to access to clip format description from QuickTime API?
- Subject: Re: Re: How to access to clip format description from QuickTime API?
- From: Raul <email@hidden>
- Date: Tue, 26 Sep 2006 12:20:58 +0200
Thanks for your code , Robert.
Unfortunately , it doesn't work for mpeg files.
2006/9/25, Robert Martin <email@hidden>:
This really is not an XCode issue - the Quicktime list is the right
place for this question.
However, you might try something along the lines of:
//----------------------------------------------------------------------
-
-(NSDictionary*) vidAttributes
//----------------------------------------------------------------------
-
{
NSMutableDictionary * attr = [NSMutableDictionary dictionary];
NSString * str = nil;
OSErr anErr = noErr;
Media aMedia = NULL;
OSType aMediaType;
aMedia = [self firstVideoMedia]; // assuming you have a method to
get this
GetMediaHandlerDescription(aMedia, &aMediaType, 0, 0);
SampleDescriptionHandle anImageDesc = NULL;
anImageDesc = (SampleDescriptionHandle)NewHandle(sizeof
(SampleDescription));
GetMediaSampleDescription(aMedia, 1, anImageDesc);
anErr = GetMoviesError();
if(anErr != noErr)
{
DisposeHandle((Handle)anImageDesc);
return nil;
}
// look in the docs for the complete list of attributes you can query...
// this will give you the name - ie: Sorensen 3 or whatever...
// stringWithPString is just a string category I use
str = [NSString stringWithPString:(*(ImageDescriptionHandle)
anImageDesc)->name ];
[attr setObject:str forKey:@"codec"];
DisposeHandle((Handle)anImageDesc);
return attr;
}
On Sep 25, 2006, at 3:43 PM, Raul wrote:
> Thanks for your info.
>
> I get the movie track with QTMovie tracksOfMediaType:QTMediaTypeVideo.
> And also get QTMedia but i don't know what to do with
> GetMediaSampleDescription() to get Video Codec Format Description.
>
> I search in google , but only find one example in C and i am
> programing in Objective-C.
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden