static void draw_osd(struct vf_instance *vf_,int w,int h){ vf=vf_;orig_w=w;orig_h=h; // printf("======================================\n"); if(vf->priv->exp_w!=w || vf->priv->exp_h!=h || vf->priv->exp_x || vf->priv->exp_y){ // yep, we're expanding image, not just copy. if(vf->dmpi->planes[0]!=vf->priv->fb_ptr){ // double buffering, so we need full clear :( if (vf->priv->exp_y > 0) remove_func_2(0,0,vf->priv->exp_w,vf->priv->exp_y); if (vf->priv->exp_y+h < vf->priv->exp_h) remove_func_2(0,vf->priv->exp_y+h,vf->priv->exp_w,vf->priv->exp_h-h-vf->priv->exp_y); if (vf->priv->exp_x > 0) remove_func_2(0,vf->priv->exp_y,vf->priv->exp_x,h); if (vf->priv->exp_x+w < vf->priv->exp_w) remove_func_2(vf->priv->exp_x+w,vf->priv->exp_y,vf->priv->exp_w-w-vf->priv->exp_x,h); } else { // partial clear: vo_remove_text(vf->priv->exp_w,vf->priv->exp_h,remove_func); } } vo_draw_text(vf->priv->exp_w,vf->priv->exp_h,draw_func); // save buffer pointer for double buffering detection - yes, i know it's // ugly method, but note that codecs with DR support does the same... if(vf->dmpi) vf->priv->fb_ptr=vf->dmpi->planes[0]; }
static void draw_osd(void){ char * vo_osd_text_save; int vo_osd_progbar_type_save; printosdprogbar(); /* let vo_draw_text only write subtitle */ vo_osd_text_save=vo_osd_text; /* we have to save the osd_text */ vo_osd_text=NULL; vo_osd_progbar_type_save=vo_osd_progbar_type; vo_osd_progbar_type=-1; vo_remove_text(aa_scrwidth(c), aa_scrheight(c),clear_alpha); vo_draw_text(aa_scrwidth(c), aa_scrheight(c), draw_alpha); vo_osd_text=vo_osd_text_save; vo_osd_progbar_type=vo_osd_progbar_type_save; }