diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-07 17:42:31 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-04-07 17:42:31 +0000 |
commit | 0c9392449485c088d8aa25cb8b510c1489050537 (patch) | |
tree | 0a3d52a9c5496a168fe97bd97bb0c60af64b55eb /libmpcodecs/dec_video.c | |
parent | 76756940e4d6e57009e1385b71c614cc5df304e6 (diff) | |
download | mpv-0c9392449485c088d8aa25cb8b510c1489050537.tar.bz2 mpv-0c9392449485c088d8aa25cb8b510c1489050537.tar.xz |
vf control codes added, autoq support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5520 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/dec_video.c')
-rw-r--r-- | libmpcodecs/dec_video.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 936be20e22..cb6186534d 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -45,14 +45,31 @@ int divx_quality=0; vd_functions_t* mpvdec=NULL; int get_video_quality_max(sh_video_t *sh_video){ + vf_instance_t* vf=sh_video->vfilter; + if(vf){ + int ret=vf->control(vf,VFCTRL_QUERY_MAX_PP_LEVEL,NULL); + if(ret>0){ + mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Using external postprocessing filter, max q = %d\n",ret); + return ret; + } + } if(mpvdec){ int ret=mpvdec->control(sh_video,VDCTRL_QUERY_MAX_PP_LEVEL,NULL); - if(ret>=0) return ret; + if(ret>0){ + mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Using codec's postprocessing, max q = %d\n",ret); + return ret; + } } - return 0; + mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Sorry, postprocessing is not available\n"); + return 0; } void set_video_quality(sh_video_t *sh_video,int quality){ + vf_instance_t* vf=sh_video->vfilter; + if(vf){ + int ret=vf->control(vf,VFCTRL_SET_PP_LEVEL, (void*)(&quality)); + if(ret==CONTROL_TRUE) return; // success + } if(mpvdec) mpvdec->control(sh_video,VDCTRL_SET_PP_LEVEL, (void*)(&quality)); } |