One of our applications uses the QuickTime API to extract uncompressed video
frames from files supported by QuickTime. A couple of files in my test batch
are 3GP files containing H.263 video w/AMR nb audio. Under QuickTime 6.x these
files presented no problems. Since upgrading to QT7, this is no longer the case.
The trouble I'm experiencing is fairly straightforward. Attempts to seek within
the video stream report success, but when I attempt to get the video data I
receive the first frame's decoded data no matter what value I pass to
SetMovieTimeValue(), and at this point I can't determine what I'm doing wrong.
Here's the relevant source code:
// the_movie: movie handle from NewMovieFromFile()
// index: TimeValue in movie's time scale
// set time...
SetMovieTimeValue( the_movie, index);
UpdateMovie( the_movie);
MoviesTask( the_movie, 0);
// FYI: at this point, a call to GetMovieTimeValue returns index,
// as expected
// values for FCompressImage args:
// bounds = m_pixMap bounds; m_pixMap bounds same as the video source
// depth is 24 in this case
// spatial_quality = codecMaxQuality
// codec_type = kBMPCodecType
// the_codec = anyCodec
// buffer size is the size reported by a call to GetMaxCompressionSize using
// the same parameters passed to FCompressImage; not that it really matters...
// image_desc was just alloc'd via a call to NewHandleClear
FCompressImage(m_pixMap, &bounds, depth, spatial_quality,
codec_type, the_codec, 0, 0, 0, 0, 0,
image_desc, buffer.GetBuffer());
At this point I'm expecting my buffer to contain data from the nearest time to
that which I passed to SetMovieTimeValue. When QT6 is present on the test PC, I
get what I'm expecting. When QT7 is present, I get frame 0. Every time. This
code works fine for every other file imported via QuickTime that I've encountered.
Notes on my .3gp files:
- both .3gp files that show this problem contain H.263 video w/AMR-nb audio,
as stated above
- both .3gp files with this problem show timescales of 1000 for the movie, and
48000 for the video track media
The .3gp files that don't exhibit this problem have matching time scales for the
movie and video track media. If this is the source of the problem, what must I
do to remedy it (QT docs currently state that QT will handle time scale
differences for me, is that really the case or an oversight?)? I have attempted
adjusting track media time scale to match the movie time scale, and vice versa
to no avail. I have also attempted adjusting the index value passed to
SetMovieTimeValue to be in video track media timescale; also no change, and I
would think this is invalid anyway.
Has anyone else seen this problem? Is there a work around?
Thanks in advance for any help anyone can provide.
Regards,
tom
--
Tom Finegan
On2 Technologies
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden