summaryrefslogtreecommitdiffstats
path: root/loader/dshow/DS_VideoDecoder.c
diff options
context:
space:
mode:
authorvoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-02 18:52:10 +0000
committervoroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-03-02 18:52:10 +0000
commite9e53f8cd0704adcab13ae9fee616b4f8f54dfdf (patch)
treef0f01081985a6b297b15ab318ca31fb087885033 /loader/dshow/DS_VideoDecoder.c
parent5c927f23672550e2d3f15aaced60c7bec51da1f9 (diff)
downloadmpv-e9e53f8cd0704adcab13ae9fee616b4f8f54dfdf.tar.bz2
mpv-e9e53f8cd0704adcab13ae9fee616b4f8f54dfdf.tar.xz
Rework of copying samples from directshow codecs.
Using callback function provided by filter to store and process samples from codec instead of explicit typecast to DS_Filter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22416 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/dshow/DS_VideoDecoder.c')
-rw-r--r--loader/dshow/DS_VideoDecoder.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c
index 358c14ffb3..4f5a8b7a79 100644
--- a/loader/dshow/DS_VideoDecoder.c
+++ b/loader/dshow/DS_VideoDecoder.c
@@ -31,6 +31,7 @@ struct _DS_VideoDecoder
int m_bIsDivX; // for speed
int m_bIsDivX4; // for speed
};
+static SampleProcUserData sampleProcData;
#include "DS_VideoDecoder.h"
@@ -175,7 +176,7 @@ DS_VideoDecoder * DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEAD
* ((this->iv.m_obh.biBitCount + 7) / 8);
- this->m_pDS_Filter = DS_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType);
+ this->m_pDS_Filter = DS_FilterCreate(dllname, guid, &this->m_sOurType, &this->m_sDestType,&sampleProcData);
if (!this->m_pDS_Filter)
{
@@ -307,10 +308,6 @@ int DS_VideoDecoder_DecodeInternal(DS_VideoDecoder *this, const void* src, int s
}
//cout << "DECODE " << (void*) pImage << " d: " << (void*) pImage->Data() << endl;
- if (pImage)
- {
- this->m_pDS_Filter->m_pOurOutput->SetPointer2(this->m_pDS_Filter->m_pOurOutput,pImage);
- }
sample->vt->SetActualDataLength(sample, size);
@@ -340,7 +337,10 @@ int DS_VideoDecoder_DecodeInternal(DS_VideoDecoder *this, const void* src, int s
{
Debug printf("DS_VideoDecoder::DecodeInternal() error putting data into input pin %x\n", result);
}
-
+ if (pImage)
+ {
+ memcpy(pImage, sampleProcData.frame_pointer, sampleProcData.frame_size);
+ }
sample->vt->Release((IUnknown*)sample);
#if 0