diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-21 21:06:08 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-04-21 21:06:08 +0000 |
commit | 597c4bf9259a707196273bd6cfe06bb408fb6843 (patch) | |
tree | d0c3bc73a8c113bbdc6d14c2d8f71519f4b95739 /loader/dmo | |
parent | 6d21e908a0cc9fccdcfa0063af05cd1627dcc9bb (diff) | |
download | mpv-597c4bf9259a707196273bd6cfe06bb408fb6843.tar.bz2 mpv-597c4bf9259a707196273bd6cfe06bb408fb6843.tar.xz |
cygwin support patch by Sascha Sommer and some fixes by me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9968 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dmo')
-rw-r--r-- | loader/dmo/DMO_AudioDecoder.c | 8 | ||||
-rw-r--r-- | loader/dmo/DMO_VideoDecoder.c | 10 | ||||
-rw-r--r-- | loader/dmo/dmo.c | 5 |
3 files changed, 21 insertions, 2 deletions
diff --git a/loader/dmo/DMO_AudioDecoder.c b/loader/dmo/DMO_AudioDecoder.c index 647fd8b912..a1a0b66d22 100644 --- a/loader/dmo/DMO_AudioDecoder.c +++ b/loader/dmo/DMO_AudioDecoder.c @@ -4,14 +4,16 @@ Copyright 2001 Eugene Kuznetsov (divx@euro.ru) *********************************************************/ - +#include "config.h" #ifndef NOAVIFILE_HEADERS #include "audiodecoder.h" #include "except.h" #else #include "libwin32.h" +#ifdef WIN32_LOADER #include "ldt_keeper.h" #endif +#endif #include "DMO_Filter.h" #include "DMO_AudioDecoder.h" @@ -43,8 +45,10 @@ DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX int sz; WAVEFORMATEX* pWF; +#ifdef WIN32_LOADER Setup_LDT_Keeper(); Setup_FS_Segment(); +#endif this = malloc(sizeof(DMO_AudioDecoder)); @@ -118,7 +122,9 @@ int DMO_AudioDecoder_Convert(DMO_AudioDecoder *this, const void* in_data, unsign if (!in_data || !out_data) return -1; +#ifdef WIN32_LOADER Setup_FS_Segment(); +#endif //m_pDMO_Filter->m_pMedia->vt->Lock(m_pDMO_Filter->m_pMedia, 1); bufferin = CMediaBufferCreate(in_size, (void*)in_data, in_size, 1); diff --git a/loader/dmo/DMO_VideoDecoder.c b/loader/dmo/DMO_VideoDecoder.c index c0672cbe46..9c3fc474a8 100644 --- a/loader/dmo/DMO_VideoDecoder.c +++ b/loader/dmo/DMO_VideoDecoder.c @@ -4,11 +4,13 @@ Copyright 2000 Eugene Kuznetsov (divx@euro.ru) *********************************************************/ - +#include "config.h" #include "guids.h" #include "interfaces.h" #include "registry.h" +#ifdef WIN32_LOADER #include "../ldt_keeper.h" +#endif #ifndef NOAVIFILE_HEADERS #include "videodecoder.h" @@ -101,7 +103,9 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE this->m_iLastQuality = -1; this->m_iMaxAuto = maxauto; +#ifdef WIN32_LOADER Setup_LDT_Keeper(); +#endif //memset(&m_obh, 0, sizeof(m_obh)); //m_obh.biSize = sizeof(m_obh); @@ -313,7 +317,9 @@ int DMO_VideoDecoder_DecodeInternal(DMO_VideoDecoder *this, const void* src, int // return -1; // } +#ifdef WIN32_LOADER Setup_FS_Segment(); +#endif bufferin = CMediaBufferCreate(size, (void*)src, size, 0); result = this->m_pDMO_Filter->m_pMedia->vt->ProcessInput(this->m_pDMO_Filter->m_pMedia, 0, @@ -500,7 +506,9 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c break; } +#ifdef WIN32_LOADER Setup_FS_Segment(); +#endif // if(should_test) // result = this->m_pDMO_Filter->m_pOutputPin->vt->QueryAccept(this->m_pDMO_Filter->m_pOutputPin, &this->m_sDestType); diff --git a/loader/dmo/dmo.c b/loader/dmo/dmo.c index f328a86969..9539678b72 100644 --- a/loader/dmo/dmo.c +++ b/loader/dmo/dmo.c @@ -1,3 +1,4 @@ +#include "config.h" #include "DMO_Filter.h" #include "driver.h" #include "com.h" @@ -19,7 +20,9 @@ void DMO_Filter_Destroy(DMO_Filter* This) This->m_pMedia->vt->Release((IUnknown*)This->m_pMedia); free(This); +#ifdef WIN32_LOADER CodecRelease(); +#endif } DMO_Filter* DMO_FilterCreate(const char* dllname, const GUID* id, @@ -33,7 +36,9 @@ DMO_Filter* DMO_FilterCreate(const char* dllname, const GUID* id, return NULL; memset(This, 0, sizeof(DMO_Filter)); +#ifdef WIN32_LOADER CodecAlloc(); +#endif //This->Start = DS_Filter_Start; //This->Stop = DS_Filter_Stop; |