[linux-dvb] Johannes' idea of simple zap (szap)

Manu Abraham manu at kromtek.com
Sun Jun 12 23:54:50 CEST 2005


Patrick Boettcher wrote:
> On Mon, 13 Jun 2005, Manu Abraham wrote:
>> What i had been doing was ca_zap was split up into 2 libs. One for 
>> parsing si
> 
> When I implemented PSIP-scanning to dvbscan I looked for a libsi to use 
> for section parsing, but I didn't find anything useful. I wrote 
> something for myself for scan (see atsc_psip_section* in utils/scan). In 

Hmm, the same way i was when i started up with ca_zap. I ended up 
writing a monolithic ca_zap which could not be modified at all for any 
other applications/bug-fixing.. It took me around 2 to 3 months (?) to 
get it to this state, since we had too much of a discussion.. ;-)

> fact it is a perl-script which generates c and header-files to have easy 
> and transparent access (no bitshifting and -masking in scancode) to 
> section-structures in scan. The current version lacks reading 
> variable-length string-fields, but I think this is solvable (libsi 
> should do the memory-management).
>

It is not a complete SI parser, at the moment it handles only PAT and 
PMT tables..

What i do is the bit-shifting and masking is done by specific routines, 
such that it look very clean indeed..

I think i should finish off ca_zap and libs such that you guys can take 
a look at it at the earliest.. Actually i have some quite modular code 
right now, thanks to the pressure Dominique put up..

> Parsing the section in the application looks like this:
> 
> struct ATSC_service_location_element e = 
> read_ATSC_service_location_element(b);
> 
> accessing it:
> 
> switch (e.stream_type) {
>  case 0x02: /* video */
>       s->video_pid = e.elementary_PID;
>

I parse the descriptors the same way.. But hand coded..


> and so on.
> 
> What do you think? Could this be a way to go on for SI?
> 

Hmmm.. i use quite some PAT and PMT parsing. I am doing a couple of 
descriptors at the moment. I was planning to add in parsing NVOD 
descriptors too for some stuff that i was working on for some NVOD 
decryption for DVB-S (Actually the modularization really helps there, as 
code duplication is really avoided)

I have quite some code there, if i happen to switch, that would make 
myself to rewrite hell a lot of code. The way i worked it out, 
liben50221 depends heavily on libsi, as CA_PMT objects are derived from 
SI only.

So it does not make much sense for me to switch over. In fact that would 
mean a complete rewrite ? If i am correct ..

Manu




More information about the linux-dvb mailing list