changeset 3446:61c392d6316e

obsoleted files
author arpi
date Mon, 10 Dec 2001 21:57:53 +0000
parents 0493b9edc4d5
children 9e4e3d2286b2
files loader/dshow/DS_AudioDec.c loader/dshow/DS_AudioDec.h loader/dshow/DS_VideoDec.c loader/dshow/DS_VideoDec.h
diffstat 4 files changed, 13 insertions(+), 218 deletions(-) [+]
line wrap: on
line diff
--- a/loader/dshow/DS_AudioDec.c	Mon Dec 10 21:56:21 2001 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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 );
-}
-
--- a/loader/dshow/DS_AudioDec.h	Mon Dec 10 21:56:21 2001 +0000
+++ b/loader/dshow/DS_AudioDec.h	Mon Dec 10 21:57:53 2001 +0000
@@ -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
--- a/loader/dshow/DS_VideoDec.c	Mon Dec 10 21:56:21 2001 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -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;
-}
-
--- a/loader/dshow/DS_VideoDec.h	Mon Dec 10 21:56:21 2001 +0000
+++ b/loader/dshow/DS_VideoDec.h	Mon Dec 10 21:57:53 2001 +0000
@@ -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_Start();
+void* DS_VideoDecoder_Open(char* dllname, GUID* guid, BITMAPINFOHEADER* format, int flip, int maxauto);
 
-void DS_VideoDecoder_Stop();
+void DS_VideoDecoder_StartInternal(void* _handle);
 
-void DS_VideoDecoder_Restart();
+void DS_VideoDecoder_Stop(void* _handle);
 
-void DS_VideoDecoder_Close();
+void DS_VideoDecoder_Destroy(void* _handle);
 
-int DS_VideoDecoder_DecodeFrame(char* src, int size, int is_keyframe, int render);
+int DS_VideoDecoder_DecodeInternal(void* _handle, char* src, int size, int is_keyframe, char* dest);
 
-int DS_VideoDecoder_SetDestFmt(int bits, int csp);
+int DS_VideoDecoder_SetDestFmt(void* _handle, 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