summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/ve_vfw.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-13 21:18:52 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-13 21:18:52 +0000
commit5d4502dc66b41177716d93dd83d7a08edd632be9 (patch)
tree037f8a291bcdd1cc574fe05f73ce3654f4d695c0 /libmpcodecs/ve_vfw.c
parent1e90cd180d4b6fea0b4059c69ad885beeb4315f5 (diff)
downloadmpv-5d4502dc66b41177716d93dd83d7a08edd632be9.tar.bz2
mpv-5d4502dc66b41177716d93dd83d7a08edd632be9.tar.xz
added support for codec selection
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6084 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ve_vfw.c')
-rw-r--r--libmpcodecs/ve_vfw.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/libmpcodecs/ve_vfw.c b/libmpcodecs/ve_vfw.c
index cd60d66992..0fb85c2daf 100644
--- a/libmpcodecs/ve_vfw.c
+++ b/libmpcodecs/ve_vfw.c
@@ -22,6 +22,15 @@
#include "dll_init.h"
+static char *vfw_param_codec = NULL;
+
+#include "cfgparser.h"
+
+struct config vfwopts_conf[]={
+ {"codec", &vfw_param_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
+ {NULL, NULL, 0, 0, 0, 0, NULL}
+};
+
struct vf_priv_s {
aviwrite_stream_t* mux;
BITMAPINFOHEADER* bih;
@@ -84,8 +93,15 @@ static int vf_open(vf_instance_t *vf, char* args){
vfw_bih->biBitCount=24;
vfw_bih->biCompression=0;
// vfw_bih->biSizeImage=vo_w*vo_h*((vfw_bih->biBitCount+7)/8);
+
+ if (!vfw_param_codec)
+ {
+ printf("No VfW codec specified! It's required!\n");
+ return 0;
+ }
// mux_v->bih=vfw_open_encoder("divxc32.dll",vfw_bih,mmioFOURCC('D', 'I', 'V', '3'));
- mux_v->bih=vfw_open_encoder("AvidAVICodec.dll",vfw_bih, 0);
+// mux_v->bih=vfw_open_encoder("AvidAVICodec.dll",vfw_bih, 0);
+ mux_v->bih = vfw_open_encoder(vfw_param_codec, vfw_bih, 0);
if(!mux_v->bih) return 0;
return 1;