summaryrefslogtreecommitdiffstats
path: root/loader/dmo
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 02:26:13 +0300
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-07-07 02:34:35 +0300
commit0eb321bf2c1cc0e048faff26a01f86cdd3ec254f (patch)
tree71cb9bd9ed121156d3382066c0722c73189afe04 /loader/dmo
parent6d908205fbadbdf7ccdc6c5e0eb918f0b43f16e0 (diff)
downloadmpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.bz2
mpv-0eb321bf2c1cc0e048faff26a01f86cdd3ec254f.tar.xz
Remove trailing whitespace from most files
Diffstat (limited to 'loader/dmo')
-rw-r--r--loader/dmo/DMO_AudioDecoder.c18
-rw-r--r--loader/dmo/DMO_VideoDecoder.c35
2 files changed, 26 insertions, 27 deletions
diff --git a/loader/dmo/DMO_AudioDecoder.c b/loader/dmo/DMO_AudioDecoder.c
index 033133c6fc..1b08757349 100644
--- a/loader/dmo/DMO_AudioDecoder.c
+++ b/loader/dmo/DMO_AudioDecoder.c
@@ -14,7 +14,7 @@
#include "DMO_AudioDecoder.h"
struct DMO_AudioDecoder
-{
+{
DMO_MEDIA_TYPE m_sOurType, m_sDestType;
DMO_Filter* m_pDMO_Filter;
char* m_sVhdr;
@@ -44,17 +44,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;
@@ -62,7 +62,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;
@@ -92,7 +92,7 @@ print_wave_header((WAVEFORMATEX *)this->m_sVhdr2, MSGL_V);
free(this);
return NULL;
}
-
+
return this;
}
@@ -120,7 +120,7 @@ int DMO_AudioDecoder_Convert(DMO_AudioDecoder *this, const void* in_data, unsign
#ifdef WIN32_LOADER
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,
@@ -148,7 +148,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/loader/dmo/DMO_VideoDecoder.c b/loader/dmo/DMO_VideoDecoder.c
index 9f3e9d7eb8..d5a56ebefd 100644
--- a/loader/dmo/DMO_VideoDecoder.c
+++ b/loader/dmo/DMO_VideoDecoder.c
@@ -20,7 +20,7 @@
struct DMO_VideoDecoder
{
IVideoDecoder iv;
-
+
DMO_Filter* m_pDMO_Filter;
AM_MEDIA_TYPE m_sOurType, m_sDestType;
VIDEOINFOHEADER* m_sVhdr;
@@ -63,7 +63,7 @@ struct ct {
int cap;
char *name;
};
-
+
static ct check[] = {
{ fccI420, 12, &MEDIASUBTYPE_I420, CAP_I420, NULL },
{ fccYV12, 12, &MEDIASUBTYPE_YV12, CAP_YV12, NULL },
@@ -86,10 +86,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;
@@ -103,10 +103,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 = malloc(bihs);
memcpy(this->iv.m_bh, format, bihs);
this->iv.m_bh->biSize = bihs;
@@ -118,7 +118,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 = malloc(bihs);
memset(this->m_sVhdr, 0, bihs);
@@ -162,7 +162,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);
@@ -175,7 +175,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");
@@ -217,7 +217,7 @@ DMO_VideoDecoder * DMO_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHE
break;
#endif
default:
-
+
this->m_Caps = CAP_NONE;
printf("Decoder supports the following formats: ");
@@ -275,7 +275,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;
@@ -283,7 +283,7 @@ void DMO_VideoDecoder_StartInternal(DMO_VideoDecoder *this)
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;
}
@@ -301,7 +301,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);
@@ -362,14 +362,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;
@@ -400,7 +400,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;
@@ -552,4 +552,3 @@ int DMO_VideoDecoder_SetDirection(DMO_VideoDecoder *this, int d)
this->m_sVhdr2->bmiHeader.biHeight = this->iv.m_obh.biHeight;
return 0;
}
-