vlc_module_begin ()
set_shortname( "Matroska" )
set_description( N_("Matroska stream demuxer" ) )
- set_capability( "demux", 0 )
+ set_capability( "demux", 50 )
set_callbacks( Open, Close )
set_category( CAT_INPUT )
set_subcategory( SUBCAT_INPUT_DEMUX )
- add_bool( "mkv-use-ordered-chapters", 1, NULL,
+ add_bool( "mkv-use-ordered-chapters", true, NULL,
N_("Ordered chapters"),
N_("Play ordered chapters as specified in the segment."), true );
- add_bool( "mkv-use-chapter-codec", 1, NULL,
+ add_bool( "mkv-use-chapter-codec", true, NULL,
N_("Chapter codecs"),
N_("Use chapter codecs found in the segment."), true );
- add_bool( "mkv-preload-local-dir", 1, NULL,
+ add_bool( "mkv-preload-local-dir", false, NULL,
N_("Preload Directory"),
N_("Preload matroska files from the same family in the same directory (not good for broken files)."), true );
- add_bool( "mkv-seek-percent", 0, NULL,
+ add_bool( "mkv-seek-percent", false, NULL,
N_("Seek based on percent not time"),
N_("Seek based on percent not time."), true );
- add_bool( "mkv-use-dummy", 0, NULL,
+ add_bool( "mkv-use-dummy", false, NULL,
N_("Dummy Elements"),
N_("Read and discard unknown EBML elements (not good for broken files)."), true );
goto error;
}
- if (config_GetInt( p_demux, "mkv-preload-local-dir" ))
+ if (var_InheritInteger( p_demux, "mkv-preload-local-dir" ))
{
/* get the files from the same dir from the same family (based on p_demux->psz_path) */
if (p_demux->psz_path[0] != '\0' && !strcmp(p_demux->psz_access, ""))
// assume it's a regular file
// get the directory path
s_path = p_demux->psz_path;
- if (s_path.at(s_path.length() - 1) == DIRECTORY_SEPARATOR)
+ if (s_path.at(s_path.length() - 1) == DIR_SEP_CHAR)
{
s_path = s_path.substr(0,s_path.length()-1);
}
else
{
- if (s_path.find_last_of(DIRECTORY_SEPARATOR) > 0)
+ if (s_path.find_last_of(DIR_SEP_CHAR) > 0)
{
- s_path = s_path.substr(0,s_path.find_last_of(DIRECTORY_SEPARATOR));
+ s_path = s_path.substr(0,s_path.find_last_of(DIR_SEP_CHAR));
}
}
{
if (strlen(psz_file) > 4)
{
- s_filename = s_path + DIRECTORY_SEPARATOR + psz_file;
+ s_filename = s_path + DIR_SEP_CHAR + psz_file;
#ifdef WIN32
if (!strcasecmp(s_filename.c_str(), p_demux->psz_path))
vlc_meta_t *p_meta;
input_attachment_t ***ppp_attach;
int *pi_int;
- int i;
switch( i_query )
{
p_sys->stored_attachments.size() );
if( !(*ppp_attach) )
return VLC_ENOMEM;
- for( i = 0; i < p_sys->stored_attachments.size(); i++ )
+ for( size_t i = 0; i < p_sys->stored_attachments.size(); i++ )
{
attachment_c *a = p_sys->stored_attachments[i];
(*ppp_attach)[i] = vlc_input_attachment_New( a->psz_file_name.c_str(), a->psz_mime_type.c_str(), NULL,
}
/* seek without index or without date */
- if( f_percent >= 0 && (config_GetInt( p_demux, "mkv-seek-percent" ) || !p_segment->b_cues || i_date < 0 ))
+ if( f_percent >= 0 && (var_InheritInteger( p_demux, "mkv-seek-percent" ) || !p_segment->b_cues || i_date < 0 ))
{
if( p_sys->f_duration >= 0 && p_segment->b_cues )
{
}
else
{
- if( !strcmp( tk->psz_codec, "V_MS/VFW/FOURCC" ) )
+ if( tk->b_dts_only )
{
- // in VFW we have no idea about B frames
- p_block->i_pts = 0;
+ p_block->i_pts = VLC_TS_INVALID;
p_block->i_dts = i_pts;
}
else
p_block->i_length = i_duration * 1000;
}
+ /* FIXME remove when VLC_TS_INVALID work is done */
+ if( i == 0 || p_block->i_dts > VLC_TS_INVALID )
+ p_block->i_dts += VLC_TS_0;
+ if( !tk->b_dts_only && ( i == 0 || p_block->i_pts > VLC_TS_INVALID ) )
+ p_block->i_pts += VLC_TS_0;
+
es_out_Send( p_demux->out, tk->p_es, p_block );
/* use time stamp only for first block */
- i_pts = 0;
+ i_pts = VLC_TS_INVALID;
}
}
else
p_sys->i_pts = (p_sys->i_chapter_time + block->GlobalTimecode()) / (mtime_t) 1000;
- es_out_Control( p_demux->out, ES_OUT_SET_PCR, p_sys->i_pts );
+ /* */
+ es_out_Control( p_demux->out, ES_OUT_SET_PCR, VLC_TS_0 + p_sys->i_pts );
if( p_sys->i_pts >= p_sys->i_start_pts )
{