* header in bytes.
*/
static inline int PESHeader( uint8_t *p_hdr, mtime_t i_pts, mtime_t i_dts,
- int i_es_size, es_format_t *p_fmt,
+ int i_es_size, const es_format_t *p_fmt,
int i_stream_id, bool b_mpeg2,
bool b_data_alignment, int i_header_size )
{
* VIDEO_ES, set to INT_MAX.
*/
void EStoPES ( block_t **pp_pes,
- es_format_t *p_fmt, int i_stream_id,
+ const es_format_t *p_fmt, int i_stream_id,
int b_mpeg2, int b_data_alignment, int i_header_size,
int i_max_pes_size, mtime_t ts_offset )
{
#define PES_PAYLOAD_SIZE_MAX 65500
void EStoPES ( block_t **pp_pes,
- es_format_t *p_fmt, int i_stream_id,
+ const es_format_t *p_fmt, int i_stream_id,
int b_mpeg2, int b_data_alignment, int i_header_size,
int i_max_pes_size, mtime_t ts_offset );
static int Mux ( sout_mux_t * );
static block_t *FixPES( sout_mux_t *p_mux, block_fifo_t *p_fifo );
-static block_t *Add_ADTS( block_t *, es_format_t * );
+static block_t *Add_ADTS( block_t *, const es_format_t * );
static void TSSchedule ( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts,
mtime_t i_pcr_length, mtime_t i_pcr_dts );
static void TSDate ( sout_mux_t *p_mux, sout_buffer_chain_t *p_chain_ts,
else
{
/* Copy extra data (VOL for MPEG-4 and extra BitMapInfoHeader for VFW */
- es_format_t *fmt = p_input->p_fmt;
+ const es_format_t *fmt = p_input->p_fmt;
if( fmt->i_extra > 0 )
{
p_stream->pes.i_extra = fmt->i_extra;
}
}
-static block_t *Add_ADTS( block_t *p_data, es_format_t *p_fmt )
+static block_t *Add_ADTS( block_t *p_data, const es_format_t *p_fmt )
{
#define ADTS_HEADER_SIZE 7 /* CRC needs 2 more bytes */
- uint8_t *p_extra = p_fmt->p_extra;
+ const uint8_t *p_extra = p_fmt->p_extra;
if( !p_data || p_fmt->i_extra < 2 || !p_extra )
return p_data; /* no data to construct the headers */