[Mplayer-cvslog] CVS: main/libmpcodecs vd_vfwex.c,NONE,1.1 Makefile,1.57,1.58 vd_vfw.c,1.9,1.10
Arpi of Ize
arpi at mplayerhq.hu
Fri Aug 30 22:47:35 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/libmpcodecs ad.c,1.9,1.10 ad_faad.c,1.4,1.5 ad_libvorbis.c,1.4,1.5 ad_realaud.c,1.13,1.14 vd_realvid.c,1.12,1.13
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs vd_vfwex.c,1.1,1.2 vd_vfw.c,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv8964
Modified Files:
Makefile vd_vfw.c
Added Files:
vd_vfwex.c
Log Message:
vfwex separated from vfw, to work with new vfm system and dlopen
--- NEW FILE ---
#include <stdio.h>
#include <stdlib.h>
#include "config.h"
#ifdef USE_WIN32DLL
#include "mp_msg.h"
#include "help_mp.h"
#include "vd_internal.h"
#include "dll_init.h"
static vd_info_t info_vfwex = {
"Win32/VfWex video codecs",
"vfwex",
VFM_VFWEX,
"A'rpi",
"based on http://avifile.sf.net",
"win32 codecs"
};
LIBVD_EXTERN(vfwex)
// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
switch(cmd){
case VDCTRL_QUERY_MAX_PP_LEVEL:
return 9;
case VDCTRL_SET_PP_LEVEL:
vfw_set_postproc(sh,10*(*((int*)arg)));
return CONTROL_OK;
}
return CONTROL_UNKNOWN;
}
// init driver
static int init(sh_video_t *sh){
if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2)) return 0;
if(!init_vfw_video_codec(sh,1)) return 0;
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n");
return 1;
}
// uninit driver
static void uninit(sh_video_t *sh){
vfw_close_video_codec(sh, 1);
}
//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
mp_image_t* mpi;
int ret;
if(len<=0) return NULL; // skipped frame
mpi=mpcodecs_get_image(sh,
(sh->codec->outflags[sh->outfmtidx] & CODECS_FLAG_STATIC) ?
MP_IMGTYPE_STATIC : MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_WIDTH,
sh->disp_w, sh->disp_h);
if(!mpi){ // temporary!
printf("couldn't allocate image for cinepak codec\n");
return NULL;
}
// set buffer:
sh->our_out_buffer=mpi->planes[0];
// set stride: (trick discovered by Andreas Ackermann - thanx!)
sh->bih->biWidth=mpi->width; //mpi->stride[0]/(mpi->bpp/8);
sh->o_bih.biWidth=mpi->width; //mpi->stride[0]/(mpi->bpp/8);
if((ret=vfw_decode_video(sh,data,len,flags&3,1))){
mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error decompressing frame, err=%d\n",ret);
return NULL;
}
if(mpi->imgfmt==IMGFMT_RGB8 || mpi->imgfmt==IMGFMT_BGR8){
// export palette:
// FIXME: sh->o_bih is cutted down to 40 bytes!!!
// if(sh->o_bih->biSize>40)
// mpi->planes[1]=((unsigned char*)&sh->o_bih)+40;
// else
mpi->planes[1]=NULL;
}
return mpi;
}
#endif
Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/Makefile,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -r1.57 -r1.58
--- Makefile 30 Aug 2002 19:56:07 -0000 1.57
+++ Makefile 30 Aug 2002 20:47:18 -0000 1.58
@@ -5,7 +5,7 @@
LIBNAME2 = libmpencoders.a
AUDIO_SRCS=dec_audio.c ad.c ad_liba52.c ad_acm.c ad_alaw.c ad_dk3adpcm.c ad_dshow.c ad_dvdpcm.c ad_ffmpeg.c ad_hwac3.c ad_imaadpcm.c ad_mp3lib.c ad_msadpcm.c ad_pcm.c ad_roqaudio.c ad_msgsm.c ad_faad.c ad_libvorbis.c ad_libmad.c ad_realaud.c ad_libdv.c
-VIDEO_SRCS=dec_video.c vd.c vd_null.c vd_realvid.c vd_cinepak.c vd_qtrpza.c vd_ffmpeg.c vd_dshow.c vd_vfw.c vd_odivx.c vd_divx4.c vd_raw.c vd_xanim.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_nuv.c vd_libmpeg2.c vd_msrle.c vd_huffyuv.c vd_zlib.c vd_mpegpes.c vd_svq1.c vd_xvid.c vd_libdv.c
+VIDEO_SRCS=dec_video.c vd.c vd_null.c vd_realvid.c vd_cinepak.c vd_qtrpza.c vd_ffmpeg.c vd_dshow.c vd_vfw.c vd_vfwex.c vd_odivx.c vd_divx4.c vd_raw.c vd_xanim.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_nuv.c vd_libmpeg2.c vd_msrle.c vd_huffyuv.c vd_zlib.c vd_mpegpes.c vd_svq1.c vd_xvid.c vd_libdv.c
VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c vf_cropdetect.c vf_test.c vf_noise.c vf_yvu9.c vf_rectangle.c vf_lavcdeint.c vf_eq.c vf_halfpack.c
ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c
NATIVE_SRCS=native/RTjpegN.c native/cinepak.c native/cyuv.c native/fli.c native/minilzo.c native/msvidc.c native/nuppelvideo.c native/qtrle.c native/qtrpza.c native/qtsmc.c native/roqav.c native/xa_gsm.c native/svq1.c
Index: vd_vfw.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_vfw.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vd_vfw.c 30 Jul 2002 16:41:33 -0000 1.9
+++ vd_vfw.c 30 Aug 2002 20:47:18 -0000 1.10
@@ -20,22 +20,7 @@
"win32 codecs"
};
-static vd_info_t info_vfwex = {
- "Win32/VfWex video codecs",
- "vfwex",
- VFM_VFWEX,
- "A'rpi",
- "based on http://avifile.sf.net",
- "win32 codecs"
-};
-
-#define info info_vfw
LIBVD_EXTERN(vfw)
-#undef info
-
-#define info info_vfwex
-LIBVD_EXTERN(vfwex)
-#undef info
// to set/get/query special features/parameters
static int control(sh_video_t *sh,int cmd,void* arg,...){
@@ -52,18 +37,16 @@
// init driver
static int init(sh_video_t *sh){
if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_YUY2)) return 0;
- if(!init_vfw_video_codec(sh,(sh->codec->driver==VFM_VFWEX))) return 0;
+ if(!init_vfw_video_codec(sh,0)) return 0;
mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: Win32 video codec init OK!\n");
return 1;
}
// uninit driver
static void uninit(sh_video_t *sh){
- vfw_close_video_codec(sh, (sh->codec->driver==VFM_VFWEX));
+ vfw_close_video_codec(sh, 0);
}
-//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
-
// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
mp_image_t* mpi;
@@ -86,7 +69,7 @@
sh->bih->biWidth=mpi->width; //mpi->stride[0]/(mpi->bpp/8);
sh->o_bih.biWidth=mpi->width; //mpi->stride[0]/(mpi->bpp/8);
- if((ret=vfw_decode_video(sh,data,len,flags&3,(sh->codec->driver==VFM_VFWEX) ))){
+ if((ret=vfw_decode_video(sh,data,len,flags&3,0))){
mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error decompressing frame, err=%d\n",ret);
return NULL;
}
- Previous message: [Mplayer-cvslog] CVS: main/libmpcodecs ad.c,1.9,1.10 ad_faad.c,1.4,1.5 ad_libvorbis.c,1.4,1.5 ad_realaud.c,1.13,1.14 vd_realvid.c,1.12,1.13
- Next message: [Mplayer-cvslog] CVS: main/libmpcodecs vd_vfwex.c,1.1,1.2 vd_vfw.c,1.10,1.11
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list