summaryrefslogtreecommitdiffstats
path: root/loader
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-10 21:57:53 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-10 21:57:53 +0000
commitcc4dea654d70255406df7c7482242737420adc1a (patch)
tree203f7a6e4e722f0ea71547c3c2e0efd595e1ab24 /loader
parent699bea5dc362989fb0dd57ad2a95b31be65113ed (diff)
downloadmpv-cc4dea654d70255406df7c7482242737420adc1a.tar.bz2
mpv-cc4dea654d70255406df7c7482242737420adc1a.tar.xz
obsoleted files
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3447 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader')
-rw-r--r--loader/dshow/DS_AudioDec.c62
-rw-r--r--loader/dshow/DS_AudioDec.h11
-rw-r--r--loader/dshow/DS_VideoDec.c142
-rw-r--r--loader/dshow/DS_VideoDec.h16
4 files changed, 13 insertions, 218 deletions
diff --git a/loader/dshow/DS_AudioDec.c b/loader/dshow/DS_AudioDec.c
deleted file mode 100644
index f9e803619b..0000000000
--- a/loader/dshow/DS_AudioDec.c
+++ /dev/null
@@ -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 );
-}
-
diff --git a/loader/dshow/DS_AudioDec.h b/loader/dshow/DS_AudioDec.h
index 9c9cad09a1..af60703236 100644
--- a/loader/dshow/DS_AudioDec.h
+++ b/loader/dshow/DS_AudioDec.h
@@ -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
diff --git a/loader/dshow/DS_VideoDec.c b/loader/dshow/DS_VideoDec.c
deleted file mode 100644
index 2df86ab0eb..0000000000
--- a/loader/dshow/DS_VideoDec.c
+++ /dev/null
@@ -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;
-}
-
diff --git a/loader/dshow/DS_VideoDec.h b/loader/dshow/DS_VideoDec.h
index d3c9415c54..8a94c01cd3 100644
--- a/loader/dshow/DS_VideoDec.h
+++ b/loader/dshow/DS_VideoDec.h
@@ -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