/*****************************************************************************
* demux.c
*****************************************************************************
- * Copyright (C) 1999-2004 the VideoLAN team
+ * Copyright (C) 1999-2004 VLC authors and VideoLAN
* $Id$
*
* Author: Laurent Aimar <fenrir@via.ecp.fr>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
return path;
}
-
+#undef demux_New
/*****************************************************************************
* demux_New:
* if s is NULL then load a access_demux
*****************************************************************************/
-demux_t *__demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
- const char *psz_access, const char *psz_demux,
- const char *psz_location,
- stream_t *s, es_out_t *out, bool b_quick )
+demux_t *demux_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
+ const char *psz_access, const char *psz_demux,
+ const char *psz_location,
+ stream_t *s, es_out_t *out, bool b_quick )
{
- static const char typename[] = "demux";
- demux_t *p_demux = vlc_custom_create( p_obj, sizeof( *p_demux ),
- VLC_OBJECT_GENERIC, typename );
+ demux_t *p_demux = vlc_custom_create( p_obj, sizeof( *p_demux ), "demux" );
const char *psz_module;
if( p_demux == NULL ) return NULL;
{ "oga", "ogg" }, { "spx", "ogg" }, { "ogv", "ogg" },
{ "ogx", "ogg" }, /*RFC5334*/
{ "pva", "pva" },
- { "rm", "rm" },
+ { "rm", "avformat" },
{ "m4v", "m4v" },
{ "h264", "h264" },
{ "voc", "voc" },
}
}
- /* Before module_need (for var_Create...) */
- vlc_object_attach( p_demux, p_obj );
-
if( s )
{
/* ID3/APE tags will mess-up demuxer probing so we skip it here.
* ID3/APE parsers will called later on in the demuxer to access the
* skipped info. */
- if( !SkipID3Tag( p_demux ) )
- SkipAPETag( p_demux );
+ while (SkipID3Tag( p_demux ))
+ ;
+ SkipAPETag( p_demux );
p_demux->p_module =
module_need( p_demux, "demux", psz_module,
}
return VLC_EGENERIC;
+ case DEMUX_GET_PTS_DELAY:
case DEMUX_GET_FPS:
case DEMUX_GET_META:
case DEMUX_HAS_UNSUPPORTED_META:
{
decoder_t *p_packetizer;
p_packetizer = vlc_custom_create( p_demux, sizeof( *p_packetizer ),
- VLC_OBJECT_GENERIC, "demux packetizer" );
+ "demux packetizer" );
if( !p_packetizer )
{
es_format_Clean( p_fmt );
p_packetizer->fmt_in = *p_fmt;
es_format_Init( &p_packetizer->fmt_out, UNKNOWN_ES, 0 );
- vlc_object_attach( p_packetizer, p_demux );
p_packetizer->p_module = module_need( p_packetizer, "packetizer", NULL, false );
if( !p_packetizer->p_module )
{