# HG changeset patch # User arpi # Date 1008021193 0 # Node ID 0c0042de1f95a37a3688bd46dbd54e542ffb62d6 # Parent 655aa82ae9f1bcb62fab667be0d051f52cc642fe API changes - now fully compatible with C++ version diff -r 655aa82ae9f1 -r 0c0042de1f95 loader/dshow/DS_AudioDecoder.c --- a/loader/dshow/DS_AudioDecoder.c Mon Dec 10 21:51:21 2001 +0000 +++ b/loader/dshow/DS_AudioDecoder.c Mon Dec 10 21:53:13 2001 +0000 @@ -26,11 +26,15 @@ typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**); -DS_AudioDecoder * DS_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf) +DS_AudioDecoder * DS_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf) +//DS_AudioDecoder * DS_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf) { DS_AudioDecoder *this; int sz; WAVEFORMATEX* pWF; + + Setup_LDT_Keeper(); + Setup_FS_Segment(); this = malloc(sizeof(DS_AudioDecoder)); @@ -75,7 +79,7 @@ /*try*/ { ALLOCATOR_PROPERTIES props, props1; - this->m_pDS_Filter = DS_FilterCreate((const char*)info->dll, info->guid, &this->m_sOurType, &this->m_sDestType); + this->m_pDS_Filter = DS_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType); if( !this->m_pDS_Filter ) { free(this); return NULL; @@ -120,6 +124,8 @@ if (!in_data || !out_data) return -1; + Setup_FS_Segment(); + in_size -= in_size%this->in_fmt.nBlockAlign; while (in_size>0) { diff -r 655aa82ae9f1 -r 0c0042de1f95 loader/dshow/DS_AudioDecoder.h --- a/loader/dshow/DS_AudioDecoder.h Mon Dec 10 21:51:21 2001 +0000 +++ b/loader/dshow/DS_AudioDecoder.h Mon Dec 10 21:53:13 2001 +0000 @@ -22,7 +22,8 @@ #define uint_t int #endif -DS_AudioDecoder * DS_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf); +//DS_AudioDecoder * DS_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMATEX* wf); +DS_AudioDecoder * DS_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf); void DS_AudioDecoder_Destroy(DS_AudioDecoder *this); diff -r 655aa82ae9f1 -r 0c0042de1f95 loader/dshow/DS_VideoDecoder.c --- a/loader/dshow/DS_VideoDecoder.c Mon Dec 10 21:51:21 2001 +0000 +++ b/loader/dshow/DS_VideoDecoder.c Mon Dec 10 21:53:13 2001 +0000 @@ -57,7 +57,7 @@ }; -DS_VideoDecoder * DS_VideoDecoder_Create(CodecInfo * info, BITMAPINFOHEADER * format, int flip, int maxauto) +DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER * format, int flip, int maxauto) { DS_VideoDecoder *this; HRESULT result; @@ -142,7 +142,7 @@ * ((this->iv.m_obh.biBitCount + 7) / 8); - this->m_pDS_Filter = DS_FilterCreate((const char*)info->dll, info->guid, &this->m_sOurType, &this->m_sDestType); + this->m_pDS_Filter = DS_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType); if (!flip) { @@ -198,11 +198,11 @@ this->m_sDestType.subtype = MEDIASUBTYPE_RGB24; this->m_iMinBuffers = this->iv.VBUFSIZE; - this->m_bIsDivX = (strcmp((const char*)info->dll, "divxcvki.ax") == 0 - || strcmp((const char*)info->dll, "divx_c32.ax") == 0 - || strcmp((const char*)info->dll, "wmvds32.ax") == 0 - || strcmp((const char*)info->dll, "wmv8ds32.ax") == 0); - this->m_bIsDivX4 = (strcmp((const char*)info->dll, "divxdec.ax") == 0); + this->m_bIsDivX = (strcmp(dllname, "divxcvki.ax") == 0 + || strcmp(dllname, "divx_c32.ax") == 0 + || strcmp(dllname, "wmvds32.ax") == 0 + || strcmp(dllname, "wmv8ds32.ax") == 0); + this->m_bIsDivX4 = (strcmp(dllname, "divxdec.ax") == 0); if (this->m_bIsDivX) this->iv.VBUFSIZE += 7; else if (this->m_bIsDivX4) diff -r 655aa82ae9f1 -r 0c0042de1f95 loader/dshow/DS_VideoDecoder.h --- a/loader/dshow/DS_VideoDecoder.h Mon Dec 10 21:51:21 2001 +0000 +++ b/loader/dshow/DS_VideoDecoder.h Mon Dec 10 21:53:13 2001 +0000 @@ -28,7 +28,7 @@ int DS_VideoDecoder_GetCapabilities(DS_VideoDecoder *this); -DS_VideoDecoder * DS_VideoDecoder_Create(CodecInfo * info, BITMAPINFOHEADER * format, int flip, int maxauto); +DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER * format, int flip, int maxauto); void DS_VideoDecoder_Destroy(DS_VideoDecoder *this);