- va_start( args, i_query );
- i_result = demux2_vaControl( p_demux, i_query, args );
- va_end( args );
- return i_result;
-}
+/**
+ * This function will create a packetizer suitable for a demuxer that parses
+ * elementary stream.
+ *
+ * The provided es_format_t will be cleaned on error or by
+ * demux_PacketizerDestroy.
+ */
+VLC_EXPORT( decoder_t *,demux_PacketizerNew, ( demux_t *p_demux, es_format_t *p_fmt, const char *psz_msg ) LIBVLC_USED );
+
+/**
+ * This function will destroy a packetizer create by demux_PacketizerNew.
+ */
+VLC_EXPORT( void, demux_PacketizerDestroy, ( decoder_t *p_packetizer ) );
+
+/**
+ * This function will return the parent input of this demux.
+ * It is retained. Can return NULL.
+ */
+VLC_EXPORT( input_thread_t *, demux_GetParentInput, ( demux_t *p_demux ) LIBVLC_USED );
+
+/* */
+#define DEMUX_INIT_COMMON() do { \
+ p_demux->pf_control = Control; \
+ p_demux->pf_demux = Demux; \
+ p_demux->p_sys = calloc( 1, sizeof( demux_sys_t ) ); \
+ if( !p_demux->p_sys ) return VLC_ENOMEM;\
+ } while(0)
+