diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-02 21:44:45 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-10-02 21:44:45 +0000 |
commit | ce8be9282b1241efb1fdc9f20fa65ec7747ba1f6 (patch) | |
tree | 32a8ad00b59bb82d96ebfc9e45a05926f20adb63 /dll_init.c | |
parent | b45d365ae4f04bd15dbcf9e88e991fc243d06cc5 (diff) | |
download | mpv-ce8be9282b1241efb1fdc9f20fa65ec7747ba1f6.tar.bz2 mpv-ce8be9282b1241efb1fdc9f20fa65ec7747ba1f6.tar.xz |
VfW stuff moved to dll_init, warnings fixed, using dll_init.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2050 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dll_init.c')
-rw-r--r-- | dll_init.c | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/dll_init.c b/dll_init.c index 6b5173e858..3fad062aca 100644 --- a/dll_init.c +++ b/dll_init.c @@ -18,11 +18,11 @@ #include "codec-cfg.h" #include "stheader.h" +#include "dll_init.h" + #include "libvo/img_format.h" #include "linux/shmem.h" -extern char* win32_codec_name; // must be set before calling DrvOpen() !!! - // ACM audio and VfW video codecs initialization // based on the avifile library [http://divx.euro.ru] @@ -143,7 +143,7 @@ int acm_decode_audio(sh_audio_t *sh_audio, void* a_buffer,int minlen,int maxlen) -int init_video_codec(sh_video_t *sh_video,int ex){ +int init_vfw_video_codec(sh_video_t *sh_video,int ex){ HRESULT ret; int yuv=0; unsigned int outfmt=sh_video->codec->outfmt[sh_video->outfmtidx]; @@ -282,7 +282,7 @@ int init_video_codec(sh_video_t *sh_video,int ex){ return 0; } - sh_video->our_out_buffer = memalign(64,sh_video->o_bih.biSizeImage); + sh_video->our_out_buffer = (char*)memalign(64,sh_video->o_bih.biSizeImage); if(!sh_video->our_out_buffer){ mp_msg(MSGT_WIN32,MSGL_ERR,MSGTR_NoMemForDecodedImage, sh_video->o_bih.biSizeImage); return 0; @@ -296,3 +296,27 @@ int init_video_codec(sh_video_t *sh_video,int ex){ mp_msg(MSGT_WIN32,MSGL_V,"VIDEO CODEC Init OK!!! ;-)\n"); return 1; } + +int vfw_decode_video(sh_video_t* sh_video,void* start,int in_size,int drop_frame,int ex){ + HRESULT ret; + + sh_video->bih->biSizeImage = in_size; + + if(ex) + ret = ICDecompressEx(sh_video->hic, + ( (sh_video->ds->flags&1) ? 0 : ICDECOMPRESS_NOTKEYFRAME ) | + ( (drop_frame==2 && !(sh_video->ds->flags&1))?(ICDECOMPRESS_HURRYUP|ICDECOMPRESS_PREROL):0 ) , + sh_video->bih, start, + &sh_video->o_bih, + drop_frame ? 0 : sh_video->our_out_buffer); + else + ret = ICDecompress(sh_video->hic, + ( (sh_video->ds->flags&1) ? 0 : ICDECOMPRESS_NOTKEYFRAME ) | + ( (drop_frame==2 && !(sh_video->ds->flags&1))?(ICDECOMPRESS_HURRYUP|ICDECOMPRESS_PREROL):0 ) , + sh_video->bih, start, + &sh_video->o_bih, + drop_frame ? 0 : sh_video->our_out_buffer); + + return (int)ret; +} + |