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 , 16 years ago
| Status: | new → assigned |
|---|
comment:2 by , 16 years ago
| Milestone: | 0.25 |
|---|
comment:3 by , 14 years ago
| Type: | task → Developer Task |
|---|
This seems like an interesting and very simple addition, one for 0.26 maybe?
comment:4 by , 14 years ago
| Milestone: | 0.25 → 0.26 |
|---|
Yes, its a good one for 0.26. Fixing the milestone
comment:5 by , 14 years ago
| Milestone: | 0.26 → 0.27 |
|---|
comment:6 by , 13 years ago
| Milestone: | 0.27 → 0.28 |
|---|
comment:7 by , 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 , 10 years ago
| Milestone: | 0.28 → 0.29 |
|---|
comment:10 by , 9 years ago
| Milestone: | 29.0 → 29.1 |
|---|
comment:11 by , 9 years ago
| Milestone: | 29.1 → 0.28.2 |
|---|
Moving remaining open tickets to 0.28.2 milestone
comment:12 by , 9 years ago
| Milestone: | 0.28.2 → 29.2 |
|---|
Moving remaining open tickets to 29.2 milestone
comment:13 by , 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 , 7 years ago
| Milestone: | 29.2 → 31.0 |
|---|---|
| Owner: | changed from to |
Klaas you are welcome to do this.
Regards Stuart
comment:15 by , 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 , 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 , 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:20 by , 7 years ago
| Resolution: | → Fixed |
|---|---|
| Status: | assigned → closed |
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 , 6 years ago
| Milestone: | 31.0 → 32.0 |
|---|---|
| Resolution: | Fixed |
| Status: | closed → new |
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 , 6 years ago
| Status: | new → accepted |
|---|
comment:24 by , 6 years ago
| Resolution: | → Fixed |
|---|---|
| Status: | accepted → closed |
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.

Milestone 0.25 deleted