Jasmin Jessich [Sun, 12 Nov 2017 17:07:13 +0000 (18:07 +0100)]
Make DD CI functional
- Extend dvbcam_ca_lookup to support DD CI.
- Allow currently only one DD CI per service.
- Attach a new descrambler function to dr_descramble.
- New function dvbcam_is_ddci to be used by mpegts.
- Fixed a memory leak in dvbcam_service_destroy.
- Select CA PIDs if a DD CI is attached to a service.
- Forward CA PIDs to the descrambler in ts_recv_packet1, if it is a DD CI.
- Do not forward CA PIDs to the transport stream (after reading them from
DD CI) in ts_recv_packet0.
- Fixed typo in mpegts.h.
Jasmin Jessich [Sun, 12 Nov 2017 16:50:33 +0000 (17:50 +0100)]
Added DDCI detection and creation
- Check if a device ciX or secX exists.
- Create also the DD CI structure, if one of the ci pathes have been found.
- Open and close the DD CI in linuxdvb_ca_class_enabled_notify.
Jasmin Jessich [Sun, 12 Nov 2017 16:04:02 +0000 (17:04 +0100)]
Added DD CI support into new file
- New file linuxdvb_ddci.c
- DD CI related data are stored in a separate structure (struct
linuxdvb_ddci).
- struct linuxdvb_ca stores a pointer to the new DD CI data structure
which gets allocated, if a DD CI exists (see next commit).
- Added logging subsystem LS_DDCI.
- Compile linuxdvb_ddci.c if DD CI is enabled.
- Added config option ddci.
E.Smith [Mon, 6 Nov 2017 12:03:02 +0000 (12:03 +0000)]
dvr: Prefer image from current broadcast to persisted image, fixes #4685
A programme in the far future may have generic details and a generic
image. For example, "Oprah is interviewing people." As the programme
nears broadcast date, the programme may then get more specific details
and a more specific image ("Oprah is interviewing Bob").
So we prefer the image from the broadcast to the one currently persisted.
E.Smith [Tue, 31 Oct 2017 10:40:25 +0000 (10:40 +0000)]
ui: Persist image to dvr/log and send to ui. (#4685).
Previously it was only available for upcoming recordings
but now we persist it to the dvr/log so it can be sent
to clients and displayed on recorded programmes.
E.Smith [Thu, 12 Oct 2017 13:35:54 +0000 (14:35 +0100)]
dvr: Handle inotify moving file to different directory. (#4702)
Previously if we moved a file from one directory we are
monitoring to another directory we are monitoring then the
path would not be updated correctly since we did not lookup
the 'to_fd'.
E.Smith [Sun, 1 Oct 2017 01:46:53 +0000 (02:46 +0100)]
channel: Allow optional fuzzy matching when merging services, fixes #4709
For historical reasons, our DVB-T and DVB-S have different names
for the same channels. They often differ in case and spacing.
So we have 'One' and 'ONE', '5+1HD' and '5 +1HD'.
So allow an optional fuzzy matching checkbox to ignore whitespace
and HD markers. This allows the channels to be merged. The
exact name chosen depends on the order of mapping, so if the
HD channel is mapped first then they would all merge in to this
name, but if a non-HD channel is the first one created then that
name is chosen. However the name could be subsequently modified
by the user if they desire.
Jasmin Jessich [Wed, 1 Nov 2017 14:09:27 +0000 (15:09 +0100)]
Fixed crash on CAM remove
When TVH is terminated with <cntrl-c> and there is a CAM opened,
dvbcam_unregister_cam is executed prior to dvbcam_service_destroy.
dvbcam_unregister_cam will remove "as->ac" so linuxdvb_ca_enqueue_capmt,
executed in dvbcam_service_destroy will crash.
This should also fix a possible crash (not tested), when removing the
CAM with an active stream.
We add a few new format strings. This helps split
movies and tvshows in to separate folders to make
it easier for external programs to scrape.
$q and $Q determine if the programme is a movie or a
show from the guide data, with variants to force
detection as a movie or a show.
We then create "queryable" or scrapable names such as:
tvmovies/Gladiator (2000)
tvshows/Bonanza/Bonanza - S09E18 - The Burning Sky
This simplifies the recording format string for people
with good guide data since it easily splits the programmes
without need of post-processing scripts.
We don't split sports, news, etc. in to separate directories
purely because it is difficult to identify programmes that
are purely those categories. For example a popular nightly
politics series is classified as "News", whereas most people
think of news as being purely news headlines programmes.
We also add variants of $1q and $2q to force the programme
to be considered a movie or show ignoring the guide data.
The names are chosen to make it easier to add other variants
in the future if necessary ($3q, $4q, etc).
E.Smith [Fri, 13 Oct 2017 14:31:17 +0000 (15:31 +0100)]
dvr: Bump htsp_protocol_version. (#4652)
The new protocol supports DVR_AUTOREC_RECORD_UNIQUE and also
using categories in autorec (#4665).
We don't do any mappings of entries that have the enum since
clients I tested already map the unknown entry to "record all"
which I think is better than not sending the entry at all.
E.Smith [Thu, 5 Oct 2017 15:19:45 +0000 (16:19 +0100)]
dvr: Add new dup method of unique id. (#4652)
Programmes on many OTA channels and with many xmltv providers have unique ids.
This is the crid or the dd_progid.
So a particular movie will always have the same MV code, a particular episode
has the same EP code. Technically crid can be reused, but they don't appear to
be reused where I am.
If I have a rule for "Simpsons" it will record episodes but I have to decide
what dedup to use. If I use episode, then what happens when the Simpsons movie
is on? Is it recorded once, every repeat showing, never recorded?
So introduce a new method to differentiate programmes based on program id or
several other fields.
This is useful since many daytime programmes don't have unique descriptions or
any episode data in OTA, but can be distinguished by the crid.
The algorithm is:
- both have id and id is equal: dup;
- both have title+season+episode that are equal: dup;
- only one has title+season+episode: not dup;
- both have title+season or title+episode: undetermined so continue checks
- either has id or id is not equal: not dup;
- title+subtitle+description equal: dup;
- else not dup.
dvr: Start keeping programme unique IDs in the dvr log (#4652).
Many OTA and xmltv grabbers provide a unique id for programmes.
This is useful since many films have numerous remakes but keep
the same title, but have different unique id.
By starting to keep these IDs in the dvr log we may be able to
offer an easier de-dup method.
dvr: Allow selecting (xmltv) category in autorec. (#4665)
The xmltv import supports categories such as "movie",
"animated", "biography", so allow autorec to record via these
categories.
We do this by providing three drop-down selectors in the
advanced settings of the autorec. This allows the user
to easily discover the categories available whilst
providing enough capability for reasonably advanced
recordings when coupled with the existing fulltext search.