From 3b78a789e04a64f2fa8a4b73b074d60659bb50b1 Mon Sep 17 00:00:00 2001 From: arpi Date: Thu, 16 Aug 2001 15:41:03 +0000 Subject: [PATCH] Start/Stop state flag fixed - requires for brightness/contrast/etc stuff... git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1556 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/dshow/DS_VideoDec.c | 5 +++-- loader/dshow/DS_VideoDecoder.c | 5 +++++ loader/dshow/libwin32.h | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/loader/dshow/DS_VideoDec.c b/loader/dshow/DS_VideoDec.c index 71ca289cda..1f80d163fd 100644 --- a/loader/dshow/DS_VideoDec.c +++ b/loader/dshow/DS_VideoDec.c @@ -44,12 +44,12 @@ extern "C" int DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER* extern "C" void DS_VideoDecoder_Start(){ DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle; - dec->StartInternal(); + dec->Start(); } extern "C" void DS_VideoDecoder_Stop(){ DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle; - dec->StopInternal(); + dec->Stop(); } extern "C" void DS_VideoDecoder_Restart(){ @@ -72,6 +72,7 @@ extern "C" int DS_VideoDecoder_SetDestFmt(int bits, int csp){ extern "C" int DS_SetValue_DivX(char* name, int value){ DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle; + printf("DS_SetValue_DivX(%s),%d)\n",name,value); return (int) dec->SetValue(name,value); } diff --git a/loader/dshow/DS_VideoDecoder.c b/loader/dshow/DS_VideoDecoder.c index 83089f4ee8..cc757c6746 100644 --- a/loader/dshow/DS_VideoDecoder.c +++ b/loader/dshow/DS_VideoDecoder.c @@ -155,6 +155,8 @@ DS_VideoDecoder::DS_VideoDecoder(const CodecInfo& info, const BITMAPINFOHEADER& || (info.dll == string("divx_c32.ax")) || (info.dll == string("wmvds32.ax")) || (info.dll == string("wmv8ds32.ax"))); + + printf("m_bIsDivX=%d\n",m_bIsDivX); } catch (FatalError& error) { @@ -548,9 +550,12 @@ HRESULT DS_VideoDecoder::SetValue(const char* name, int value) { if (m_bIsDivX) { + if (m_State != START) return VFW_E_NOT_RUNNING; + printf("DS_VideoDecoder::SetValue(%s,%d)\n",name,value); + //cout << "set value " << name << " " << value << endl; // brightness 87 // contrast 74 diff --git a/loader/dshow/libwin32.h b/loader/dshow/libwin32.h index 7aae0bcc35..26a3fbc792 100644 --- a/loader/dshow/libwin32.h +++ b/loader/dshow/libwin32.h @@ -279,8 +279,8 @@ struct IVideoDecoder virtual ~IVideoDecoder(){}; virtual void StartInternal()=0; virtual void StopInternal()=0; - void Stop(){ StopInternal();} - void Start(){StartInternal();} + void Stop(){ StopInternal(); m_State = STOP;} + void Start(){StartInternal(); m_State = START;} const CodecInfo& record; DecodingMode m_Mode; // should we do precaching (or even change Quality on the fly)