[vdr-ttxtsubs] Update to current upstream git + PTS sync patch from upstream BTS.
Ville Skyttä
scop at fedoraproject.org
Wed Jul 18 21:49:06 UTC 2012
commit a193785b583ff4603a520fe66030aeb3b566db71
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Thu Jul 19 00:48:52 2012 +0300
Update to current upstream git + PTS sync patch from upstream BTS.
.gitignore | 1 +
0001-Adapt-to-VDR-1.7.26-API-changes.patch | 49 -
sources | 1 +
vdr-ttxtsubs-0.2.4+git.patch | 1334 ++++++++++++++++++++++++++++
vdr-ttxtsubs.spec | 11 +-
5 files changed, 1345 insertions(+), 51 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3c49ab7..aa1a699 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/*.gz
+/ttxtsubs-pts-sync-v2.diff
diff --git a/sources b/sources
index ea310b8..d3a1add 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
cc8936ae1c8a2894591907d81d8ff858 vdr-ttxtsubs-0.2.4.tar.gz
+2b9299963ab356cf0b2135a3d97f112f ttxtsubs-pts-sync-v2.diff
diff --git a/vdr-ttxtsubs-0.2.4+git.patch b/vdr-ttxtsubs-0.2.4+git.patch
new file mode 100644
index 0000000..e3b6413
--- /dev/null
+++ b/vdr-ttxtsubs-0.2.4+git.patch
@@ -0,0 +1,1334 @@
+diff --git a/.dir-locals.el b/.dir-locals.el
+new file mode 100644
+index 0000000..6dcf8b7
+--- /dev/null
++++ b/.dir-locals.el
+@@ -0,0 +1 @@
++((c++-mode . ((indent-tabs-mode . t))))
+diff --git a/HISTORY b/HISTORY
+index 8dddfc5..2c63aa3 100644
+--- a/HISTORY
++++ b/HISTORY
+@@ -1,6 +1,13 @@
+ VDR Plugin 'ttxtsubs' Revision History
+ --------------------------------------
+
++2012-04-xx: Version x.x.x
++- Removed obsolete (unused since 0.2.0) setup options: DVB Source Selection,
++ Live Delay, Record Subtitles, and Workaround for some French chns.
++- Added hard-coded workaround for french channels where page numbes 850-859
++ must be mapped to 880-889 (Closes #865, #703)
++ (Thx to Jussi Tepponen!)
++
+ 2011-10-08: Version 0.2.4
+ - Updated patch for VDR 1.7.21 (Closes #745)
+
+@@ -10,7 +17,7 @@ VDR Plugin 'ttxtsubs' Revision History
+ With VDR 1.7.21 the subtitle PIDs are stored in the channels.conf as an
+ extension to the teletext PID (see vdr.5 for details).
+
+- This change made it neccessary to change the extension of the tpid in
++ This change made it necessary to change the extension of the tpid in
+ channels.conf used by the ttxtsubs patch:
+
+ old: ...:201;150=deu,151=fin:...
+@@ -88,7 +95,7 @@ VDR Plugin 'ttxtsubs' Revision History
+ 2009-01-04: Version 0.0.8
+ - Updated Italien translation provided by Diego Pierotto
+ - Updated Russian translation provided by Oleg Roitburd (Closes #47)
+-- Fixed displaying of multiple rows when antialiasing is enabled by aquiring a
++- Fixed displaying of multiple rows when antialiasing is enabled by acquiring a
+ single OSD area for all rows - Thx to Rolf Ahrenberg (Closes #24)
+
+ 2008-12-18: Version 0.0.7
+diff --git a/Makefile b/Makefile
+index f44e420..9b2da50 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,7 +1,6 @@
+ #
+ # Makefile for a Video Disk Recorder plugin
+ #
+-# $Id: Makefile,v 1.22 2004/05/31 19:26:05 ragge Exp $
+
+ # The official name of this plugin.
+ # This name will be used in the '-P...' option of VDR to load the plugin.
+diff --git a/TROUBLESHOOTING b/TROUBLESHOOTING
+index b8cf3f5..e5d17c8 100644
+--- a/TROUBLESHOOTING
++++ b/TROUBLESHOOTING
+@@ -63,9 +63,7 @@ Troubleshooting ttxtsubs
+
+ A good thing to check first is how another set top box behaves. If the
+ other set top box automatically finds and displays teletext subtitles
+-while ttxtsubs don't, there is probably a problem in ttxtsubs. If the
+-channel in question is a French, please see the French channel problem
+-section below.
++while ttxtsubs don't, there is probably a problem in ttxtsubs.
+
+ If neither the set top box nor ttxtsubs automatically finds the
+ subtitles but you can get them by manually entering the teletext page
+@@ -198,40 +196,9 @@ automatically pick them up and present the subtitles to the viewer.
+ -----
+
+
+-There is a known problem with some French channels. Because of some
+-old specification interpretation mistake, some channels send the
+-teletext page number in decimal coded as binary, and not as the
+-standard says in hexadecimal. Since there are set top boxes sold that
+-has the same bug so that they can work with there channels, they are
+-reluctant to correct this. The service information for those channels
+-typically say that the subtitles are on page 858 or 859 when they
+-really are on page 888 or 889. To still be able to use those channels,
+-you can in ttxtsubs turn on the "Workaround for some French chns"
+-option which will remap numbers in the X5Y range into X8Y. Since this
+-would also remap the page number for a channel that really is using
+-for example page 859, this is an option that is off by default. If
+-you see this problem, please contact the channel provider and make
+-them understand that time will only make it harder to correct this
+-mistake as more decoders with this bug will be out there and software
+-updates for older set top boxes will be harder and harder to get.
+-Some channels do what they can to gradually correct this by sending
+-both a descriptor for French subtitles on page 859 (whish is
+-interpreted as page 889 on the old non standard decoders), and as
+-French for the Hearing Impaired on page 889 which is the setting that
+-can be used on standard compliant decoders.
+-(For the technically interrested: The hundreds figure is in teletext
+-called "magazine" and is sent separately from the 8 bit "page
+-number". Each magazine can actually have up to 256 pages and the page
+-number is really in hex, but only the 100 pages which use only the
+-figures 0-9 are normally seen by the user as only those numbers can be
+-entered on the remote control keyboard. 59 hex is 89 decimal, and here
+-is where something went wrong.)
+-
+-
+ Note that some channels don't use teletext subtitles but instead use
+-DVB subtitles, which is something different. DVB subtitles are sent as
+-bitmaps, somewhat like DVD subtitles. You can find a plugin for DVB
+-subtitles here: http://www.saunalahti.fi/~opvirtan/vdr/subtitles/
++DVB subtitles, which is something different. Support for DVB subtitles
++is included in VDR >= 1.5.10; you don't need this plugin for them.
+
+
+ Typical ttxtsubs messages and explanations
+diff --git a/patches/patch-set.1.7.21/0006-Ttxtsubs-plugin-hook.patch b/patches/patch-set.1.7.21/0006-Ttxtsubs-plugin-hook.patch
+index d6e2358..a650660 100644
+--- a/patches/patch-set.1.7.21/0006-Ttxtsubs-plugin-hook.patch
++++ b/patches/patch-set.1.7.21/0006-Ttxtsubs-plugin-hook.patch
+@@ -136,7 +136,7 @@ index 0000000..2471788
+ --- /dev/null
+ +++ b/vdrttxtsubshooks.c
+ @@ -0,0 +1,63 @@
+-+/*
+++/* -*- c++ -*-
+ + * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ + * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ + *
+@@ -204,8 +204,8 @@ new file mode 100644
+ index 0000000..2f97969
+ --- /dev/null
+ +++ b/vdrttxtsubshooks.h
+-@@ -0,0 +1,46 @@
+-+/*
++@@ -0,1 +1,46 @@
+++/* -*- c++ -*-
+ + * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ + * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ + *
+diff --git a/patches/vdr-1.7.21-ttxtsubs.patch b/patches/vdr-1.7.21-ttxtsubs.patch
+index 83fbd2b..9ae8b7a 100644
+--- a/patches/vdr-1.7.21-ttxtsubs.patch
++++ b/patches/vdr-1.7.21-ttxtsubs.patch
+@@ -899,7 +899,7 @@ index 0000000..2471788
+ --- /dev/null
+ +++ b/vdrttxtsubshooks.c
+ @@ -0,0 +1,63 @@
+-+/*
+++/* -*- c++ -*-
+ + * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ + * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ + *
+@@ -968,7 +968,7 @@ index 0000000..2f97969
+ --- /dev/null
+ +++ b/vdrttxtsubshooks.h
+ @@ -0,0 +1,46 @@
+-+/*
+++/* -*- c++ -*-
+ + * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ + * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ + *
+diff --git a/po/ca_ES.po b/po/ca_ES.po
+index 726bfbb..7dc0fbe 100644
+--- a/po/ca_ES.po
++++ b/po/ca_ES.po
+@@ -9,7 +9,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2007-08-24 23:49+0300\n"
+ "Last-Translator: Jordi Vilà <jvila at tinet.org>\n"
+ "Language-Team: Catalan <vdr at linuxtv.org>\n"
+@@ -43,27 +43,9 @@ msgstr "4:3/Letterbox"
+ msgid "Page Mode"
+ msgstr "Modalitat pàgina"
+
+-msgid "All"
+-msgstr "Totes"
+-
+-msgid "Only DVB-S"
+-msgstr "Només DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "Només DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "Només DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Visualitza subtítols"
+
+-msgid "Record Subtitles"
+-msgstr "Grava subtítols"
+-
+-msgid "Live Delay"
+-msgstr "Retard en directe"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Retard en reproducció (PES)"
+
+@@ -73,12 +55,6 @@ msgstr "Retard en reproducció (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Alternativa del menú principal"
+
+-msgid "Workaround for some French chns"
+-msgstr "Correcció per a canals francesos"
+-
+-msgid "DVB Source Selection"
+-msgstr "Selecció font DVB"
+-
+ msgid "Font Size (pixel)"
+ msgstr ""
+
+diff --git a/po/de_DE.po b/po/de_DE.po
+index 5dd113c..73b169d 100644
+--- a/po/de_DE.po
++++ b/po/de_DE.po
+@@ -7,7 +7,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2007-08-24 23:49+0300\n"
+ "Last-Translator: Klaus Schmidinger <Klaus.Schmidinger at tvdr.de>\n"
+ "Language-Team: German <vdr at linuxtv.org>\n"
+@@ -41,27 +41,9 @@ msgstr "4:3/Letterbox"
+ msgid "Page Mode"
+ msgstr "Seitenmodus"
+
+-msgid "All"
+-msgstr "Alle"
+-
+-msgid "Only DVB-S"
+-msgstr "Nur DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "Nur DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "Nur DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Zeige Untertitel"
+
+-msgid "Record Subtitles"
+-msgstr "Nimm Untertitel auf"
+-
+-msgid "Live Delay"
+-msgstr "Live Verzögerung"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Wiedergabe Verzögerung (PES)"
+
+@@ -71,12 +53,6 @@ msgstr "Wiedergabe Verzögerung (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Hauptmenu Alternative"
+
+-msgid "Workaround for some French chns"
+-msgstr "Workaround für französische Kanäle"
+-
+-msgid "DVB Source Selection"
+-msgstr "DVB Quelle Auswahl"
+-
+ msgid "Font Size (pixel)"
+ msgstr ""
+
+diff --git a/po/es_ES.po b/po/es_ES.po
+index 4e42a83..310cab3 100644
+--- a/po/es_ES.po
++++ b/po/es_ES.po
+@@ -7,7 +7,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2007-08-24 23:49+0300\n"
+ "Last-Translator: Ruben Nunez Francisco <ruben.nunez at tang-it.com>\n"
+ "Language-Team: Spanish <vdr at linuxtv.org>\n"
+@@ -41,27 +41,9 @@ msgstr "4:3/Letterbox"
+ msgid "Page Mode"
+ msgstr "Modo página"
+
+-msgid "All"
+-msgstr "Todas"
+-
+-msgid "Only DVB-S"
+-msgstr "Sólo DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "Sólo DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "Sólo DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Visualiza subtítulos"
+
+-msgid "Record Subtitles"
+-msgstr "Graba subtítulos"
+-
+-msgid "Live Delay"
+-msgstr "Retardo en directo"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Retardo en reproducción (PES)"
+
+@@ -71,12 +53,6 @@ msgstr "Retardo en reproducción (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Alternativa del menú principal"
+
+-msgid "Workaround for some French chns"
+-msgstr "Corrección para canales franceses"
+-
+-msgid "DVB Source Selection"
+-msgstr "Selección fuente DVB"
+-
+ msgid "Font Size (pixel)"
+ msgstr ""
+
+diff --git a/po/et_EE.po b/po/et_EE.po
+index 57dccad..a1711ed 100644
+--- a/po/et_EE.po
++++ b/po/et_EE.po
+@@ -7,7 +7,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2007-08-24 23:49+0300\n"
+ "Last-Translator: Arthur Konovalov <artlov at gmail.com>\n"
+ "Language-Team: Estonian <vdr at linuxtv.org>\n"
+@@ -40,27 +40,9 @@ msgstr "pildisuhe (iganenud)"
+ msgid "Page Mode"
+ msgstr "lk valik"
+
+-msgid "All"
+-msgstr "kõik"
+-
+-msgid "Only DVB-S"
+-msgstr "DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Subtiitrite kuvamine"
+
+-msgid "Record Subtitles"
+-msgstr "Subtiitrite salvestamine"
+-
+-msgid "Live Delay"
+-msgstr "Otsesaate viivitus"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Salvestuse viivitus (PES)"
+
+@@ -70,12 +52,6 @@ msgstr "Salvestuse viivitus (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Peamenüü valikud"
+
+-msgid "Workaround for some French chns"
+-msgstr "Parandus prantsuse kanalitel"
+-
+-msgid "DVB Source Selection"
+-msgstr "DVB allika valik"
+-
+ msgid "Font Size (pixel)"
+ msgstr "Fondi suurus (pix)"
+
+diff --git a/po/fi_FI.po b/po/fi_FI.po
+index 7e298e7..6dce8de 100644
+--- a/po/fi_FI.po
++++ b/po/fi_FI.po
+@@ -7,7 +7,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: ttxtsubs 0.2.0\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2007-08-24 23:49+0300\n"
+ "Last-Translator: Rolf Ahrenberg <rahrenbe at cc.hut.fi>\n"
+ "Language-Team: Finnish <vdr at linuxtv.org>\n"
+@@ -40,27 +40,9 @@ msgstr "4:3/Letterbox (käytöstä poistunut)"
+ msgid "Page Mode"
+ msgstr "sivun valinta"
+
+-msgid "All"
+-msgstr "kaikki"
+-
+-msgid "Only DVB-S"
+-msgstr "vain DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "vain DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "vain DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Näytä tekstitykset"
+
+-msgid "Record Subtitles"
+-msgstr "Tallenna tekstitykset"
+-
+-msgid "Live Delay"
+-msgstr "Viive Live-lähetyksessä"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Viive toistossa (PES)"
+
+@@ -70,12 +52,6 @@ msgstr "Viive toistossa (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Päävalikon toiminnot"
+
+-msgid "Workaround for some French chns"
+-msgstr "Ranskalainen silmänkääntötemppu"
+-
+-msgid "DVB Source Selection"
+-msgstr "Tekstityslähteen valinta"
+-
+ msgid "Font Size (pixel)"
+ msgstr "Kirjasintyypin koko (px)"
+
+diff --git a/po/fr_FR.po b/po/fr_FR.po
+index 98ca435..e074cab 100644
+--- a/po/fr_FR.po
++++ b/po/fr_FR.po
+@@ -10,7 +10,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2010-02-28 14:43+0100\n"
+ "Last-Translator: Nival Michaël\n"
+ "Language-Team: French <vdr at linuxtv.org>\n"
+@@ -43,27 +43,9 @@ msgstr "4:3/Letterbox (obsolète)"
+ msgid "Page Mode"
+ msgstr "Mode page"
+
+-msgid "All"
+-msgstr "Tous"
+-
+-msgid "Only DVB-S"
+-msgstr "Seulement DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "Seulement DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "Seulement DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Afficher les sous-titre"
+
+-msgid "Record Subtitles"
+-msgstr "Enregistrer les sous-titres"
+-
+-msgid "Live Delay"
+-msgstr "Délai en directe"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Delai à la lecture (PES)"
+
+@@ -73,12 +55,6 @@ msgstr "Delai à la lecture (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Choix du menu principal"
+
+-msgid "Workaround for some French chns"
+-msgstr "Contournement chaînes françaises"
+-
+-msgid "DVB Source Selection"
+-msgstr "Sélection Source DVB"
+-
+ msgid "Font Size (pixel)"
+ msgstr "Taille Police (pixel)"
+
+diff --git a/po/it_IT.po b/po/it_IT.po
+index 9d53937..9911a01 100644
+--- a/po/it_IT.po
++++ b/po/it_IT.po
+@@ -9,7 +9,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2010-03-02 20:48+0100\n"
+ "Last-Translator: Diego Pierotto <vdr-italian at tiscali.it>\n"
+ "Language-Team: Italian <vdr at linuxtv.org>\n"
+@@ -45,27 +45,9 @@ msgstr "4:3/Letterbox (deprecato)"
+ msgid "Page Mode"
+ msgstr "Mod. pagina"
+
+-msgid "All"
+-msgstr "Tutte"
+-
+-msgid "Only DVB-S"
+-msgstr "Solo DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "Solo DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "Solo DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Visualizza sottotitoli"
+
+-msgid "Record Subtitles"
+-msgstr "Registra sottotitoli"
+-
+-msgid "Live Delay"
+-msgstr "Ritardo mod. dal vivo"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Ritardo mod. riproduzione (PES)"
+
+@@ -75,12 +57,6 @@ msgstr "Ritardo mod. riproduzione (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Voci alternative menu princ."
+
+-msgid "Workaround for some French chns"
+-msgstr "Correzione per canali francesi"
+-
+-msgid "DVB Source Selection"
+-msgstr "Selezione sorgente DVB"
+-
+ msgid "Font Size (pixel)"
+ msgstr "Dim. caratteri (pixel)"
+
+diff --git a/po/ru_RU.po b/po/ru_RU.po
+index 8fe3272..4bda852 100644
+--- a/po/ru_RU.po
++++ b/po/ru_RU.po
+@@ -7,7 +7,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2008-12-30 14:05+0100\n"
+ "Last-Translator: Oleg Roitburd <oleg at roitburd.de>\n"
+ "Language-Team: Russian <vdr at linuxtv.org>\n"
+@@ -41,27 +41,9 @@ msgstr "4:3/широкий экран"
+ msgid "Page Mode"
+ msgstr "Режим страницы"
+
+-msgid "All"
+-msgstr "Все"
+-
+-msgid "Only DVB-S"
+-msgstr "Только DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "Только DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "Только DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Показывать субтитры"
+
+-msgid "Record Subtitles"
+-msgstr "Записывать субтитры"
+-
+-msgid "Live Delay"
+-msgstr "Live задержка"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Задержка воспроизведения (PES)"
+
+@@ -71,12 +53,6 @@ msgstr "Задержка воспроизведения (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Команда в главном меню"
+
+-msgid "Workaround for some French chns"
+-msgstr "Спец. настройки для франц. каналов"
+-
+-msgid "DVB Source Selection"
+-msgstr "Выбор DVB источника"
+-
+ msgid "Font Size (pixel)"
+ msgstr "Размер фонта (pixel)"
+
+diff --git a/po/sv_SE.po b/po/sv_SE.po
+index a9231a1..b12242c 100644
+--- a/po/sv_SE.po
++++ b/po/sv_SE.po
+@@ -8,7 +8,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2007-08-24 23:49+0300\n"
+ "Last-Translator: Tomas Prybil <tomas at prybil.se>\n"
+ "Language-Team: Swedish <vdr at linuxtv.org>\n"
+@@ -42,27 +42,9 @@ msgstr "4:3/brevlådeformat"
+ msgid "Page Mode"
+ msgstr ""
+
+-msgid "All"
+-msgstr ""
+-
+-msgid "Only DVB-S"
+-msgstr ""
+-
+-msgid "Only DVB-T"
+-msgstr ""
+-
+-msgid "Only DVB-C"
+-msgstr ""
+-
+ msgid "Display Subtitles"
+ msgstr "Visa textning"
+
+-msgid "Record Subtitles"
+-msgstr "Spela in textning"
+-
+-msgid "Live Delay"
+-msgstr ""
+-
+ msgid "Replay Delay (PES)"
+ msgstr ""
+
+@@ -72,12 +54,6 @@ msgstr ""
+ msgid "Main Menu Alternative"
+ msgstr "Huvudmenyalternativ"
+
+-msgid "Workaround for some French chns"
+-msgstr "Fix för vissa franska kanaler"
+-
+-msgid "DVB Source Selection"
+-msgstr ""
+-
+ msgid "Font Size (pixel)"
+ msgstr ""
+
+diff --git a/po/uk_UA.po b/po/uk_UA.po
+index 9c1946f..bdcae35 100644
+--- a/po/uk_UA.po
++++ b/po/uk_UA.po
+@@ -2,7 +2,7 @@ msgid ""
+ msgstr ""
+ "Project-Id-Version: VDR 1.5.7\n"
+ "Report-Msgid-Bugs-To: <author>\n"
+-"POT-Creation-Date: 2011-03-20 22:52+0200\n"
++"POT-Creation-Date: 2011-12-09 21:28+0200\n"
+ "PO-Revision-Date: 2009-05-28 14:05+0100\n"
+ "Last-Translator: Yarema aka Knedlyk <yupadmin at gmail.com>\n"
+ "Language-Team: Ukrainian <vdr at linuxtv.org>\n"
+@@ -36,27 +36,9 @@ msgstr "4:3/широкий екран"
+ msgid "Page Mode"
+ msgstr "Режим сторінки"
+
+-msgid "All"
+-msgstr "Всі"
+-
+-msgid "Only DVB-S"
+-msgstr "Тільки DVB-S"
+-
+-msgid "Only DVB-T"
+-msgstr "Тільки DVB-T"
+-
+-msgid "Only DVB-C"
+-msgstr "Тільки DVB-C"
+-
+ msgid "Display Subtitles"
+ msgstr "Показувати субтитри"
+
+-msgid "Record Subtitles"
+-msgstr "Записувати субтитри"
+-
+-msgid "Live Delay"
+-msgstr "Live затримка"
+-
+ msgid "Replay Delay (PES)"
+ msgstr "Затримка Програвання (PES)"
+
+@@ -66,12 +48,6 @@ msgstr "Затримка Програвання (TS)"
+ msgid "Main Menu Alternative"
+ msgstr "Команда в головному меню"
+
+-msgid "Workaround for some French chns"
+-msgstr "Спец. настройки для франц. каналів"
+-
+-msgid "DVB Source Selection"
+-msgstr "Вибір DVB джерела"
+-
+ msgid "Font Size (pixel)"
+ msgstr "Размір фонта (пікселі)"
+
+diff --git a/teletext-chars.h b/teletext-chars.h
+index 5a6653a..baa885e 100644
+--- a/teletext-chars.h
++++ b/teletext-chars.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/teletext-tables.h b/teletext-tables.h
+index 6ed0037..3216b95 100644
+--- a/teletext-tables.h
++++ b/teletext-tables.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/teletext.c b/teletext.c
+index 1cc0644..9dae4bc 100644
+--- a/teletext.c
++++ b/teletext.c
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/teletext.h b/teletext.h
+index 8b672b6..fba2eb0 100644
+--- a/teletext.h
++++ b/teletext.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/ttxtsubs.c b/ttxtsubs.c
+index 7fd1c19..7d316d3 100644
+--- a/ttxtsubs.c
++++ b/ttxtsubs.c
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+@@ -136,7 +136,11 @@ public:
+
+ // -- cStatus
+ protected:
+- virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
++ virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber
++#if APIVERSNUM >= 10726
++ , bool LiveView
++#endif
++ );
+ virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On);
+ // virtual void OsdClear(void) { ShowTtxt(); }
+ // virtual void OsdTitle(const char *Title) { HideTtxt(); }
+@@ -181,7 +185,6 @@ class cMenuSetupTtxtsubs : public cMenuSetupPage {
+ cPluginTtxtsubs *mTtxtsubs;
+ int mLanguageNo[MAXLANGUAGES];
+ int mLangHI[MAXLANGUAGES];
+- int mSavedFrenchSpecial;
+ int mDoStore;
+ cTtxtsubsConf mConf;
+ };
+@@ -229,18 +232,18 @@ bool cPluginTtxtsubs::Start(void)
+ if(strlen(mOldLanguage)) {
+ // use old setup lang, first try to find it amongst known languages
+ for(int i = 0; i < gNumLanguages; i++) {
+- if(!memcmp(mOldLanguage, gLanguages[i][0], 3) ||
+- !memcmp(mOldLanguage, gLanguages[i][1], 3)) {
+- strncpy(globals.mLanguages[0][0], gLanguages[i][0], 4);
+- globals.mLanguages[0][0][3] = '\0';
+- strncpy(globals.mLanguages[0][1], gLanguages[i][1], 4);
+- globals.mLanguages[0][1][3] = '\0';
+- }
++ if(!memcmp(mOldLanguage, gLanguages[i][0], 3) ||
++ !memcmp(mOldLanguage, gLanguages[i][1], 3)) {
++ strncpy(globals.mLanguages[0][0], gLanguages[i][0], 4);
++ globals.mLanguages[0][0][3] = '\0';
++ strncpy(globals.mLanguages[0][1], gLanguages[i][1], 4);
++ globals.mLanguages[0][1][3] = '\0';
++ }
+ }
+ if(!memcmp(globals.mLanguages[0][0], "unk", 3)) {
+- // not found there, just copy it
+- memcpy(globals.mLanguages[0][0], mOldLanguage, 3);
+- globals.mLanguages[0][0][3] = '\0';
++ // not found there, just copy it
++ memcpy(globals.mLanguages[0][0], mOldLanguage, 3);
++ globals.mLanguages[0][0][3] = '\0';
+ }
+ globals.mHearingImpaireds[0][0] = mOldHearingImpaired;
+ globals.mHearingImpaireds[0][1] = mOldHearingImpaired;
+@@ -313,13 +316,9 @@ cMenuSetupPage *cPluginTtxtsubs::SetupMenu(void)
+ bool cPluginTtxtsubs::SetupParse(const char *Name, const char *Value)
+ {
+ if(!strcasecmp(Name, "Display")) { globals.mDoDisplay = atoi(Value); globals.mRealDoDisplay=globals.mDoDisplay; }
+- else if(!strcasecmp(Name, "Record")) globals.mDoRecord = atoi(Value);
+- else if(!strcasecmp(Name, "LiveDelay")) globals.mLiveDelay = atoi(Value);
+ else if(!strcasecmp(Name, "ReplayDelay")) globals.mReplayDelay = atoi(Value);
+ else if(!strcasecmp(Name, "ReplayTsDelay")) globals.mReplayTsDelay = atoi(Value);
+ else if(!strcasecmp(Name, "MainMenuEntry")) globals.mMainMenuEntry = atoi(Value);
+- else if(!strcasecmp(Name, "FrenchSpecial")) globals.mFrenchSpecial = atoi(Value);
+- else if(!strcasecmp(Name, "DvbSources")) globals.mDvbSources = atoi(Value);
+ else if(!strcasecmp(Name, "FontSize")) globals.mFontSize = atoi(Value);
+ else if(!strcasecmp(Name, "OutlineWidth")) globals.mOutlineWidth = atoi(Value);
+ else if(!strcasecmp(Name, "Languages")) parseLanguages(Value);
+@@ -333,10 +332,17 @@ bool cPluginTtxtsubs::SetupParse(const char *Name, const char *Value)
+ return true;
+ }
+
+-void cPluginTtxtsubs::ChannelSwitch(const cDevice *Device, int ChannelNumber)
++void cPluginTtxtsubs::ChannelSwitch(const cDevice *Device, int ChannelNumber
++#if APIVERSNUM >= 10726
++ , bool LiveView
++#endif
++ )
+ {
++#if APIVERSNUM < 10726
++ bool LiveView = Device->IsPrimaryDevice();
++#endif
+ //dprint("cPluginTtxtsubs::ChannelSwitch(devicenr: %d, channelnr: %d) - mDispl: %x\n", Device->DeviceNumber(), ChannelNumber, mDispl); // XXX
+- if (Device->IsPrimaryDevice() && !Device->Replaying() && ChannelNumber)
++ if (LiveView && !Device->Replaying() && ChannelNumber)
+ {
+ StopTtxt();
+ DELETENULL(mLiveReceiver);
+@@ -438,7 +444,7 @@ void cPluginTtxtsubs::parseLanguages(const char *val) {
+ if(len) {
+ size_t trlen = len;
+ if(trlen > 3)
+- trlen = 3;
++ trlen = 3;
+ memcpy(globals.mLanguages[i/2][i%2], p, trlen);
+ globals.mLanguages[i/2][i%2][trlen] = '\0';
+ }
+@@ -481,7 +487,6 @@ void cMenuSetupTtxtsubsLanguages::Store(void)
+ }
+
+ const char * mainMenuAlts[5] = {NULL, NULL, NULL, NULL, NULL};
+-const char * dvbSources[5];
+
+ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
+ :
+@@ -497,17 +502,8 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
+ mainMenuAlts[2] = tr("4:3/Letterbox (deprecated)");
+ mainMenuAlts[3] = tr("Page Mode");
+ mainMenuAlts[4] = NULL;
+-
+- dvbSources[0] = tr("All");
+- dvbSources[1] = tr("Only DVB-S");
+- dvbSources[2] = tr("Only DVB-T");
+- dvbSources[3] = tr("Only DVB-C");
+- dvbSources[4] = NULL;
+ }
+ const int numMainMenuAlts = sizeof(mainMenuAlts) / sizeof(mainMenuAlts[0]) - 1;
+- const int numDvbSources = sizeof(dvbSources) / sizeof(dvbSources[0]) - 1;
+-
+- mSavedFrenchSpecial = mConf.mFrenchSpecial;
+
+ for(int n = 0; n < MAXLANGUAGES; n++) {
+ mLanguageNo[n] = -1;
+@@ -515,28 +511,20 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(cPluginTtxtsubs *ttxtsubs, int doStore)
+
+ for(int i = 0; i < gNumLanguages; i++) {
+ if(!strncmp(mConf.mLanguages[n][0], gLanguages[i][0], 4) &&
+- !strncmp(mConf.mLanguages[n][1], gLanguages[i][1], 4)) {
+- mLanguageNo[n] = i;
+- break;
++ !strncmp(mConf.mLanguages[n][1], gLanguages[i][1], 4)) {
++ mLanguageNo[n] = i;
++ break;
+ }
+ }
+ }
+
+ Add(new cMenuEditBoolItem(tr("Display Subtitles"), &mConf.mDoDisplay));
+- Add(new cMenuEditBoolItem(tr("Record Subtitles"), &mConf.mDoRecord));
+- Add(new cMenuEditIntItem(tr("Live Delay"), &mConf.mLiveDelay, 0, 5000));
+ Add(new cMenuEditIntItem(tr("Replay Delay (PES)"), &mConf.mReplayDelay, 0, 5000));
+ Add(new cMenuEditIntItem(tr("Replay Delay (TS)"), &mConf.mReplayTsDelay, 0, 5000));
+ if(mConf.mMainMenuEntry < 0 || mConf.mMainMenuEntry >= numMainMenuAlts)
+ mConf.mMainMenuEntry = 0; // menu item segfaults if out of range
+ Add(new cMenuEditStraItem(tr("Main Menu Alternative"), &mConf.mMainMenuEntry,
+- numMainMenuAlts, mainMenuAlts));
+- Add(new cMenuEditBoolItem(tr("Workaround for some French chns"),
+- &mConf.mFrenchSpecial));
+- if(mConf.mDvbSources < 0 || mConf.mDvbSources >= numDvbSources)
+- mConf.mDvbSources = 0; // menu item segfaults if out of range
+- Add(new cMenuEditStraItem(tr("DVB Source Selection"),
+- &mConf.mDvbSources, 4, dvbSources));
++ numMainMenuAlts, mainMenuAlts));
+ Add(new cMenuEditIntItem(tr("Font Size (pixel)"), &mConf.mFontSize, 10, MAXFONTSIZE * 2));
+ Add(new cMenuEditIntItem(tr("Font OutlineWidth (pixel)"), &mConf.mOutlineWidth, 1, 10));
+
+@@ -590,13 +578,9 @@ void cMenuSetupTtxtsubs::Store(void)
+ }
+
+ SetupStore("Display", mConf.mDoDisplay);
+- SetupStore("Record", mConf.mDoRecord);
+- SetupStore("LiveDelay", mConf.mLiveDelay);
+ SetupStore("ReplayDelay", mConf.mReplayDelay);
+ SetupStore("ReplayTsDelay", mConf.mReplayTsDelay);
+- SetupStore("FrenchSpecial", mConf.mFrenchSpecial);
+ SetupStore("MainMenuEntry", mConf.mMainMenuEntry);
+- SetupStore("DvbSources", mConf.mDvbSources);
+ SetupStore("FontSize", mConf.mFontSize);
+ SetupStore("OutlineWidth", mConf.mOutlineWidth);
+
+@@ -629,29 +613,19 @@ void cMenuSetupTtxtsubs::Store(void)
+ int cTtxtsubsConf::langChoise(const char *lang, const int HI)
+ {
+ size_t i, j;
+- int result = -1;
+-
++
+ for(i = 0; i < MAXLANGUAGES; i++) {
+ for(j = 0; j < 2; j++) {
+- if(!mLanguages[i][j][0])
+- continue;
+-
+- if(!memcmp(lang, mLanguages[i][j], 3)) {
+- if( ( HI && mHearingImpaireds[i][j] ) ||
+- ( !HI && !mHearingImpaireds[i][j] ) ) {
+- result = i*2;
+- goto x;
+- }
+- if( !HI && mHearingImpaireds[i][j] ) {
+- result = 1 + i*2;
+- goto x;
+- }
++ if(mLanguages[i][j][0] && !memcmp(lang, mLanguages[i][j], 3)) {
++ if( ( HI && mHearingImpaireds[i][j] ) || ( !HI && !mHearingImpaireds[i][j] ) )
++ return i*2;
++ if( !HI && mHearingImpaireds[i][j] )
++ return 1 + i*2;
+ }
+ }
+ }
+
+- x:
+- return result;
++ return -1;
+ }
+
+
+diff --git a/ttxtsubschannelsettings.c b/ttxtsubschannelsettings.c
+index b317c6b..a8114ce 100644
+--- a/ttxtsubschannelsettings.c
++++ b/ttxtsubschannelsettings.c
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+@@ -25,10 +25,11 @@
+ #include <vdr/tools.h>
+
+ cTtxtSubsChannelSetting::cTtxtSubsChannelSetting(const cChannel *Channel, int PageMode, int PageNumber)
++ :
++ channelid(Channel->GetChannelID()),
++ pagemode(PageMode),
++ pagenumber(PageNumber)
+ {
+- channelid=Channel->GetChannelID();
+- pagemode=PageMode;
+- pagenumber=PageNumber;
+ }
+
+ bool cTtxtSubsChannelSetting::Parse(const char *s)
+diff --git a/ttxtsubschannelsettings.h b/ttxtsubschannelsettings.h
+index 90048e9..9ee8acc 100644
+--- a/ttxtsubschannelsettings.h
++++ b/ttxtsubschannelsettings.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/ttxtsubsdisplay.c b/ttxtsubsdisplay.c
+index 9453a2f..04b36c8 100644
+--- a/ttxtsubsdisplay.c
++++ b/ttxtsubsdisplay.c
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+@@ -105,12 +105,11 @@ cTtxtSubsDisplay::cTtxtSubsDisplay(void)
+ _doDisplay(1),
+ _osd(NULL),
+ _osdLock(),
+- _lastDataTime(NULL)
++ _lastDataTime((struct timeval *) calloc(1, sizeof(*_lastDataTime))),
++ _osdFont(cFont::CreateFont(Setup.FontOsd, globals.mFontSize))
+ {
+ memset(&_page.data, 0, sizeof(_page.data));
+- _lastDataTime = (struct timeval *) calloc(1, sizeof(*_lastDataTime));
+
+- _osdFont = cFont::CreateFont(Setup.FontOsd, globals.mFontSize);
+ if (!_osdFont || !_osdFont->Height())
+ {
+ _osdFont = cFont::GetFont(fontOsd);
+diff --git a/ttxtsubsdisplay.h b/ttxtsubsdisplay.h
+index 76c897d..534e24e 100644
+--- a/ttxtsubsdisplay.h
++++ b/ttxtsubsdisplay.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/ttxtsubsdisplayer.c b/ttxtsubsdisplayer.c
+index 56b4ebc..fa0a1b2 100644
+--- a/ttxtsubsdisplayer.c
++++ b/ttxtsubsdisplayer.c
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+@@ -28,13 +28,12 @@
+
+ cTtxtSubsDisplayer::cTtxtSubsDisplayer(int textpage)
+ :
+- mDisp(NULL),
++ mDisp(new cTtxtSubsDisplay()),
+ mGetMutex(),
+ mGetCond(),
+ mRingBuf(94000, true),
+ mRun(0)
+ {
+- mDisp = new cTtxtSubsDisplay();
+ mDisp->SetPage(textpage);
+
+ mRun = 1;
+@@ -99,7 +98,7 @@ cTtxtSubsPlayer::cTtxtSubsPlayer(int backup_textpage)
+
+ // Take PES packets and break out the teletext data
+ // Buffer the data for processing in a separate thread
+-// XXX We should do some filtering here to avoid unneccessary load!
++// XXX We should do some filtering here to avoid unnecessary load!
+ void cTtxtSubsPlayer::PES_data(uchar *p, int Length, bool IsPesRecording, const struct tTeletextSubtitlePage teletextSubtitlePages[], int pageCount)
+ {
+ int i;
+@@ -118,14 +117,8 @@ void cTtxtSubsPlayer::PES_data(uchar *p, int Length, bool IsPesRecording, const
+ for (int p=0; p < pageCount; p++) {
+ // isyslog("ttxtsubs: got page info from vdr: %s 0x%02X 0x%2X.0x%02X", teletextSubtitlePages[p].ttxtLanguage, teletextSubtitlePages[p].ttxtType,
+ // teletextSubtitlePages[p].ttxtMagazine, teletextSubtitlePages[p].ttxtPage);
+- int ch = globals.langChoise(teletextSubtitlePages[p].ttxtLanguage, teletextSubtitlePages[p].ttxtType == 0x05);
+- if (ch >= 0 && ch < mLangChoise) {
+- mLangChoise = ch;
+- int bcdPage = (teletextSubtitlePages[p].ttxtMagazine << 8) + teletextSubtitlePages[p].ttxtPage;
+- mDisp->SetPage(bcdPage);
+- mFoundLangPage = 1;
+- isyslog("Found subtitle page: %03x\n", bcdPage);
+- }
++ SetPreferredPage(teletextSubtitlePages[p].ttxtLanguage, teletextSubtitlePages[p].ttxtType == 0x05,
++ (teletextSubtitlePages[p].ttxtMagazine << 8) + teletextSubtitlePages[p].ttxtPage);
+ }
+ }
+ }
+@@ -190,57 +183,70 @@ void cTtxtSubsPlayer::SearchLanguagePage(uint8_t *p, int len)
+ switch(foundlines) {
+ case 0:
+ if(packet != 0) // need a Y0 first
+- return;
++ return;
+ foundlines++;
+ break;
+ case 1:
+ if(packet != 1) // need a Y1
+- return;
++ return;
+ copy_inv_strip_par(buf, d->data, sizeof(buf));
+ if(memcmp((char *) buf, infoline, strlen(infoline)))
+- return;
++ return;
+ foundlines++;
+ break;
+ case 2:
+ mLangInfoState++;
+ if(packet < 2) // need a Y2 or more
+- return;
++ return;
+ if(mLangInfoState == 3)
+- fprintf(stderr, "ttxtsubs: Chosen Language not found in recording, available languages:\n");
++ fprintf(stderr, "ttxtsubs: Chosen Language not found in recording, available languages:\n");
+ copy_inv_strip_par(buf, d->data, sizeof(buf));
+ for(size_t i = 0; i < 40; i += 8) {
+- if(mLangInfoState == 3 && buf[i] >= 'a' && buf[i] <= 'z')
+- fprintf(stderr, " %c%c%c: %c%c%c %s\n", buf[i+4], buf[i+5], buf[i+6],
+- buf[i], buf[i+1], buf[i+2], buf[i+3] == ' ' ? "" :
+- buf[i+3] == 'h' ? "(Hearing Impaired)" : "(Unknown type)");
+-
+- if(buf[i] >= 'a' && buf[i] <= 'z' &&
+- buf[i+1] >= 'a' && buf[i+1] <= 'z' &&
+- buf[i+2] >= 'a' && buf[i+2] <= 'z' &&
+- ((buf[i+3] == ' ') || (buf[i+3] == 'h')) &&
+- buf[i+4] >= '1' && buf[i+4] <= '8' &&
+- buf[i+5] >= '0' && buf[i+5] <= '9' &&
+- buf[i+6] >= '0' && buf[i+6] <= '9' &&
+- buf[i+7] == ' ') {
+- int ch = globals.langChoise((char *)buf+i, buf[i+3] == 'h');
+- unsigned int page =
+- ((buf[i+4] - '0') << 8) +
+- ((buf[i+5] - '0') << 4) +
+- (buf[i+6] - '0');
+- if(page >= 0x100 && page < 0x900) {
+- if(page >= 0x800)
+- page -= 0x800;
+-
+- if(ch >= 0 && ch < mLangChoise) {
+- mLangChoise = ch;
+- mDisp->SetPage(page);
+- mFoundLangPage = 1;
+- fprintf(stderr, "Found subtitle page: %03x\n", page); // XXX
+- }
+- }
+- }
++ if(mLangInfoState == 3 && buf[i] >= 'a' && buf[i] <= 'z')
++ fprintf(stderr, " %c%c%c: %c%c%c %s\n", buf[i+4], buf[i+5], buf[i+6],
++ buf[i], buf[i+1], buf[i+2], buf[i+3] == ' ' ? "" :
++ buf[i+3] == 'h' ? "(Hearing Impaired)" : "(Unknown type)");
++
++ if(buf[i] >= 'a' && buf[i] <= 'z' &&
++ buf[i+1] >= 'a' && buf[i+1] <= 'z' &&
++ buf[i+2] >= 'a' && buf[i+2] <= 'z' &&
++ ((buf[i+3] == ' ') || (buf[i+3] == 'h')) &&
++ buf[i+4] >= '1' && buf[i+4] <= '8' &&
++ buf[i+5] >= '0' && buf[i+5] <= '9' &&
++ buf[i+6] >= '0' && buf[i+6] <= '9' &&
++ buf[i+7] == ' ') {
++ unsigned int page =
++ ((buf[i+4] - '0') << 8) +
++ ((buf[i+5] - '0') << 4) +
++ (buf[i+6] - '0');
++ if(page >= 0x100 && page < 0x900) {
++ if(page >= 0x800)
++ page -= 0x800;
++ SetPreferredPage((char *)buf+i, buf[i+3] == 'h', page);
++ }
++ }
+ }
+ break;
+ }
+ }
+ }
++
++bool cTtxtSubsPlayer::SetPreferredPage(const char* language, bool hearingImpaired, unsigned int bcdPage)
++{
++ // Some French channels still send wrong subtitle page number!
++ // This is a hard fix to change the page numbers 05x to 08x
++ // According to ETSI tables pages 850-859 are not used for
++ // teletext subtitles in any country, so we assume, that these can
++ // safely be mapped to 880-889
++
++ if(bcdPage >= 0x50 && bcdPage <= 0x59)
++ bcdPage += 0x30;
++
++ int ch = globals.langChoise(language, hearingImpaired);
++ if (ch >= 0 && ch < mLangChoise) {
++ mLangChoise = ch;
++ mDisp->SetPage(bcdPage);
++ mFoundLangPage = 1;
++ isyslog("Found subtitle page: %03x\n", bcdPage < 0x100 ? 0x800 + bcdPage : bcdPage);
++ }
++}
+diff --git a/ttxtsubsdisplayer.h b/ttxtsubsdisplayer.h
+index 66fd10c..66f420a 100644
+--- a/ttxtsubsdisplayer.h
++++ b/ttxtsubsdisplayer.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+@@ -47,7 +47,8 @@ class cTtxtSubsPlayer : public cTtxtSubsDisplayer {
+
+ private:
+ void SearchLanguagePage(uint8_t *p, int len);
+-
++ bool SetPreferredPage(const char* language, bool hearingImpaired, unsigned int bcdPage);
++
+ int mHasFilteredStream;
+ int mFoundLangPage;
+ int mLangChoise;
+diff --git a/ttxtsubsglobals.h b/ttxtsubsglobals.h
+index 59dfcb0..acf82b5 100644
+--- a/ttxtsubsglobals.h
++++ b/ttxtsubsglobals.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+@@ -34,53 +34,39 @@ class cTtxtsubsConf {
+
+ public:
+ cTtxtsubsConf(void)
++ :
++ mDoDisplay(1),
++ mRealDoDisplay(1),
++ mMainMenuEntry(0),
++ mFontSize(20),
++ mOutlineWidth(2),
++ mReplayDelay(0),
++ mReplayTsDelay(0)
+ {
+- mDoDisplay = 1;
+- mRealDoDisplay =1;
+- mDoRecord = 1;
+- mMainMenuEntry = 0;
+- mFrenchSpecial = 0;
+- mDvbSources = 0;
+- mFontSize = 20;
+- mOutlineWidth = 2;
+ memset(mLanguages, 0, sizeof(mLanguages));
+ memset(mHearingImpaireds, 0, sizeof(mHearingImpaireds));
+- mI18nLanguage = 0;
+- mLiveDelay = 0;
+- mReplayDelay = 0;
+- mReplayTsDelay = 0;
+ }
+
+ public:
+ int doDisplay(void) {return mRealDoDisplay;}
+- int doRecord(void) {return mDoRecord;}
+ int mainMenuEntry(void) {return mMainMenuEntry;}
+- int frenchSpecial(void) {return mFrenchSpecial;}
+- int dvbSources(void) {return mDvbSources;}
+ int fontSize(void) {return mFontSize;}
+ int outlineWidth(void) {return mOutlineWidth;}
+ char (*languages(void))[MAXLANGUAGES][2][4] {return &mLanguages;}
+ int (*hearingImpaireds(void))[MAXLANGUAGES][2] {return &mHearingImpaireds;}
+
+ int langChoise(const char *lang, const int HI);
+- int i18nLanguage(void) {return mI18nLanguage;}
+- int liveDelay(void) {return mLiveDelay;}
+ int replayDelay(void) {return mReplayDelay;}
+ int replayTsDelay(void) {return mReplayTsDelay;}
+
+ protected:
+ int mDoDisplay;
+ int mRealDoDisplay;
+- int mDoRecord;
+ int mMainMenuEntry;
+- int mFrenchSpecial;
+- int mDvbSources;
+ int mFontSize;
+ int mOutlineWidth;
+ char mLanguages[MAXLANGUAGES][2][4];
+ int mHearingImpaireds[MAXLANGUAGES][2];
+- int mI18nLanguage;
+- int mLiveDelay;
+ int mReplayDelay;
+ int mReplayTsDelay;
+ };
+diff --git a/ttxtsubslivereceiver.c b/ttxtsubslivereceiver.c
+index cfe3288..9f60fdd 100644
+--- a/ttxtsubslivereceiver.c
++++ b/ttxtsubslivereceiver.c
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+@@ -23,9 +23,10 @@
+ #include "ttxtsubslivereceiver.h"
+
+ cTtxtSubsLiveReceiver::cTtxtSubsLiveReceiver(cChannel* channel, cVDRTtxtsubsHookListener* hook)
++ :
++ _channel(channel),
++ _hook(hook)
+ {
+- _channel = channel;
+- _hook = hook;
+ AddPid(channel->Tpid());
+ }
+
+diff --git a/ttxtsubslivereceiver.h b/ttxtsubslivereceiver.h
+index 9752be6..d361c7b 100644
+--- a/ttxtsubslivereceiver.h
++++ b/ttxtsubslivereceiver.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/ttxtsubspagemenu.c b/ttxtsubspagemenu.c
+index 379a78a..cd7b6d0 100644
+--- a/ttxtsubspagemenu.c
++++ b/ttxtsubspagemenu.c
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/ttxtsubspagemenu.h b/ttxtsubspagemenu.h
+index 8908725..ad4bd48 100644
+--- a/ttxtsubspagemenu.h
++++ b/ttxtsubspagemenu.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
+diff --git a/utils.h b/utils.h
+index 62fbba4..d1fcdae 100644
+--- a/utils.h
++++ b/utils.h
+@@ -1,4 +1,4 @@
+-/*
++/* -*- c++ -*-
+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder
+ * Copyright (c) 2003 - 2008 Ragnar Sundblad <ragge at nada.kth.se>
+ *
diff --git a/vdr-ttxtsubs.spec b/vdr-ttxtsubs.spec
index dae5c8b..434308a 100644
--- a/vdr-ttxtsubs.spec
+++ b/vdr-ttxtsubs.spec
@@ -3,14 +3,17 @@
Name: vdr-%{pname}
Version: 0.2.4
-Release: 10%{?dist}
+Release: 10.20120718git%{?dist}
Summary: Teletext subtitles plugin for VDR
License: GPLv2+
URL: http://projects.vdr-developer.org/projects/show/plg-ttxtsubs
Source0: http://projects.vdr-developer.org/attachments/download/725/%{name}-%{version}.tar.gz
Source1: %{name}.conf
-Patch0: 0001-Adapt-to-VDR-1.7.26-API-changes.patch
+# git diff v0.2.4..HEAD
+Patch0: %{name}-0.2.4+git.patch
+# http://projects.vdr-developer.org/issues/119
+Patch1: http://projects.vdr-developer.org/attachments/download/952/ttxtsubs-pts-sync-v2.diff
BuildRequires: vdr-devel >= 1.7.6
Requires: vdr(abi)%{?_isa} = %{vdr_apiversion}
@@ -23,6 +26,7 @@ teletext based subtitles using the on screen display.
%prep
%setup -q -n %{pname}-%{version}
%patch0 -p1
+%patch1 -p1
sed -i -e '/^DVBDIR/d' -e 's|-I$(DVBDIR)/include||' Makefile
f=HISTORY ; iconv -f iso-8859-1 -t utf-8 -o $f.utf8 $f ; mv $f.utf8 $f
sed -i -e 's|ConfigDirectory("ttxtsubs")|"%{vdr_vardir}/%{pname}"|' \
@@ -61,6 +65,9 @@ cp -pR locale/* $RPM_BUILD_ROOT%{_datadir}/locale
%changelog
+* Wed Jul 18 2012 Ville Skyttä <ville.skytta at iki.fi> - 0.2.4-10.20120718git
+- Update to current upstream git + PTS sync patch from upstream BTS.
+
* Fri Jun 29 2012 Ville Skyttä <ville.skytta at iki.fi> - 0.2.4-10
- Rebuild.
More information about the scm-commits
mailing list