diff options
Diffstat (limited to 'debian/patches/07_vdr_output.dpatch')
-rw-r--r-- | debian/patches/07_vdr_output.dpatch | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/debian/patches/07_vdr_output.dpatch b/debian/patches/07_vdr_output.dpatch new file mode 100644 index 0000000..b8ad800 --- /dev/null +++ b/debian/patches/07_vdr_output.dpatch @@ -0,0 +1,140 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 07_vdr_output.dpatch by Darren Salt <linux@youmustbejoking.demon.co.uk> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix a few problems in the VDR output. +## DP: * Provider names formatting was wrong +## DP: * Output audio language information +## DP: * Ensure that the services' TS IDs are always correctly set + +@DPATCH@ +diff -urNad linuxtv-dvb-apps-1.1.0~/util/scan/dump-vdr.c linuxtv-dvb-apps-1.1.0/util/scan/dump-vdr.c +--- linuxtv-dvb-apps-1.1.0~/util/scan/dump-vdr.c 2005-10-22 19:51:02.000000000 +0100 ++++ linuxtv-dvb-apps-1.1.0/util/scan/dump-vdr.c 2005-10-22 19:51:03.058914014 +0100 +@@ -115,9 +115,11 @@ + int video_pid, + int pcr_pid, + uint16_t *audio_pid, ++ char audio_lang[][4], + int audio_num, + int teletext_pid, + int scrambled, ++ int subtitling_pid, + int ac3_pid, + int service_id, + int network_id, +@@ -133,26 +135,42 @@ + int i; + + if ((video_pid || audio_pid[0]) && ((ca_select > 0) || ((ca_select == 0) && (scrambled == 0)))) { ++ if (vdr_version <= 2) { ++ audio_lang = NULL; ++ network_id = 0; ++ transport_stream_id = 0; ++ } + if ((dump_channum == 1) && (channel_num > 0)) + fprintf(f, ":@%i\n", channel_num); +- if (dump_provider == 1) +- fprintf (f, "%s - ", provider_name); +- fprintf (f, "%s:", service_name); ++ if (vdr_version >= 3) ++ fprintf (f, "%s;%s:", service_name, provider_name); ++ else ++ { ++ if (dump_provider == 1) ++ fprintf (f, "%s - ", provider_name); ++ fprintf (f, "%s:", service_name); ++ } + vdr_dump_dvb_parameters (f, type, p, polarity, orbital_pos, we_flag); + if ((pcr_pid != video_pid) && (video_pid > 0)) + fprintf (f, "%i+%i:", video_pid, pcr_pid); + else + fprintf (f, "%i:", video_pid); + fprintf (f, "%i", audio_pid[0]); ++ if (audio_lang && audio_lang[0][0]) ++ fprintf (f, "=%.4s", audio_lang[0]); + for (i = 1; i < audio_num; i++) ++ { + fprintf (f, ",%i", audio_pid[i]); ++ if (audio_lang && audio_lang[i][0]) ++ fprintf (f, "=%.4s", audio_lang[i]); ++ } + if (ac3_pid) ++ { + fprintf (f, ";%i", ac3_pid); ++ if (audio_lang && audio_lang[0][0]) ++ fprintf (f, "=%.4s", audio_lang[0]); ++ } + if (scrambled == 1) scrambled = ca_select; +- if (vdr_version == 2) { +- network_id = 0; +- transport_stream_id = 0; +- } + fprintf (f, ":%d:%d:%d:%d:%d:0", teletext_pid, scrambled, + service_id, network_id, transport_stream_id); + fprintf (f, "\n"); +diff -urNad linuxtv-dvb-apps-1.1.0~/util/scan/dump-vdr.h linuxtv-dvb-apps-1.1.0/util/scan/dump-vdr.h +--- linuxtv-dvb-apps-1.1.0~/util/scan/dump-vdr.h 2005-10-22 19:51:02.000000000 +0100 ++++ linuxtv-dvb-apps-1.1.0/util/scan/dump-vdr.h 2005-10-22 19:51:03.058914014 +0100 +@@ -19,9 +19,11 @@ + int video_pid, + int pcr_pid, + uint16_t *audio_pid, ++ char audio_lang[][4], + int audio_num, + int teletext_pid, + int scrambled, ++ int subtitling_pid, + int ac3_pid, + int service_id, + int network_id, +diff -urNad linuxtv-dvb-apps-1.1.0~/util/scan/scan.c linuxtv-dvb-apps-1.1.0/util/scan/scan.c +--- linuxtv-dvb-apps-1.1.0~/util/scan/scan.c 2005-10-22 19:51:02.000000000 +0100 ++++ linuxtv-dvb-apps-1.1.0/util/scan/scan.c 2005-10-22 19:53:29.088734079 +0100 +@@ -237,11 +237,13 @@ + * (the DVB standards say theay should be unique within one + * network, but in real life...) + */ +-static struct service *alloc_service(struct transponder *tp, int service_id) ++static struct service *alloc_service(struct transponder *tp, int service_id, ++ int transport_stream_id) + { + struct service *s = calloc(1, sizeof(*s)); + INIT_LIST_HEAD(&s->list); + s->service_id = service_id; ++ s->transport_stream_id = transport_stream_id; + list_add_tail(&s->list, &tp->services); + return s; + } +@@ -684,7 +686,7 @@ + /* SDT might have been parsed first... */ + s = find_service(current_tp, service_id); + if (!s) +- s = alloc_service(current_tp, service_id); ++ s = alloc_service(current_tp, service_id, transport_stream_id); + s->pmt_pid = ((buf[2] & 0x1f) << 8) | buf[3]; + if (!s->priv && s->pmt_pid) { + s->priv = malloc(sizeof(struct section_buf)); +@@ -872,7 +874,7 @@ + s = find_service(current_tp, service_id); + if (!s) + /* maybe PAT has not yet been parsed... */ +- s = alloc_service(current_tp, service_id); ++ s = alloc_service(current_tp, service_id, transport_stream_id); + + s->running = (buf[3] >> 5) & 0x7; + s->scrambled = (buf[3] >> 4) & 1; +@@ -1677,11 +1679,11 @@ + s->video_pid, + s->pcr_pid, + s->audio_pid, +- //FIXME: s->audio_lang ++ s->audio_lang, + s->audio_num, + s->teletext_pid, + s->scrambled, +- //FIXME: s->subtitling_pid ++ s->subtitling_pid, + s->ac3_pid, + s->service_id, + t->network_id, |