• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Codec type from QTMovie/QTMedia/QTTrack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Codec type from QTMovie/QTMedia/QTTrack


  • Subject: Re: Codec type from QTMovie/QTMedia/QTTrack
  • From: Tim Monroe <email@hidden>
  • Date: Mon, 8 Aug 2005 08:51:43 -0700


On Aug 7, 2005, at 11:28 AM, Ben Braken wrote:

I've been trawling through the QuickTime / Cocoa API and have been
unsuccessful in finding a simple way to determine the codec type of
separate tracks in QTMovie/QTTrack/QTMedia objects. I'm relatively new
to programming on Macs, and have been pretty much confined to Cocoa and
Objective-C, so finding/using the pure C functions which are the
quicktime API is quite a tedious and time consuming task.

[SNIP]

What I'm wonder if there's a high level method for a QTTrack or QTMedia
object for retrieving codec type, or a single function from the
QuickTime API which I've just totally missed, or is going through and
using 4 separate functions to get 4 bytes of information the only way?

Try this:

ImageDescriptionHandle desc = (ImageDescriptionHandle)NewHandleClear(sizeof(ImageDescription));

GetMediaSampleDescription([media quickTimeMedia], 1, (SampleDescriptionHandle)desc);



After calling GetMediaSampleDescription, then (**desc).cType should have the codec type you are looking for. Don;t forget to dispose of the memory:


			...
			DisposeHandle((Handle)desc);


Tim Monroe QuickTime Engineering email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: [Moderator] Take to carbon-dev (Re: Creation of a file???)
  • Next by Date: Re: NSOutlineView selectable only children
  • Previous by thread: Re: Codec type from QTMovie/QTMedia/QTTrack
  • Next by thread: Part of an NSAttributedString that fir a rectangle ?
  • Index(es):
    • Date
    • Thread