Commit bd7169e9 authored by Gildas Bazin's avatar Gildas Bazin

* include/vlc_video.h, src/video_output/vout_subpictures.c: added an i_alpha...

* include/vlc_video.h, src/video_output/vout_subpictures.c: added an i_alpha member to subpicture_t to specify the transpareny of the subpicture.
parent ddd93218
......@@ -241,10 +241,9 @@ struct subpicture_t
/**@{*/
mtime_t i_start; /**< beginning of display date */
mtime_t i_stop; /**< end of display date */
vlc_bool_t b_ephemer; /**< If this flag is set to true
the subtitle will be displayed
untill the next one appear */
vlc_bool_t b_fade; /**< enable fading */
vlc_bool_t b_ephemer; /**< If this flag is set to true the subtitle
will be displayed untill the next one appear */
vlc_bool_t b_fade; /**< enable fading */
/**@}*/
subpicture_region_t *p_region; /**< region list composing this subtitle */
......@@ -258,6 +257,7 @@ struct subpicture_t
int i_y; /**< offset from alignment position */
int i_width; /**< picture width */
int i_height; /**< picture height */
int i_alpha; /**< transparency */
int i_original_picture_width; /**< original width of the movie */
int i_original_picture_height;/**< original height of the movie */
int b_absolute; /**< position is absolute */
......
......@@ -373,6 +373,8 @@ subpicture_t *spu_CreateSubpicture( spu_t *p_spu )
p_subpic->i_status = RESERVED_SUBPICTURE;
p_subpic->b_absolute = VLC_TRUE;
p_subpic->b_fade = VLC_FALSE;
p_subpic->i_alpha = 0xFF;
p_subpic->p_region = 0;
p_subpic->pf_render = 0;
p_subpic->pf_destroy = 0;
p_subpic->p_sys = 0;
......@@ -749,7 +751,7 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
p_spu->p_blend->pf_video_blend( p_spu->p_blend, p_pic_dst,
p_pic_src, &p_region->picture, i_x_offset, i_y_offset,
i_fade_alpha );
i_fade_alpha * p_subpic->i_alpha / 255 );
p_region = p_region->p_next;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment