changeset 4957:2826b2e5cbd3

new controls added for query/set pp level
author arpi
date Wed, 06 Mar 2002 22:02:51 +0000
parents 84f465d2ff16
children ca6f6b35baf4
files libmpcodecs/dec_video.c libmpcodecs/vd.h
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c	Wed Mar 06 21:59:24 2002 +0000
+++ b/libmpcodecs/dec_video.c	Wed Mar 06 22:02:51 2002 +0000
@@ -62,12 +62,16 @@
 static vd_functions_t* mpvdec=NULL;
 
 int get_video_quality_max(sh_video_t *sh_video){
-// switch(sh_video->codec->driver){
+  if(mpvdec){
+    int ret=mpvdec->control(sh_video,VDCTRL_QUERY_MAX_PP_LEVEL);
+    if(ret>=0) return ret;
+  }
  return 0;
 }
 
 void set_video_quality(sh_video_t *sh_video,int quality){
-// switch(sh_video->codec->driver){
+  if(mpvdec)
+    mpvdec->control(sh_video,VDCTRL_SET_PP_LEVEL, (void*)(&quality));
 }
 
 int set_video_colors(sh_video_t *sh_video,char *item,int value)
--- a/libmpcodecs/vd.h	Wed Mar 06 21:59:24 2002 +0000
+++ b/libmpcodecs/vd.h	Wed Mar 06 22:02:51 2002 +0000
@@ -35,6 +35,8 @@
 #define CONTROL_NA -3
 
 #define VDCTRL_QUERY_FORMAT 3 /* test for availabilty of a format */
+#define VDCTRL_QUERY_MAX_PP_LEVEL 4 /* test for postprocessing support (max level) */
+#define VDCTRL_SET_PP_LEVEL 5 /* test for postprocessing support (max level) */
 
 // callbacks:
 int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt);