Re: string encoding in NSMutableData
Re: string encoding in NSMutableData
- Subject: Re: string encoding in NSMutableData
- From: Jaime Magiera <email@hidden>
- Date: Wed, 8 Aug 2007 23:17:54 -0400
On Aug 8, 2007, at 5:50 PM, Paolo Manna wrote:
On 08/08/07, John Stiles <email@hidden> wrote:
I think going to NSString and NSData might be a little overkill given
that the actual type in question appears to just be an OSType (which
is just an int, nothing more). Why all the handstands here?
True, if we really start from a string (that is needed as a
NSDictionary key anyway, according to the posted code), and it will be
used just as an OSType a QTOSTypeForString() call would be enough...
But, I don't want to make assumptions how that will be used: for
example, if you're going to interact with QTKit, you could end up in
principle working with NSData in many places...
Too little code posted to decide what's actually the best solution!
Sorry, I thought the reference to QuicktimeAtoms would provide
context. The NSData is created from a MP4 file on disk. I'm adding/
removing bytes to that NSData (MP4 Atoms/boxes), then writing it back
out to disk. "a9415254" is the header of the Author metadata atom.
For more reference...
http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt
If there is a wiser way look at this problem, I'm all ears. It's new
territory.
Jaime Magiera
Sensory Research Network
http://www.sensoryresearch.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden