Opened 16 years ago

Closed 14 years ago

#5562 closed defect (fixed)

scanning Astra 28.2 doesn't populate the default authority descriptor

Reported by: Stuart Auchterlonie Owned by: Janne Grunau
Priority: minor Milestone: 0.23
Component: MythTV - Channel Scanner Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

scanning Astra 28.2 (dvb-s) doesn't pickup the default authority descriptor. The equivalent scan on dvb-t picks up the default authority descriptors

This is used in EIT to create programid's & seriesid's

Stuart

Attachments (16)

patch1_addbat.patch (5.3 KB) - added by David Matthews <dm@…> 15 years ago.
patch2_descriptors_tables.patch (1.8 KB) - added by David Matthews <dm@…> 15 years ago.
patch3_listeners.patch (4.8 KB) - added by David Matthews <dm@…> 15 years ago.
patch4_scanning.patch (9.5 KB) - added by David Matthews <dm@…> 15 years ago.
ticket5562-quilt.tar.gz (5.6 KB) - added by Stuart Auchterlonie 15 years ago.
Quilt Patchset containing work in progress of patch4 of David's original set of patches
t5562_populate_default_authority.diff (20.2 KB) - added by Janne Grunau 15 years ago.
untested
t5562_populate_default_authority_r21414.diff (17.7 KB) - added by Janne Grunau 15 years ago.
t5562_default_authority_r21554.diff (19.6 KB) - added by Janne Grunau 15 years ago.
updated to r21554 and added verbose messages
log-dvbt-full-uk-scan-r21591-t5562.tar.bz2 (38.6 KB) - added by Nick Morrott <knowledgejunkie (at) gmail (dot) com> 15 years ago.
mythconverg-dvbt-full-uk-scan-r21591-t5562.sql.bz2 (4.8 KB) - added by Nick Morrott <knowledgejunkie (at) gmail (dot) com> 15 years ago.
log-dvbs-tuned-scan-astra2-r21591-t5562.tar.bz2 (10.4 KB) - added by Nick Morrott <knowledgejunkie (at) gmail (dot) com> 15 years ago.
mythconverg-dvbs-tuned-scan-astra2-r21591-t5562.sql.bz2 (1.7 KB) - added by Nick Morrott <knowledgejunkie (at) gmail (dot) com> 15 years ago.
defaultauthority-0-22-fixes-r23473.patch (11.9 KB) - added by Douglas Mackay <douglas.mackay@…> 14 years ago.
defaultauthority-trunk-r23491.patch (11.9 KB) - added by Douglas Mackay <douglas.mackay@…> 14 years ago.
defaultauthority_patch2-0-22-fixes-r23473.patch (9.1 KB) - added by Douglas Mackay <douglas.mackay@…> 14 years ago.
defaultauthority_patch2-trunk-r23491.patch (9.1 KB) - added by Douglas Mackay <douglas.mackay@…> 14 years ago.

Download all attachments as: .zip

Change History (41)

comment:1 Changed 16 years ago by anonymous

The descriptor is found in the BAT for satellite and as such covers all the services on a transponder.

comment:2 Changed 16 years ago by David Waring <david.waring@…>

Note: See #5603 for a patch for network level default authorities. BAT parsing would need to be added to that in order to satisfy this ticket.

comment:3 Changed 15 years ago by Dibblah

Status: newassigned

Changed 15 years ago by David Matthews <dm@…>

Attachment: patch1_addbat.patch added

Changed 15 years ago by David Matthews <dm@…>

Changed 15 years ago by David Matthews <dm@…>

Attachment: patch3_listeners.patch added

Changed 15 years ago by David Matthews <dm@…>

Attachment: patch4_scanning.patch added

comment:4 Changed 15 years ago by David Matthews <dm@…>

I've been looking into this and the attached patches enable the channel scanner to pick up the default authority from Freesat data. The default authority is actually transmitted using BAT and SDTo on the non-standard PID 3841. BAT is used where many channels share the same default authority, essentially BBC and ITV; and SDTo for the remainder. One complication that appeared during testing was that there are SDTo, and possibly BAT, on PID 0x11 with the same ID as those on PID 3841 but different versions.

Patches 1, 2 and 3 are fairly straightforward. I originally used the BAT code from #5530 but once it became clear that the layout of a BAT was essentially the same as a NIT I largely copied the code from there.

Patch 4, which adds this into the scanner, is more complicated. The existing logic is driven by the arrival of the NIT and SDT. When both have been seen the information from the SDT is added to the database and the next transport is selected. In the case of the Freesat default authority it is necessary to wait until all the information from the BAT and SDTo has been collected before the SDT can be processed, but with the proviso that not all services in the SDT have a default authority. This is done by looking at the SDT when it first arrives and setting a timer of 10 seconds for the first of the BAT and SDTo to arrive. Each BAT and SDTo is processed to add the default authorities to a map and the timer extended. The next time an SDT arrives after the time has expired it can be processed. This all works because DVBStreamData only allows tables with a particular version through once. The version for SDT is reset (actually DTVSignalMonitor::HandleSDT does this anyway) so that it can be seen again. The changes to ScanStreamData? are to ensure that only the BAT and SDTo on the desired pid are processed.

Note: While developing this patch I came across a bug that causes "mythtv-setup -v siparser" to segfault at the end of a channel scan. The problem is that the destructor for SIScan calls SIScan::loc after the channel object has been deleted. The fix is to set channel to zero in deleteLater and this fix is included in patch4.

comment:5 Changed 15 years ago by Stuart Auchterlonie

(In [19620]) Refs #5562. Fixes a channel scanner segfault that has been around for a while. The fix was found by David Matthews while working on this ticket. This one line is found in patch4_scanning.patch

comment:6 Changed 15 years ago by Stuart Auchterlonie

(In [20417]) Refs #5562, Refs #2695. Adds the Bouquet Table parsing class for BAT support.

comment:7 Changed 15 years ago by Stuart Auchterlonie

(In [20418]) Refs #5562, Refs #2695. Bouquet Table plumbing. Adds the plumbing to start collecting BAT tables as they are found in the broadcast stream.

comment:8 Changed 15 years ago by Stuart Auchterlonie

(In [20419]) Refs #5562, Refs #2695. Whitespace only cleanup of dvbdescriptors.cpp

comment:9 Changed 15 years ago by Stuart Auchterlonie

(In [20420]) Refs #5562, Refs #2695. A bunch of dvbdescriptor updates.

Creates a ServiceDescriptorMapping? class to provide a single point to convert service descriptors.

Make ServiceDescriptor? use the ServiceDescriptorMapping? class.

Make the BouquetNameDescriptor? toString useful.

Enhance the CountryAvailabilityDescriptor? to print out country codes.

Finish off ServiceListDescriptor? toString. Uses ServiceDescriptorMapping? class.

Adds DefaultAuthorityDescriptor?.

Add plumbing to print out DefaultAuthorityDescriptor?, BouquetNameDescriptor?, CountryAvailabilityDescriptor?, ServiceListDescriptor? when present in the broadcast stream.

comment:10 Changed 15 years ago by Stuart Auchterlonie

Status: assignedstarted

comment:11 Changed 15 years ago by Stuart Auchterlonie

(In [20652]) Refs #2695, Refs #5562. Adds default_authority column to channelscan_channel.

Default Authority's can be channel specific or mplex specific.

Changed 15 years ago by Stuart Auchterlonie

Attachment: ticket5562-quilt.tar.gz added

Quilt Patchset containing work in progress of patch4 of David's original set of patches

comment:12 Changed 15 years ago by Stuart Auchterlonie

Owner: changed from Stuart Auchterlonie to Janne Grunau
Status: startedassigned

I've uploaded the work in progress at porting Patch4 from David's original patchset to the new scanner. I'm not likely to have time to finish it before 0.22

What works: BAT parsing. DVB-T Default Authorities -> channelscan_channel What doesn't:

  • DVB-S BAT default authorities from BAT -> channelscan_dtv_multiplex
  • Default Authorities from channelscan_channel -> channel
  • Default Authorities from channelscan_dtv_multiplex -> dtv_multiplex

Changed 15 years ago by Janne Grunau

untested

comment:13 Changed 15 years ago by Janne Grunau

t5562_populate_default_authority.diff reworked from stuarta's patches:[BR] channelscan_channel default authority should be populated from SDT, SDTo and BAT[BR] channel default authority should be updated on insert or update

There seems to be no compelling reason to use default authority in both tables. If there is one it can be easily added.

comment:14 Changed 15 years ago by Janne Grunau

(In [21413]) Allows scanstreamdata to listen on the additional freesat SI PID, Refs #5562

adds freesat SI and EIT PIDs

based on patch by: David Matthews and Stuart Auchterlonie

Changed 15 years ago by Janne Grunau

Changed 15 years ago by Janne Grunau

updated to r21554 and added verbose messages

comment:15 Changed 15 years ago by Nick Morrott <knowledgejunkie (at) gmail (dot) com>

Real-world UK DVB-T testing of the t5562_default_authority_r21554.diff applied against trunk r21591 is very positive - all major channels/groups (BBC/ITV/Channel4/Five) were assigned their respective default authorities, several others were assigned their own default authority.

22/86 channels were not assigned a default authority.

Logs and DB tables attached.

DVB-S testing to follow shortly.

Changed 15 years ago by Nick Morrott <knowledgejunkie (at) gmail (dot) com>

Changed 15 years ago by Nick Morrott <knowledgejunkie (at) gmail (dot) com>

comment:16 Changed 15 years ago by Nick Morrott <knowledgejunkie (at) gmail (dot) com>

Real-world Astra 2 DVB-S testing of the t5562_default_authority_r21554.diff applied against trunk r21591 is very negative - the full tuned scan was completely broken on my system and produced no usable channels.

Initial observations were:

i) only the starting mux was scanned
ii) all channels on that mux were incorrectly 'detected' as MPEG channels
iii) none of the channels/muxes had their default authority recorded

Logs and DB tables attached.

Changed 15 years ago by Nick Morrott <knowledgejunkie (at) gmail (dot) com>

Changed 15 years ago by Nick Morrott <knowledgejunkie (at) gmail (dot) com>

comment:17 Changed 15 years ago by Nick Morrott <knowledgejunkie (at) gmail (dot) com>

Note that my DVB-S testing output includes scans of different muxes and decryption settings to see if the breakage was consistent (and it was).

comment:18 Changed 15 years ago by stuartm

Component: channelscanMythTV - Channel Scanner

comment:19 Changed 15 years ago by Janne Grunau

Milestone: 0.220.23

pushing this to 0.23

comment:20 Changed 15 years ago by stephengrobertson@…

I'm just wanting to check my reading of this, that this implies that currently [22552] scanning DVB-T will not insert default authority data and therefore because of #5603 programid data will be also not be populated.

comment:21 Changed 14 years ago by Janne Grunau

(In [22612]) Adds default authority handling to the new channel scanner. Refs #5562

based on patch by: David Matthews and Stuart Auchterlonie

comment:22 Changed 14 years ago by Stuart Auchterlonie

(In [22616]) Closes #7441, Refs #5562. Backport [22612] and [22613] to 0.22-fixes.

This fixes a regression with the rewritten channel scanner that caused it to no longer populate the default_authority information for a channel on DVB-T.

Changed 14 years ago by Douglas Mackay <douglas.mackay@…>

Changed 14 years ago by Douglas Mackay <douglas.mackay@…>

comment:23 Changed 14 years ago by Douglas Mackay <douglas.mackay@…>

Port of David's patch to new channel scanner.

Tested successfully with UK DVB-T Freeview & UK DVB-S Freesat

Changed 14 years ago by Douglas Mackay <douglas.mackay@…>

Changed 14 years ago by Douglas Mackay <douglas.mackay@…>

comment:24 Changed 14 years ago by Douglas Mackay <douglas.mackay@…>

Updated patches that don't touch scanstreamdata

comment:25 Changed 14 years ago by stuartm

Resolution: fixed
Status: assignedclosed

(In [23704]) Fix default authority parsing for DVB-S. Closes #5562.

Note: See TracTickets for help on using tickets.