Archiving an NSMovie...
Archiving an NSMovie...
- Subject: Archiving an NSMovie...
- From: Oleg Svirgstin <email@hidden>
- Date: Tue, 18 Feb 2003 00:43:41 +0300
Hi all!
I am getting a strange problem (I am not sure, but I think I did not have
this problem with the past versions of the X, now I am using 10.2.4 + the
Glorious December Developer Tools). However, I had some problems storing
RTFD with a movie inside that might have been caused by this very problem,
too.
I am using NSMovie to record sounds. Actually, it is a mix of Cocoa timers
and QuickTime calls. It does record the sound to the FSSpec I specify, I can
play it back, I can play it forward and backward, starting and stopping at
any point.
QuickTime is rich, workable, clean etc. It is that easy to do whatever with
a movie in it.
But there are some basic things that I cannot find a way to do in Cocoa...
I need to store the resulting NSMovie species in an archive. The sound
movies are small parts of a big and complicated hierarchy of data, each of
these sounds must load at its proper place (in proper context).
Here are the ways I used:
1. I use QT OpenMovieFile + NewMovieFile (that returns a Movie, say, m) and
use
[[NSMovie allocate] initWithMovie:m]
2. I find the url corresponding to the FSSpec and init the NSMovie from that
url. With "reference:NO". Documentation tells that in this case I will have
my movie in the archive.
3. I have even tried the (2) with "reference:YES", for the case if the
documentation is as incorrect as always.
In all these cases no unarchived NSMovie holds a non-zero QTMovie unless
there exists the file it was created from (or the file previously specified
as the sequence grabber output in case of (1)).
I did not yet (a) select all Movie (b) copy it to the pasteboard and (c)
crete a NSMovie from the pasteboard. Should I?
Is it me doing something wrong? What do I misunderstand? Is there a way to
store an entire NSMovie into an archive at all?
Actually, I am using some workarounds now (my document based application
uses file wrapper to store its data). The things are still too silly, too
dirty and very complicated. There must be better ways!
Am I the only one trying to record sounds or to use QuickTime from Cocoa?
Does this horribly terribly obvious thing need a feature request from Apple?
I mean, creating at last NSMovie and NSSound capable of the real world
tasks, including sound recording into any of them? (I would also request
such features from Apple as workable, fast and reliable ProjectBuilder...
And they would tell: wow, we did not know anybody might need it! Well, PB is
immense. It is NOTHING TO DO to polish these two little classes comparing to
the amount of work needed to polish PB.)
And, finally, does anybody know of a framework (free, best if Open Source...
These are very hard times, you know...) or a sample or anything to just
record sounds and store them into archives or into an NSFileWrapper, doing
that all in Cocoa.
Sorry for too many words. This little problem made me write too many lines
of code.
Thanks in advance for any suggestion, advice, etc.
Oleg
PS I _love_ rant and OT. Most other people don't. Please, send me such
replies off the list.
_______________________________________________
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.