Mercurial > mplayer.hg
comparison libmpcodecs/dec_video.c @ 6989:b2ba67f6203e
messages moved from dec_??d?o.c
author | jaf |
---|---|
date | Tue, 13 Aug 2002 16:04:16 +0000 |
parents | 66427e850216 |
children | eca7dbad0166 |
comparison
equal
deleted
inserted
replaced
6988:d09524ea66b0 | 6989:b2ba67f6203e |
---|---|
47 int get_video_quality_max(sh_video_t *sh_video){ | 47 int get_video_quality_max(sh_video_t *sh_video){ |
48 vf_instance_t* vf=sh_video->vfilter; | 48 vf_instance_t* vf=sh_video->vfilter; |
49 if(vf){ | 49 if(vf){ |
50 int ret=vf->control(vf,VFCTRL_QUERY_MAX_PP_LEVEL,NULL); | 50 int ret=vf->control(vf,VFCTRL_QUERY_MAX_PP_LEVEL,NULL); |
51 if(ret>0){ | 51 if(ret>0){ |
52 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Using external postprocessing filter, max q = %d\n",ret); | 52 mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_UsingExternalPP,ret); |
53 return ret; | 53 return ret; |
54 } | 54 } |
55 } | 55 } |
56 if(mpvdec){ | 56 if(mpvdec){ |
57 int ret=mpvdec->control(sh_video,VDCTRL_QUERY_MAX_PP_LEVEL,NULL); | 57 int ret=mpvdec->control(sh_video,VDCTRL_QUERY_MAX_PP_LEVEL,NULL); |
58 if(ret>0){ | 58 if(ret>0){ |
59 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Using codec's postprocessing, max q = %d\n",ret); | 59 mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_UsingCodecPP,ret); |
60 return ret; | 60 return ret; |
61 } | 61 } |
62 } | 62 } |
63 // mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Sorry, postprocessing is not available\n"); | 63 // mp_msg(MSGT_DECVIDEO,MSGL_INFO,"[PP] Sorry, postprocessing is not available\n"); |
64 return 0; | 64 return 0; |
91 } | 91 } |
92 /* try software control */ | 92 /* try software control */ |
93 if(mpvdec) | 93 if(mpvdec) |
94 if( mpvdec->control(sh_video,VDCTRL_SET_EQUALIZER, item, (int *)value) | 94 if( mpvdec->control(sh_video,VDCTRL_SET_EQUALIZER, item, (int *)value) |
95 == CONTROL_OK) return 1; | 95 == CONTROL_OK) return 1; |
96 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Video attribute '%s' isn't supported by selected vo & vd! \n",item); | 96 mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_VideoAttributeNotSupportedByVO_VD,item); |
97 return 0; | 97 return 0; |
98 } | 98 } |
99 | 99 |
100 int get_video_colors(sh_video_t *sh_video,char *item,int *value) | 100 int get_video_colors(sh_video_t *sh_video,char *item,int *value) |
101 { | 101 { |
133 return 0; | 133 return 0; |
134 } | 134 } |
135 | 135 |
136 void uninit_video(sh_video_t *sh_video){ | 136 void uninit_video(sh_video_t *sh_video){ |
137 if(!sh_video->inited) return; | 137 if(!sh_video->inited) return; |
138 mp_msg(MSGT_DECVIDEO,MSGL_V,"uninit video: %d \n",sh_video->codec->driver); | 138 mp_msg(MSGT_DECVIDEO,MSGL_V,MSGTR_UninitVideo,sh_video->codec->driver); |
139 mpvdec->uninit(sh_video); | 139 mpvdec->uninit(sh_video); |
140 vf_uninit_filter_chain(sh_video->vfilter); | 140 vf_uninit_filter_chain(sh_video->vfilter); |
141 sh_video->inited=0; | 141 sh_video->inited=0; |
142 } | 142 } |
143 | 143 |
162 // ok, it matches all rules, let's find the driver! | 162 // ok, it matches all rules, let's find the driver! |
163 for (i=0; mpcodecs_vd_drivers[i] != NULL; i++) | 163 for (i=0; mpcodecs_vd_drivers[i] != NULL; i++) |
164 if(mpcodecs_vd_drivers[i]->info->id==sh_video->codec->driver) break; | 164 if(mpcodecs_vd_drivers[i]->info->id==sh_video->codec->driver) break; |
165 mpvdec=mpcodecs_vd_drivers[i]; | 165 mpvdec=mpcodecs_vd_drivers[i]; |
166 if(!mpvdec){ // driver not available (==compiled in) | 166 if(!mpvdec){ // driver not available (==compiled in) |
167 mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Requested video codec family [%s] (vfm=%d) not available (enable it at compile time!)\n", | 167 mp_msg(MSGT_DECVIDEO,MSGL_WARN,MSGTR_VideoCodecFamilyNotAvailable, |
168 sh_video->codec->name, sh_video->codec->driver); | 168 sh_video->codec->name, sh_video->codec->driver); |
169 continue; | 169 continue; |
170 } | 170 } |
171 // it's available, let's try to init! | 171 // it's available, let's try to init! |
172 if(sh_video->codec->flags & CODECS_FLAG_ALIGN16){ | 172 if(sh_video->codec->flags & CODECS_FLAG_ALIGN16){ |
179 sh_video->disp_w=(sh_video->disp_w+15)&(~15); | 179 sh_video->disp_w=(sh_video->disp_w+15)&(~15); |
180 sh_video->disp_h=(sh_video->disp_h+15)&(~15); | 180 sh_video->disp_h=(sh_video->disp_h+15)&(~15); |
181 } | 181 } |
182 } | 182 } |
183 // init() | 183 // init() |
184 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"Opening video decoder: [%s] %s\n",mpvdec->info->short_name,mpvdec->info->name); | 184 mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_OpeningVideoDecoder,mpvdec->info->short_name,mpvdec->info->name); |
185 if(!mpvdec->init(sh_video)){ | 185 if(!mpvdec->init(sh_video)){ |
186 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDecoder init failed :(\n"); | 186 mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_VDecoderInitFailed); |
187 continue; // try next... | 187 continue; // try next... |
188 } | 188 } |
189 // Yeah! We got it! | 189 // Yeah! We got it! |
190 sh_video->inited=1; | 190 sh_video->inited=1; |
191 return 1; | 191 return 1; |