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
This commit is contained in:
arpi 2001-08-16 15:41:03 +00:00
parent e297a06ec9
commit 3b78a789e0
3 changed files with 10 additions and 4 deletions

View File

@ -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);
}

View File

@ -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

View File

@ -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)