[Mplayer-cvslog] CVS: main dll_init.c,1.42,1.43 dll_init.h,1.4,1.5
Arpi of Ize
arpi at mplayer.dev.hu
Thu Apr 11 04:52:31 CEST 2002
Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv19989
Modified Files:
dll_init.c dll_init.h
Log Message:
vfw encoding func splitted to init and start parts
Index: dll_init.c
===================================================================
RCS file: /cvsroot/mplayer/main/dll_init.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- dll_init.c 1 Apr 2002 17:58:04 -0000 1.42
+++ dll_init.c 11 Apr 2002 02:52:28 -0000 1.43
@@ -466,15 +466,9 @@
//int init_vfw_encoder(char *dll_name, BITMAPINFOHEADER *input_bih, BITMAPINFOHEADER *output_bih)
BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, BITMAPINFOHEADER *input_bih,unsigned int out_fourcc)
{
-// sh_video_t *sh_video;
HRESULT ret;
-// int yuv=0;
-// unsigned int outfmt=sh_video->codec->outfmt[sh_video->outfmtidx];
-// unsigned int outfmt;
BITMAPINFOHEADER* output_bih=NULL;
int temp_len;
- int i;
-// int hic;
//sh_video = malloc(sizeof(sh_video_t));
@@ -524,12 +518,20 @@
memset(output_bih,0,temp_len);
output_bih->biSize = temp_len; //sizeof(BITMAPINFOHEADER);
+ return output_bih;
+}
+
+int vfw_start_encoder(BITMAPINFOHEADER *input_bih, BITMAPINFOHEADER *output_bih){
+ HRESULT ret;
+ int temp_len=output_bih->biSize;
+ int i;
+
ret = ICCompressGetFormat(encoder_hic, input_bih, output_bih);
if(ret < 0){
unsigned char* temp=output_bih;
mp_msg(MSGT_WIN32,MSGL_ERR,"ICCompressGetFormat failed: Error %d (0x%X)\n", (int)ret, (int)ret);
for (i=0; i < temp_len; i++) mp_msg(MSGT_WIN32, MSGL_DBG2, "%02x ", temp[i]);
- return NULL;
+ return 0;
}
mp_msg(MSGT_WIN32,MSGL_V,"ICCompressGetFormat OK\n");
@@ -592,7 +594,7 @@
encoder_frameno=0;
mp_msg(MSGT_WIN32,MSGL_V,"VIDEO CODEC Init OK!!! ;-)\n");
- return output_bih;
+ return 1;
}
int vfw_encode_frame(BITMAPINFOHEADER* biOutput,void* OutBuf,
Index: dll_init.h
===================================================================
RCS file: /cvsroot/mplayer/main/dll_init.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- dll_init.h 10 Feb 2002 12:20:50 -0000 1.4
+++ dll_init.h 11 Apr 2002 02:52:28 -0000 1.5
@@ -11,7 +11,7 @@
int vfw_set_postproc(sh_video_t* sh_video,int quality);
BITMAPINFOHEADER* vfw_open_encoder(char *dll_name, BITMAPINFOHEADER *input_bih,unsigned int out_fourcc);
+int vfw_start_encoder(BITMAPINFOHEADER *input_bih, BITMAPINFOHEADER *output_bih);
int vfw_encode_frame(BITMAPINFOHEADER* biOutput,void* OutBuf,
BITMAPINFOHEADER* biInput,void* Image,
long* keyframe, int quality);
-
More information about the MPlayer-cvslog
mailing list