I have trouble with QuickTime API on MacOS 10.7.2(b.11C74).
Here is a piece of openFrameworks code which opens a movie descriptor:
// ofQuickTimePlayer.cpp
bool createMovieFromURL(string urlIn, Movie &movie){
char * url = (char *)urlIn.c_str();
Handle urlDataRef;
OSErr err;
urlDataRef = NewHandle(strlen(url) + 1);
// ...
BlockMoveData(url, *urlDataRef, strlen(url) + 1);
err = NewMovieFromDataRef(
&movie,
newMovieActive,
nil,
urlDataRef,
URLDataHandlerSubType);
// ...
if ( err != noErr ) {
ofLog(OF_LOG_ERROR,"createMovieFromURL: error loading url");
return false;
} else {
return true;
}
}
All I need is just to open HLS video stream.
Testing the Apple HLS stream doesn't fail to load but no video is rendered. Here it is: http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
My test HLS stream fails to load and err equals -2048
in this case.
Everything works perfectly with .mp4 transferred by HTTP and with RTSP protocol.
Same streams play perfectly in QuickTime Player 10.1 (501.5).
Details of my tiny research are here: https://github.com/openframeworks/openFrameworks/issues/897
So my questions are:
- What is the cause of this strange behavior?
- How to fix it?