Changeset 74da7a424fdcaea34fed38e37f844dbeade9a3b3

Show
Ignore:
Timestamp:
09/20/07 20:54:02 (10 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1190314442 +0000
git-parent:

[98622388c1b02f46c29fd7e46a1750396d3eae03]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1190314442 +0000
Message:

DMO/loader patch from Alex Antropoff.
You may need to upgrade Windows Media to get this working,
since it uses a newer DLL name.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libs/loader/win32.c

    rdcfd2c7 r74da7a4  
    39373937typedef struct __attribute__((__packed__)) 
    39383938{ 
    3939     char hay[0x40]; 
     3939    char hay[0x3C]; 
     3940    void*   pbUnknown;      //0x3C 
    39403941    unsigned long cbFormat;     //0x40 
    39413942    char*   pbFormat;       //0x44 
     
    39593960    if (!dest) 
    39603961        return E_POINTER; 
    3961     memset(dest, 0, sizeof(MY_MEDIA_TYPE)); 
     3962 
     3963    dest->pbUnknown = NULL; 
     3964    dest->cbFormat = cbFormat; 
    39623965    if (cbFormat) 
    39633966    { 
     
    39653968    if (!dest->pbFormat) 
    39663969            return E_OUTOFMEMORY; 
     3970    } 
     3971    else  
     3972    { 
     3973    dest->pbFormat=NULL; 
    39673974    } 
    39683975    return S_OK; 
  • modules/codec/dmo/dmo.c

    r6ee1e19 r74da7a4  
    143143 
    144144static const GUID guid_wmv_enc = { 0x3181343b, 0x94a2, 0x4feb, { 0xad, 0xef, 0x30, 0xa1, 0xdd, 0xe6, 0x17, 0xb4 } }; 
     145static const GUID guid_wmv_enc2 = { 0x96b57cdd, 0x8966, 0x410c,{ 0xbb, 0x1f, 0xc9, 0x7e, 0xea, 0x76, 0x5c, 0x04 } }; 
    145146static const GUID guid_wma_enc = { 0x70f598e9, 0xf4ab, 0x495a, { 0x99, 0xe2, 0xa7, 0xc4, 0xd3, 0xd8, 0x9a, 0xbf } }; 
    146147 
     
    192193static const codec_dll encoders_table[] = 
    193194{ 
     195    /* WMV3 */ 
     196    { VLC_FOURCC('W','M','V','3'), "wmvdmoe2.dll", &guid_wmv_enc2 }, 
     197    { VLC_FOURCC('w','m','v','3'), "wmvdmoe2.dll", &guid_wmv_enc2 }, 
    194198    /* WMV2 */ 
    195     { VLC_FOURCC('W','M','V','2'), "wmvdmoe.dll", &guid_wmv_enc }, 
    196     { VLC_FOURCC('w','m','v','2'), "wmvdmoe.dll", &guid_wmv_enc }, 
     199    { VLC_FOURCC('W','M','V','2'), "wmvdmoe2.dll", &guid_wmv_enc2 }, 
     200    { VLC_FOURCC('w','m','v','2'), "wmvdmoe2.dll", &guid_wmv_enc2 }, 
    197201    /* WMV1 */ 
    198     { VLC_FOURCC('W','M','V','1'), "wmvdmoe.dll", &guid_wmv_enc }, 
    199     { VLC_FOURCC('w','m','v','1'), "wmvdmoe.dll", &guid_wmv_enc }, 
     202    { VLC_FOURCC('W','M','V','1'), "wmvdmoe2.dll", &guid_wmv_enc2 }, 
     203    { VLC_FOURCC('w','m','v','1'), "wmvdmoe2.dll", &guid_wmv_enc2 }, 
    200204 
    201205    /* WMA 3 */ 
     
    968972    encoder_t *p_enc = (encoder_t*)p_this; 
    969973 
    970 #ifndef LOADER 
    971974    int i_ret = EncOpen( p_this ); 
    972975    if( i_ret != VLC_SUCCESS ) return i_ret; 
    973  
    974 #else 
    975     /* We can't open it now, because of ldt_keeper or something 
    976      * Open/Encode/Close has to be done in the same thread */ 
    977     int i; 
    978  
    979     /* Probe if we support it */ 
    980     for( i = 0; encoders_table[i].i_fourcc != 0; i++ ) 
    981     { 
    982         if( encoders_table[i].i_fourcc == p_enc->fmt_out.i_codec ) 
    983         { 
    984             msg_Dbg( p_enc, "DMO codec for %4.4s may work with dll=%s", 
    985                      (char*)&p_enc->fmt_out.i_codec, 
    986                      encoders_table[i].psz_dll ); 
    987             break; 
    988         } 
    989     } 
    990  
    991     p_enc->p_sys = NULL; 
    992     if( !encoders_table[i].i_fourcc ) return VLC_EGENERIC; 
    993 #endif /* LOADER */ 
    994976 
    995977    /* Set callbacks */ 
     
    10341016    /* Setup input format */ 
    10351017    memset( &dmo_type, 0, sizeof(dmo_type) ); 
    1036     dmo_type.pUnk = 0; 
    10371018    memset( &vih, 0, sizeof(VIDEOINFOHEADER) ); 
    10381019 
     
    14121393    mtime_t i_pts; 
    14131394 
    1414     if( p_sys == NULL ) 
    1415     { 
    1416         if( EncOpen( VLC_OBJECT(p_enc) ) ) 
    1417         { 
    1418             msg_Err( p_enc, "EncOpen failed" ); 
    1419             return NULL; 
    1420         } 
    1421         p_sys = p_enc->p_sys; 
    1422     } 
    1423  
    14241395    if( !p_data ) return NULL; 
    14251396