Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Importing bitmap sequence - setting correct fps



Hi all,

I still havent find the solution to the problem I posted this Monday.
I will try to be more specific this time. Maybe some merciful soul can help
this QT newbie out? Please? :]

What I am trying to do:

Import a sequence of bitmap images - bitmap_1, bitmap_2, ..., bitmap_N - into
a QuicktTime Movie and set the correct movie rate/fps/durationPerSample.

Problem:

I cant set the movie rate/fps/durationPerSample.

I will walk you thru my code.



OSErr err = noErr;
Movie movie = 0;
MovieImportComponent movieImporter = 0;
Track usedTrack;
long outFlags;
TimeValue addedDuration;


// Init the movieImporter
err = OpenADefaultComponent( MovieImportType, GraphicsImporterComponentType,
&movieImporter );

// Set so the movieImporter will import the sequence and not just the first
bitmap.
GraphicsImageImportSetSequenceEnabled( movieImporter, true );

// Create the movie to hold the sequence
movie = NewMovie(newMovieActive);

// Import the sequence to movie.
err = MovieImportFile( movieImporter, &myFSSpec, movie, nil, &usedTrack, 0,
&addedDuration, 0, &outFlags );

myFSSpec points to the "bitmap_1". The import goes well, and I am able to play
the movie.

PROBLEM:
The frame rate is defaulting to 15 frames per second.
I need to be able to set the frame rate to any value in the range of [ 0.0 ,
30.0 ].

QUESTION:

How can I set the frame rate of the MovieImportComponent to the value I
specify?


The function MovieImportDoUserDialog(...) takes the MovieImportComponent as
input and changes the frame rate of the MovieImportComponent to one of the 15
values that the user are able to choose from in the dialog presented to
him/her.

I want to do the same thing that this function does, w/o the user dialog and
with the framerate specified by me - not the user.

Who knows how you do this?

/Jonatan
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.