[Mplayer-cvslog] CVS: main/loader/dshow DS_AudioDecoder.c,1.5,1.6 DS_AudioDecoder.h,1.4,1.5 DS_VideoDecoder.c,1.12,1.13 DS_VideoDecoder.h,1.3,1.4
Arpi of Ize
arpi at mplayer.dev.hu
Mon Dec 10 22:53:18 CET 2001
Update of /cvsroot/mplayer/main/loader/dshow
In directory mplayer:/var/tmp.root/cvs-serv10832
Modified Files:
DS_AudioDecoder.c DS_AudioDecoder.h DS_VideoDecoder.c
DS_VideoDecoder.h
Log Message:
API changes - now fully compatible with C++ version
Index: DS_AudioDecoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/DS_AudioDecoder.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DS_AudioDecoder.c 22 Nov 2001 03:16:31 -0000 1.5
+++ DS_AudioDecoder.c 10 Dec 2001 21:53:13 -0000 1.6
@@ -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;
@@ -119,6 +123,8 @@
if (!in_data || !out_data)
return -1;
+
+ Setup_FS_Segment();
in_size -= in_size%this->in_fmt.nBlockAlign;
while (in_size>0)
Index: DS_AudioDecoder.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/DS_AudioDecoder.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DS_AudioDecoder.h 22 Nov 2001 03:16:31 -0000 1.4
+++ DS_AudioDecoder.h 10 Dec 2001 21:53:13 -0000 1.5
@@ -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);
Index: DS_VideoDecoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/DS_VideoDecoder.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- DS_VideoDecoder.c 22 Nov 2001 03:16:31 -0000 1.12
+++ DS_VideoDecoder.c 10 Dec 2001 21:53:13 -0000 1.13
@@ -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)
Index: DS_VideoDecoder.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/dshow/DS_VideoDecoder.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DS_VideoDecoder.h 22 Nov 2001 03:16:31 -0000 1.3
+++ DS_VideoDecoder.h 10 Dec 2001 21:53:13 -0000 1.4
@@ -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);
More information about the MPlayer-cvslog
mailing list