]> git.sesse.net Git - vlc/commitdiff
Added a subtitle properties to subpicture.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 13 Sep 2008 09:20:58 +0000 (11:20 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 13 Sep 2008 11:26:24 +0000 (13:26 +0200)
It will allow to have different procedures for osd subpicture and subtitle
subpicture.

include/vlc_osd.h
include/vlc_vout.h
src/input/decoder.c
src/video_output/vout_subpictures.c

index 0cfc3a3f69afab1ef5f074dbc7896d41479eae8e..7041d11c0d6075f64a67ac8032275d6c22ccb531 100644 (file)
@@ -123,7 +123,7 @@ VLC_EXPORT( subpicture_region_t *,__spu_CreateRegion, ( vlc_object_t *, video_fo
 VLC_EXPORT( subpicture_region_t *,__spu_MakeRegion, ( vlc_object_t *, video_format_t *, picture_t * ) );
 #define spu_DestroyRegion(a,b) __spu_DestroyRegion(VLC_OBJECT(a),b)
 VLC_EXPORT( void, __spu_DestroyRegion, ( vlc_object_t *, subpicture_region_t * ) );
-VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t, bool ) );
+VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t display_date, bool b_paused, bool b_subtitle_only ) );
 VLC_EXPORT( void, spu_RenderSubpictures, ( spu_t *,  video_format_t *, picture_t *, subpicture_t *, int, int ) );
 
 /** @}*/
index dde94956470082c46c253f411ba7d32180f0e19c..ccc0c4b16312ae0f26b6efdcc9e3b8617d49e2bb 100644 (file)
@@ -364,6 +364,7 @@ struct subpicture_t
     int          i_original_picture_height;/**< original height of the movie */
     bool         b_absolute;                       /**< position is absolute */
     int          i_flags;                                /**< position flags */
+    bool         b_subtitle;            /**< the picture is a movie subtitle */
      /**@}*/
 
     /** Pointer to function that renders this subtitle in a picture */
index 48df78a5184c46a02cd93c92ba5e20a86edfc241..db3927e042814de835a0ab5660f82ed18a36b037 100644 (file)
@@ -1440,6 +1440,7 @@ static subpicture_t *spu_new_buffer( decoder_t *p_dec )
     if( p_subpic )
     {
         p_subpic->i_channel = p_sys->i_spu_channel;
+        p_subpic->b_subtitle = true;
     }
 
     vlc_object_release( p_vout );
index 05378c6279757e675fe49fed293d17da3e360ffa..487dcefa0102b70bf8dced58d7b24750c6c5fba6 100644 (file)
@@ -394,6 +394,7 @@ subpicture_t *spu_CreateSubpicture( spu_t *p_spu )
     p_subpic->b_absolute = true;
     p_subpic->b_pausable = false;
     p_subpic->b_fade     = false;
+    p_subpic->b_subtitle = false;
     p_subpic->i_alpha    = 0xFF;
     p_subpic->p_region   = NULL;
     p_subpic->pf_render  = NULL;