Changeset 74da7a424fdcaea34fed38e37f844dbeade9a3b3
- 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
| rdcfd2c7 |
r74da7a4 |
|
| 3937 | 3937 | typedef struct __attribute__((__packed__)) |
|---|
| 3938 | 3938 | { |
|---|
| 3939 | | char hay[0x40]; |
|---|
| | 3939 | char hay[0x3C]; |
|---|
| | 3940 | void* pbUnknown; //0x3C |
|---|
| 3940 | 3941 | unsigned long cbFormat; //0x40 |
|---|
| 3941 | 3942 | char* pbFormat; //0x44 |
|---|
| … | … | |
| 3959 | 3960 | if (!dest) |
|---|
| 3960 | 3961 | return E_POINTER; |
|---|
| 3961 | | memset(dest, 0, sizeof(MY_MEDIA_TYPE)); |
|---|
| | 3962 | |
|---|
| | 3963 | dest->pbUnknown = NULL; |
|---|
| | 3964 | dest->cbFormat = cbFormat; |
|---|
| 3962 | 3965 | if (cbFormat) |
|---|
| 3963 | 3966 | { |
|---|
| … | … | |
| 3965 | 3968 | if (!dest->pbFormat) |
|---|
| 3966 | 3969 | return E_OUTOFMEMORY; |
|---|
| | 3970 | } |
|---|
| | 3971 | else |
|---|
| | 3972 | { |
|---|
| | 3973 | dest->pbFormat=NULL; |
|---|
| 3967 | 3974 | } |
|---|
| 3968 | 3975 | return S_OK; |
|---|
| r6ee1e19 |
r74da7a4 |
|
| 143 | 143 | |
|---|
| 144 | 144 | static const GUID guid_wmv_enc = { 0x3181343b, 0x94a2, 0x4feb, { 0xad, 0xef, 0x30, 0xa1, 0xdd, 0xe6, 0x17, 0xb4 } }; |
|---|
| | 145 | static const GUID guid_wmv_enc2 = { 0x96b57cdd, 0x8966, 0x410c,{ 0xbb, 0x1f, 0xc9, 0x7e, 0xea, 0x76, 0x5c, 0x04 } }; |
|---|
| 145 | 146 | static const GUID guid_wma_enc = { 0x70f598e9, 0xf4ab, 0x495a, { 0x99, 0xe2, 0xa7, 0xc4, 0xd3, 0xd8, 0x9a, 0xbf } }; |
|---|
| 146 | 147 | |
|---|
| … | … | |
| 192 | 193 | static const codec_dll encoders_table[] = |
|---|
| 193 | 194 | { |
|---|
| | 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 }, |
|---|
| 194 | 198 | /* 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 }, |
|---|
| 197 | 201 | /* 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 }, |
|---|
| 200 | 204 | |
|---|
| 201 | 205 | /* WMA 3 */ |
|---|
| … | … | |
| 968 | 972 | encoder_t *p_enc = (encoder_t*)p_this; |
|---|
| 969 | 973 | |
|---|
| 970 | | #ifndef LOADER |
|---|
| 971 | 974 | int i_ret = EncOpen( p_this ); |
|---|
| 972 | 975 | 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 */ |
|---|
| 994 | 976 | |
|---|
| 995 | 977 | /* Set callbacks */ |
|---|
| … | … | |
| 1034 | 1016 | /* Setup input format */ |
|---|
| 1035 | 1017 | memset( &dmo_type, 0, sizeof(dmo_type) ); |
|---|
| 1036 | | dmo_type.pUnk = 0; |
|---|
| 1037 | 1018 | memset( &vih, 0, sizeof(VIDEOINFOHEADER) ); |
|---|
| 1038 | 1019 | |
|---|
| … | … | |
| 1412 | 1393 | mtime_t i_pts; |
|---|
| 1413 | 1394 | |
|---|
| 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 | | |
|---|
| 1424 | 1395 | if( !p_data ) return NULL; |
|---|
| 1425 | 1396 | |
|---|