1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-11 17:37:23 +00:00
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1560 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-08-16 18:39:49 +00:00
parent e366304055
commit 1134c269bc

View File

@ -1,9 +1,9 @@
#include "guids.h" #include "guids.h"
#include "interfaces.h" #include "interfaces.h"
#include "libwin32.h"
#include "DS_VideoDecoder.h" #include "DS_VideoDecoder.h"
#include <wine/winerror.h> #include <wine/winerror.h>
#include <libwin32.h>
//#include <cpuinfo.h> //#include <cpuinfo.h>
#include <unistd.h> #include <unistd.h>
@ -33,8 +33,13 @@ extern "C" int DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER*
CodecInfo ci; CodecInfo ci;
ci.dll=dllname; ci.dll=dllname;
ci.guid=*guid; ci.guid=*guid;
DS_VideoDecoder* dec=new DS_VideoDecoder(ci, *format, flip); // try {
DS_VideoDecoder* dec=new DS_VideoDecoder(ci, *format, flip);
// } catch (FatalError &e) {
// _handle=NULL;
// return -1;
// }
_d_ptr=d_ptr; _d_ptr=d_ptr;
_handle=(void*)dec; _handle=(void*)dec;
@ -56,13 +61,15 @@ extern "C" void DS_VideoDecoder_Restart(){
} }
extern "C" void DS_VideoDecoder_Close(){ extern "C" void DS_VideoDecoder_Close(){
DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle;
delete dec;
} }
extern "C" int DS_VideoDecoder_DecodeFrame(char* src, int size, int is_keyframe, int render){ extern "C" int DS_VideoDecoder_DecodeFrame(char* src, int size, int is_keyframe, int render){
DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle; DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle;
CImage image; CImage image;
image.ptr=*_d_ptr; image.ptr=*_d_ptr;
return dec->DecodeInternal((void*)src,(size_t)size,is_keyframe,&image); return dec->Decode((void*)src,(size_t)size,is_keyframe,&image);
} }
extern "C" int DS_VideoDecoder_SetDestFmt(int bits, int csp){ extern "C" int DS_VideoDecoder_SetDestFmt(int bits, int csp){