* object. The types are declared in the include file include/vlc_osd.h
* @see vlc_osd.h
*/
-VLC_EXPORT( int, osd_Slider, ( vlc_object_t *, spu_t *, int, int, int, int, short ) );
-VLC_EXPORT( int, osd_Icon, ( vlc_object_t *, spu_t *, int, int, int, short ) );
+VLC_EXPORT( int, osd_Slider, ( vlc_object_t *, spu_t *, int, int, int, int, int, int, short ) );
+VLC_EXPORT( int, osd_Icon, ( vlc_object_t *, spu_t *, int, int, int, int, int, short ) );
/**
* Loading and parse the OSD Configuration file
void (*httpd_HandlerDelete_inner) (httpd_handler_t *);
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);
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 *);
- int (*osd_Slider_inner) (vlc_object_t *, spu_t *, int, int, int, int, short);
+ int (*osd_Slider_inner) (vlc_object_t *, spu_t *, int, int, int, int, int, int, short);
int (*osd_ShowTextRelative_inner) (spu_t *, int, char *, text_style_t *, int, int, int, mtime_t);
- int (*osd_Icon_inner) (vlc_object_t *, spu_t *, int, int, int, short);
+ int (*osd_Icon_inner) (vlc_object_t *, spu_t *, int, int, int, int, int, short);
void (*osd_Message_inner) (spu_t *, int, char *, ...);
int (*osd_ShowTextAbsolute_inner) (spu_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t);
char * (*config_GetUserDir_inner) (void);
*****************************************************************************/
int osd_Slider( vlc_object_t *p_this, spu_t *p_spu,
int i_render_width, int i_render_height,
+ int i_margin_left, int i_margin_bottom,
int i_channel, int i_position, short i_type )
{
subpicture_t *p_subpic;
}
i_y_margin = i_render_height / 10;
- i_x_margin = i_y_margin;
+ i_x_margin = i_y_margin + i_margin_left;
+ i_y_margin += i_margin_bottom;
+
if( i_type == OSD_HOR_SLIDER )
{
i_width = i_render_width - 2 * i_x_margin;
* Types are: OSD_PLAY_ICON, OSD_PAUSE_ICON, OSD_SPEAKER_ICON, OSD_MUTE_ICON
*****************************************************************************/
int osd_Icon( vlc_object_t *p_this, spu_t *p_spu,
- int i_render_width, int i_render_height, int i_channel, short i_type )
+ int i_render_width, int i_render_height, int i_margin_right,
+ int i_margin_top, int i_channel, short i_type )
{
subpicture_t *p_subpic;
int i_x_margin, i_y_margin, i_x, i_y, i_width, i_height;
}
i_y_margin = i_render_height / 15;
- i_x_margin = i_y_margin;
+ i_x_margin = i_y_margin + i_margin_right;
+ i_y_margin += i_margin_top;
i_width = i_render_width / 20;
i_height = i_width;
i_x = i_render_width - i_x_margin - i_width;
vasprintf( &psz_string, psz_format, args );
vout_ShowTextRelative( p_vout, i_channel, psz_string, NULL,
- OSD_ALIGN_TOP|OSD_ALIGN_RIGHT, 30,20,1000000 );
+ OSD_ALIGN_TOP|OSD_ALIGN_RIGHT,
+ 30 + p_vout->fmt_in.i_width
+ - p_vout->fmt_in.i_visible_width
+ - p_vout->fmt_in.i_x_offset,
+ 20 + p_vout->fmt_in.i_y_offset, 1000000 );
vlc_object_release( p_vout );
free( psz_string );
if( p_vout && ( config_GetInt( p_caller, "osd" ) || ( i_position >= 0 ) ) )
{
osd_Slider( p_caller, p_vout->p_spu, p_vout->render.i_width,
- p_vout->render.i_height, i_channel, i_position, i_type );
+ p_vout->render.i_height, p_vout->fmt_in.i_x_offset,
+ p_vout->fmt_in.i_height - p_vout->fmt_in.i_visible_height
+ - p_vout->fmt_in.i_y_offset,
+ i_channel, i_position, i_type );
}
vlc_object_release( p_vout );
}
if( config_GetInt( p_caller, "osd" ) )
{
- osd_Icon( p_caller, p_vout->p_spu, p_vout->render.i_width,
- p_vout->render.i_height, i_channel, i_type );
+ osd_Icon( p_caller,
+ p_vout->p_spu,
+ p_vout->render.i_width,
+ p_vout->render.i_height,
+ p_vout->fmt_in.i_width - p_vout->fmt_in.i_visible_width
+ - p_vout->fmt_in.i_x_offset,
+ p_vout->fmt_in.i_y_offset,
+ i_channel, i_type );
}
vlc_object_release( p_vout );
}