1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-18 21:31:13 +00:00

obsoleted files

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3447 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
arpi 2001-12-10 21:57:53 +00:00
parent 699bea5dc3
commit cc4dea654d
4 changed files with 13 additions and 218 deletions

View File

@ -1,62 +0,0 @@
#include "guids.h"
#include "interfaces.h"
#include "DS_AudioDecoder.h"
#include "wine/winerror.h"
#include "libwin32.h"
//#include <cpuinfo.h>
//#include <unistd.h>
//#include <fcntl.h>
//#include <errno.h>
//#include <sys/types.h>
//#include <sys/mman.h>
//#include <cstdio>
//#include <iostream>
//#include <strstream>
#include "DS_AudioDec.h"
#include "ldt_keeper.h"
// DS_Decoder(const CodecInfo& info, const WAVEFORMATEX*);
// virtual ~DS_Decoder();
// virtual int Convert(const void*, size_t, void*, size_t, size_t*, size_t*);
// virtual int GetSrcSize(int);
static void* _handle;
extern "C" int DS_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf){
Setup_LDT_Keeper();
Setup_FS_Segment();
CodecInfo ci;
ci.dll=dllname;
ci.guid=*guid;
DS_AudioDecoder* dec=new DS_AudioDecoder(ci, wf);
_handle=(void*)dec;
return 0;
}
extern "C" void DS_AudioDecoder_Close(){
}
extern "C" int DS_AudioDecoder_GetSrcSize(int dest_size){
DS_AudioDecoder* dec=(DS_AudioDecoder*)_handle;
return dec->GetSrcSize(dest_size);
}
extern "C" int DS_AudioDecoder_Convert(unsigned char* in_data, unsigned in_size,
unsigned char* out_data, unsigned out_size,
unsigned* size_read, unsigned* size_written){
DS_AudioDecoder* dec=(DS_AudioDecoder*)_handle;
Setup_FS_Segment();
return dec->Convert( (void*)in_data,(size_t)in_size,
(void*)out_data,(size_t)out_size,
(size_t*)size_read, (size_t*)size_written );
}

View File

@ -10,14 +10,15 @@
extern "C" {
#endif /* defined(__cplusplus) */
int DS_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf);
void* DS_AudioDecoder_Open(char* dllname, GUID* guid, WAVEFORMATEX* wf);
void DS_AudioDecoder_Close();
void DS_AudioDecoder_Close(void* _handle);
int DS_AudioDecoder_GetSrcSize(int dest_size);
int DS_AudioDecoder_GetSrcSize(void* _handle, int dest_size);
int DS_AudioDecoder_Convert(unsigned char* in_data, unsigned in_size,
unsigned char* out_data, unsigned out_size,
int DS_AudioDecoder_Convert(void* _handle,
unsigned char* in_data, unsigned in_size,
unsigned char* out_data, unsigned out_size,
unsigned* size_read, unsigned* size_written);
#ifdef __cplusplus

View File

@ -1,142 +0,0 @@
#include "guids.h"
#include "interfaces.h"
#include "libwin32.h"
#include "DS_VideoDecoder.h"
#include "wine/winerror.h"
//#include <cpuinfo.h>
//#include <unistd.h>
//#include <fcntl.h>
//#include <errno.h>
//#include <sys/types.h>
//#include <sys/mman.h>
//#include <cstdio>
//#include <iostream>
//#include <strstream>
#include "registry.h"
//#include <wine/winreg.h>
#include "DS_VideoDec.h"
#include "ldt_keeper.h"
static void* _handle; // will be parameter later...
static char** _d_ptr; // will be parameter later...
extern "C" int DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER* format, int flip,char** d_ptr){
Setup_LDT_Keeper();
CodecInfo ci;
ci.dll=dllname;
ci.guid=*guid;
try {
DS_VideoDecoder* dec=new DS_VideoDecoder(ci, *format, flip);
_d_ptr=d_ptr;
_handle=(void*)dec;
return 0;
} catch (FatalError &e) { }
_handle=NULL;
return -1;
}
extern "C" void DS_VideoDecoder_Start(){
DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle;
dec->Start();
}
extern "C" void DS_VideoDecoder_Stop(){
DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle;
dec->Stop();
}
extern "C" void DS_VideoDecoder_Restart(){
}
extern "C" void DS_VideoDecoder_Close(){
DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle;
_handle=NULL;
delete dec;
}
extern "C" int DS_VideoDecoder_DecodeFrame(char* src, int size, int is_keyframe, int render){
DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle;
CImage image;
image.ptr=*_d_ptr;
return dec->Decode((void*)src,(size_t)size,is_keyframe,&image);
}
extern "C" int DS_VideoDecoder_SetDestFmt(int bits, int csp){
DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle;
return dec->SetDestFmt(bits,(fourcc_t)csp);
}
extern "C" int DS_SetValue_DivX(char* name, int value){
DS_VideoDecoder* dec=(DS_VideoDecoder*) _handle;
/* This printf is annoying with autoquality, *
* should be moved into players code - atmos */
//printf("DS_SetValue_DivX(%s),%d)\n",name,value);
return (int) dec->SetValue(name,value);
}
extern "C" int DS_SetAttr_DivX(char* attribute, int value){
int result, status, newkey, count;
if(strcmp(attribute, "Quality")==0){
char* keyname="SOFTWARE\\Microsoft\\Scrunch";
result=RegCreateKeyExA(HKEY_CURRENT_USER, keyname, 0, 0, 0, 0, 0, &newkey, &status);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: registry failure\n");
return -1;
}
result=RegSetValueExA(newkey, "Current Post Process Mode", 0, REG_DWORD, &value, 4);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: error writing value\n");
return -1;
}
value=-1;
result=RegSetValueExA(newkey, "Force Post Process Mode", 0, REG_DWORD, &value, 4);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: error writing value\n");
return -1;
}
RegCloseKey(newkey);
return 0;
}
if(
(strcmp(attribute, "Saturation")==0) ||
(strcmp(attribute, "Hue")==0) ||
(strcmp(attribute, "Contrast")==0) ||
(strcmp(attribute, "Brightness")==0)
)
{
char* keyname="SOFTWARE\\Microsoft\\Scrunch\\Video";
result=RegCreateKeyExA(HKEY_CURRENT_USER, keyname, 0, 0, 0, 0, 0, &newkey, &status);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: registry failure\n");
return -1;
}
result=RegSetValueExA(newkey, attribute, 0, REG_DWORD, &value, 4);
if(result!=0)
{
printf("VideoDecoder::SetExtAttr: error writing value\n");
return -1;
}
RegCloseKey(newkey);
return 0;
}
printf("Unknown attribute!\n");
return -200;
}

View File

@ -10,21 +10,19 @@
extern "C" {
#endif /* defined(__cplusplus) */
int DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER* format, int flip,char** d_ptr);
void* DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER* format, int flip, int maxauto);
void DS_VideoDecoder_Start();
void DS_VideoDecoder_StartInternal(void* _handle);
void DS_VideoDecoder_Stop();
void DS_VideoDecoder_Stop(void* _handle);
void DS_VideoDecoder_Restart();
void DS_VideoDecoder_Destroy(void* _handle);
void DS_VideoDecoder_Close();
int DS_VideoDecoder_DecodeInternal(void* _handle, char* src, int size, int is_keyframe, char* dest);
int DS_VideoDecoder_DecodeFrame(char* src, int size, int is_keyframe, int render);
int DS_VideoDecoder_SetDestFmt(void* _handle, int bits, int csp);
int DS_VideoDecoder_SetDestFmt(int bits, int csp);
int DS_SetValue_DivX(char* name, int value);
int DS_VideoDecoder_SetValue(void* _handle, char* name, int value);
int DS_SetAttr_DivX(char* attribute, int value);
#ifdef __cplusplus