Merge lp:~siegfried-winter/me-tv/just_a_test into lp:~lamothe-deactivatedaccount-deactivatedaccount/me-tv/stable

Proposed by siggi
Status: Rejected
Rejected by: Michael Lamothe
Proposed branch: lp:~siegfried-winter/me-tv/just_a_test
Merge into: lp:~lamothe-deactivatedaccount-deactivatedaccount/me-tv/stable
Diff against target: 74 lines (+33/-25)
1 file modified
src/dvb_si.cc (+33/-25)
To merge this branch: bzr merge lp:~siegfried-winter/me-tv/just_a_test
Reviewer Review Type Date Requested Status
Michael Lamothe final Disapprove
Review via email: mp+17162@code.launchpad.net
To post a comment you must log in.
Revision history for this message
siggi (siegfried-winter) wrote :

The parser of the service description section now only scans for services of the actual transport stream, indicated by tableID 0x42.

Revision history for this message
Michael Lamothe (lamothe-deactivatedaccount-deactivatedaccount) wrote :

I can see what you are doing here and it is a very practical approach. However, I think that there's a better way to get around this issue. What you are asking for is only tables that are only 0x42. There's a way to tell the DVB API to wait until you get one of these rather than looping.

See line 58 of dvb_scanner.cc of the current stable branch:

  demuxer_sds.set_filter(SDT_PID, SDT_ID);

Change it to,

  demuxer_sds.set_filter(SDT_PID, SDT_ID, 0xFF);

This tells the filter that you are only interested in tables of STD_ID (0x42). This should really be the default behaviour for the set_filter function but I have no testing team to check if this will break people in other places. But that's another discussion. Can you please test this for me?

review: Disapprove (final)
Revision history for this message
siggi (siegfried-winter) wrote :

Thank you Michael,

you see that am not familiar with DVB-technic and need your help.
I'll test your proposal this evening

Siegfried

Am Donnerstag, den 14.01.2010, 01:58 +0000 schrieb Michael Lamothe:
> Review: Disapprove final
> I can see what you are doing here and it is a very practical approach. However, I think that there's a better way to get around this issue. What you are asking for is only tables that are only 0x42. There's a way to tell the DVB API to wait until you get one of these rather than looping.
>
> See line 58 of dvb_scanner.cc of the current stable branch:
>
> demuxer_sds.set_filter(SDT_PID, SDT_ID);
>
> Change it to,
>
> demuxer_sds.set_filter(SDT_PID, SDT_ID, 0xFF);
>
> This tells the filter that you are only interested in tables of STD_ID (0x42). This should really be the default behaviour for the set_filter function but I have no testing team to check if this will break people in other places. But that's another discussion. Can you please test this for me?

Revision history for this message
siggi (siegfried-winter) wrote :

Michael,

I verified that your proposed modification is ok.
With the filter settings the demuxer only deliveres data sets beginning with 0x42. That 's what I need.
Could you please merge it to the oficial release.

Perhaps it could be useful to have a more sophisticated scan-algorithm. On ASTRA 19,2E I receive more than 1100 channels. It seems, that sometimes not all channels of a tranponder are sent with each dataset. It could be necessary to read more than one table to gather all programs.
It also might be useful to filter for tv or radio, scrambeld or free-to-air, different languages etc. ..
Would it be worth to think about such features?

Besides, if you need help for other test feel free to ask. I have Ubuntu 9.04, a skystar budget DVB-S card and receive Astra 19.2E.

Best regards

Siegfried

----- Original Nachricht ----
Von: Michael Lamothe <email address hidden>
An: <email address hidden>
Datum: 14.01.2010 02:58
Betreff: Re: [Merge] lp:~siegfried-winter/me-tv/just_a_test into lp:me-tv

> Review: Disapprove final
> I can see what you are doing here and it is a very practical approach.
> However, I think that there's a better way to get around this issue. What
> you are asking for is only tables that are only 0x42. There's a way to tell
> the DVB API to wait until you get one of these rather than looping.
>
> See line 58 of dvb_scanner.cc of the current stable branch:
>
> demuxer_sds.set_filter(SDT_PID, SDT_ID);
>
> Change it to,
>
> demuxer_sds.set_filter(SDT_PID, SDT_ID, 0xFF);
>
> This tells the filter that you are only interested in tables of STD_ID
> (0x42). This should really be the default behaviour for the set_filter
> function but I have no testing team to check if this will break people in
> other places. But that's another discussion. Can you please test this for
> me?
> --
> https://code.launchpad.net/~siegfried-winter/me-tv/just_a_test/+merge/17162
> You are the owner of lp:~siegfried-winter/me-tv/just_a_test.
>

Schluss mit teuer - her mit den Schnäppchen!
Jetzt alle Discounter-Angebote von Aldi über Douglas bis Schlecker übersichtlich für Sie geordnet - jetzt klicken und sparen!
http://www.arcor.de/rd/footer.discounto

Unmerged revisions

291. By Siegfried Winter <swinter@x24>

while scannig skip service IDs of wrong transponders

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/dvb_si.cc'
2--- src/dvb_si.cc 2010-01-11 14:22:54 +0000
3+++ src/dvb_si.cc 2010-01-11 21:24:13 +0000
4@@ -76,37 +76,45 @@
5 void SectionParser::parse_sds (Demuxer& demuxer, ServiceDescriptionSection& section)
6 {
7 Buffer buffer;
8- demuxer.read_section(buffer);
9- gsize section_length = buffer.get_length();
10-
11- guint offset = 3;
12- section.transport_stream_id = buffer.get_bits(offset, 0, 16);
13- offset += 8;
14-
15- while (offset < section_length - 4)
16+ guint loop_counter = 0;
17+ do
18 {
19- Service service;
20- service.id = buffer.get_bits(offset, 0, 16);
21- offset += 3;
22- guint descriptors_loop_length = buffer.get_bits(offset, 4, 12);
23- offset += 2;
24- guint descriptors_end_offset = offset + descriptors_loop_length;
25- while (offset < descriptors_end_offset)
26+ demuxer.read_section(buffer);
27+ gsize section_length = buffer.get_length();
28+ if (buffer[0] == 0x42)
29 {
30- guint descriptor_tag = buffer[offset];
31- guint descriptor_length = buffer[offset + 1];
32- if (descriptor_tag == 0x48)
33+ loop_counter = 10;
34+ guint offset = 3;
35+ section.transport_stream_id = buffer.get_bits(offset, 0, 16);
36+ offset += 8;
37+
38+ while (offset < section_length - 4)
39 {
40- service.type = buffer[offset + 2];
41- guint service_provider_name_length = get_text(service.provider_name, buffer.get_buffer() + offset + 3);
42- get_text(service.name, buffer.get_buffer() + offset + 3 + service_provider_name_length);
43+ Service service;
44+ service.id = buffer.get_bits(offset, 0, 16);
45+ offset += 3;
46+ guint descriptors_loop_length = buffer.get_bits(offset, 4, 12);
47+ offset += 2;
48+ guint descriptors_end_offset = offset + descriptors_loop_length;
49+ while (offset < descriptors_end_offset)
50+ {
51+ guint descriptor_tag = buffer[offset];
52+ guint descriptor_length = buffer[offset + 1];
53+ if (descriptor_tag == 0x48)
54+ {
55+ service.type = buffer[offset + 2];
56+ guint service_provider_name_length = get_text(service.provider_name, buffer.get_buffer() + offset + 3);
57+ get_text(service.name, buffer.get_buffer() + offset + 3 + service_provider_name_length);
58+ }
59+
60+ offset += descriptor_length + 2;
61+ }
62+
63+ section.services.push_back(service);
64 }
65-
66- offset += descriptor_length + 2;
67 }
68-
69- section.services.push_back(service);
70 }
71+ while (loop_counter++ < 10) ;
72 }
73
74 void SectionParser::parse_nis (Demuxer& demuxer, NetworkInformationSection& section)

Subscribers

People subscribed via source and target branches