Need advice on reading TS without PAT/PMT

Christophe Massiot massiot at via.ecp.fr
Tue Mar 13 15:15:32 CET 2001


On Tue, Mar 13, 2001, Steve Brown wrote:

> I am working with a pc satellite demodulator. The driver supports
> filtering of an audio & video PID. Is there a simple way to circumvent
> the PAT/PMT mechanism in input_TS.c and mpeg_systems.c so I can route
> the output of the driver directly to vlc?

That's a bit tricky, but you can try :
* comment out DemuxPSI in mpeg_system.c:1126 ;
* comment out input_ts.c from line 175 ;
* at the end of TSInit(), add your ES PID :
input_AddProgram( p_input, 0, sizeof(pgrm_ts_data_t) ); /* generic program */
input_AddES( p_input, p_input->stream.pp_programs[0], 0x42, sizeof(es_ts_data_t) );
/* where 0x42 is the PID of the video given by your board */
p_input->stream.pp_programs[0]->pp_es[0].i_type = MPEG2_VIDEO_ES;
input_SelectES( p_input, p_input->stream.pp_programs[0]->pp_es[0] );
/* This is quick & dirty */

The comments in input_programs.c might help you.
Of course there is a cleaner way to do it, but hey, where is the fun ?

> I've considered adding a correct PAT/PMT to the filtered stream in the
> driver, but this seems like a lot of work, checksums and all.

It's not easy. Check out the VideoLAN server's sources, they have a PSI
generator. vlc does not check checksums, too much trouble :-).

-- 
Christophe Massiot.




More information about the vlc mailing list