]> git.sesse.net Git - vlc/commitdiff
* include/vlc_video.h, src/video_output/vout_subpictures.c: added an i_alpha member...
authorGildas Bazin <gbazin@videolan.org>
Thu, 16 Dec 2004 20:27:12 +0000 (20:27 +0000)
committerGildas Bazin <gbazin@videolan.org>
Thu, 16 Dec 2004 20:27:12 +0000 (20:27 +0000)
include/vlc_video.h
src/video_output/vout_subpictures.c

index 14c497dc4417dc679d676f9f0b07d6a8405d3905..9b973fd4ffb1a04db8045eb8872d7f611ec67158 100644 (file)
@@ -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 */
index 31fe32772c6ff5e1344da9f733eea7aebc214590..87d13a169c5535b1a6e24435d99311d86f7b1f19 100644 (file)
@@ -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;
         }