QTKit for creating movies
QTKit for creating movies
- Subject: QTKit for creating movies
- From: Edwin Vane <email@hidden>
- Date: Sun, 25 Sep 2005 23:38:38 -0400
- Mail-followup-to: Cocoa-Dev <email@hidden>
Hi,
I doubt anybody can answer this but I thought I'd at least try...
I have a movie with a single video track loaded into an application I'm
writing using QTKit in
which I'm going to add a soundtrack. The media for this track is a
custom media type (ie, I wrote a derived media handler for it). I'm
basically porting older code that uses the normal QT API so I have
a version of code that does indeed work (ie, I can add tracks to a movie
and play them back). However, with the QTKit, my soundtrack never
plays back.
By comparing the debug output of my component in both QTKit settings and
normal QT settings, I see the sequence of component calls is not the
same. In fact, with QTKit, I continually get MediaIdle calls with the
'time' parameter set to -1.
So my question: is there anything fancy I must do (to perhaps the
QTMovieView) to make newly added tracks play back correctly when using
QTKit?
For curiosity, here's the code I use to add a track (with empty media).
It was adapted from the Apple Technote for adding tracks to QTMovies.
Media gets added later one sample at a time between a pair of calls to
Begin/End Media Edits.
emusTrack = NewMovieTrack([self quickTimeMovie], 0, 0, kFullVolume);
require (GetMoviesError() == noErr, NEWTRACK_ERROR);
// Create a track with 'EMus' data with the dataRef being the movie's
// default data ref.
emusMedia = NewTrackMedia(emusTrack, 'EMus', 1000, NULL, 0);
require (GetMoviesError() == noErr, TRACKMEDIA_ERROR);
InsertMediaIntoTrack (emusTrack, 0, 0, duration.timeValue, (1L<<16));
require (GetMoviesError() == noErr, INSERTMEDIA_ERROR);
newTrack = [QTTrack trackWithQuickTimeTrack:emusTrack error:nil];
The difference is I use the movie's default data ref (which I hope is
what happens when I specify NULL as the media data ref).
--
Edwin Vane
MMath Candidate
Computer Graphics Lab
School of Computer Science
University of Waterloo
_______________________________________________
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