Changeset 4fac9bb2655ad8894ad15b8bc896f88b08fbba0a

Show
Ignore:
Timestamp:
14/06/08 23:12:28 (4 months ago)
Author:
Jean-Baptiste Kempf <jb@videolan.org>
git-committer:
Jean-Baptiste Kempf <jb@videolan.org> 1213477948 -0700
git-parent:

[8ad05151abe4cefca9e61318d2f21c9a8d382923]

git-author:
Jean-Baptiste Kempf <jb@videolan.org> 1213477948 -0700
Message:

Support more path to look for RealVideo? Dlls.

Files:

Legend:

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

    rb2507fd r4fac9bb  
    108108 
    109109int dll_type = 1; 
    110 #ifdef WIN32 
    111 const char *g_decode_path="plugins\\drv43260.dll"; 
    112 #else 
    113 const char *g_decode_path="../lib/vlc/codec/drv4.so.6.0"; 
    114 #endif 
    115110 
    116111static unsigned long (*rvyuv_custom_message)(cmsg_data_t* ,void*); 
     
    124119static unsigned long WINAPI (*wrvyuv_transform)(char*, char*,transform_in_t*,unsigned int*,void*); 
    125120#endif 
     121 
    126122/***************************************************************************** 
    127123 * Module descriptor 
     
    214210    char fcc[4]; 
    215211    vlc_mutex_t  *lock; 
     212    char *g_decode_path; 
     213 
    216214    int  i_vide = p_dec->fmt_in.i_extra; 
    217215    unsigned int *p_vide = p_dec->fmt_in.p_extra; 
     
    246244    init_data.unk5 = 1; 
    247245    init_data.format = (unsigned int*)p_vide[1]; 
    248      
     246 
    249247    /* first try to load linux dlls, if failed and we're supporting win32 dlls, 
    250248       then try to load the windows ones */ 
     249    bool b_so_opened = false; 
     250 
    251251#ifdef WIN32 
    252     if ( NULL== (p_sys->rv_handle = load_syms(p_dec, g_decode_path)) ) 
     252    g_decode_path="plugins\\drv43260.dll"; 
     253 
     254    if( (p_sys->rv_handle = load_syms(p_dec, g_decode_path)) ) 
     255        b_so_opened = true; 
    253256#else 
    254     if ( NULL== (p_sys->rv_handle = load_syms_linux(p_dec, g_decode_path)) ) 
    255 #endif 
    256     { 
    257         msg_Err( p_dec, "Cannot load real decoder library: %s",  g_decode_path); 
     257    const char *ppsz_path[] = 
     258    { 
     259        "/usr/lib/win32", 
     260        "/usr/lib/codecs", 
     261        "/usr/local/RealPlayer8/Codecs", 
     262        "/usr/RealPlayer8/Codecs", 
     263        "/usr/lib/RealPlayer8/Codecs", 
     264        "/opt/RealPlayer8/Codecs", 
     265        "/usr/lib/RealPlayer9/users/Real/Codecs", 
     266        "/usr/lib/RealPlayer10/codecs", 
     267        "/usr/lib/RealPlayer10GOLD/codecs", 
     268        "/usr/lib/helix/player/codecs", 
     269        "/usr/lib64/RealPlayer8/Codecs", 
     270        "/usr/lib64/RealPlayer9/users/Real/Codecs", 
     271        "/usr/lib64/RealPlayer10/codecs", 
     272        "/usr/lib64/RealPlayer10GOLD/codecs", 
     273        "/usr/local/lib/codecs", 
     274        NULL 
     275    }; 
     276 
     277    for( int i = 0; ppsz_path[i]; i++ ) 
     278    { 
     279        asprintf( &g_decode_path, "%s/drv4.so.6.0", ppsz_path[i] ); 
     280        if( (p_sys->rv_handle = load_syms_linux(p_dec, g_decode_path)) ) 
     281        { 
     282            b_so_opened = true; 
     283            free( g_decode_path ); 
     284            break; 
     285        } 
     286 
     287        asprintf( &g_decode_path, "%s/drv3.so.6.0", ppsz_path[i] ); 
     288        if( (p_sys->rv_handle = load_syms_linux(p_dec, g_decode_path)) ) 
     289        { 
     290            b_so_opened = true; 
     291            free( g_decode_path ); 
     292            break; 
     293        } 
     294 
     295        msg_Dbg( p_dec, "Cannot load real decoder library: %s", g_decode_path); 
     296        free( g_decode_path ); 
     297    } 
     298#endif 
     299 
     300    if(!b_so_opened ) 
     301    { 
     302        msg_Err( p_dec, "Cannot any real decoder library" ); 
    258303        free( p_sys ); 
    259304        return VLC_EGENERIC;