Great! Just a question, is anyone currently working on libdvbsi (or any other part of dvb-apps)? I would be glad to be able to contribute some by fixing the streams code and any other part that may need some polishing. Regards, Henrik > Henrik Sjoberg wrote: > >>Thanks for clarifying for me. >> >>I looked a bit more into the specs and the code in dvb-apps. I have found >>some problems in the dvbsi lib (mainly descriptor.c) which cause the >>stream not to be parsed correctly. After some corrections, my ca_zap >> looks >>like this: >> >>[root@evermeet dvb-apps]# util/ca_zap/ca_zap -c ~/.tzap/channels.conf -n >>TV3 -t ter >>Using Adpater=[/dev/dvb/adapter0] >> Frontend=[/dev/dvb/adapter0/frontend0] >> Demux=[/dev/dvb/adapter0/demux0] >> Slot=[/dev/dvb/adapter0/ca0] >>Parsing /root/.tzap/channels.conf >>Terrestrial frontend >>Channel TV3 >>parse_ter_channel_list: Channel=[TV3], Frequency=[786000000], >>Video=[1039], Audio=[1038], Service=[1030] >>Service ID=[1030] >>parse_pat: ----------------->parse PAT section >>parse_pat: PAT => Section Length=[73], TS ID=[1110] >>parse_si: PMT PID = [1030] >>parse_si: PAT: Close Demux /dev/dvb/adapter0/demux0 >>parse_pmt: PMT Words=[ 02 b0 73 04 06 c9 00 00 e4 0f f0 00 05 ef a4 f0 12 >>0f 04 4f 54 56 00 90 01 86 fe 04 45 50 47 32 fd 01 20 02 e4 0f f0 11 09 >> 0f >>05 00 e0 32 10 01 01 13 01 20 14 03 02 05 08 03 e4 0e f0 11 09 0f 05 00 >> e0 >>32 10 01 01 13 01 20 14 03 02 05 08 06 e4 0c f0 07 56 05 73 77 65 09 00 >> 05 >>e4 08 f0 12 0f 04 4f 54 56 00 90 01 86 fe 04 31 30 33 32 fd 01 80 e1 df >> dc >>cc ] >> >>parse_pmt: ----------->parse PMT section, PMT PID=[1030], bytes=[118] >>parse_pmt_header: Table ID=[2], Section Length=[115], Program >>Number=[1030], Section Number=[0], PCR PID=[1039], Program info >> length=[0] >>parse_pmt: Program info length=[0] >> >> parse_streams: Elements=[ 05 ef a4 f0 12 0f 04 4f 54 56 00 90 01 >>86 fe 04 45 50 47 32 fd 01 20] >> parse_streams: Stream=[0], Stream Type=[5], Elementary >> PID=[4004], >>ES info length=[18] >> >> parse_streams: Elements=[ 02 e4 0f f0 11 09 0f 05 00 e0 32 10 01 >>01 13 01 20 14 03 02 05 08] >> parse_streams: Stream=[1], Stream Type=[2], Elementary >> PID=[1039], >>ES info length=[17] >>INFO:: Parsing descriptor: parse_ca_descriptor, Tag=[09], Length=[15] >>parse_ca_descriptor: Tag=[09], Length=[0f], CA System=[500], CA PID=[32] >>parse_ca_descriptor: CA Private Data=[ 10 01 01 13 01 20 14 03 02 05 08 ] >>parse_ca_descriptor: Pos=[57] >> >> parse_streams: Elements=[ 03 e4 0e f0 11 09 0f 05 00 e0 32 10 01 >>01 13 01 20 14 03 02 05 08] >> parse_streams: Stream=[2], Stream Type=[3], Elementary >> PID=[1038], >>ES info length=[17] >>INFO:: Parsing descriptor: parse_ca_descriptor, Tag=[09], Length=[15] >>parse_ca_descriptor: Tag=[09], Length=[0f], CA System=[500], CA PID=[32] >>parse_ca_descriptor: CA Private Data=[ 10 01 01 13 01 20 14 03 02 05 08 ] >>parse_ca_descriptor: Pos=[79] >> >> parse_streams: Elements=[ 06 e4 0c f0 07 56 05 73 77 65 09 00] >> parse_streams: Stream=[3], Stream Type=[6], Elementary >> PID=[1036], >>ES info length=[7] >> >> parse_streams: Elements=[ 05 e4 08 f0 12 0f 04 4f 54 56 00 90 01 >>86 fe 04 31 30 33 32 fd 01 80] >> parse_streams: Stream=[4], Stream Type=[5], Elementary >> PID=[1032], >>ES info length=[18] >> >>copy_en50221_pmt_object: Copying EN50221 Header >>copy_en50221_pmt_object: Program Number=[1030], Program info length=[0] >>copy_en50221_pmt_object: Program level descriptor count=[0] >>copy_en50221_stream_object: Stream Type=[5], Elementary PID=[4004], ES >>length=[18], Number of descriptors=[0] >>copy_en50221_stream_object: Stream Type=[2], Elementary PID=[1039], ES >>length=[17], Number of descriptors=[0] >>copy_en50221_stream_object: Stream Type=[3], Elementary PID=[1038], ES >>length=[17], Number of descriptors=[0] >>copy_en50221_stream_object: Stream Type=[6], Elementary PID=[1036], ES >>length=[7], Number of descriptors=[0] >>copy_en50221_stream_object: Stream Type=[5], Elementary PID=[1032], ES >>length=[18], Number of descriptors=[0] >>do_en50221_pmt_object: CA PMT List Management=[03] >>set_pmt_command: Setting PMT Command >>do_en50221_pmt_object: Object length=[248], Total length=[31] >>asn_1_encode: Length=[31] >>asn_1_encode: length indicator=[1f] >>do_en50221_pmt_object: ASN.1 words=[1], Length Array=[ 31 ] >>en50221_encode_header: CA PMT List Mgmt=[3], Program Number=[1030], >>Program info length=[0] >>write_en50221_pmt_object: EN50221 header encoded >>en50221_encode_streams: Stream type=[05], ES PID=[fa4], ES Info >> length=[12] >>en50221_encode_streams: Stream type=[02], ES PID=[40f], ES Info >> length=[11] >>en50221_encode_streams: Stream type=[03], ES PID=[40e], ES Info >> length=[11] >>en50221_encode_streams: Stream type=[06], ES PID=[40c], ES Info >> length=[07] >>en50221_encode_streams: Stream type=[05], ES PID=[408], ES Info >> length=[12] >>debug_message: CA MESSAGE=[ 9f 80 32 1f 03 04 06 d1 10 00 05 ef a4 f0 00 >>02 e4 0f f0 00 03 e4 0e f0 00 06 e4 0c f0 00 05 e4 08 f0 00 ] >> >>this looks much better. However, the CA descriptors (that are actually >>found now) still can't be seen in the ca_pmt so there is probably still >>some problems left. >>Have to keep digging... >> >> > Yep, it looks better.. Only the CA descriptors should be used to compose > the CA_PMT message, the rest of the descriptors should be filtered out. > and once you have it composed, you should copy the descriptors from > stream level to program level. > > > Manu > > > >