Changeset c84678fdc7d6971cc3ceb9aa8b7f9d2403b63444

Show
Ignore:
Timestamp:
13/06/08 08:45:41 (4 months ago)
Author:
Felix Paul Kühne <fkuehne@videolan.org>
git-committer:
Felix Paul Kühne <fkuehne@videolan.org> 1213339541 +0200
git-parent:

[cc13469bbbefe6789ad41271fa9d6c539e48d17d]

git-author:
Felix Paul Kühne <fkuehne@videolan.org> 1213339504 +0200
Message:

We can't use this plugin for audio decoding on Leopard due to the removal of the old pre-carbon SoundManager? API.

As this plugin is heavily based on QuickDraw? and Sound Manager, we definitively want a re-write using sane and supported APIs meaning either QTKit or a combination of CoreAudio? and the 32bit C QuickTime? API

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/codec/quicktime.c

    re72ecce rc84678f  
    230230#ifdef __APPLE__ 
    231231    OSErr err; 
    232     SInt32 qtVersion
     232    SInt32 qtVersion, macosversion
    233233     
    234234    err = Gestalt(gestaltQuickTimeVersion, &qtVersion); 
     235    err = Gestalt(gestaltSystemVersion, &macosversion); 
     236#ifndef NDEBUG 
     237    msg_Dbg( p_this, "mac os version is %#lx", macosversion ); 
     238    msg_Dbg( p_this, "quicktime version is %#lx", qtVersion ); 
     239#endif 
    235240#endif 
    236241 
     
    260265        case VLC_FOURCC('a','z','p','r'): /* QuickTime animation (RLE) */ 
    261266#ifdef LOADER 
    262             p_dec->p_sys = NULL; 
    263             p_dec->pf_decode_video = DecodeVideo; 
    264             return VLC_SUCCESS; 
     267        p_dec->p_sys = NULL; 
     268        p_dec->pf_decode_video = DecodeVideo; 
     269        return VLC_SUCCESS; 
    265270#else 
    266             return OpenVideo( p_dec ); 
     271        return OpenVideo( p_dec ); 
    267272#endif 
    268273 
     
    298303        case 0x6D730011:                        /* DVI Intel IMAADPCM-ACM */ 
    299304#ifdef LOADER 
    300             p_dec->p_sys = NULL; 
    301             p_dec->pf_decode_audio = DecodeAudio; 
    302             return VLC_SUCCESS; 
     305        p_dec->p_sys = NULL; 
     306        p_dec->pf_decode_audio = DecodeAudio; 
     307        return VLC_SUCCESS; 
    303308#else 
    304             return OpenAudio( p_dec ); 
     309 
     310#ifdef __APPLE__ 
     311        /* FIXME: right now, we don't support audio decoding on 10.5 and later 
     312         because we are still using the hardcore-outdated SoundManager API, 
     313         which was removed after 10.4 */ 
     314 
     315        if( macosversion >= 0x1050 || err != noErr ) 
     316        { 
     317            msg_Warn( p_dec, "Your Mac OS version doesn't have SoundManager anymore. " 
     318                     "You can't use this plugin for audio." ); 
     319            return VLC_EGENERIC; 
     320        } 
     321#endif 
     322        return OpenAudio( p_dec ); 
    305323#endif 
    306324 
     
    888906        p_sys->i_late = 0; 
    889907    } 
    890     msg_Dbg( p_dec, "bufsize: %d", p_block->i_buffer); 
     908    msg_Dbg( p_dec, "bufsize: %d", (int)p_block->i_buffer); 
    891909 
    892910    if( p_sys->i_late > 10 )