summaryrefslogtreecommitdiff
path: root/src/libw32dll/dmo
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2009-11-30 21:24:21 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2009-11-30 21:24:21 +0000
commitadd0bcc4c9191cb8980d0b6935ca5d51a9928d82 (patch)
tree1ef3c98b5183a299107193ceca9135e9f3c57bfc /src/libw32dll/dmo
parent6d410af50e98533e07dd8ebb8fdd3870192f8a73 (diff)
downloadxine-lib-add0bcc4c9191cb8980d0b6935ca5d51a9928d82.tar.gz
xine-lib-add0bcc4c9191cb8980d0b6935ca5d51a9928d82.tar.bz2
Trim trailing space & reduce space+tab.
Diffstat (limited to 'src/libw32dll/dmo')
-rw-r--r--src/libw32dll/dmo/DMO_AudioDecoder.c18
-rw-r--r--src/libw32dll/dmo/DMO_VideoDecoder.c42
-rw-r--r--src/libw32dll/dmo/Makefile.am2
-rw-r--r--src/libw32dll/dmo/dmo.c2
4 files changed, 32 insertions, 32 deletions
diff --git a/src/libw32dll/dmo/DMO_AudioDecoder.c b/src/libw32dll/dmo/DMO_AudioDecoder.c
index faf49e266..f2a1bfb5c 100644
--- a/src/libw32dll/dmo/DMO_AudioDecoder.c
+++ b/src/libw32dll/dmo/DMO_AudioDecoder.c
@@ -19,7 +19,7 @@
#include "DMO_AudioDecoder.h"
struct _DMO_AudioDecoder
-{
+{
DMO_MEDIA_TYPE m_sOurType, m_sDestType;
DMO_Filter* m_pDMO_Filter;
char* m_sVhdr;
@@ -49,17 +49,17 @@ DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX
Setup_LDT_Keeper();
Setup_FS_Segment();
#endif
-
+
this = malloc(sizeof(DMO_AudioDecoder));
-
+
this->m_iFlushed=1;
-
+
sz = 18 + wf->cbSize;
this->m_sVhdr = malloc(sz);
memcpy(this->m_sVhdr, wf, sz);
this->m_sVhdr2 = malloc(18);
memcpy(this->m_sVhdr2, this->m_sVhdr, 18);
-
+
pWF = (WAVEFORMATEX*)this->m_sVhdr2;
pWF->wFormatTag = 1;
pWF->wBitsPerSample = 16;
@@ -67,7 +67,7 @@ DMO_AudioDecoder * DMO_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX
pWF->nBlockAlign = 2*pWF->nChannels; //pWF->nChannels * (pWF->wBitsPerSample + 7) / 8;
pWF->nAvgBytesPerSec = pWF->nBlockAlign * pWF->nSamplesPerSec;
pWF->cbSize = 0;
-
+
memset(&this->m_sOurType, 0, sizeof(this->m_sOurType));
this->m_sOurType.majortype=MEDIATYPE_Audio;
this->m_sOurType.subtype=MEDIASUBTYPE_PCM;
@@ -101,7 +101,7 @@ print_wave_header((WAVEFORMATEX *)this->m_sVhdr2);
free(this);
return NULL;
}
-
+
return this;
}
@@ -129,7 +129,7 @@ int DMO_AudioDecoder_Convert(DMO_AudioDecoder *this, const void* in_data, unsign
#ifdef LDT_paranoia
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);
r = this->m_pDMO_Filter->m_pMedia->vt->ProcessInput(this->m_pDMO_Filter->m_pMedia, 0,
@@ -157,7 +157,7 @@ int DMO_AudioDecoder_Convert(DMO_AudioDecoder *this, const void* in_data, unsign
((IMediaBuffer*)db.pBuffer)->vt->GetBufferAndLength((IMediaBuffer*)db.pBuffer, 0, &written);
((IMediaBuffer*)db.pBuffer)->vt->Release((IUnknown*)db.pBuffer);
-
+
//printf("RESULTB: %d 0x%x %ld\n", r, r, written);
//printf("Converted %d -> %d\n", in_size, out_size);
}
diff --git a/src/libw32dll/dmo/DMO_VideoDecoder.c b/src/libw32dll/dmo/DMO_VideoDecoder.c
index 7b25085f0..64b0ef78c 100644
--- a/src/libw32dll/dmo/DMO_VideoDecoder.c
+++ b/src/libw32dll/dmo/DMO_VideoDecoder.c
@@ -24,7 +24,7 @@
struct _DMO_VideoDecoder
{
IVideoDecoder iv;
-
+
DMO_Filter* m_pDMO_Filter;
AM_MEDIA_TYPE m_sOurType, m_sDestType;
VIDEOINFOHEADER* m_sVhdr;
@@ -72,7 +72,7 @@ struct _ct {
const GUID* subtype;
int cap;
};
-
+
static ct check[] = {
{ fccI420, 12, &MEDIASUBTYPE_I420, CAP_I420 },
{ fccYV12, 12, &MEDIASUBTYPE_YV12, CAP_YV12 },
@@ -95,10 +95,10 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
DMO_VideoDecoder *this;
HRESULT result;
ct* c;
-
+
this = malloc(sizeof(DMO_VideoDecoder));
memset( this, 0, sizeof(DMO_VideoDecoder));
-
+
this->m_sVhdr2 = 0;
this->m_iLastQuality = -1;
this->m_iMaxAuto = maxauto;
@@ -112,10 +112,10 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
/*try*/
{
unsigned int bihs;
-
+
bihs = (format->biSize < (int) sizeof(BITMAPINFOHEADER)) ?
sizeof(BITMAPINFOHEADER) : format->biSize;
-
+
this->iv.m_bh = (BITMAPINFOHEADER*)malloc(bihs);
memcpy(this->iv.m_bh, format, bihs);
this->iv.m_bh->biSize = bihs;
@@ -127,7 +127,7 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
this->iv.m_iPlaypos = -1;
this->iv.m_fQuality = 0.0f;
this->iv.m_bCapable16b = true;
-
+
bihs += sizeof(VIDEOINFOHEADER) - sizeof(BITMAPINFOHEADER);
this->m_sVhdr = (VIDEOINFOHEADER*)malloc(bihs);
memset(this->m_sVhdr, 0, bihs);
@@ -171,7 +171,7 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
this->m_sDestType.pUnk = 0;
this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
this->m_sDestType.pbFormat = (char*)this->m_sVhdr2;
-
+
memset(&this->iv.m_obh, 0, sizeof(this->iv.m_obh));
memcpy(&this->iv.m_obh, this->iv.m_bh, sizeof(this->iv.m_obh) < (unsigned) this->iv.m_bh->biSize
? sizeof(this->iv.m_obh) : (unsigned) this->iv.m_bh->biSize);
@@ -184,7 +184,7 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
this->m_pDMO_Filter = DMO_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType);
-
+
if (!this->m_pDMO_Filter)
{
printf("Failed to create DMO filter\n");
@@ -229,7 +229,7 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
break;
#endif
default:
-
+
this->m_Caps = CAP_NONE;
printf("Decoder supports the following YUV formats: ");
@@ -284,7 +284,7 @@ void DMO_VideoDecoder_StartInternal(DMO_VideoDecoder *this)
Debug printf("DMO_VideoDecoder_StartInternal\n");
//cout << "DSSTART" << endl;
this->m_pDMO_Filter->Start(this->m_pDMO_Filter);
-
+
props.cBuffers = 1;
props.cbBuffer = this->m_sDestType.lSampleSize;
@@ -292,7 +292,7 @@ void DMO_VideoDecoder_StartInternal(DMO_VideoDecoder *this)
props.cbAlign = props.cbPrefix = 0;
this->m_pDMO_Filter->m_pAll->vt->SetProperties(this->m_pDMO_Filter->m_pAll, &props, &props1);
this->m_pDMO_Filter->m_pAll->vt->Commit(this->m_pDMO_Filter->m_pAll);
-#endif
+#endif
this->iv.m_State = START;
}
@@ -310,7 +310,7 @@ int DMO_VideoDecoder_DecodeInternal(DMO_VideoDecoder *this, const void* src, int
DMO_OUTPUT_DATA_BUFFER db;
CMediaBuffer* bufferin;
//+ uint8_t* imdata = dest ? dest->Data() : 0;
-
+
Debug printf("DMO_VideoDecoder_DecodeInternal(%p,%p,%d,%d,%p)\n",this,src,size,is_keyframe,imdata);
// this->m_pDMO_Filter->m_pAll->vt->GetBuffer(this->m_pDMO_Filter->m_pAll, &sample, 0, 0, 0);
@@ -371,14 +371,14 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c
{
HRESULT result;
int should_test=1;
-
+
Debug printf("DMO_VideoDecoder_SetDestFmt (%p, %d, %d)\n",this,bits,(int)csp);
-
+
/* if (!CImage::Supported(csp, bits))
return -1;
*/
// BitmapInfo temp = m_obh;
-
+
if (!csp) // RGB
{
int ok = true;
@@ -387,7 +387,7 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c
{
case 15:
this->m_sDestType.subtype = MEDIASUBTYPE_RGB555;
- break;
+ break;
case 16:
this->m_sDestType.subtype = MEDIASUBTYPE_RGB565;
break;
@@ -409,7 +409,7 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c
this->iv.m_obh.biCompression=3;//BI_BITFIELDS
this->iv.m_obh.biSizeImage=abs((int)(2*this->iv.m_obh.biWidth*this->iv.m_obh.biHeight));
}
-
+
if( bits == 16 ) {
this->iv.m_obh.colors[0]=0xF800;
this->iv.m_obh.colors[1]=0x07E0;
@@ -459,7 +459,7 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c
if (ok) {
if (csp != 0 && csp != 3 && this->iv.m_obh.biHeight > 0)
- this->iv.m_obh.biHeight *= -1; // YUV formats uses should have height < 0
+ this->iv.m_obh.biHeight *= -1; // YUV formats uses should have height < 0
this->iv.m_obh.biSize = sizeof(BITMAPINFOHEADER);
this->iv.m_obh.biCompression=csp;
this->iv.m_obh.biBitCount=bits;
@@ -532,9 +532,9 @@ int DMO_VideoDecoder_SetDestFmt(DMO_VideoDecoder *this, int bits, unsigned int c
memcpy(&(this->m_sVhdr2->bmiHeader), &this->iv.m_decoder, sizeof(this->iv.m_decoder));
this->m_sVhdr2->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
if (this->m_sVhdr2->bmiHeader.biCompression == 3)
- this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER) + 12;
+ this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER) + 12;
else
- this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
+ this->m_sDestType.cbFormat = sizeof(VIDEOINFOHEADER);
return -1;
}
diff --git a/src/libw32dll/dmo/Makefile.am b/src/libw32dll/dmo/Makefile.am
index 2b7cd3e37..ad77447c2 100644
--- a/src/libw32dll/dmo/Makefile.am
+++ b/src/libw32dll/dmo/Makefile.am
@@ -17,7 +17,7 @@ libdmo_filter_la_SOURCES = \
dmo.c \
dmo_guids.c \
DMO_VideoDecoder.c
-
+
noinst_HEADERS = \
DMO_AudioDecoder.h \
dmo_guids.h \
diff --git a/src/libw32dll/dmo/dmo.c b/src/libw32dll/dmo/dmo.c
index 98cfbad40..103105040 100644
--- a/src/libw32dll/dmo/dmo.c
+++ b/src/libw32dll/dmo/dmo.c
@@ -61,7 +61,7 @@ DMO_Filter* DMO_FilterCreate(const char* dllname, const GUID* id,
//trapbug();
hr = func(id, &IID_IClassFactory, (void**)&factory);
if (hr || !factory)
- {
+ {
em = "no such class object";
break;
}