[Mplayer-cvslog] CVS: main/loader/DirectShow DS_AudioDecoder.cpp,1.1,1.2 DS_Filter.cpp,1.8,1.9 DS_VideoDecoder.cpp,1.5,1.6 allocator.cpp,1.3,1.4 cmediasample.cpp,1.4,1.5 guids.h,1.2,1.3 inputpin.cpp,1.2,1.3 interfaces.h,1.4,1.5 libwin32.h,1.3,1.4 outputpin.cpp,1.4,1.5

Arpi of Ize arpi at mplayer.dev.hu
Thu Oct 4 04:21:50 CEST 2001


Update of /cvsroot/mplayer/main/loader/DirectShow
In directory mplayer:/var/tmp.root/cvs-serv22435/DirectShow

Modified Files:
	DS_AudioDecoder.cpp DS_Filter.cpp DS_VideoDecoder.cpp 
	allocator.cpp cmediasample.cpp guids.h inputpin.cpp 
	interfaces.h libwin32.h outputpin.cpp 
Log Message:
sync with avifile

Index: DS_AudioDecoder.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/DS_AudioDecoder.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DS_AudioDecoder.cpp	16 Aug 2001 00:50:02 -0000	1.1
+++ DS_AudioDecoder.cpp	4 Oct 2001 02:21:47 -0000	1.2
@@ -4,12 +4,13 @@
 	 Copyright 2001 Eugene Kuznetsov  (divx at euro.ru)
 
 *********************************************************/
+
 #include "DS_AudioDecoder.h"
+#include <string.h>
+#include <stdio.h>
+
+// using namespace std;
 
-#include <cstdio>
-#include <cstring>
-#include <string>
-#include <iostream>
 #define __MODULE__ "DirectShow audio decoder"
 const GUID FORMAT_WaveFormatEx = {
     0x05589f81, 0xc356, 0x11CE,
@@ -24,17 +25,16 @@
     { 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71 }
 };
 
-using namespace std;
-
 typedef long STDCALL (*GETCLASS) (GUID*, GUID*, void**);
 
 DS_AudioDecoder::DS_AudioDecoder(const CodecInfo& info, const WAVEFORMATEX* wf)
     : IAudioDecoder(info, wf), m_pDS_Filter(0), m_sVhdr(0), m_sVhdr2(0)
 {
-    m_sVhdr=new char[18 + wf->cbSize];
-    memcpy(m_sVhdr, wf, 18 + wf->cbSize);
-    m_sVhdr2=new char[18 + wf->cbSize];
-    memcpy(m_sVhdr2, m_sVhdr, 18 + wf->cbSize);
+    int sz = 18 + wf->cbSize;
+    m_sVhdr=new char[sz];
+    memcpy(m_sVhdr, wf, sz);
+    m_sVhdr2=new char[sz];
+    memcpy(m_sVhdr2, m_sVhdr, sz);
     WAVEFORMATEX* pWF=(WAVEFORMATEX*)m_sVhdr2;
     pWF->wFormatTag=1;
     pWF->wBitsPerSample=16;
@@ -51,7 +51,7 @@
     m_sOurType.bFixedSizeSamples=true;
     m_sOurType.bTemporalCompression=false;
     m_sOurType.pUnk=0;
-    m_sOurType.cbFormat=18+wf->cbSize;
+    m_sOurType.cbFormat=sz;
     m_sOurType.pbFormat=m_sVhdr;
 
     memset(&m_sDestType, 0, sizeof(m_sDestType));
@@ -62,7 +62,7 @@
     m_sDestType.bTemporalCompression=false;
     m_sDestType.lSampleSize=2*wf->nChannels;
     m_sDestType.pUnk=0;
-    m_sDestType.cbFormat=18;
+    m_sDestType.cbFormat=pWF->cbSize;
     m_sDestType.pbFormat=m_sVhdr2;
 
     try
@@ -95,19 +95,19 @@
     delete m_pDS_Filter;
 }
 
-int DS_AudioDecoder::Convert(const void* in_data, size_t in_size,
-			void* out_data, size_t out_size,
-			size_t* size_read, size_t* size_written)
+int DS_AudioDecoder::Convert(const void* in_data, uint_t in_size,
+			void* out_data, uint_t out_size,
+			uint_t* size_read, uint_t* size_written)
 {
     if (!in_data || !out_data)
 	return -1;
 
-    size_t written = 0;
-    size_t read = 0;
+    uint_t written = 0;
+    uint_t read = 0;
     in_size -= in_size%in_fmt.nBlockAlign;
     while (in_size>0)
     {
-	size_t frame_size=0;
+	uint_t frame_size=0;
 	char* frame_pointer;
 //	m_pOurOutput->SetFramePointer(out_data+written);
 	m_pDS_Filter->m_pOurOutput->SetFramePointer(&frame_pointer);
@@ -116,7 +116,7 @@
 	m_pDS_Filter->m_pAll->vt->GetBuffer(m_pDS_Filter->m_pAll, &sample, 0, 0, 0);
 	if(!sample)
 	{
-	    Debug cerr<<"DS_AudioDecoder::Convert() Error: null sample"<<endl;
+	    Debug printf("DS_AudioDecoder::Convert() Error: null sample\n");
 	    break;
 	}
 	char* ptr;

Index: DS_Filter.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/DS_Filter.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- DS_Filter.cpp	16 Aug 2001 00:50:02 -0000	1.8
+++ DS_Filter.cpp	4 Oct 2001 02:21:47 -0000	1.9
@@ -1,7 +1,7 @@
 #include "DS_Filter.h"
 //#include "../loader/loader.h"
-#include <libwin32.h>
-#include <string>
+#include "libwin32.h"
+//#include <string>
 #include <stdio.h>
 #include <string.h>
 
@@ -213,7 +213,10 @@
     if (m_iState == 2)
     {
 	m_pAll->vt->Release((IUnknown*)m_pAll);
-	m_pFilter->vt->Stop(m_pFilter); // causes weird crash ??? FIXME
+        if (m_pFilter)
+	    m_pFilter->vt->Stop(m_pFilter); // causes weird crash ??? FIXME
+	else
+	    printf("m_pFilter is NULL!\n");
 	m_pAll = 0;
 	m_iState = 1;
     }

Index: DS_VideoDecoder.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/DS_VideoDecoder.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DS_VideoDecoder.cpp	4 Oct 2001 00:07:15 -0000	1.5
+++ DS_VideoDecoder.cpp	4 Oct 2001 02:21:47 -0000	1.6
@@ -9,9 +9,9 @@
 #include "interfaces.h"
 
 #include "DS_VideoDecoder.h"
-#include <wine/winerror.h>
-#include <libwin32.h>
-//#include <cpuinfo.h>
+#include "wine/winerror.h"
+#include "ldt_keeper.h"
+//#include <wine/winerror.h>
 
 #include <unistd.h>
 #include <fcntl.h>
@@ -23,10 +23,6 @@
 #include <strstream>
 
 #define __MODULE__ "DirectShow_VideoDecoder"
-
-#include "ldt_keeper.h"
-
-extern "C" char* def_path;
 
 using namespace std;
 

Index: allocator.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/allocator.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- allocator.cpp	16 Aug 2001 00:50:02 -0000	1.3
+++ allocator.cpp	4 Oct 2001 02:21:47 -0000	1.4
@@ -1,6 +1,6 @@
 #include "allocator.h"
-#include <com.h>
-#include <wine/winerror.h>
+#include "com.h"
+#include "wine/winerror.h"
 #include <stdio.h>
 
 //#undef Debug

Index: cmediasample.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/cmediasample.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cmediasample.cpp	16 Aug 2001 00:50:02 -0000	1.4
+++ cmediasample.cpp	4 Oct 2001 02:21:47 -0000	1.5
@@ -1,5 +1,5 @@
 #include "cmediasample.h"
-#include <wine/winerror.h>
+#include "wine/winerror.h"
 #include <stdio.h>
 #include <string.h>
 

Index: guids.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/guids.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- guids.h	16 Aug 2001 00:50:02 -0000	1.2
+++ guids.h	4 Oct 2001 02:21:47 -0000	1.3
@@ -1,12 +1,12 @@
 #ifndef GUIDS_H
 #define GUIDS_H
 
-#include <com.h>
-#include <wine/winbase.h>
-#include <wine/windef.h>
-#include <wine/winuser.h>
-#include <wine/vfw.h>
-//#include <formats.h>
+#include "com.h"
+#include "wine/winbase.h"
+#include "wine/windef.h"
+#include "wine/winuser.h"
+#include "wine/vfw.h"
+
 extern int DSHOW_DEBUG;
 #define Debug if(DSHOW_DEBUG)
 

Index: inputpin.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/inputpin.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- inputpin.cpp	16 Aug 2001 00:50:02 -0000	1.2
+++ inputpin.cpp	4 Oct 2001 02:21:47 -0000	1.3
@@ -1,5 +1,5 @@
 #include "inputpin.h"
-#include <wine/winerror.h>
+#include "wine/winerror.h"
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -49,24 +49,17 @@
 public:
     CEnumPins(IPin*, IPin* =0);
     ~CEnumPins(){delete vt;}
-    static long STDCALL Next (
-        IEnumPins * This,
-        /* [in] */ unsigned long cMediaTypes,
-        /* [size_is][out] */ IPin **ppMediaTypes,
-        /* [out] */ unsigned long *pcFetched);
-
-    static long STDCALL Skip (
-        IEnumPins * This,
-        /* [in] */ unsigned long cMediaTypes);
-
-    static long STDCALL Reset (
-        IEnumPins * This);
-
-    static long STDCALL Clone (
-        IEnumPins * This,
-        /* [out] */ IEnumPins **ppEnum);
-
+    static long STDCALL Next (IEnumPins * This,
+			      /* [in] */ unsigned long cMediaTypes,
+			      /* [size_is][out] */ IPin **ppMediaTypes,
+			      /* [out] */ unsigned long *pcFetched);
+    static long STDCALL Skip (IEnumPins * This,
+			      /* [in] */ unsigned long cMediaTypes);
+    static long STDCALL Reset (IEnumPins * This);
+    static long STDCALL Clone (IEnumPins * This,
+			       /* [out] */ IEnumPins **ppEnum);
 };
+
 GUID CEnumPins::interfaces[]=
 {
     IID_IUnknown,

Index: interfaces.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/interfaces.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- interfaces.h	16 Aug 2001 00:50:02 -0000	1.4
+++ interfaces.h	4 Oct 2001 02:21:47 -0000	1.5
@@ -9,7 +9,7 @@
 
 */
 
-#include <com.h>
+#include "com.h"
 #include "guids.h"
 
 #ifndef STDCALL

Index: libwin32.h
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/libwin32.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- libwin32.h	16 Aug 2001 18:27:03 -0000	1.3
+++ libwin32.h	4 Oct 2001 02:21:47 -0000	1.4
@@ -36,6 +36,8 @@
 #include <string>
 #include <stdio.h>
 
+typedef unsigned int uint_t;    // use as generic type -
+
 typedef unsigned int fourcc_t;
 
 struct FatalError

Index: outputpin.cpp
===================================================================
RCS file: /cvsroot/mplayer/main/loader/DirectShow/outputpin.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- outputpin.cpp	16 Aug 2001 00:50:02 -0000	1.4
+++ outputpin.cpp	4 Oct 2001 02:21:47 -0000	1.5
@@ -1,7 +1,7 @@
 #include "outputpin.h"
 #include "allocator.h"
 #include "iunk.h"
-#include <wine/winerror.h>
+#include "wine/winerror.h"
 #include <cstdio>
 #include <cstring>
 




More information about the MPlayer-cvslog mailing list