MovieImportDataRef(Handle) and SetOffsetAndLimit fails
When using oggvorbis component with my app, MovieImportDataRef() with a subtype HandleDataHandlerSubType fails. HandleDataHandler doesn't seem to support DataH****64() on the current QuickTime 7. Also, MovieImportSetOffsetAndLimit() isn't working, when trying to point the data in the archived file.
The API sequences are roughly like this:
Handle data, dataRef; ComponentInstance ci;
Movie movie; TimeValue duration; Track track; long flags;
assert((data = NewHandle(size_of_oggvorbis_data)) != NULL);
memcpy(*data, ptr_of_oggvorbis_data, size_of_oggvorbis_data);
assert(PtrToHand((Ptr)&data, &dataRef, sizeof(Ptr)));
assert(OpenADefaultComponent(MovieImportType, 'OggS', &ci));
assert((movie = NewMovie(newMovieActive)) != NULL);
assert(MovieImportDataRef(ci, dataRef, HandleDataHandlerSubType, movie,
NULL, &track, 0, &duration, movieImportCreateTrack, &flags));
assert(OpenADefaultComponent(MovieImportType, 'OggS', &ci));
assert(MovieImportSetOffsetAndLimit(ci, data_offset, data_offset + data_size));
assert(MovieImportFile(ci, &file, chunkMovie, NULL, &track, 0, &duration,
movieImportCreateTrack, &flags));
// doesn't start from data_offset
I'll attach the patch for the problem afterward.