/*****************************************************************************
* sub.h
*****************************************************************************
- * Copyright (C) 2001-2003 VideoLAN
- * $Id: sub.h,v 1.13 2004/01/26 20:02:15 gbazin Exp $
+ * Copyright (C) 2001-2004 VideoLAN
+ * $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
+#include "../ps.h"
+
#define SUB_TYPE_MICRODVD 0x00
#define SUB_TYPE_SUBRIP 0x01
#define SUB_TYPE_SSA1 0x02
#define SUB_TYPE_SSA2_4 0x03
#define SUB_TYPE_VPLAYER 0x04
#define SUB_TYPE_SAMI 0x05
+#define SUB_TYPE_SUBVIEWER 0x06
#define SUB_TYPE_VOBSUB 0x100
#define SUB_TYPE_UNKNOWN 0xffff
} subtitle_t;
-#if 0
-typedef struct
-{
- int i_track_id;
- char *psz_header;
- int i_subtitle;
- int i_subtitles;
- subtitle_t *subtitle;
- char *psz_language;
-
- int i_previously_selected; /* to make pf_seek */
- es_descriptor_t *p_es;
-
-} subtitle_track_t;
-#endif
-
typedef struct subtitle_demux_s
{
VLC_COMMON_MEMBERS
int (*pf_open) ( struct subtitle_demux_s *p_sub,
input_thread_t*p_input,
char *psz_name,
- mtime_t i_microsecperframe,
- int i_track_id );
+ mtime_t i_microsecperframe );
int (*pf_demux)( struct subtitle_demux_s *p_sub, mtime_t i_maxdate );
int (*pf_seek) ( struct subtitle_demux_s *p_sub, mtime_t i_date );
void (*pf_close)( struct subtitle_demux_s *p_sub );
es_out_id_t *p_es;
int i_previously_selected; /* to make pf_seek */
FILE *p_vobsub_file;
-
- /*unsigned int i_tracks;
- subtitle_track_t *p_tracks
- */
+ mtime_t i_original_mspf;
} subtitle_demux_t;
* XXX: - if psz_name is NULL then --sub-file is read
* - i_microsecperframe is used only for microdvd file. (overriden
* by --sub-fps )
- * - it's at this point that --sub-delay is applied
*
*****************************************************************************/
static inline subtitle_demux_t *subtitle_New( input_thread_t *p_input,
char *psz_name,
- mtime_t i_microsecperframe,
- int i_track_id )
+ mtime_t i_microsecperframe )
{
subtitle_demux_t *p_sub;
p_sub = vlc_object_create( p_input, sizeof( subtitle_demux_t ) );
p_sub->psz_object_name = "subtitle demux";
vlc_object_attach( p_sub, p_input );
- p_sub->p_module = module_Need( p_sub, "subtitle demux", "" );
+ p_sub->p_module = module_Need( p_sub, "subtitle demux", NULL, 0 );
if( p_sub->p_module &&
- p_sub->pf_open( p_sub, p_input, psz_name, i_microsecperframe,
- i_track_id ) >=0 )
+ p_sub->pf_open( p_sub, p_input, psz_name, i_microsecperframe ) >=0 )
{
msg_Info( p_input, "subtitle started" );
msg_Info( p_sub, "subtitle stopped" );
if( p_sub )
{
+ p_sub->pf_close( p_sub );
vlc_object_detach( p_sub );
if( p_sub->p_module )
{