Changeset 2ad5cc2ba9b397e6d8c3aa401ea3a054ff5634c5
- 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
| r4bf6d51 |
r2ad5cc2 |
|
| 469 | 469 | * @see vlc_osd.h |
|---|
| 470 | 470 | */ |
|---|
| 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 ) ); |
|---|
| | 471 | VLC_EXPORT( int, osd_Slider, ( vlc_object_t *, spu_t *, int, int, int, int, int, int, short ) ); |
|---|
| | 472 | VLC_EXPORT( int, osd_Icon, ( vlc_object_t *, spu_t *, int, int, int, int, int, short ) ); |
|---|
| 473 | 473 | |
|---|
| 474 | 474 | /** |
|---|
| r299ef0c |
r2ad5cc2 |
|
| 421 | 421 | 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); |
|---|
| 422 | 422 | 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); |
|---|
| 424 | 424 | 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); |
|---|
| 426 | 426 | void (*osd_Message_inner) (spu_t *, int, char *, ...); |
|---|
| 427 | 427 | int (*osd_ShowTextAbsolute_inner) (spu_t *, int, char *, text_style_t *, int, int, int, mtime_t, mtime_t); |
|---|
| r2cb472d |
r2ad5cc2 |
|
| 214 | 214 | int osd_Slider( vlc_object_t *p_this, spu_t *p_spu, |
|---|
| 215 | 215 | int i_render_width, int i_render_height, |
|---|
| | 216 | int i_margin_left, int i_margin_bottom, |
|---|
| 216 | 217 | int i_channel, int i_position, short i_type ) |
|---|
| 217 | 218 | { |
|---|
| … | … | |
| 226 | 227 | |
|---|
| 227 | 228 | 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 | |
|---|
| 229 | 232 | if( i_type == OSD_HOR_SLIDER ) |
|---|
| 230 | 233 | { |
|---|
| … | … | |
| 273 | 276 | *****************************************************************************/ |
|---|
| 274 | 277 | int 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 ) |
|---|
| 276 | 280 | { |
|---|
| 277 | 281 | subpicture_t *p_subpic; |
|---|
| … | … | |
| 285 | 289 | |
|---|
| 286 | 290 | 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; |
|---|
| 288 | 293 | i_width = i_render_width / 20; |
|---|
| 289 | 294 | i_height = i_width; |
|---|
| r2cb472d |
r2ad5cc2 |
|
| 130 | 130 | |
|---|
| 131 | 131 | 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 ); |
|---|
| 133 | 137 | |
|---|
| 134 | 138 | vlc_object_release( p_vout ); |
|---|
| r2cb472d |
r2ad5cc2 |
|
| 45 | 45 | { |
|---|
| 46 | 46 | 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 ); |
|---|
| 48 | 51 | } |
|---|
| 49 | 52 | vlc_object_release( p_vout ); |
|---|
| … | … | |
| 63 | 66 | if( config_GetInt( p_caller, "osd" ) ) |
|---|
| 64 | 67 | { |
|---|
| 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 ); |
|---|
| 67 | 76 | } |
|---|
| 68 | 77 | vlc_object_release( p_vout ); |
|---|