/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h>
#include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/sout.h>
+#include <vlc_sout.h>
+#include <vlc_codecs.h>
+#include <vlc_block.h>
-#include "codecs.h"
#include "bits.h"
#include "pes.h"
int i_system_header;
int i_dts_delay;
int i_rate_bound; /* units of 50 bytes/second */
-
+
int64_t i_instant_bitrate;
int64_t i_instant_size;
int64_t i_instant_dts;
vlc_value_t val;
msg_Info( p_mux, "Open" );
- sout_CfgParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
+ config_ChainParse( p_mux, SOUT_CFG_PREFIX, ppsz_sout_options, p_mux->p_cfg );
p_mux->pf_control = Control;
p_mux->pf_addstream = AddStream;
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
ps_stream_t *p_stream;
-
+
msg_Dbg( p_mux, "adding input codec=%4.4s",
(char*)&p_input->p_fmt->i_codec );
p_sys->i_instant_bitrate += p_input->p_fmt->i_bitrate + 1000/* overhead */;
/* FIXME -- spec requires an upper limit rate boundary in the system header;
- our codecs are VBR; using 2x nominal rate, convert to 50 bytes/sec */
+ our codecs are VBR; using 2x nominal rate, convert to 50 bytes/sec */
p_sys->i_rate_bound += p_input->p_fmt->i_bitrate * 2 / (8 * 50);
p_sys->i_psm_version++;
bits_write( &bits, 32, 0x01bb );
bits_write( &bits, 16, 12 - 6 + i_nb_stream * 3 );
bits_write( &bits, 1, 1 ); // marker bit
- bits_write( &bits, 22, i_rate_bound);
+ bits_write( &bits, 22, i_rate_bound);
bits_write( &bits, 1, 1 ); // marker bit
bits_write( &bits, 6, p_sys->i_audio_bound );
sout_input_t *p_input = p_mux->pp_inputs[i];
block_t *p_data;
- if( p_input->p_fifo->i_depth <= 0 )
+ if( block_FifoCount( p_input->p_fifo ) <= 0 )
{
if( p_input->p_fmt->i_cat == AUDIO_ES ||
p_input->p_fmt->i_cat == VIDEO_ES )