• 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
Of saving a QTMovie created from a NSURL and the resulting disappointments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Of saving a QTMovie created from a NSURL and the resulting disappointments


  • Subject: Of saving a QTMovie created from a NSURL and the resulting disappointments
  • From: "Hari Seldon" <email@hidden>
  • Date: Thu, 6 Jul 2006 10:14:33 -0500

Hello Cocoa-Dev! I'm back again with another wily problem, casting
myself at your mercy.

I happily create a QTMovie from a NSURL.

movie = [QTMovie movieWithURL:URL error:nil];

(I know passing nil for 'error' is a terrible thing to do, but right
now I'm only testing against a known, local URL :))

Because I know I'll be streaming music, I also add a notification
handler for "QTMovieLoadStateDidChangeNotification". Works like a
charm.

Once my program receives the "kMovieLoadStateComplete" notification, I
give the user the opportunity to save the now fully loaded mp3/aac
file. This is where disaster occurs.

While browsing the QTMovie documentation, I thought I'd hit upon the
perfect method: writeToFile:withAttributes: I happily write a bit of
code to use the method, making sure to pass along QTMovieFlatten in
the attributes dictionary. The fully streamed mp3/aac file supposedly
appears on my desktop. Then I inspect it more carefully. I try
importing it into iTunes – instead of reporting as an "MPEG audio
file", I see "QuickTime Movie". Running a binary diff reveals huge
differences between the original and the "writeToFile:withAttributes:"
version. (Interestingly enough, this seems to duplicate the [buggy?]
behavior of "Save As Source…" in the QuickTime plug-in)

My question to you titans of code: Is there any way to save or access
the "raw" file that QTMovie so greedily holds? Barring that, would it
be possible to download the file myself (using the excellent WebKit)
and pass along chunks of data to a QTMovie? I'm at the proverbial end
of my wits. Thank you for reading my plea, and have an excellent
afternoon :)
_______________________________________________
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


  • Follow-Ups:
    • Re: Of saving a QTMovie created from a NSURL and the resulting disappointments
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Re: two-way bindings and one-way bindings
  • Next by Date: Re: Permissions in an app bundle
  • Previous by thread: Re: two-way bindings and one-way bindings
  • Next by thread: Re: Of saving a QTMovie created from a NSURL and the resulting disappointments
  • Index(es):
    • Date
    • Thread