# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_demux.h>
#include <vlc_codec.h>
static int Open ( vlc_object_t * );
static void Close( vlc_object_t * );
-vlc_module_begin();
- set_category( CAT_INPUT );
- set_subcategory( SUBCAT_INPUT_DEMUX );
- set_description( _("MPEG-I/II video demuxer" ) );
- set_capability( "demux", 100 );
- set_callbacks( Open, Close );
- add_shortcut( "mpgv" );
-vlc_module_end();
+vlc_module_begin ()
+ set_category( CAT_INPUT )
+ set_subcategory( SUBCAT_INPUT_DEMUX )
+ set_description( N_("MPEG-I/II video demuxer" ) )
+ set_capability( "demux", 100 )
+ set_callbacks( Open, Close )
+ add_shortcut( "mpgv" )
+vlc_module_end ()
/*****************************************************************************
* Local prototypes
p_sys->p_es = NULL;
/* Load the mpegvideo packetizer */
- INIT_VPACKETIZER( p_sys->p_packetizer, 'm', 'p', 'g', 'v' );
- es_format_Init( &p_sys->p_packetizer->fmt_out, UNKNOWN_ES, 0 );
- LOAD_PACKETIZER_OR_FAIL( p_sys->p_packetizer, "MPEG Video" );
+ es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_MPGV );
+ p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, "mpeg video" );
+ if( !p_sys->p_packetizer )
+ {
+ free( p_sys );
+ return VLC_EGENERIC;
+ }
/* create the output */
- es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
+ es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_MPGV );
p_sys->p_es = es_out_Add( p_demux->out, &fmt );
return VLC_SUCCESS;
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- DESTROY_PACKETIZER( p_sys->p_packetizer );
-
+ demux_PacketizerDestroy( p_sys->p_packetizer );
free( p_sys );
}