From 8def9bf218ea5b9dd8036a4139450985f5b61ad4 Mon Sep 17 00:00:00 2001 From: Laurent Aimar Date: Sat, 13 Sep 2008 11:20:58 +0200 Subject: [PATCH] Added a subtitle properties to subpicture. It will allow to have different procedures for osd subpicture and subtitle subpicture. --- include/vlc_osd.h | 2 +- include/vlc_vout.h | 1 + src/input/decoder.c | 1 + src/video_output/vout_subpictures.c | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/vlc_osd.h b/include/vlc_osd.h index 0cfc3a3f69..7041d11c0d 100644 --- a/include/vlc_osd.h +++ b/include/vlc_osd.h @@ -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 ) ); /** @}*/ diff --git a/include/vlc_vout.h b/include/vlc_vout.h index dde9495647..ccc0c4b163 100644 --- a/include/vlc_vout.h +++ b/include/vlc_vout.h @@ -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 */ diff --git a/src/input/decoder.c b/src/input/decoder.c index 48df78a518..db3927e042 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -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 ); diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c index 05378c6279..487dcefa01 100644 --- a/src/video_output/vout_subpictures.c +++ b/src/video_output/vout_subpictures.c @@ -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; -- 2.39.2