Opened 16 years ago

Closed 6 years ago

#8774 closed Developer Task (Fixed)

Store channel type in database

Reported by: Stuart Auchterlonie Owned by: Klaas de Waal
Priority: minor Milestone: 32.0
Component: MythTV - Channel Scanner Version: Master Head
Severity: medium Keywords: schemachange
Cc: Ticket locked: no

Description

Store channel type (TV/Radio/Data etc) into database when we find that information during channel scanning.

This information can then be leveraged in other areas, such as when setting up a recorder and the type of streams it expects to find.

Change History (24)

comment:1 by Stuart Auchterlonie, 16 years ago

Status: newassigned

comment:2 by stuartm, 16 years ago

Milestone: 0.25

Milestone 0.25 deleted

comment:3 by stuartm, 14 years ago

Type: taskDeveloper Task

This seems like an interesting and very simple addition, one for 0.26 maybe?

comment:4 by Stuart Auchterlonie, 14 years ago

Milestone: 0.250.26

Yes, its a good one for 0.26. Fixing the milestone

comment:5 by Kenni Lund [kenni a kelu dot dk], 14 years ago

Milestone: 0.260.27

comment:6 by paulh, 13 years ago

Milestone: 0.270.28

comment:7 by Karl Egly, 11 years ago

Keywords: schemachange added

I'd love to see us store the SD/HD/UHD/3D part of the service type, too. My plan is to use it in MFDB for a fixup similar to FixHD on EIT.

comment:8 by Stuart Auchterlonie, 10 years ago

Milestone: 0.280.29

comment:9 by Stuart Auchterlonie, 10 years ago

Milestone: 0.2929.0

Milestone renamed

comment:10 by Stuart Auchterlonie, 9 years ago

Milestone: 29.029.1

comment:11 by Stuart Auchterlonie, 9 years ago

Milestone: 29.10.28.2

Moving remaining open tickets to 0.28.2 milestone

comment:12 by Stuart Auchterlonie, 9 years ago

Milestone: 0.28.229.2

Moving remaining open tickets to 29.2 milestone

comment:13 by Klaas de Waal, 7 years ago

This would be useful to setup the buffering parameters for Live TV/Radio. At the moment the Live TV is setup for 8Mbit/s for all channels. This is OK for TV but for radio/audio-only channels a much lower setting would be better.

comment:14 by Stuart Auchterlonie, 7 years ago

Milestone: 29.231.0
Owner: changed from Stuart Auchterlonie to Klaas de Waal

Klaas you are welcome to do this.

Regards Stuart

comment:15 by Klaas de Waal, 7 years ago

It looks like the best value to use for channel type is the service_type as described in the DVB Bluebook A038, Feb 2019, pages 82 and 83. The way to do this is to extend database table channel with a field service_type and copy the service_type into this field when found during the channel scan.

comment:16 by Stuart Auchterlonie, 7 years ago

Klass, this just needs a DB schema update to add an appropriate column, and then the code as you mention to store the relevant info

comment:17 by Klaas de Waal, 7 years ago

Column service_type is added to database table channel in commit 8ae1c0b7958f3693ca4361bc9d116e55958a47ad which bumps the database schema version to 1352.

The code to retrieve and store the data as described in comment:15 is added in commit c7ad89a7eb999982c702eda9347603a9a7a1f532.

comment:18 by Klaas de Waal <kdewaal@…>, 7 years ago

In 8ae1c0b79/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:19 by Klaas de Waal <klaas@…>, 7 years ago

In bba208158/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:20 by Klaas de Waal, 7 years ago

Resolution: Fixed
Status: assignedclosed

The possible values of the service_type are enumerated in file dvbdescriptors.h in class ServiceDescriptorMapping.

An example on how to use this class:

#include "dvbdescriptors.h"
{
    uint32_t service_type = ServiceDescriptorMapping::kServiceTypeDigitalTelevision;
    ServiceDescriptorMapping st(service_type);
    LOG(VB_GENERAL, LOG_INFO, QString("service_type:%1 '%2' IsDTV:%3")
        .arg(st.ServiceType()).arg(st.toString()).arg(st.IsDTV()));
}

which gives the following output:

service_type:1 ' (TV)' IsDTV:1

comment:21 by Klaas de Waal, 6 years ago

Milestone: 31.032.0
Resolution: Fixed
Status: closednew

The mythtv-setup channel scanner feature "Import Existing Scan" fails in v31 and in master because the new field service_type is missing in database table channelscan_channel.

For now the "Import Existing Scan" feature will be temporarily fixed by importing the scan results without the service_type field.

The service_type was added to database channel but it was not added to table channelscan_channel.

Adding this field to table channelscan_channel and restoring the functionality to use it will be done before the v32 release so that the database schema version of master will be the same as v31 for a while.

comment:22 by Klaas de Waal, 6 years ago

Status: newaccepted

comment:23 by Klaas de Waal <kdewaal@…>, 6 years ago

In c970d5837/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:24 by Klaas de Waal, 6 years ago

Resolution: Fixed
Status: acceptedclosed

The last bit of this, storing the service_type in database table channelscan_channel for use in the "Import existing scan" feature, has been implemented in commit 2e11e33b7af24c8a867b5b5f056a7c42c730c7c7 and hence this ticket is now closed.

Note: See TracTickets for help on using tickets.