summaryrefslogtreecommitdiffstats
path: root/dll_init.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-02 21:44:45 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-10-02 21:44:45 +0000
commitce8be9282b1241efb1fdc9f20fa65ec7747ba1f6 (patch)
tree32a8ad00b59bb82d96ebfc9e45a05926f20adb63 /dll_init.c
parentb45d365ae4f04bd15dbcf9e88e991fc243d06cc5 (diff)
downloadmpv-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.c32
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;
+}
+