Closed zignig closed 8 years ago
I have no time to write and test one now. If you have working section decoder d (i.e. you can read sections from it) try this:
var pat psi.PAT
checkErr(pat.Update(d, true))
pl := pat.ProgramList()
for !pl.IsEmpty() {
sid, pmtpid, pl := pl.Pop()
// ...
}
PMT table is always one section so if you can read sections from decoder simply use:
pmt = PMT(s)
to access it.
I'm not entirely satisfied with the current API for handling tables, but I use this code in production and it works well.
Better way for PMT:
pmt, err = psi.AsPMT(s)
Thanks for your reply,
I understand how you use the (item,remaining list ... ) construct now :).
And thanks for a cool DVB lib.
Simon
Is it possible to get an example for decoding tables ?
I have some ts streams that I am trying to the the PAT , PMT out.
ts.NewPacketReader -> get PID 0 -> PktQueue -> SectionDecoder -> tables.