QuickTime API fails with error 2048
Asked Answered
A

0

11

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:

  1. What is the cause of this strange behavior?
  2. How to fix it?
Ancy answered 6/2, 2012 at 11:14 Comment(3)
this is all i got. hopefully this helps. :-/ moviecodec.com/solutions/quicktime-error-2048-fix-41979Recitative
Did michaelcurry suggestion help? If not, what does that error return mean?Chenab
@JohnOdom Haven't tried this solution with OpenFrameworks on 10.7. The only thing I can say is that native ObjC code works fine with HLS streams using QuickTime framework on my MacOS 10.9.Ancy

© 2022 - 2024 — McMap. All rights reserved.