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 0cfc3a3..7041d11 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 dde9495..ccc0c4b 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 48df78a..db3927e 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 05378c6..487dcef 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;