Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Resampling movie geometry, again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Resampling movie geometry, again



Hello -

I sent an earlier post asking about the resampling of movies. I have
stumbled across an example of such a process. It uses
MovieExportFromProceduresToDataRef.

I am having some problems.

Specifically, it is not obvious to me how to properly set up the
callbacks. I also do not know how the callbacks send data from the
source movie to the destination movie.

My questions are:
1. How am I expected to send in the video data with the callback? Can
I do it track at a time? Picture at a time? How do I format the
track/pic so that the exporter can read it?
2. If I only specify video, will the audio be automatically converted?
3. How do I properly assign a gVideoDataProcUPP to the callbacks?

For example, my call to MovieExportFromProceduresToDataRef looks like

//declare callbacks
pascal OSErr getVideoPropertyProc(void *refcon, long trackID,
OSType propertyType,
void *propertyValue)
{
//Specify Height/Width no problems here
}

pascal OSErr getVideoDataProc(void *refcon,
MovieExportGetDataParams *params)
{
//??? How/what do I pass back in params to convert
//a track of data???
}

...

//Assign up the UPPs, this code does not compile
//Any ideas?
gVideoPropProcUPP = NewMovieExportGetPropertyProc(getVideoPropertyProc);
gVideoDataProcUPP = NewMovieExportGetDataProc(getVideoDataProc);

//Make the call to MovieExportAddDataSource
long track_id = GetTrackID(...);
long refcon;
err = MovieExportAddDataSource(myExporter,
VideoMediaType,
GetMovieRate(m_movie),
&track_id,
gVideoPropProcUPP,
gVideoDataProcUPP,
void*)&refcon);

//end of snippet

The NewMovieExportGetPropertyProc #defines do not seem to work at all.
I may not be using them properly.

I'd love to hear your ideas/suggestions!

Thanks in advance,
Peter Doege




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.