Changeset 2ad5cc2ba9b397e6d8c3aa401ea3a054ff5634c5

Show
Ignore:
Timestamp:
04/07/06 00:41:06 (2 years ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1144363266 +0000
git-parent:

[eaba550ead33eb5d16ab3fc673df98e6d69a9fe1]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1144363266 +0000
Message:

Fix OSD display when vout crop is used (so that every thing stays on the displayed image).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_osd.h

    r4bf6d51 r2ad5cc2  
    469469 * @see vlc_osd.h 
    470470 */ 
    471 VLC_EXPORT( int, osd_Slider, ( vlc_object_t *, spu_t *, int, int, int, int, short ) ); 
    472 VLC_EXPORT( int, osd_Icon, ( vlc_object_t *, spu_t *, int, int, int, short ) ); 
     471VLC_EXPORT( int, osd_Slider, ( vlc_object_t *, spu_t *, int, int, int, int, int, int, short ) ); 
     472VLC_EXPORT( int, osd_Icon, ( vlc_object_t *, spu_t *, int, int, int, int, int, short ) ); 
    473473 
    474474/** 
  • include/vlc_symbols.h

    r299ef0c r2ad5cc2  
    421421    int (*__vlc_execve_inner) (vlc_object_t *p_object, int i_argc, char **pp_argv, char **pp_env, char *psz_cwd, char *p_in, int i_in, char **pp_data, int *pi_data); 
    422422    httpd_handler_t * (*httpd_HandlerNew_inner) (httpd_host_t *, const char *psz_url, const char *psz_user, const char *psz_password, const vlc_acl_t *p_acl, httpd_handler_callback_t pf_fill, httpd_handler_sys_t *); 
    423     int (*osd_Slider_inner) (vlc_object_t *, spu_t *, int, int, int, int, short); 
     423    int (*osd_Slider_inner) (vlc_object_t *, spu_t *, int, int, int, int, int, int, short); 
    424424    int (*osd_ShowTextRelative_inner) (spu_t *, int, char *, text_style_t *, int, int, int, mtime_t); 
    425     int (*osd_Icon_inner) (vlc_object_t *, spu_t *, int, int, int, short); 
     425    int (*osd_Icon_inner) (vlc_object_t *, spu_t *, int, int, int, int, int, short); 
    426426    void (*osd_Message_inner) (spu_t *, int, char *, ...); 
    427427    int (*osd_ShowTextAbsolute_inner) (spu_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t); 
  • src/osd/osd_widgets.c

    r2cb472d r2ad5cc2  
    214214int osd_Slider( vlc_object_t *p_this, spu_t *p_spu, 
    215215    int i_render_width, int i_render_height, 
     216    int i_margin_left, int i_margin_bottom, 
    216217    int i_channel, int i_position, short i_type ) 
    217218{ 
     
    226227 
    227228    i_y_margin = i_render_height / 10; 
    228     i_x_margin = i_y_margin; 
     229    i_x_margin = i_y_margin + i_margin_left; 
     230    i_y_margin += i_margin_bottom; 
     231 
    229232    if( i_type == OSD_HOR_SLIDER ) 
    230233    { 
     
    273276 *****************************************************************************/ 
    274277int osd_Icon( vlc_object_t *p_this, spu_t *p_spu, 
    275     int i_render_width, int i_render_height, int i_channel, short i_type ) 
     278    int i_render_width, int i_render_height, int i_margin_right, 
     279    int i_margin_top, int i_channel, short i_type ) 
    276280{ 
    277281    subpicture_t *p_subpic; 
     
    285289 
    286290    i_y_margin = i_render_height / 15; 
    287     i_x_margin = i_y_margin; 
     291    i_x_margin = i_y_margin + i_margin_right; 
     292    i_y_margin += i_margin_top; 
    288293    i_width = i_render_width / 20; 
    289294    i_height = i_width; 
  • src/video_output/video_text.c

    r2cb472d r2ad5cc2  
    130130 
    131131        vout_ShowTextRelative( p_vout, i_channel, psz_string, NULL, 
    132                                OSD_ALIGN_TOP|OSD_ALIGN_RIGHT, 30,20,1000000 ); 
     132                               OSD_ALIGN_TOP|OSD_ALIGN_RIGHT, 
     133                               30 + p_vout->fmt_in.i_width 
     134                                  - p_vout->fmt_in.i_visible_width 
     135                                  - p_vout->fmt_in.i_x_offset, 
     136                               20 + p_vout->fmt_in.i_y_offset, 1000000 ); 
    133137 
    134138        vlc_object_release( p_vout ); 
  • src/video_output/video_widgets.c

    r2cb472d r2ad5cc2  
    4545    { 
    4646        osd_Slider( p_caller, p_vout->p_spu, p_vout->render.i_width, 
    47             p_vout->render.i_height, i_channel, i_position, i_type ); 
     47            p_vout->render.i_height, p_vout->fmt_in.i_x_offset, 
     48            p_vout->fmt_in.i_height - p_vout->fmt_in.i_visible_height 
     49                                    - p_vout->fmt_in.i_y_offset, 
     50            i_channel, i_position, i_type ); 
    4851    } 
    4952    vlc_object_release( p_vout ); 
     
    6366    if( config_GetInt( p_caller, "osd" ) ) 
    6467    { 
    65         osd_Icon( p_caller, p_vout->p_spu, p_vout->render.i_width, 
    66             p_vout->render.i_height, i_channel, i_type ); 
     68        osd_Icon( p_caller, 
     69                  p_vout->p_spu, 
     70                  p_vout->render.i_width, 
     71                  p_vout->render.i_height, 
     72                  p_vout->fmt_in.i_width - p_vout->fmt_in.i_visible_width 
     73                                         - p_vout->fmt_in.i_x_offset, 
     74                  p_vout->fmt_in.i_y_offset, 
     75                  i_channel, i_type ); 
    6776    } 
    6877    vlc_object_release( p_vout );