diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-11 02:52:28 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-11 02:52:28 +0000 |
commit | db67e6d5554bbbe297078b97b3c875d682822921 (patch) | |
tree | 3a8f828e57bb0b4ff699d7c308ed4ac20747384b /dll_init.c | |
parent | 3e54c28df87ca731a6e92871f5d7f17d263e2f57 (diff) | |
download | mpv-db67e6d5554bbbe297078b97b3c875d682822921.tar.bz2 mpv-db67e6d5554bbbe297078b97b3c875d682822921.tar.xz |
vfw encoding func splitted to init and start parts
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5555 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dll_init.c')
-rw-r--r-- | dll_init.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/dll_init.c b/dll_init.c index 5934d5393c..22702ec02d 100644 --- a/dll_init.c +++ b/dll_init.c @@ -466,15 +466,9 @@ static int encoder_frameno=0; //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 @@ printf("\n"); 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 @@ printf("\n"); 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, |