summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-10 21:53:13 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-10 21:53:13 +0000
commit9829ce7b5f63b548ddd2fa5030cdc7e632f99cd1 (patch)
tree633b8d579c017795cec94d678731367ac08ba14f /loader
parent2e45373e7119d5571d455420125e60a6c68395fe (diff)
downloadmpv-9829ce7b5f63b548ddd2fa5030cdc7e632f99cd1.tar.bz2
mpv-9829ce7b5f63b548ddd2fa5030cdc7e632f99cd1.tar.xz
API changes - now fully compatible with C++ version
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3445 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r--loader/dshow/DS_AudioDecoder.c10
-rw-r--r--loader/dshow/DS_AudioDecoder.h3
-rw-r--r--loader/dshow/DS_VideoDecoder.c14
-rw-r--r--loader/dshow/DS_VideoDecoder.h2
4 files changed, 18 insertions, 11 deletions
diff --git a/loader/dshow/DS_AudioDecoder.c b/loader/dshow/DS_AudioDecoder.c
index db971806a1..77519f7e89 100644
--- a/loader/dshow/DS_AudioDecoder.c
+++ b/loader/dshow/DS_AudioDecoder.c
@@ -26,11 +26,15 @@ const GUID MEDIASUBTYPE_PCM = {
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 @@ DS_AudioDecoder * DS_AudioDecoder_Create(const CodecInfo * info, const WAVEFORMA
/*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 @@ int DS_AudioDecoder_Convert(DS_AudioDecoder *this, const void* in_data, uint_t i
if (!in_data || !out_data)
return -1;
+ Setup_FS_Segment();
+
in_size -= in_size%this->in_fmt.nBlockAlign;
while (in_size>0)
{
diff --git a/loader/dshow/DS_AudioDecoder.h b/loader/dshow/DS_AudioDecoder.h
index aa26a09ca5..bd180d4d19 100644
--- a/loader/dshow/DS_AudioDecoder.h
+++ b/loader/dshow/DS_AudioDecoder.h
@@ -22,7 +22,8 @@ typedef struct _DS_AudioDecoder
#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 --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c
index 59fa97ee0a..2316e4736e 100644
--- a/loader/dshow/DS_VideoDecoder.c
+++ b/loader/dshow/DS_VideoDecoder.c
@@ -57,7 +57,7 @@ static ct check[] = {
};
-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 @@ DS_VideoDecoder * DS_VideoDecoder_Create(CodecInfo * info, BITMAPINFOHEADER * f
* ((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 @@ DS_VideoDecoder * DS_VideoDecoder_Create(CodecInfo * info, BITMAPINFOHEADER * f
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 --git a/loader/dshow/DS_VideoDecoder.h b/loader/dshow/DS_VideoDecoder.h
index 4b2d19f90b..e205a8d2a1 100644
--- a/loader/dshow/DS_VideoDecoder.h
+++ b/loader/dshow/DS_VideoDecoder.h
@@ -28,7 +28,7 @@ typedef struct _DS_VideoDecoder
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);