• 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
FSSpec for saving a movie with FlattenMovieData() from an NSString*?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FSSpec for saving a movie with FlattenMovieData() from an NSString*?


  • Subject: FSSpec for saving a movie with FlattenMovieData() from an NSString*?
  • From: "Michael B. Johnson" <email@hidden>
  • Date: Sun, 21 Apr 2002 22:22:12 -0700

So I have a QuickTime movie that I've made, and I've confirmed that I've got a valid qt movie by init'ing an NSMovie with it and putting it in an NSMovieView and it looks fine. My problem is dealing with FlattenMovieData(), which wants an FSSpec. I believe that an FSSpec is the data type in Carbon that you give any function that needs a file path, but for the life of me, I can't figure out how to go from @"/tmp/foo.mov" to an FSSpec that it likes. I've spelunked through all the sample Cocoa code I have that plays nice with Carbon, and tried a few things, but I *know* this must be trivial, but I haven't stumbled on the magic incantation to get it to work.

Searching on www.apple.com/developer is singularly unhelpful; I actually only got 4 hits with FSSpec - I expected to get 8billion (i.e. like searching for FILE* in man pages or somesuch).

Here's the first thing I tried:

FSSpec fsspec;
Str255 movieNameString;
CopyCStringToPascal([fileName cString], movieNameString);
FSMakeFSSpec(0, 0, movieNameString, &fsspec);

and then the next one was:
NSURL *fileUrl = [NSURL fileURLWithPath:fileName];
FSSpec fileFSSpec;
FSRef fileFSRef;

// get an FSRef for our file
Boolean gotFSRef = CFURLGetFSRef((CFURLRef)fileUrl, &fileFSRef);
// get an FSSpec for the same file
status = FSGetCatalogInfo(&fileFSRef, kFSCatInfoNone, NULL, NULL, &fileFSSpec, NULL);

I'm stumbling around in the dark here... Thanks.


--> Michael B. Johnson, Ph.D. -- email@hidden
--> Studio Tools, Pixar Animation Studios
--> http://xenia.media.mit.edu/~wave
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: FSSpec for saving a movie with FlattenMovieData() from an NSString*?
      • From: "Timothy J. Wood" <email@hidden>
  • Prev by Date: OT: Darwin -- Devils own OS
  • Next by Date: << do not localize >>
  • Previous by thread: OT: Darwin -- Devils own OS
  • Next by thread: Re: FSSpec for saving a movie with FlattenMovieData() from an NSString*?
  • Index(es):
    • Date
    • Thread