mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.3.42
- Removed leftover 'needsBufferReserve' variable from cTransfer (thanks to Marco Schlüßler). - Fixed setting "No title" for broken event data (reported by Ronny Kornexl). - Fixed channel up/down switching on single card systems (reported by Stefan Huelswitt). - Fixed handling "pending" timers that blocked others that actually could record (reported by Thomas Koch). - Speeded up cVideoRepacker (thanks to Reinhard Nissl). - Added an 'Id' parameter to cDevice::PlayAudio() to allow plugins to easier process the audio data (thanks to Marco Schlüßler). - Added Czech language texts (thanks to Vladimír Bárta). Plugin authors may want to add the new entries to their I18N texts and contact the translators to have their texts translated. Note that there are now 21 different OSD languages, so please make sure you have 21 versions for each of your texts. - Updated the Polish OSD texts (thanks to Jaroslaw Swierczynski). - Fixed auto advance in string entry fields when pressing Up/Down in insert mode (reported by Udo Richter). - Fixed handling the "Setup/OSD/Menu button closes" option when set to 'yes' in case a replay is active (thanks to Udo Richter). - Improved cUnbufferedFile; USE_FADVISE is now defined in tools.c by default, so if you don't want to use "fadvise" you need to comment out that line (thanks to Artur Skawina). - Fixed a missing ',' in the Swedish OSD texts (thanks to Arthur Konovalov). - cDevice::Transferring() can now be used to determine whether the (primary) device is currently playing in Transfer Mode (based on a suggestion by Reinhard Nissl). - The 'runvdr' script no longer uses the $VDRUSR environment variable to set the user id under which 'vdr' shall run. Just add the '-u username' option when you call 'runvdr'. - Fixed multiple entries of the same subdirectory in the "Recordings" menu (reported by Christian Jacobsen). - Enabled generating a core dump if VDR is run with a different user id (thanks to Ville Skyttä). - Fixed handling the "Blue" key in the "Schedule" menu for the current channel (thanks to Rolf Ahrenberg). - Renamed the Makefile target 'plugins-clean' to 'clean-plugins' (suggested by Sebastian Frei). - Made all font and image data 'const' (thanks to Darren Salt). - Fixed scrolling with Up/Down in case there are non-selectable items at the beginning or end of the menu (reported by Helmut Auer). - Added cSkin::GetTextAreaWidth() and cSkin::GetTextAreaFont(), so that a plugin that wants to do special text formatting can do so (thanks to Alexander Rieger).
This commit is contained in:
parent
c37734080c
commit
c23992b807
28
CONTRIBUTORS
28
CONTRIBUTORS
@ -215,6 +215,7 @@ Stefan Huelswitt <huels@iname.com>
|
||||
path names
|
||||
for suggesting that the SVDRP command GRAB should allow file names without extension
|
||||
again
|
||||
for reporting a problem with channel up/down switching on single card systems
|
||||
|
||||
Ulrich Röder <roeder@efr-net.de>
|
||||
for pointing out that there are channels that have a symbol rate higher than 27500
|
||||
@ -270,6 +271,7 @@ Artur Skawina <skawina@geocities.com>
|
||||
for improving the font file generation in the Makefile
|
||||
for pointing out a problem with the ERR macro defined by ncurses.h
|
||||
for a patch that contained a fix for checking toFile in cCuttingThread::Action()
|
||||
for improving cUnbufferedFile
|
||||
|
||||
Werner Fink <werner@suse.de>
|
||||
for making I/O more robust by handling EINTR
|
||||
@ -548,6 +550,8 @@ Helmut Auer <vdr@helmutauer.de>
|
||||
for suggesting to give a message when an instant recording is started
|
||||
fpr suggesting to retry a shutdown after a while
|
||||
for separating the 'install' target into several individual targets
|
||||
for reporting a problem with scrolling with Up/Down in case there are non-selectable
|
||||
items at the beginning of the menu
|
||||
|
||||
Jeremy Hall <jhall@UU.NET>
|
||||
for fixing an incomplete initialization of the filter parameters in eit.c
|
||||
@ -843,6 +847,8 @@ Ludwig Nussel <ludwig.nussel@web.de>
|
||||
Thomas Koch <tom@harhar.net>
|
||||
for his support in keeping the Premiere World channels up to date in 'channels.conf'
|
||||
for implementing the SVDRP command STAT
|
||||
for reporting a problem with "pending" timers that blocked others that actually
|
||||
could record
|
||||
|
||||
Stefan Hußfeldt <vdr@marvin.on-luebeck.de>
|
||||
for his help in keeping 'channels.conf.cable' up to date
|
||||
@ -880,6 +886,8 @@ Christian Jacobsen <christian.jacobsen@stageholding.de>
|
||||
for reporting a problem in case a station defines all 32 audio PIDs
|
||||
for suggestions and experiments regarding the buffer reserve in cTransfer
|
||||
for reporting a problem with 'summary.vdr' files with more than two empty lines
|
||||
for reporting a problem with multiple entries of the same subdirectory in the
|
||||
"Recordings" menu
|
||||
|
||||
Andreas Mair <Andreas.Mair@linogate.com>
|
||||
for reporting a short display of the main menu if a plugin displays its own OSD and
|
||||
@ -944,6 +952,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
|
||||
for a patch that was used to implement automatic cursor advance when entering text
|
||||
via the numeric keys
|
||||
for reporting a problem with expired timers when shutting down via the Power key
|
||||
for fixing handling the "Blue" key in the "Schedule" menu for the current channel
|
||||
|
||||
Ralf Klueber <ralf.klueber@vodafone.com>
|
||||
for reporting a bug in cutting a recording if there is only a single editing mark
|
||||
@ -1040,6 +1049,7 @@ Reinhard Nissl <rnissl@gmx.de>
|
||||
DiSEqC data) if the lock is lost
|
||||
for fixing handling TS packets in cTS2PES
|
||||
for adding a mutex to synchronize cDevice::PlayPesPacket() and SetCurrentAudioTrack()
|
||||
for a suggestion that lead to implementing cDevice::Transferring()
|
||||
|
||||
Richard Robson <richard_robson@beeb.net>
|
||||
for reporting freezing replay if a timer starts while in Transfer Mode from the
|
||||
@ -1061,6 +1071,7 @@ Robert Bartl <robert@bartl.priv.at>
|
||||
|
||||
Sebastian Frei <sebastian@schnapsleichen.de>
|
||||
for his support in keeping 'channels.conf' up-to-date.
|
||||
for suggesting to rename the Makefile target 'plugins-clean' to 'clean-plugins'
|
||||
|
||||
Rene Bartsch <ml@bartschnet.de>
|
||||
for reporting a bug in setting the primary device in case none of the devices
|
||||
@ -1292,6 +1303,9 @@ Marco Schl
|
||||
for figuring out some obscure length bytes the the CA PMT Reply data of AlphaCrypt CAMs
|
||||
for fixing handling OSD areas that have invalid sizes
|
||||
for removing unused variables in skinclassic.c and skinsttng.c
|
||||
for removing leftover 'needsBufferReserve' variable from cTransfer
|
||||
for adding an 'Id' parameter to cDevice::PlayAudio() to allow plugins to easier
|
||||
process the audio data
|
||||
|
||||
Jürgen Schmitz <j.schmitz@web.de>
|
||||
for reporting a bug in displaying the current channel when switching via the SVDRP
|
||||
@ -1330,6 +1344,7 @@ Kimmo Tykkala <tykkala@iki.fi>
|
||||
Arthur Konovalov <kasjas@hot.ee>
|
||||
for translating OSD texts to the Estonian language
|
||||
for fixing a missing ',' in the Greek OSD texts
|
||||
for fixing a missing ',' in the Swedish OSD texts
|
||||
|
||||
Milos Kapoun <m.kapoun@cra.cz>
|
||||
for suggesting to skip code table info in SI data
|
||||
@ -1351,6 +1366,10 @@ Udo Richter <udo_richter@gmx.de>
|
||||
for making the Makefile report a summary of failed plugins
|
||||
for reporting a problem with the new handling of k_Repeat keypresses in channel
|
||||
switching
|
||||
for reporting a problem with auto advance in string entry fields when pressing
|
||||
Up/Down in insert mode
|
||||
for fixing handling the "Setup/OSD/Menu button closes" option when set to 'yes' in
|
||||
case a replay is active
|
||||
|
||||
Sven Kreiensen <svenk@kammer.uni-hannover.de>
|
||||
for his help in keeping 'channels.conf.terr' up to date
|
||||
@ -1414,6 +1433,7 @@ Darren Salt <linux@youmustbejoking.demon.co.uk>
|
||||
for suggesting to write grabbed images to the SVDRP connection encoded in base64
|
||||
for suggesting to open the file handle in the SVDRP GRAB command in a way that
|
||||
it won't follow symbolic links, and to canonicalize the file name
|
||||
for making all font and image data 'const'
|
||||
|
||||
Sean Carlos <seanc@libero.it>
|
||||
for translating OSD texts to the Italian language
|
||||
@ -1494,6 +1514,7 @@ Ville Skytt
|
||||
for removing the obsolete "ca.conf" section from vdr.1
|
||||
for making the cLircRemote try to reestablish the connection to the LIRC daemon
|
||||
in case it breaks
|
||||
for enabling generating a core dump if VDR is run with a different user id
|
||||
|
||||
Steffen Beyer <cpunk@reactor.de>
|
||||
for fixing setting the colored button help after deleting a recording in case the next
|
||||
@ -1590,6 +1611,7 @@ Alexander Rieger <Alexander.Rieger@inka.de>
|
||||
for fixing handling color buttons in cMenuEditStrItem
|
||||
for making the '.update' file in the video directory be touched when a recording is
|
||||
added or deleted, so that other VDR instances can update their lists
|
||||
for adding cSkin::GetTextAreaWidth() and cSkin::GetTextAreaFont()
|
||||
|
||||
Philip Prindeville <philipp_subx@redfish-solutions.com>
|
||||
for updates to 'sources.conf'
|
||||
@ -1710,3 +1732,9 @@ Daniel Karsubka <dkar@gmx.de>
|
||||
Suur Karu <suurkaru@fastmail.fm>
|
||||
for reporting a problem with the tuning timeout for channels that have low symbol
|
||||
rates
|
||||
|
||||
Ronny Kornexl <ronny.kornexl@online.de>
|
||||
for reporting a problem with setting "No title" for broken event data
|
||||
|
||||
Bárta Vladimír <vladimir.barta@k2atmitec.cz>
|
||||
for translating OSD texts to the Czech language
|
||||
|
46
HISTORY
46
HISTORY
@ -4270,3 +4270,49 @@ Video Disk Recorder Revision History
|
||||
system, it is now tried again after 5 minutes (suggested by Helmut Auer).
|
||||
- Separated the 'install' target into several individual targets; renamed the
|
||||
'plugins-install' target to 'install-plugins' (thanks to Helmut Auer).
|
||||
|
||||
2006-02-05: Version 1.3.42
|
||||
|
||||
- Removed leftover 'needsBufferReserve' variable from cTransfer (thanks to Marco
|
||||
Schlüßler).
|
||||
- Fixed setting "No title" for broken event data (reported by Ronny Kornexl).
|
||||
- Fixed channel up/down switching on single card systems (reported by Stefan
|
||||
Huelswitt).
|
||||
- Fixed handling "pending" timers that blocked others that actually could record
|
||||
(reported by Thomas Koch).
|
||||
- Speeded up cVideoRepacker (thanks to Reinhard Nissl).
|
||||
- Added an 'Id' parameter to cDevice::PlayAudio() to allow plugins to easier
|
||||
process the audio data (thanks to Marco Schlüßler).
|
||||
- Added Czech language texts (thanks to Bárta Vladimír).
|
||||
Plugin authors may want to add the new entries to their I18N texts and contact
|
||||
the translators to have their texts translated. Note that there are now 21
|
||||
different OSD languages, so please make sure you have 21 versions for each of
|
||||
your texts.
|
||||
- Updated the Polish OSD texts (thanks to Jaroslaw Swierczynski).
|
||||
- Fixed auto advance in string entry fields when pressing Up/Down in insert mode
|
||||
(reported by Udo Richter).
|
||||
- Fixed handling the "Setup/OSD/Menu button closes" option when set to 'yes' in
|
||||
case a replay is active (thanks to Udo Richter).
|
||||
- Improved cUnbufferedFile; USE_FADVISE is now defined in tools.c by default, so
|
||||
if you don't want to use "fadvise" you need to comment out that line (thanks to
|
||||
Artur Skawina).
|
||||
- Fixed a missing ',' in the Swedish OSD texts (thanks to Arthur Konovalov).
|
||||
- cDevice::Transferring() can now be used to determine whether the (primary)
|
||||
device is currently playing in Transfer Mode (based on a suggestion by
|
||||
Reinhard Nissl).
|
||||
- The 'runvdr' script no longer uses the $VDRUSR environment variable to set
|
||||
the user id under which 'vdr' shall run. Just add the '-u username' option
|
||||
when you call 'runvdr'.
|
||||
- Fixed multiple entries of the same subdirectory in the "Recordings" menu
|
||||
(reported by Christian Jacobsen).
|
||||
- Enabled generating a core dump if VDR is run with a different user id (thanks
|
||||
to Ville Skyttä).
|
||||
- Fixed handling the "Blue" key in the "Schedule" menu for the current channel
|
||||
(thanks to Rolf Ahrenberg).
|
||||
- Renamed the Makefile target 'plugins-clean' to 'clean-plugins' (suggested by
|
||||
Sebastian Frei).
|
||||
- Made all font and image data 'const' (thanks to Darren Salt).
|
||||
- Fixed scrolling with Up/Down in case there are non-selectable items at the
|
||||
beginning or end of the menu (reported by Helmut Auer).
|
||||
- Added cSkin::GetTextAreaWidth() and cSkin::GetTextAreaFont(), so that a plugin
|
||||
that wants to do special text formatting can do so (thanks to Alexander Rieger).
|
||||
|
3
INSTALL
3
INSTALL
@ -136,7 +136,8 @@ watchdog timer to restart the program in case something happens that
|
||||
causes a program hangup. If you change the command line options for the
|
||||
call to the VDR program, be sure to NOT use the '-d' option! Otherwise
|
||||
VDR will go into 'deamon' mode and the initial program call will return
|
||||
immediately!
|
||||
immediately! 'runvdr' needs to be started as user 'root'. Use the '-u'
|
||||
option to run the actual 'vdr' program under a different user id.
|
||||
|
||||
Setting the system time:
|
||||
------------------------
|
||||
|
4
Makefile
4
Makefile
@ -4,7 +4,7 @@
|
||||
# See the main source file 'vdr.c' for copyright information and
|
||||
# how to reach the author.
|
||||
#
|
||||
# $Id: Makefile 1.84 2006/01/29 14:50:34 kls Exp $
|
||||
# $Id: Makefile 1.85 2006/02/05 13:37:11 kls Exp $
|
||||
|
||||
.DELETE_ON_ERROR:
|
||||
|
||||
@ -193,7 +193,7 @@ plugins: include-dir
|
||||
done;\
|
||||
if [ -n "$$failed" ] ; then echo; echo "*** failed plugins:$$failed"; echo; fi
|
||||
|
||||
plugins-clean:
|
||||
clean-plugins:
|
||||
@for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/src/$$i" clean; done
|
||||
@-rm -f $(PLUGINDIR)/lib/libvdr-*.so.$(VDRVERSION)
|
||||
|
||||
|
@ -175,7 +175,7 @@ is not used, the path to the plugin directory has be be given to VDR through the
|
||||
<p>
|
||||
The VDR <tt>Makefile</tt> contains the target <tt>plugins</tt>, which calls
|
||||
<tt>make all</tt> in every directory found under <tt>VDR/PLUGINS/src</tt>,
|
||||
plus the target <tt>plugins-clean</tt>, which calls <tt>make clean</tt> in
|
||||
plus the target <tt>clean-plugins</tt>, which calls <tt>make clean</tt> in
|
||||
each of these directories.
|
||||
<p>
|
||||
If you download a plugin <a href="#Building the distribution package">package</a>
|
||||
@ -187,7 +187,7 @@ and will unpack into a directory named
|
||||
<p>
|
||||
<tt>hello-0.0.1</tt>
|
||||
<p>
|
||||
To use the <tt>plugins</tt> and <tt>plugins-clean</tt> targets from the VDR <tt>Makefile</tt>
|
||||
To use the <tt>plugins</tt> and <tt>clean-plugins</tt> targets from the VDR <tt>Makefile</tt>
|
||||
you need to unpack such an archive into the <tt>VDR/PLUGINS/src</tt> directory and
|
||||
create a symbolic link with the basic plugin name, as in
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* See the README file for copyright information and how to reach the author.
|
||||
*
|
||||
* $Id: i18n.c 1.4 2004/01/16 13:28:23 kls Exp $
|
||||
* $Id: i18n.c 1.5 2006/02/04 10:51:41 kls Exp $
|
||||
*/
|
||||
|
||||
#include "i18n.h"
|
||||
@ -26,6 +26,10 @@ const tI18nPhrase Phrases[] = {
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"¿àØÒÕâ!",
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"Ahoj",
|
||||
},
|
||||
{ "Hello world!",
|
||||
"Hallo Welt!",
|
||||
@ -44,6 +48,10 @@ const tI18nPhrase Phrases[] = {
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"·ÔàÐÒáâÒãÙ ÜØà!",
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"Ahoj svìte!",
|
||||
},
|
||||
{ "Howdy folks!",
|
||||
"Tach zusammen!",
|
||||
@ -62,6 +70,10 @@ const tI18nPhrase Phrases[] = {
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"ºÐÚ ßÞÖØÒÐÕâÕ?",
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"Nazdar vespolek!",
|
||||
},
|
||||
{ "A friendly greeting",
|
||||
"Ein freundlicher Gruß",
|
||||
@ -80,6 +92,10 @@ const tI18nPhrase Phrases[] = {
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"´àãÖÕáÚÞÕ ßàØÒÕâáâÒØÕ",
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"Pøátelský pozdrav",
|
||||
},
|
||||
{ "Greeting time (s)",
|
||||
"Dauer des Grußes (s)",
|
||||
@ -98,6 +114,10 @@ const tI18nPhrase Phrases[] = {
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"¿àÞÔÞÛÖØâÕÛìÝÞáâì ßàØÒÕâáâÒØï",
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"Èas pozdravu (s)",
|
||||
},
|
||||
{ "Use alternate greeting",
|
||||
"Alternativen Gruß verwenden",
|
||||
@ -116,6 +136,10 @@ const tI18nPhrase Phrases[] = {
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"°ÛìâÕàÝÐâØÒÝÞÕ ßàØÒÕâáâÒØÕ",
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"",// TODO
|
||||
"Pou¾ít alternativní pozdrav",
|
||||
},
|
||||
{ NULL }
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
: first line
|
||||
: second line
|
||||
RTL Television,RTL;RTL World:12187:hC34:S19.2E:27500:163:104=deu:105:0:12003:1:1089:0
|
||||
SAT.1;ProSiebenSat.1:12480:vC34:S19.2E:27500:1791:1792=deu;1795=deu:34:0:46:133:33:0
|
||||
ProSieben;ProSiebenSat.1:12480:vC34:S19.2E:27500:255:256=deu;257=deu:32:0:898:133:33:0
|
||||
@ -13,10 +15,10 @@ S
|
||||
Phoenix;ARD:11836:hC34:S19.2E:27500:901:902=deu:904:0:28114:1:1101:0
|
||||
ZDF;ZDFvision:11953:hC34:S19.2E:27500:110:120=deu,121=2ch;125=dd:130:0:28006:1:1079:0
|
||||
3sat;ZDFvision:11953:hC34:S19.2E:27500:210:220=deu,221=2ch;225=dd:230:0:28007:1:1079:0
|
||||
KiKa;ZDFvision:11953:hC34:S19.2E:27500:310:320=deu:330:0:28008:1:1079:0
|
||||
KiKa;ZDFvision:11953:hC34:S19.2E:27500:310:320:0:0:28008:1:1079:0
|
||||
arte;ARD:11836:hC34:S19.2E:27500:401:402=deu,403=fra:404:0:28109:1:1101:0
|
||||
ORF1;ORF:12692:hC56:S19.2E:22000:160:161=deu;163=deu:165:1762,D05,1702,1801:13001:1:1117:0
|
||||
ORF2;ORF:12692:hC56:S19.2E:22000:500:501=deu;503=deu:505:1762,D05,1702,1801:13002:1:1117:0
|
||||
ORF1;ORF:12692:hC56:S19.2E:22000:160:161=deu;163=deu:165:0:13001:1:1117:0
|
||||
ORF2;ORF:12692:hC56:S19.2E:22000:500:501=deu,502=deu;503=deu:505:1762,D05,1702,1801:13002:1:1117:0
|
||||
ZDFinfokanal;ZDFvision:11953:hC34:S19.2E:27500:610:620=deu:130:0:28011:1:1079:0
|
||||
CNN Int.;CNN:11778:vC34:S19.2E:27500:165:100=eng:47:0:28522:1:1068:0
|
||||
Super RTL,S RTL;RTL World:12187:hC34:S19.2E:27500:165:120=deu:65:0:12040:1:1089:0
|
||||
@ -28,7 +30,7 @@ DSF;BetaDigital:12480:vC34:S19.2E:27500:1023:1024=deu:39:0:900:133:33:0
|
||||
HSE24,HSE24;BetaDigital:12480:vC34:S19.2E:27500:1279:1280=deu:37:0:40:133:33:0
|
||||
Bloomberg TV Germany;Bloomberg:12551:vC56:S19.2E:22000:162:99=deu:0:0:12160:1:1108:0
|
||||
EURONEWS;CSAT:11817:vC34:S19.2E:27500:163:92=fra,93=eng,94=ita,95=esl,91=rus,98=por,99=deu:0:0:8004:1:1070:0
|
||||
rbb Brandenburg;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28205:1:1073:0
|
||||
rbb Brandenburg;ARD:12109:hC34:S19.2E:27500:501:502=deu:504:0:28205:1:1073:0
|
||||
Sky News:11597:vC56:S19.2E:22000:305+131:306=eng:0:0:28707:1:1026:0
|
||||
Veronica/JETIX;CANALDIGITAAL:12574:hC56:S19.2E:22000:518+8190:92=dut:38:622,100:5020:53:1109:0
|
||||
BVN;CANALDIGITAAL:12574:hC56:S19.2E:22000:515+8190:96=dut:36:0:5025:53:1109:0
|
||||
@ -45,14 +47,14 @@ MDR FERNSEHEN;ARD:12109:hC34:S19.2E:27500:401:402=deu:404:0:28204:1:1073:0
|
||||
rbb Berlin;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28206:1:1073:0
|
||||
:Premiere World
|
||||
PREMIERE START,START;PREMIERE:11797:hC34:S19.2E:27500:255:256=deu:32:1801,1722,1702:8:133:2:0
|
||||
PREMIERE 1,PREM 1;PREMIERE:11797:hC34:S19.2E:27500:511:512=deu,513=deu;515=deu:32:1:10:133:2:0
|
||||
PREMIERE 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu,1793=deu;1795=deu:32:1:11:133:2:0
|
||||
PREMIERE 1,PREM 1;PREMIERE:11797:hC34:S19.2E:27500:511:512=deu,513=deu;515=deu:32:1801,1722,1702:10:133:2:0
|
||||
PREMIERE 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu,1793=deu;1795=deu:32:1801,1722,1702:11:133:2:0
|
||||
PREMIERE 3,PREM 3;PREMIERE:11797:hC34:S19.2E:27500:2303:2304=deu,2305=deu:32:1722,1702,1801:43:133:2:0
|
||||
PREMIERE 4,PREM 4;PREMIERE:11797:hC34:S19.2E:27500:767:768=deu,769=deu:32:1:9:133:2:0
|
||||
PREMIERE 4,PREM 4;PREMIERE:11797:hC34:S19.2E:27500:767:768=deu,769=deu:32:1801,1722,1702:9:133:2:0
|
||||
PREMIERE 5,PREM 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu:32:1722,1702,1801:29:133:2:0
|
||||
PREMIERE 6,PREM 6;PREMIERE:11797:hC34:S19.2E:27500:1535:1536=deu:32:1702,1722,1801:41:133:2:0
|
||||
PREMIERE 7,PREM 7;PREMIERE:11797:hC34:S19.2E:27500:1023:1024=deu:32:1801,1702,1722:20:133:2:0
|
||||
DISNEY CHANNEL,DISNEY;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:32:1:34:133:17:0
|
||||
DISNEY CHANNEL,DISNEY;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:32:1801,1722,1702:34:133:17:0
|
||||
:Premiere Direkt
|
||||
PREMIERE DIREKT,DIREKT;PREMIERE:12031:hC34:S19.2E:27500:2815:2816=deu,2817=deu;2819=deu:0:0:18:133:4:0
|
||||
:PW Erotic
|
||||
@ -113,14 +115,14 @@ ParaComedy 1;BSkyB:12187:hC23:S28.2E:27500:518+8190:666=eng,686=NAR:582:960,961:
|
||||
Paramount;BSkyB:11526:vC23:S28.2E:27500:2317+2306:2318=eng:2319:960,961:50305:2:2404:0
|
||||
ParaComedy 2;BSkyB:11914:hC23:S28.2E:27500:514+8190:642=eng,662=NAR:578:960,961:4504:2:2011:0
|
||||
Discovery;BSkyB:11875:hC23:S28.2E:27500:2308:2310=eng,2311=NAR:2309:960,961:6201:2:2009:0
|
||||
Sky Movies 1;BSkyB:11836:hC23:S28.2E:27500:518+8190:646=eng,653=NAR;686=eng:582:960,961:4303:2:2007:0
|
||||
Sky Movies 2;BSkyB:11836:hC23:S28.2E:27500:519+8190:647=eng,667=NAR;687=eng:583:960,961:4302:2:2007:0
|
||||
Sky Movies 3;BSkyB:11836:hC23:S28.2E:27500:520+8190:648=eng,654=NAR;688=eng:584:960,961:4403:2:2007:0
|
||||
Sky Movies 1;BSkyB:11836:hC23:S28.2E:27500:518+8190:646=eng,653=NAR;666=eng:582:960,961:4303:2:2007:0
|
||||
Sky Movies 2;BSkyB:11836:hC23:S28.2E:27500:519+8190:647=eng,655=NAR;667=eng:583:960,961:4302:2:2007:0
|
||||
Sky Movies 3;BSkyB:11836:hC23:S28.2E:27500:520+8190:648=eng,654=NAR;668=eng:584:960,961:4403:2:2007:0
|
||||
Sky Movies 4;BSkyB:11914:hC23:S28.2E:27500:512+8190:640=eng,660=NAR:576:960,961:4402:2:2011:0
|
||||
Sky Movies 5;BSkyB:11914:hC23:S28.2E:27500:515+8190:643=eng,663=NAR:579:960,961:4503:2:2011:0
|
||||
Sky Movies 6;BSkyB:11914:hC23:S28.2E:27500:513+8190:641=eng,661=NAR:577:960,961:4502:2:2011:0
|
||||
Sky Movies 7;BSkyB:12285:vC23:S28.2E:27500:515+8190:643=eng,663=NAR:579:960,961:4603:2:2030:0
|
||||
Sky Movies 8;BSkyB:11836:hC23:S28.2E:27500:515+8190:643=eng,663=NAR:579:960,961:5502:2:2007:0
|
||||
Sky Movies 8;BSkyB:11836:hC23:S28.2E:27500:515+8190:643=eng,656=NAR:579:960,961:5502:2:2007:0
|
||||
Sky Movies 9;BSkyB:12285:vC23:S28.2E:27500:518+8190:646=eng,666=NAR:582:960,961:4602:2:2030:0
|
||||
Sky Cinema 1;BSkyB:12285:vC23:S28.2E:27500:519+8190:647=eng,667=NAR:583:960,961:4809:2:2030:0
|
||||
Sky Cinema 2;BSkyB:12285:vC23:S28.2E:27500:517+8190:645=eng,665=NAR:581:960,961:4802:2:2030:0
|
||||
|
6
config.h
6
config.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: config.h 1.242 2006/01/27 13:27:41 kls Exp $
|
||||
* $Id: config.h 1.243 2006/01/29 17:24:53 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __CONFIG_H
|
||||
@ -19,8 +19,8 @@
|
||||
#include "i18n.h"
|
||||
#include "tools.h"
|
||||
|
||||
#define VDRVERSION "1.3.41"
|
||||
#define VDRVERSNUM 10341 // Version * 10000 + Major * 100 + Minor
|
||||
#define VDRVERSION "1.3.42"
|
||||
#define VDRVERSNUM 10342 // Version * 10000 + Major * 100 + Minor
|
||||
|
||||
#define MAXPRIORITY 99
|
||||
#define MAXLIFETIME 99
|
||||
|
5
cutter.c
5
cutter.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: cutter.c 1.12 2006/01/27 13:45:00 kls Exp $
|
||||
* $Id: cutter.c 1.14 2006/02/05 11:06:47 kls Exp $
|
||||
*/
|
||||
|
||||
#include "cutter.h"
|
||||
@ -66,6 +66,8 @@ void cCuttingThread::Action(void)
|
||||
toFile = toFileName->Open();
|
||||
if (!fromFile || !toFile)
|
||||
return;
|
||||
fromFile->SetReadAhead(MEGABYTE(20));
|
||||
toFile->SetReadAhead(MEGABYTE(20));
|
||||
int Index = Mark->position;
|
||||
Mark = fromMarks.Next(Mark);
|
||||
int FileSize = 0;
|
||||
@ -90,6 +92,7 @@ void cCuttingThread::Action(void)
|
||||
if (fromIndex->Get(Index++, &FileNumber, &FileOffset, &PictureType, &Length)) {
|
||||
if (FileNumber != CurrentFileNumber) {
|
||||
fromFile = fromFileName->SetOffset(FileNumber, FileOffset);
|
||||
fromFile->SetReadAhead(MEGABYTE(20));
|
||||
CurrentFileNumber = FileNumber;
|
||||
}
|
||||
if (fromFile) {
|
||||
|
17
device.c
17
device.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: device.c 1.121 2006/01/08 11:39:37 kls Exp $
|
||||
* $Id: device.c 1.123 2006/02/04 14:58:24 kls Exp $
|
||||
*/
|
||||
|
||||
#include "device.h"
|
||||
@ -924,12 +924,17 @@ bool cDevice::Replaying(void) const
|
||||
return player != NULL;
|
||||
}
|
||||
|
||||
bool cDevice::Transferring(void) const
|
||||
{
|
||||
return dynamic_cast<cTransfer *>(player) != NULL;
|
||||
}
|
||||
|
||||
bool cDevice::AttachPlayer(cPlayer *Player)
|
||||
{
|
||||
if (CanReplay()) {
|
||||
if (player)
|
||||
Detach(player);
|
||||
if (!dynamic_cast<cTransfer *>(Player))
|
||||
if (!Transferring())
|
||||
ClrAvailableTracks();
|
||||
pesAssembler->Reset();
|
||||
player = Player;
|
||||
@ -977,7 +982,7 @@ int cDevice::PlayVideo(const uchar *Data, int Length)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int cDevice::PlayAudio(const uchar *Data, int Length)
|
||||
int cDevice::PlayAudio(const uchar *Data, int Length, uchar Id)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
@ -1000,7 +1005,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
|
||||
case 0xC0 ... 0xDF: // audio
|
||||
SetAvailableTrack(ttAudio, c - 0xC0, c);
|
||||
if (!VideoOnly && c == availableTracks[currentAudioTrack].id) {
|
||||
w = PlayAudio(Start, d);
|
||||
w = PlayAudio(Start, d, c);
|
||||
if (FirstLoop)
|
||||
Audios.PlayAudio(Data, Length, c);
|
||||
}
|
||||
@ -1026,7 +1031,7 @@ pre_1_3_19_PrivateStreamDeteced:
|
||||
if (Setup.UseDolbyDigital) {
|
||||
SetAvailableTrack(ttDolby, SubStreamIndex, SubStreamId);
|
||||
if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
|
||||
w = PlayAudio(Start, d);
|
||||
w = PlayAudio(Start, d, SubStreamId);
|
||||
if (FirstLoop)
|
||||
Audios.PlayAudio(Data, Length, SubStreamId);
|
||||
}
|
||||
@ -1035,7 +1040,7 @@ pre_1_3_19_PrivateStreamDeteced:
|
||||
case 0xA0: // LPCM
|
||||
SetAvailableTrack(ttAudio, SubStreamIndex, SubStreamId);
|
||||
if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
|
||||
w = PlayAudio(Start, d);
|
||||
w = PlayAudio(Start, d, SubStreamId);
|
||||
if (FirstLoop)
|
||||
Audios.PlayAudio(Data, Length, SubStreamId);
|
||||
}
|
||||
|
7
device.h
7
device.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: device.h 1.70 2006/01/08 10:10:26 kls Exp $
|
||||
* $Id: device.h 1.72 2006/02/04 14:22:08 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __DEVICE_H
|
||||
@ -424,9 +424,10 @@ protected:
|
||||
///< Length) or not at all (returning 0 or -1 and setting 'errno' to EAGAIN).
|
||||
///< \return Returns the number of bytes actually taken from Data, or -1
|
||||
///< in case of an error.
|
||||
virtual int PlayAudio(const uchar *Data, int Length);
|
||||
virtual int PlayAudio(const uchar *Data, int Length, uchar Id);
|
||||
///< Plays the given data block as audio.
|
||||
///< Data points to exactly one complete PES packet of the given Length.
|
||||
///< Id indicates the type of audio data this packet holds.
|
||||
///< PlayAudio() shall process the packet either as a whole (returning
|
||||
///< Length) or not at all (returning 0 or -1 and setting 'errno' to EAGAIN).
|
||||
///< \return Returns the number of bytes actually taken from Data, or -1
|
||||
@ -483,6 +484,8 @@ public:
|
||||
///< guaranteed to always receive complete PES packets.
|
||||
bool Replaying(void) const;
|
||||
///< Returns true if we are currently replaying.
|
||||
bool Transferring(void) const;
|
||||
///< Returns true if we are currently in Transfer Mode.
|
||||
void StopReplay(void);
|
||||
///< Stops the current replay session (if any).
|
||||
bool AttachPlayer(cPlayer *Player);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbdevice.c 1.151 2006/01/28 15:37:01 kls Exp $
|
||||
* $Id: dvbdevice.c 1.152 2006/02/04 10:21:51 kls Exp $
|
||||
*/
|
||||
|
||||
#include "dvbdevice.h"
|
||||
@ -1169,7 +1169,7 @@ int cDvbDevice::PlayVideo(const uchar *Data, int Length)
|
||||
return WriteAllOrNothing(fd_video, Data, Length, 1000, 10);
|
||||
}
|
||||
|
||||
int cDvbDevice::PlayAudio(const uchar *Data, int Length)
|
||||
int cDvbDevice::PlayAudio(const uchar *Data, int Length, uchar Id)
|
||||
{
|
||||
return WriteAllOrNothing(fd_audio, Data, Length, 1000, 10);
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: dvbdevice.h 1.37 2005/12/29 13:33:12 kls Exp $
|
||||
* $Id: dvbdevice.h 1.38 2006/02/04 10:21:51 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __DVBDEVICE_H
|
||||
@ -119,7 +119,7 @@ protected:
|
||||
virtual bool CanReplay(void) const;
|
||||
virtual bool SetPlayMode(ePlayMode PlayMode);
|
||||
virtual int PlayVideo(const uchar *Data, int Length);
|
||||
virtual int PlayAudio(const uchar *Data, int Length);
|
||||
virtual int PlayAudio(const uchar *Data, int Length, uchar Id);
|
||||
public:
|
||||
virtual int64_t GetSTC(void);
|
||||
virtual void TrickSpeed(int Speed);
|
||||
|
4
epg.c
4
epg.c
@ -7,7 +7,7 @@
|
||||
* Original version (as used in VDR before 1.3.0) written by
|
||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||
*
|
||||
* $Id: epg.c 1.57 2006/01/29 14:17:33 kls Exp $
|
||||
* $Id: epg.c 1.58 2006/02/03 13:16:54 kls Exp $
|
||||
*/
|
||||
|
||||
#include "epg.h"
|
||||
@ -321,7 +321,7 @@ bool cEvent::Read(FILE *f, cSchedule *Schedule)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'e': if (!Event->Title())
|
||||
case 'e': if (Event && !Event->Title())
|
||||
Event->SetTitle(tr("No title"));
|
||||
Event = NULL;
|
||||
break;
|
||||
|
11
font.c
11
font.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: font.c 1.11 2005/01/14 13:25:35 kls Exp $
|
||||
* $Id: font.c 1.12 2006/02/05 13:49:10 kls Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
@ -35,9 +35,10 @@
|
||||
#include "fontfix-iso8859-15.c"
|
||||
#include "fontosd-iso8859-15.c"
|
||||
#include "fontsml-iso8859-15.c"
|
||||
|
||||
// --- cFont -----------------------------------------------------------------
|
||||
|
||||
static void *FontData[eDvbCodeSize][eDvbFontSize] = {
|
||||
static const void *const FontData[eDvbCodeSize][eDvbFontSize] = {
|
||||
{ FontOsd_iso8859_1, FontFix_iso8859_1, FontSml_iso8859_1 },
|
||||
{ FontOsd_iso8859_2, FontFix_iso8859_2, FontSml_iso8859_2 },
|
||||
{ FontOsd_iso8859_5, FontFix_iso8859_5, FontSml_iso8859_5 },
|
||||
@ -58,12 +59,12 @@ static const char *FontCode[eDvbCodeSize] = {
|
||||
eDvbCode cFont::code = code_iso8859_1;
|
||||
cFont *cFont::fonts[eDvbFontSize] = { NULL };
|
||||
|
||||
cFont::cFont(void *Data)
|
||||
cFont::cFont(const void *Data)
|
||||
{
|
||||
SetData(Data);
|
||||
}
|
||||
|
||||
void cFont::SetData(void *Data)
|
||||
void cFont::SetData(const void *Data)
|
||||
{
|
||||
if (Data) {
|
||||
height = ((tCharData *)Data)->height;
|
||||
@ -112,7 +113,7 @@ void cFont::SetCode(eDvbCode Code)
|
||||
}
|
||||
}
|
||||
|
||||
void cFont::SetFont(eDvbFont Font, void *Data)
|
||||
void cFont::SetFont(eDvbFont Font, const void *Data)
|
||||
{
|
||||
delete fonts[Font];
|
||||
fonts[Font] = new cFont(Data ? Data : FontData[code][Font]);
|
||||
|
8
font.h
8
font.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: font.h 1.11 2005/03/19 15:51:19 kls Exp $
|
||||
* $Id: font.h 1.12 2006/02/05 13:46:36 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __FONT_H
|
||||
@ -43,9 +43,9 @@ private:
|
||||
const tCharData *data[NUMCHARS];
|
||||
int height;
|
||||
public:
|
||||
cFont(void *Data);
|
||||
cFont(const void *Data);
|
||||
virtual ~cFont() {}
|
||||
void SetData(void *Data);
|
||||
void SetData(const void *Data);
|
||||
virtual int Width(unsigned char c) const { return data[c]->width; }
|
||||
///< Returns the width of the given character.
|
||||
virtual int Width(const char *s) const;
|
||||
@ -59,7 +59,7 @@ public:
|
||||
const tCharData *CharData(unsigned char c) const { return data[c]; }
|
||||
static bool SetCode(const char *Code);
|
||||
static void SetCode(eDvbCode Code);
|
||||
static void SetFont(eDvbFont Font, void *Data = NULL);
|
||||
static void SetFont(eDvbFont Font, const void *Data = NULL);
|
||||
static const cFont *GetFont(eDvbFont Font);
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontFix_iso8859_1[][28] = {
|
||||
static const cFont::tPixelData FontFix_iso8859_1[][28] = {
|
||||
{ // 32
|
||||
15, 26,
|
||||
0x00000000, // ...............
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontFix_iso8859_13[][28] = {
|
||||
static const cFont::tPixelData FontFix_iso8859_13[][28] = {
|
||||
{ // 32
|
||||
15, 26,
|
||||
0x00000000, // ...............
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontFix_iso8859_15[][28] = {
|
||||
static const cFont::tPixelData FontFix_iso8859_15[][28] = {
|
||||
{ // 32
|
||||
15, 26,
|
||||
0x00000000, // ...............
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontFix_iso8859_2[][28] = {
|
||||
static const cFont::tPixelData FontFix_iso8859_2[][28] = {
|
||||
{ // 32
|
||||
15, 26,
|
||||
0x00000000, // ...............
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontFix_iso8859_5[][26] = {
|
||||
static const cFont::tPixelData FontFix_iso8859_5[][26] = {
|
||||
{ // 32
|
||||
15, 24,
|
||||
0x00000000, // ...............
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontFix_iso8859_7[][26] = {
|
||||
static const cFont::tPixelData FontFix_iso8859_7[][26] = {
|
||||
{ // 32
|
||||
11, 24,
|
||||
0x00000000, // ...........
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontOsd_iso8859_1[][29] = {
|
||||
static const cFont::tPixelData FontOsd_iso8859_1[][29] = {
|
||||
{ // 32
|
||||
6, 27,
|
||||
0x00000000, // ......
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontOsd_iso8859_13[][29] = {
|
||||
static const cFont::tPixelData FontOsd_iso8859_13[][29] = {
|
||||
{ // 32
|
||||
6, 27,
|
||||
0x00000000, // ......
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontOsd_iso8859_15[][29] = {
|
||||
static const cFont::tPixelData FontOsd_iso8859_15[][29] = {
|
||||
{ // 32
|
||||
6, 27,
|
||||
0x00000000, // ......
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* iso8859-2 modified iso8859-1 (Drazen Dupor 23.05.2004).
|
||||
*
|
||||
@ -10,7 +9,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
static const cFont::tPixelData FontOsd_iso8859_2[][29] = {
|
||||
{ // 32
|
||||
6, 27,
|
||||
0x00000000, // ......
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontOsd_iso8859_5[][24] = {
|
||||
static const cFont::tPixelData FontOsd_iso8859_5[][24] = {
|
||||
{ // 32
|
||||
6, 22,
|
||||
0x00000000, // ......
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontOsd_iso8859_7[][27] = {
|
||||
static const cFont::tPixelData FontOsd_iso8859_7[][27] = {
|
||||
{ // 32
|
||||
12, 25,
|
||||
0x00000000, // ............
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontSml_iso8859_1[][24] = {
|
||||
static const cFont::tPixelData FontSml_iso8859_1[][24] = {
|
||||
{ // 32
|
||||
5, 22,
|
||||
0x00000000, // .....
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontSml_iso8859_13[][24] = {
|
||||
static const cFont::tPixelData FontSml_iso8859_13[][24] = {
|
||||
{ // 32
|
||||
5, 22,
|
||||
0x00000000, // .....
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontSml_iso8859_15[][24] = {
|
||||
static const cFont::tPixelData FontSml_iso8859_15[][24] = {
|
||||
{ // 32
|
||||
5, 22,
|
||||
0x00000000, // .....
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontSml_iso8859_2[][25] = {
|
||||
static const cFont::tPixelData FontSml_iso8859_2[][25] = {
|
||||
{ // 32
|
||||
5, 23,
|
||||
0x00000000, // .....
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontSml_iso8859_5[][27] = {
|
||||
static const cFont::tPixelData FontSml_iso8859_5[][27] = {
|
||||
{ // 32
|
||||
5, 25,
|
||||
0x00000000, // .....
|
||||
|
@ -1,4 +1,4 @@
|
||||
cFont::tPixelData FontSml_iso8859_7[][22] = {
|
||||
static const cFont::tPixelData FontSml_iso8859_7[][22] = {
|
||||
{ // 32
|
||||
9, 20,
|
||||
0x00000000, // .........
|
||||
|
@ -371,7 +371,7 @@ main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
printf("%s[][%d] = {\n", varname, fontinfo->max_ascent + fontinfo->max_descent + 2);
|
||||
printf("static const %s[][%d] = {\n", varname, fontinfo->max_ascent + fontinfo->max_descent + 2);
|
||||
for (c = 32; c < 256; c++) {
|
||||
getMetric(fontinfo, c, &tgi);
|
||||
printGlyph(fontinfo, c);
|
||||
|
4
i18n.h
4
i18n.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: i18n.h 1.16 2005/09/09 14:50:35 kls Exp $
|
||||
* $Id: i18n.h 1.17 2006/02/04 10:41:16 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __I18N_H
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
const int I18nNumLanguages = 20;
|
||||
const int I18nNumLanguages = 21;
|
||||
|
||||
typedef const char *tI18nPhrase[I18nNumLanguages];
|
||||
|
||||
|
8
menu.c
8
menu.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.c 1.407 2006/01/29 14:04:37 kls Exp $
|
||||
* $Id: menu.c 1.410 2006/02/05 13:31:08 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
@ -1437,7 +1437,7 @@ eOSState cMenuSchedule::ProcessKey(eKeys Key)
|
||||
case kYellow: if (schedules)
|
||||
return AddSubMenu(new cMenuWhatsOn(schedules, false, cMenuWhatsOn::CurrentChannel()));
|
||||
break;
|
||||
case kBlue: if (Count())
|
||||
case kBlue: if (Count() && otherChannel)
|
||||
return Switch();
|
||||
break;
|
||||
case kOk: if (Count())
|
||||
@ -3083,7 +3083,7 @@ cChannel *cDisplayChannel::NextAvailableChannel(cChannel *Channel, int Direction
|
||||
if (Direction) {
|
||||
while (Channel) {
|
||||
Channel = Direction > 0 ? Channels.Next(Channel) : Channels.Prev(Channel);
|
||||
if (Channel && !Channel->GroupSep() && cDevice::GetDevice(Channel, 0))
|
||||
if (Channel && !Channel->GroupSep() && (cDevice::PrimaryDevice()->ProvidesChannel(Channel, Setup.PrimaryLimit) || cDevice::GetDevice(Channel, 0)))
|
||||
return Channel;
|
||||
}
|
||||
}
|
||||
@ -3326,7 +3326,7 @@ cDisplayTracks::cDisplayTracks(void)
|
||||
:cOsdObject(true)
|
||||
{
|
||||
cDevice::PrimaryDevice()->EnsureAudioTrack();
|
||||
SetTrackDescriptions(!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice() ? cDevice::CurrentChannel() : 0);
|
||||
SetTrackDescriptions(!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring() ? cDevice::CurrentChannel() : 0);
|
||||
currentDisplayTracks = this;
|
||||
numTracks = track = 0;
|
||||
audioChannel = cDevice::PrimaryDevice()->GetAudioChannel();
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menuitems.c 1.30 2006/01/21 12:27:14 kls Exp $
|
||||
* $Id: menuitems.c 1.31 2006/02/04 12:47:08 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menuitems.h"
|
||||
@ -345,7 +345,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
|
||||
bool SameKey = Key == lastKey;
|
||||
if (Key != kNone)
|
||||
lastKey = Key;
|
||||
else if (!newchar && autoAdvanceTimeout.TimedOut()) {
|
||||
else if (!newchar && k0 <= NORMALKEY(lastKey) && NORMALKEY(lastKey) <= k9 && autoAdvanceTimeout.TimedOut()) {
|
||||
AdvancePos();
|
||||
newchar = true;
|
||||
currentChar = NULL;
|
||||
@ -427,7 +427,7 @@ eOSState cMenuEditStrItem::ProcessKey(eKeys Key)
|
||||
value[pos] = toupper(Inc(tolower(value[pos]), NORMALKEY(Key) == kUp));
|
||||
else
|
||||
value[pos] = Inc( value[pos], NORMALKEY(Key) == kUp);
|
||||
newchar = true;
|
||||
newchar = false;
|
||||
}
|
||||
else
|
||||
return cMenuEditItem::ProcessKey(Key);
|
||||
|
8
osd.c
8
osd.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: osd.c 1.65 2005/12/30 15:42:04 kls Exp $
|
||||
* $Id: osd.c 1.66 2006/02/05 13:46:37 kls Exp $
|
||||
*/
|
||||
|
||||
#include "osd.h"
|
||||
@ -112,7 +112,7 @@ cBitmap::cBitmap(const char *FileName)
|
||||
LoadXpm(FileName);
|
||||
}
|
||||
|
||||
cBitmap::cBitmap(char *Xpm[])
|
||||
cBitmap::cBitmap(const char *const Xpm[])
|
||||
{
|
||||
bitmap = NULL;
|
||||
x0 = 0;
|
||||
@ -251,9 +251,9 @@ bool cBitmap::LoadXpm(const char *FileName)
|
||||
return Result;
|
||||
}
|
||||
|
||||
bool cBitmap::SetXpm(char *Xpm[], bool IgnoreNone)
|
||||
bool cBitmap::SetXpm(const char *const Xpm[], bool IgnoreNone)
|
||||
{
|
||||
char **p = Xpm;
|
||||
const char *const *p = Xpm;
|
||||
int w, h, n, c;
|
||||
if (4 != sscanf(*p, "%d %d %d %d", &w, &h, &n, &c)) {
|
||||
esyslog("ERROR: faulty 'values' line in XPM: '%s'", *p);
|
||||
|
6
osd.h
6
osd.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: osd.h 1.50 2005/12/18 12:56:21 kls Exp $
|
||||
* $Id: osd.h 1.51 2006/02/05 13:46:37 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __OSD_H
|
||||
@ -112,7 +112,7 @@ public:
|
||||
///< this offset (unless specified otherwise).
|
||||
cBitmap(const char *FileName);
|
||||
///< Creates a bitmap and loads an XPM image from the given file.
|
||||
cBitmap(char *Xpm[]);
|
||||
cBitmap(const char *const Xpm[]);
|
||||
///< Creates a bitmap from the given XPM data.
|
||||
virtual ~cBitmap();
|
||||
int X0(void) const { return x0; }
|
||||
@ -140,7 +140,7 @@ public:
|
||||
bool LoadXpm(const char *FileName);
|
||||
///< Calls SetXpm() with the data from the file FileName.
|
||||
///< Returns true if the operation was successful.
|
||||
bool SetXpm(char *Xpm[], bool IgnoreNone = false);
|
||||
bool SetXpm(const char *const Xpm[], bool IgnoreNone = false);
|
||||
///< Sets this bitmap to the given XPM data. Any previous bitmap or
|
||||
///< palette data will be overwritten with the new data.
|
||||
///< If IgnoreNone is true, a "none" color entry will be ignored.
|
||||
|
14
osdbase.c
14
osdbase.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: osdbase.c 1.28 2006/01/08 11:40:02 kls Exp $
|
||||
* $Id: osdbase.c 1.29 2006/02/05 14:37:03 kls Exp $
|
||||
*/
|
||||
|
||||
#include "osdbase.h"
|
||||
@ -280,6 +280,12 @@ void cOsdMenu::CursorUp(void)
|
||||
return;
|
||||
while (--tmpCurrent != current) {
|
||||
if (tmpCurrent < 0) {
|
||||
if (first > 0) {
|
||||
// make non-selectable items at the beginning visible:
|
||||
first = 0;
|
||||
Display();
|
||||
return;
|
||||
}
|
||||
if (Setup.MenuScrollWrap)
|
||||
tmpCurrent = last + 1;
|
||||
else
|
||||
@ -312,6 +318,12 @@ void cOsdMenu::CursorDown(void)
|
||||
return;
|
||||
while (++tmpCurrent != current) {
|
||||
if (tmpCurrent > last) {
|
||||
if (first < last - displayMenuItems) {
|
||||
// make non-selectable items at the end visible:
|
||||
first = last - displayMenuItems + 1;
|
||||
Display();
|
||||
return;
|
||||
}
|
||||
if (Setup.MenuScrollWrap)
|
||||
tmpCurrent = -1;
|
||||
else
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.c 1.133 2006/01/20 17:18:59 kls Exp $
|
||||
* $Id: recording.c 1.134 2006/02/05 12:34:08 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@ -604,6 +604,7 @@ char *cRecording::SortName(void) const
|
||||
{
|
||||
if (!sortBuffer) {
|
||||
char *s = StripEpisodeName(strdup(FileName() + strlen(VideoDirectory) + 1));
|
||||
strreplace(s, '/', 'a'); // some locales ignore '/' when sorting
|
||||
int l = strxfrm(NULL, s, 0) + 1;
|
||||
sortBuffer = MALLOC(char, l);
|
||||
strxfrm(sortBuffer, s, l);
|
||||
|
349
remux.c
349
remux.c
@ -11,7 +11,7 @@
|
||||
* The cRepacker family's code was originally written by Reinhard Nissl <rnissl@gmx.de>,
|
||||
* and adapted to the VDR coding style by Klaus.Schmidinger@cadsoft.de.
|
||||
*
|
||||
* $Id: remux.c 1.53 2006/01/08 11:40:16 kls Exp $
|
||||
* $Id: remux.c 1.54 2006/02/03 16:19:02 kls Exp $
|
||||
*/
|
||||
|
||||
#include "remux.h"
|
||||
@ -248,6 +248,14 @@ private:
|
||||
scanPicture
|
||||
};
|
||||
int state;
|
||||
void HandleStartCode(const uchar *const Data, cRingBufferLinear *const ResultBuffer, const uchar *&Payload, const uchar StreamID, const ePesHeader MpegLevel);
|
||||
inline bool ScanDataForStartCodeSlow(const uchar *const Data);
|
||||
inline bool ScanDataForStartCodeFast(const uchar *&Data, const uchar *Limit);
|
||||
inline bool ScanDataForStartCode(const uchar *&Data, int &Done, int &Todo);
|
||||
inline void AdjustCounters(const int Delta, int &Done, int &Todo);
|
||||
inline bool ScanForEndOfPictureSlow(const uchar *&Data);
|
||||
inline bool ScanForEndOfPictureFast(const uchar *&Data, const uchar *Limit);
|
||||
inline bool ScanForEndOfPicture(const uchar *&Data, const uchar *Limit);
|
||||
public:
|
||||
cVideoRepacker(void);
|
||||
virtual void Reset(void);
|
||||
@ -267,6 +275,162 @@ void cVideoRepacker::Reset(void)
|
||||
state = syncing;
|
||||
}
|
||||
|
||||
void cVideoRepacker::HandleStartCode(const uchar *const Data, cRingBufferLinear *const ResultBuffer, const uchar *&Payload, const uchar StreamID, const ePesHeader MpegLevel)
|
||||
{
|
||||
// synchronisation is detected some bytes after frame start.
|
||||
const int SkippedBytesLimit = 4;
|
||||
|
||||
// which kind of start code have we got?
|
||||
switch (*Data) {
|
||||
case 0xB9 ... 0xFF: // system start codes
|
||||
LOG("cVideoRepacker: found system start code: stream seems to be scrambled or not demultiplexed");
|
||||
break;
|
||||
case 0xB0 ... 0xB1: // reserved start codes
|
||||
case 0xB6:
|
||||
LOG("cVideoRepacker: found reserved start code: stream seems to be scrambled");
|
||||
break;
|
||||
case 0xB4: // sequence error code
|
||||
LOG("cVideoRepacker: found sequence error code: stream seems to be damaged");
|
||||
case 0xB2: // user data start code
|
||||
case 0xB5: // extension start code
|
||||
break;
|
||||
case 0xB7: // sequence end code
|
||||
case 0xB3: // sequence header code
|
||||
case 0xB8: // group start code
|
||||
case 0x00: // picture start code
|
||||
if (state == scanPicture) {
|
||||
// the above start codes indicate that the current picture is done. So
|
||||
// push out the packet to start a new packet for the next picuture. If
|
||||
// the byte count get's negative then the current buffer ends in a
|
||||
// partitial start code that must be stripped off, as it shall be put
|
||||
// in the next packet.
|
||||
PushOutPacket(ResultBuffer, Payload, Data - 3 - Payload);
|
||||
// go on with syncing to the next picture
|
||||
state = syncing;
|
||||
}
|
||||
if (state == syncing) {
|
||||
if (initiallySyncing) // omit report for the typical initial case
|
||||
initiallySyncing = false;
|
||||
else if (skippedBytes > SkippedBytesLimit) // report that syncing dropped some bytes
|
||||
LOG("cVideoRepacker: skipped %d bytes to sync on next picture", skippedBytes - SkippedBytesLimit);
|
||||
skippedBytes = 0;
|
||||
// if there is a PES header available, then use it ...
|
||||
if (pesHeaderBackupLen > 0) {
|
||||
// ISO 13818-1 says:
|
||||
// In the case of video, if a PTS is present in a PES packet header
|
||||
// it shall refer to the access unit containing the first picture start
|
||||
// code that commences in this PES packet. A picture start code commences
|
||||
// in PES packet if the first byte of the picture start code is present
|
||||
// in the PES packet.
|
||||
memcpy(pesHeader, pesHeaderBackup, pesHeaderBackupLen);
|
||||
pesHeaderLen = pesHeaderBackupLen;
|
||||
pesHeaderBackupLen = 0;
|
||||
}
|
||||
else {
|
||||
// ... otherwise create a continuation PES header
|
||||
pesHeaderLen = 0;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x01;
|
||||
pesHeader[pesHeaderLen++] = StreamID; // video stream ID
|
||||
pesHeader[pesHeaderLen++] = 0x00; // length still unknown
|
||||
pesHeader[pesHeaderLen++] = 0x00; // length still unknown
|
||||
|
||||
if (MpegLevel == phMPEG2) {
|
||||
pesHeader[pesHeaderLen++] = 0x80;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
}
|
||||
else
|
||||
pesHeader[pesHeaderLen++] = 0x0F;
|
||||
}
|
||||
// append the first three bytes of the start code
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x01;
|
||||
// the next packet's payload will begin with the fourth byte of
|
||||
// the start code (= the actual code)
|
||||
Payload = Data;
|
||||
// as there is no length information available, assume the
|
||||
// maximum we can hold in one PES packet
|
||||
packetTodo = maxPacketSize - pesHeaderLen;
|
||||
// go on with finding the picture data
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
case 0x01 ... 0xAF: // slice start codes
|
||||
if (state == findPicture) {
|
||||
// go on with scanning the picture data
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool cVideoRepacker::ScanDataForStartCodeSlow(const uchar *const Data)
|
||||
{
|
||||
scanner <<= 8;
|
||||
bool FoundStartCode = (scanner == 0x00000100);
|
||||
scanner |= *Data;
|
||||
return FoundStartCode;
|
||||
}
|
||||
|
||||
bool cVideoRepacker::ScanDataForStartCodeFast(const uchar *&Data, const uchar *Limit)
|
||||
{
|
||||
Limit--;
|
||||
|
||||
while (Data < Limit && (Data = (const uchar *)memchr(Data, 0x01, Limit - Data))) {
|
||||
if (Data[-2] || Data[-1])
|
||||
Data += 3;
|
||||
else {
|
||||
scanner = 0x00000100 | *++Data;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Data = Limit;
|
||||
unsigned long *Scanner = (unsigned long *)(Data - 3);
|
||||
scanner = ntohl(*Scanner);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cVideoRepacker::ScanDataForStartCode(const uchar *&Data, int &Done, int &Todo)
|
||||
{
|
||||
const uchar *const DataOrig = Data;
|
||||
const int MinDataSize = 4;
|
||||
|
||||
if (Todo < MinDataSize || (state != syncing && packetTodo < MinDataSize))
|
||||
return ScanDataForStartCodeSlow(Data);
|
||||
|
||||
int Limit = Todo;
|
||||
if (state != syncing && Limit > packetTodo)
|
||||
Limit = packetTodo;
|
||||
|
||||
if (ScanDataForStartCodeSlow(Data))
|
||||
return true;
|
||||
|
||||
if (ScanDataForStartCodeSlow(++Data)) {
|
||||
AdjustCounters(1, Done, Todo);
|
||||
return true;
|
||||
}
|
||||
++Data;
|
||||
|
||||
bool FoundStartCode = ScanDataForStartCodeFast(Data, DataOrig + Limit);
|
||||
AdjustCounters(Data - DataOrig, Done, Todo);
|
||||
return FoundStartCode;
|
||||
}
|
||||
|
||||
void cVideoRepacker::AdjustCounters(const int Delta, int &Done, int &Todo)
|
||||
{
|
||||
Done += Delta;
|
||||
Todo -= Delta;
|
||||
|
||||
if (state <= syncing)
|
||||
skippedBytes += Delta;
|
||||
else
|
||||
packetTodo -= Delta;
|
||||
}
|
||||
|
||||
void cVideoRepacker::Repack(cRingBufferLinear *ResultBuffer, const uchar *Data, int Count)
|
||||
{
|
||||
// synchronisation is detected some bytes after frame start.
|
||||
@ -300,98 +464,9 @@ void cVideoRepacker::Repack(cRingBufferLinear *ResultBuffer, const uchar *Data,
|
||||
if (state <= syncing)
|
||||
skippedBytes++;
|
||||
// did we reach a start code?
|
||||
scanner <<= 8;
|
||||
if (scanner != 0x00000100)
|
||||
scanner |= *data;
|
||||
else {
|
||||
scanner |= *data;
|
||||
|
||||
// which kind of start code have we got?
|
||||
switch (*data) {
|
||||
case 0xB9 ... 0xFF: // system start codes
|
||||
LOG("cVideoRepacker: found system start code: stream seems to be scrambled or not demultiplexed");
|
||||
break;
|
||||
case 0xB0 ... 0xB1: // reserved start codes
|
||||
case 0xB6:
|
||||
LOG("cVideoRepacker: found reserved start code: stream seems to be scrambled");
|
||||
break;
|
||||
case 0xB4: // sequence error code
|
||||
LOG("cVideoRepacker: found sequence error code: stream seems to be damaged");
|
||||
case 0xB2: // user data start code
|
||||
case 0xB5: // extension start code
|
||||
break;
|
||||
case 0xB7: // sequence end code
|
||||
case 0xB3: // sequence header code
|
||||
case 0xB8: // group start code
|
||||
case 0x00: // picture start code
|
||||
if (state == scanPicture) {
|
||||
// the above start codes indicate that the current picture is done. So
|
||||
// push out the packet to start a new packet for the next picuture. If
|
||||
// the byte count get's negative then the current buffer ends in a
|
||||
// partitial start code that must be stripped off, as it shall be put
|
||||
// in the next packet.
|
||||
PushOutPacket(ResultBuffer, payload, data - 3 - payload);
|
||||
// go on with syncing to the next picture
|
||||
state = syncing;
|
||||
}
|
||||
if (state == syncing) {
|
||||
if (initiallySyncing) // omit report for the typical initial case
|
||||
initiallySyncing = false;
|
||||
else if (skippedBytes > SkippedBytesLimit) // report that syncing dropped some bytes
|
||||
LOG("cVideoRepacker: skipped %d bytes to sync on next picture", skippedBytes - SkippedBytesLimit);
|
||||
skippedBytes = 0;
|
||||
// if there is a PES header available, then use it ...
|
||||
if (pesHeaderBackupLen > 0) {
|
||||
// ISO 13818-1 says:
|
||||
// In the case of video, if a PTS is present in a PES packet header
|
||||
// it shall refer to the access unit containing the first picture start
|
||||
// code that commences in this PES packet. A picture start code commences
|
||||
// in PES packet if the first byte of the picture start code is present
|
||||
// in the PES packet.
|
||||
memcpy(pesHeader, pesHeaderBackup, pesHeaderBackupLen);
|
||||
pesHeaderLen = pesHeaderBackupLen;
|
||||
pesHeaderBackupLen = 0;
|
||||
}
|
||||
else {
|
||||
// ... otherwise create a continuation PES header
|
||||
pesHeaderLen = 0;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x01;
|
||||
pesHeader[pesHeaderLen++] = Data[3]; // video stream ID
|
||||
pesHeader[pesHeaderLen++] = 0x00; // length still unknown
|
||||
pesHeader[pesHeaderLen++] = 0x00; // length still unknown
|
||||
|
||||
if (mpegLevel == phMPEG2) {
|
||||
pesHeader[pesHeaderLen++] = 0x80;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
}
|
||||
else
|
||||
pesHeader[pesHeaderLen++] = 0x0F;
|
||||
}
|
||||
// append the first three bytes of the start code
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x00;
|
||||
pesHeader[pesHeaderLen++] = 0x01;
|
||||
// the next packet's payload will begin with the fourth byte of
|
||||
// the start code (= the actual code)
|
||||
payload = data;
|
||||
// as there is no length information available, assume the
|
||||
// maximum we can hold in one PES packet
|
||||
packetTodo = maxPacketSize - pesHeaderLen;
|
||||
// go on with finding the picture data
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
case 0x01 ... 0xAF: // slice start codes
|
||||
if (state == findPicture) {
|
||||
// go on with scanning the picture data
|
||||
state++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (ScanDataForStartCode(data, done, todo))
|
||||
HandleStartCode(data, ResultBuffer, payload, Data[3], mpegLevel);
|
||||
// move on
|
||||
data++;
|
||||
done++;
|
||||
todo--;
|
||||
@ -501,6 +576,79 @@ void cVideoRepacker::Repack(cRingBufferLinear *ResultBuffer, const uchar *Data,
|
||||
}
|
||||
}
|
||||
|
||||
bool cVideoRepacker::ScanForEndOfPictureSlow(const uchar *&Data)
|
||||
{
|
||||
localScanner <<= 8;
|
||||
localScanner |= *Data++;
|
||||
// check start codes which follow picture data
|
||||
switch (localScanner) {
|
||||
case 0x00000100: // picture start code
|
||||
case 0x000001B8: // group start code
|
||||
case 0x000001B3: // sequence header code
|
||||
case 0x000001B7: // sequence end code
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cVideoRepacker::ScanForEndOfPictureFast(const uchar *&Data, const uchar *Limit)
|
||||
{
|
||||
Limit--;
|
||||
|
||||
while (Data < Limit && (Data = (const uchar *)memchr(Data, 0x01, Limit - Data))) {
|
||||
if (Data[-2] || Data[-1])
|
||||
Data += 3;
|
||||
else {
|
||||
localScanner = 0x00000100 | *++Data;
|
||||
// check start codes which follow picture data
|
||||
switch (localScanner) {
|
||||
case 0x00000100: // picture start code
|
||||
case 0x000001B8: // group start code
|
||||
case 0x000001B3: // sequence header code
|
||||
case 0x000001B7: // sequence end code
|
||||
Data++;
|
||||
return true;
|
||||
default:
|
||||
Data += 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Data = Limit + 1;
|
||||
unsigned long *LocalScanner = (unsigned long *)(Data - 4);
|
||||
localScanner = ntohl(*LocalScanner);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool cVideoRepacker::ScanForEndOfPicture(const uchar *&Data, const uchar *Limit)
|
||||
{
|
||||
const uchar *const DataOrig = Data;
|
||||
const int MinDataSize = 4;
|
||||
bool FoundEndOfPicture;
|
||||
|
||||
if (Limit - Data <= MinDataSize) {
|
||||
FoundEndOfPicture = false;
|
||||
while (Data < Limit) {
|
||||
if (ScanForEndOfPictureSlow(Data)) {
|
||||
FoundEndOfPicture = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
FoundEndOfPicture = true;
|
||||
if (!ScanForEndOfPictureSlow(Data)) {
|
||||
if (!ScanForEndOfPictureSlow(Data)) {
|
||||
if (!ScanForEndOfPictureFast(Data, Limit))
|
||||
FoundEndOfPicture = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
localStart += (Data - DataOrig);
|
||||
return FoundEndOfPicture;
|
||||
}
|
||||
|
||||
int cVideoRepacker::BreakAt(const uchar *Data, int Count)
|
||||
{
|
||||
if (initiallySyncing)
|
||||
@ -522,19 +670,8 @@ int cVideoRepacker::BreakAt(const uchar *Data, int Count)
|
||||
const uchar *data = Data + PesPayloadOffset + localStart;
|
||||
const uchar *limit = Data + Count;
|
||||
// scan data
|
||||
while (data < limit) {
|
||||
localStart++;
|
||||
localScanner <<= 8;
|
||||
localScanner |= *data++;
|
||||
// check start codes which follow picture data
|
||||
switch (localScanner) {
|
||||
case 0x00000100: // picture start code
|
||||
case 0x000001B8: // group start code
|
||||
case 0x000001B3: // sequence header code
|
||||
case 0x000001B7: // sequence end code
|
||||
return data - Data;
|
||||
}
|
||||
}
|
||||
if (ScanForEndOfPicture(data, limit))
|
||||
return data - Data;
|
||||
}
|
||||
// just fill up packet and append next start code
|
||||
return PesPayloadOffset + packetTodo + 4;
|
||||
|
11
runvdr
11
runvdr
@ -5,12 +5,9 @@
|
||||
# If VDR exits abnormally, the driver will be reloaded
|
||||
# and VDR restarted.
|
||||
#
|
||||
# Set the environment variable VDRUSR to the user id you
|
||||
# want VDR to run with. If VDRUSR is not set, VDR will run
|
||||
# as user 'vdr'.
|
||||
#
|
||||
# Since this script loads the DVB driver, it must be started
|
||||
# as user 'root'.
|
||||
# as user 'root'. Add the option "-u username" to run VDR
|
||||
# under the given user name.
|
||||
#
|
||||
# Any command line parameters will be passed on to the
|
||||
# actual 'vdr' program.
|
||||
@ -18,11 +15,11 @@
|
||||
# See the main source file 'vdr.c' for copyright information and
|
||||
# how to reach the author.
|
||||
#
|
||||
# $Id: runvdr 1.15 2005/12/31 16:04:53 kls Exp $
|
||||
# $Id: runvdr 1.16 2006/02/04 15:20:48 kls Exp $
|
||||
|
||||
DVBDIR="../DVB/driver"
|
||||
VDRPRG="./vdr"
|
||||
VDRCMD="$VDRPRG -u $VDRUSR -w 60 $*"
|
||||
VDRCMD="$VDRPRG -w 60 $*"
|
||||
|
||||
LSMOD="`/sbin/lsmod | grep -w '^dvb' | wc -l`"
|
||||
KILL="/usr/bin/killall -q -TERM"
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skinclassic.c 1.13 2006/01/01 14:37:58 kls Exp $
|
||||
* $Id: skinclassic.c 1.14 2006/02/05 14:51:39 kls Exp $
|
||||
*/
|
||||
|
||||
#include "skinclassic.h"
|
||||
@ -169,6 +169,8 @@ public:
|
||||
virtual void SetEvent(const cEvent *Event);
|
||||
virtual void SetRecording(const cRecording *Recording);
|
||||
virtual void SetText(const char *Text, bool FixedFont);
|
||||
virtual int GetTextAreaWidth(void) const;
|
||||
virtual const cFont *GetTextAreaFont(bool FixedFont) const;
|
||||
virtual void Flush(void);
|
||||
};
|
||||
|
||||
@ -357,11 +359,20 @@ void cSkinClassicDisplayMenu::SetRecording(const cRecording *Recording)
|
||||
|
||||
void cSkinClassicDisplayMenu::SetText(const char *Text, bool FixedFont)
|
||||
{
|
||||
const cFont *font = cFont::GetFont(FixedFont ? fontFix : fontOsd);
|
||||
textScroller.Set(osd, x0, y2, x1 - x0 - 2 * ScrollWidth, y3 - y2, Text, font, Theme.Color(clrMenuText), Theme.Color(clrBackground));
|
||||
textScroller.Set(osd, x0, y2, GetTextAreaWidth(), y3 - y2, Text, GetTextAreaFont(FixedFont), Theme.Color(clrMenuText), Theme.Color(clrBackground));
|
||||
SetScrollbar();
|
||||
}
|
||||
|
||||
int cSkinClassicDisplayMenu::GetTextAreaWidth(void) const
|
||||
{
|
||||
return x1 - x0 - 2 * ScrollWidth;
|
||||
}
|
||||
|
||||
const cFont *cSkinClassicDisplayMenu::GetTextAreaFont(bool FixedFont) const
|
||||
{
|
||||
return cFont::GetFont(FixedFont ? fontFix : fontOsd);
|
||||
}
|
||||
|
||||
void cSkinClassicDisplayMenu::Flush(void)
|
||||
{
|
||||
cString date = DayDateTime();
|
||||
|
12
skins.c
12
skins.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skins.c 1.7 2006/01/08 11:40:18 kls Exp $
|
||||
* $Id: skins.c 1.8 2006/02/05 14:53:04 kls Exp $
|
||||
*/
|
||||
|
||||
#include "skins.h"
|
||||
@ -108,6 +108,16 @@ const char *cSkinDisplayMenu::GetTabbedText(const char *s, int Tab)
|
||||
return buffer;
|
||||
}
|
||||
|
||||
int cSkinDisplayMenu::GetTextAreaWidth(void) const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const cFont *cSkinDisplayMenu::GetTextAreaFont(bool) const
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// --- cSkinDisplayReplay::cProgressBar --------------------------------------
|
||||
|
||||
cSkinDisplayReplay::cProgressBar::cProgressBar(int Width, int Height, int Current, int Total, const cMarks *Marks, tColor ColorSeen, tColor ColorRest, tColor ColorSelected, tColor ColorMark, tColor ColorCurrent)
|
||||
|
15
skins.h
15
skins.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skins.h 1.10 2006/01/08 11:40:21 kls Exp $
|
||||
* $Id: skins.h 1.11 2006/02/05 14:59:57 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __SKINS_H
|
||||
@ -160,6 +160,19 @@ public:
|
||||
///< the Scroll() function will be called to drive scrolling that text if
|
||||
///< necessary.
|
||||
//XXX ??? virtual void SetHelp(const char *Help) = 0;
|
||||
virtual int GetTextAreaWidth(void) const;
|
||||
///< Returns the width in pixel of the area which is used to display text
|
||||
///< with SetText(). The width of the area is the width of the central area
|
||||
///< minus the width of any possibly displayed scroll-bar or other decoration.
|
||||
///< The default implementation returns 0. Therefore a caller of this method
|
||||
///< must be prepared to receive 0 if the plugin doesn't implement this method.
|
||||
virtual const cFont *GetTextAreaFont(bool FixedFont) const;
|
||||
///< Returns a pointer to the font which is used to display text with SetText().
|
||||
///< The parameter FixedFont has the same meaning as in SetText(). The default
|
||||
///< implementation returns NULL. Therefore a caller of this method must be
|
||||
///< prepared to receive NULL if the plugin doesn't implement this method.
|
||||
///< The returned pointer is valid a long as the instance of cSkinDisplayMenu
|
||||
///< exists.
|
||||
};
|
||||
|
||||
class cSkinDisplayReplay : public cSkinDisplay {
|
||||
|
20
skinsttng.c
20
skinsttng.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: skinsttng.c 1.16 2006/01/01 14:38:14 kls Exp $
|
||||
* $Id: skinsttng.c 1.18 2006/02/05 14:51:39 kls Exp $
|
||||
*/
|
||||
|
||||
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
|
||||
@ -347,6 +347,8 @@ public:
|
||||
virtual void SetEvent(const cEvent *Event);
|
||||
virtual void SetRecording(const cRecording *Recording);
|
||||
virtual void SetText(const char *Text, bool FixedFont);
|
||||
virtual int GetTextAreaWidth(void) const;
|
||||
virtual const cFont *GetTextAreaFont(bool FixedFont) const;
|
||||
virtual void Flush(void);
|
||||
};
|
||||
|
||||
@ -617,11 +619,21 @@ void cSkinSTTNGDisplayMenu::SetRecording(const cRecording *Recording)
|
||||
}
|
||||
|
||||
void cSkinSTTNGDisplayMenu::SetText(const char *Text, bool FixedFont)
|
||||
{
|
||||
textScroller.Set(osd, x3, y3, GetTextAreaWidth(), y4 - y3, Text, GetTextAreaFont(FixedFont), Theme.Color(clrMenuText), Theme.Color(clrBackground));
|
||||
SetScrollbar();
|
||||
}
|
||||
|
||||
int cSkinSTTNGDisplayMenu::GetTextAreaWidth(void) const
|
||||
{
|
||||
return x4 - x3;
|
||||
}
|
||||
|
||||
const cFont *cSkinSTTNGDisplayMenu::GetTextAreaFont(bool FixedFont) const
|
||||
{
|
||||
const cFont *font = cFont::GetFont(FixedFont ? fontFix : fontOsd);
|
||||
font = cFont::GetFont(fontSml);//XXX -> make a way to let the text define which font to use
|
||||
textScroller.Set(osd, x3, y3, x4 - x3, y4 - y3, Text, font, Theme.Color(clrMenuText), Theme.Color(clrBackground));
|
||||
SetScrollbar();
|
||||
return font;
|
||||
}
|
||||
|
||||
void cSkinSTTNGDisplayMenu::Flush(void)
|
||||
@ -721,7 +733,7 @@ void cSkinSTTNGDisplayReplay::SetTitle(const char *Title)
|
||||
osd->DrawText(x3 + 5, y0, Title, Theme.Color(clrReplayTitle), frameColor, cFont::GetFont(fontSml), x4 - x3 - 5);
|
||||
}
|
||||
|
||||
static char **ReplaySymbols[2][2][5] = {
|
||||
static const char *const *ReplaySymbols[2][2][5] = {
|
||||
{ { pause_xpm, srew_xpm, srew1_xpm, srew2_xpm, srew3_xpm },
|
||||
{ pause_xpm, sfwd_xpm, sfwd1_xpm, sfwd2_xpm, sfwd3_xpm }, },
|
||||
{ { play_xpm, frew_xpm, frew1_xpm, frew2_xpm, frew3_xpm },
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * arrowdown_xpm[] = {
|
||||
static const char *const arrowdown_xpm[] = {
|
||||
"12 12 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * arrowup_xpm[] = {
|
||||
static const char *const arrowup_xpm[] = {
|
||||
"12 12 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * audio_xpm[] = {
|
||||
static const char *const audio_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * audioleft_xpm[] = {
|
||||
static const char *const audioleft_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * audioright_xpm[] = {
|
||||
static const char *const audioright_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * audiostereo_xpm[] = {
|
||||
static const char *const audiostereo_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * dolbydigital_xpm[] = {
|
||||
static const char *const dolbydigital_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * encrypted_xpm[] = {
|
||||
static const char *const encrypted_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * ffwd_xpm[] = {
|
||||
static const char *const ffwd_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * ffwd1_xpm[] = {
|
||||
static const char *const ffwd1_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * ffwd2_xpm[] = {
|
||||
static const char *const ffwd2_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * ffwd3_xpm[] = {
|
||||
static const char *const ffwd3_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * frew_xpm[] = {
|
||||
static const char *const frew_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * frew1_xpm[] = {
|
||||
static const char *const frew1_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * frew2_xpm[] = {
|
||||
static const char *const frew2_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * frew3_xpm[] = {
|
||||
static const char *const frew3_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * mute_xpm[] = {
|
||||
static const char *const mute_xpm[] = {
|
||||
"26 20 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * pause_xpm[] = {
|
||||
static const char *const pause_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * play_xpm[] = {
|
||||
static const char *const play_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * radio_xpm[] = {
|
||||
static const char *const radio_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * recording_xpm[] = {
|
||||
static const char *const recording_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * sfwd_xpm[] = {
|
||||
static const char *const sfwd_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * sfwd1_xpm[] = {
|
||||
static const char *const sfwd1_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * sfwd2_xpm[] = {
|
||||
static const char *const sfwd2_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * sfwd3_xpm[] = {
|
||||
static const char *const sfwd3_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * srew_xpm[] = {
|
||||
static const char *const srew_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * srew1_xpm[] = {
|
||||
static const char *const srew1_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * srew2_xpm[] = {
|
||||
static const char *const srew2_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * srew3_xpm[] = {
|
||||
static const char *const srew3_xpm[] = {
|
||||
"28 26 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * teletext_xpm[] = {
|
||||
static const char *const teletext_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XPM */
|
||||
static char * volume_xpm[] = {
|
||||
static const char *const volume_xpm[] = {
|
||||
"28 14 2 1",
|
||||
". c #FFFFFF",
|
||||
"+ c #000000",
|
||||
|
11
timers.c
11
timers.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: timers.c 1.45 2006/01/28 15:09:05 kls Exp $
|
||||
* $Id: timers.c 1.46 2006/02/03 15:20:14 kls Exp $
|
||||
*/
|
||||
|
||||
#include "timers.h"
|
||||
@ -535,13 +535,22 @@ cTimer *cTimers::GetTimer(cTimer *Timer)
|
||||
|
||||
cTimer *cTimers::GetMatch(time_t t)
|
||||
{
|
||||
static int LastPending = -1;
|
||||
cTimer *t0 = NULL;
|
||||
for (cTimer *ti = First(); ti; ti = Next(ti)) {
|
||||
if (!ti->Recording() && ti->Matches(t)) {
|
||||
if (ti->Pending()) {
|
||||
if (ti->Index() > LastPending)
|
||||
LastPending = ti->Index();
|
||||
else
|
||||
continue;
|
||||
}
|
||||
if (!t0 || ti->Priority() > t0->Priority())
|
||||
t0 = ti;
|
||||
}
|
||||
}
|
||||
if (!t0)
|
||||
LastPending = -1;
|
||||
return t0;
|
||||
}
|
||||
|
||||
|
174
tools.c
174
tools.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: tools.c 1.112 2006/01/20 14:01:28 kls Exp $
|
||||
* $Id: tools.c 1.114 2006/02/05 11:05:56 kls Exp $
|
||||
*/
|
||||
|
||||
#include "tools.h"
|
||||
@ -1054,10 +1054,9 @@ bool cSafeFile::Close(void)
|
||||
|
||||
// --- cUnbufferedFile -------------------------------------------------------
|
||||
|
||||
//#define USE_FADVISE
|
||||
#define USE_FADVISE
|
||||
|
||||
#define READ_AHEAD MEGABYTE(2)
|
||||
#define WRITE_BUFFER MEGABYTE(10)
|
||||
#define WRITE_BUFFER KILOBYTE(800)
|
||||
|
||||
cUnbufferedFile::cUnbufferedFile(void)
|
||||
{
|
||||
@ -1073,8 +1072,17 @@ int cUnbufferedFile::Open(const char *FileName, int Flags, mode_t Mode)
|
||||
{
|
||||
Close();
|
||||
fd = open(FileName, Flags, Mode);
|
||||
begin = end = ahead = -1;
|
||||
curpos = 0;
|
||||
#ifdef USE_FADVISE
|
||||
begin = lastpos = ahead = 0;
|
||||
cachedstart = 0;
|
||||
cachedend = 0;
|
||||
readahead = KILOBYTE(128);
|
||||
written = 0;
|
||||
totwritten = 0;
|
||||
if (fd >= 0)
|
||||
posix_fadvise(fd, 0, 0, POSIX_FADV_RANDOM); // we could use POSIX_FADV_SEQUENTIAL, but we do our own readahead, disabling the kernel one.
|
||||
#endif
|
||||
return fd;
|
||||
}
|
||||
|
||||
@ -1082,16 +1090,9 @@ int cUnbufferedFile::Close(void)
|
||||
{
|
||||
#ifdef USE_FADVISE
|
||||
if (fd >= 0) {
|
||||
if (ahead > end)
|
||||
end = ahead;
|
||||
if (begin >= 0 && end > begin) {
|
||||
//dsyslog("close buffer: %d (flush: %d bytes, %ld-%ld)", fd, written, begin, end);
|
||||
if (written)
|
||||
fdatasync(fd);
|
||||
posix_fadvise(fd, begin, end - begin, POSIX_FADV_DONTNEED);
|
||||
}
|
||||
begin = end = ahead = -1;
|
||||
written = 0;
|
||||
if (totwritten) // if we wrote anything make sure the data has hit the disk before
|
||||
fdatasync(fd); // calling fadvise, as this is our last chance to un-cache it.
|
||||
posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
|
||||
}
|
||||
#endif
|
||||
int OldFd = fd;
|
||||
@ -1099,45 +1100,84 @@ int cUnbufferedFile::Close(void)
|
||||
return close(OldFd);
|
||||
}
|
||||
|
||||
// When replaying and going e.g. FF->PLAY the position jumps back 2..8M
|
||||
// hence we do not want to drop recently accessed data at once.
|
||||
// We try to handle the common cases such as PLAY->FF->PLAY, small
|
||||
// jumps, moving editing marks etc.
|
||||
|
||||
#define FADVGRAN KILOBYTE(4) // AKA fadvise-chunk-size; PAGE_SIZE or getpagesize(2) would also work.
|
||||
#define READCHUNK MEGABYTE(8)
|
||||
|
||||
void cUnbufferedFile::SetReadAhead(size_t ra)
|
||||
{
|
||||
readahead = ra;
|
||||
}
|
||||
|
||||
int cUnbufferedFile::FadviseDrop(off_t Offset, off_t Len)
|
||||
{
|
||||
// rounding up the window to make sure that not PAGE_SIZE-aligned data gets freed.
|
||||
return posix_fadvise(fd, Offset - (FADVGRAN - 1), Len + (FADVGRAN - 1) * 2, POSIX_FADV_DONTNEED);
|
||||
}
|
||||
|
||||
off_t cUnbufferedFile::Seek(off_t Offset, int Whence)
|
||||
{
|
||||
if (fd >= 0)
|
||||
return lseek(fd, Offset, Whence);
|
||||
return -1;
|
||||
if (Whence == SEEK_SET && Offset == curpos)
|
||||
return curpos;
|
||||
curpos = lseek(fd, Offset, Whence);
|
||||
return curpos;
|
||||
}
|
||||
|
||||
ssize_t cUnbufferedFile::Read(void *Data, size_t Size)
|
||||
{
|
||||
if (fd >= 0) {
|
||||
#ifdef USE_FADVISE
|
||||
off_t pos = lseek(fd, 0, SEEK_CUR);
|
||||
// jump forward - adjust end position
|
||||
if (pos > end)
|
||||
end = pos;
|
||||
// after adjusting end - don't clear more than previously requested
|
||||
if (end > ahead)
|
||||
end = ahead;
|
||||
// jump backward - drop read ahead of previous run
|
||||
if (pos < begin)
|
||||
end = ahead;
|
||||
if (begin >= 0 && end > begin)
|
||||
posix_fadvise(fd, begin - KILOBYTE(200), end - begin + KILOBYTE(200), POSIX_FADV_DONTNEED);//XXX macros/parameters???
|
||||
begin = pos;
|
||||
off_t jumped = curpos-lastpos; // nonzero means we're not at the last offset
|
||||
if ((cachedstart < cachedend) && (curpos < cachedstart || curpos > cachedend)) {
|
||||
// current position is outside the cached window -- invalidate it.
|
||||
FadviseDrop(cachedstart, cachedend-cachedstart);
|
||||
cachedstart = curpos;
|
||||
cachedend = curpos;
|
||||
}
|
||||
cachedstart = min(cachedstart, curpos);
|
||||
#endif
|
||||
ssize_t bytesRead = safe_read(fd, Data, Size);
|
||||
#ifdef USE_FADVISE
|
||||
if (bytesRead > 0) {
|
||||
pos += bytesRead;
|
||||
end = pos;
|
||||
// this seems to trigger a non blocking read - this
|
||||
// may or may not have been finished when we will be called next time.
|
||||
// If it is not finished we can't release the not yet filled buffers.
|
||||
// So this is commented out till we find a better solution.
|
||||
//posix_fadvise(fd, pos, READ_AHEAD, POSIX_FADV_WILLNEED);
|
||||
ahead = pos + READ_AHEAD;
|
||||
curpos += bytesRead;
|
||||
cachedend = max(cachedend, curpos);
|
||||
|
||||
// Read ahead:
|
||||
// no jump? (allow small forward jump still inside readahead window).
|
||||
if (jumped >= 0 && jumped <= (off_t)readahead) {
|
||||
// Trigger the readahead IO, but only if we've used at least
|
||||
// 1/2 of the previously requested area. This avoids calling
|
||||
// fadvise() after every read() call.
|
||||
if (ahead - curpos < (off_t)(readahead / 2)) {
|
||||
posix_fadvise(fd, curpos, readahead, POSIX_FADV_WILLNEED);
|
||||
ahead = curpos + readahead;
|
||||
cachedend = max(cachedend, ahead);
|
||||
}
|
||||
if (readahead < Size * 32) { // automagically tune readahead size.
|
||||
readahead = Size * 32;
|
||||
}
|
||||
}
|
||||
else
|
||||
ahead = curpos; // jumped -> we really don't want any readahead, otherwise e.g. fast-rewind gets in trouble.
|
||||
}
|
||||
else
|
||||
end = pos;
|
||||
|
||||
if (cachedstart < cachedend) {
|
||||
if (curpos - cachedstart > READCHUNK * 2) {
|
||||
// current position has moved forward enough, shrink tail window.
|
||||
FadviseDrop(cachedstart, curpos - READCHUNK - cachedstart);
|
||||
cachedstart = curpos - READCHUNK;
|
||||
}
|
||||
else if (cachedend > ahead && cachedend - curpos > READCHUNK * 2) {
|
||||
// current position has moved back enough, shrink head window.
|
||||
FadviseDrop(curpos + READCHUNK, cachedend - curpos + READCHUNK);
|
||||
cachedend = curpos + READCHUNK;
|
||||
}
|
||||
}
|
||||
lastpos = curpos;
|
||||
#endif
|
||||
return bytesRead;
|
||||
}
|
||||
@ -1147,28 +1187,46 @@ ssize_t cUnbufferedFile::Read(void *Data, size_t Size)
|
||||
ssize_t cUnbufferedFile::Write(const void *Data, size_t Size)
|
||||
{
|
||||
if (fd >=0) {
|
||||
#ifdef USE_FADVISE
|
||||
off_t pos = lseek(fd, 0, SEEK_CUR);
|
||||
#endif
|
||||
ssize_t bytesWritten = safe_write(fd, Data, Size);
|
||||
#ifdef USE_FADVISE
|
||||
if (bytesWritten >= 0) {
|
||||
if (bytesWritten > 0) {
|
||||
begin = min(begin, curpos);
|
||||
curpos += bytesWritten;
|
||||
written += bytesWritten;
|
||||
if (begin >= 0) {
|
||||
if (pos < begin)
|
||||
begin = pos;
|
||||
}
|
||||
else
|
||||
begin = pos;
|
||||
if (pos + bytesWritten > end)
|
||||
end = pos + bytesWritten;
|
||||
lastpos = max(lastpos, curpos);
|
||||
if (written > WRITE_BUFFER) {
|
||||
//dsyslog("flush buffer: %d (%d bytes, %ld-%ld)", fd, written, begin, end);
|
||||
fdatasync(fd);
|
||||
if (begin >= 0 && end > begin)
|
||||
posix_fadvise(fd, begin, end - begin, POSIX_FADV_DONTNEED);
|
||||
begin = end = -1;
|
||||
if (lastpos > begin) {
|
||||
// Now do three things:
|
||||
// 1) Start writeback of begin..lastpos range
|
||||
// 2) Drop the already written range (by the previous fadvise call)
|
||||
// 3) Handle nonpagealigned data.
|
||||
// This is why we double the WRITE_BUFFER; the first time around the
|
||||
// last (partial) page might be skipped, writeback will start only after
|
||||
// second call; the third call will still include this page and finally
|
||||
// drop it from cache.
|
||||
off_t headdrop = min(begin, WRITE_BUFFER * 2L);
|
||||
posix_fadvise(fd, begin - headdrop, lastpos - begin + headdrop, POSIX_FADV_DONTNEED);
|
||||
}
|
||||
begin = lastpos = curpos;
|
||||
totwritten += written;
|
||||
written = 0;
|
||||
// The above fadvise() works when writing slowly (recording), but could
|
||||
// leave cached data around when writing at a high rate, e.g. when cutting,
|
||||
// because by the time we try to flush the cached pages (above) the data
|
||||
// can still be dirty - we are faster than the disk I/O.
|
||||
// So we do another round of flushing, just like above, but at larger
|
||||
// intervals -- this should catch any pages that couldn't be released
|
||||
// earlier.
|
||||
if (totwritten > MEGABYTE(32)) {
|
||||
// It seems in some setups, fadvise() does not trigger any I/O and
|
||||
// a fdatasync() call would be required do all the work (reiserfs with some
|
||||
// kind of write gathering enabled), but the syncs cause (io) load..
|
||||
// Uncomment the next line if you think you need them.
|
||||
//fdatasync(fd);
|
||||
off_t headdrop = min(curpos - totwritten, totwritten * 2L);
|
||||
posix_fadvise(fd, curpos - totwritten - headdrop, totwritten + headdrop, POSIX_FADV_DONTNEED);
|
||||
totwritten = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
13
tools.h
13
tools.h
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: tools.h 1.90 2006/01/15 16:19:56 kls Exp $
|
||||
* $Id: tools.h 1.92 2006/02/04 14:27:05 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TOOLS_H
|
||||
@ -242,15 +242,22 @@ public:
|
||||
class cUnbufferedFile {
|
||||
private:
|
||||
int fd;
|
||||
off_t curpos;
|
||||
off_t cachedstart;
|
||||
off_t cachedend;
|
||||
off_t begin;
|
||||
off_t end;
|
||||
off_t lastpos;
|
||||
off_t ahead;
|
||||
ssize_t written;
|
||||
size_t readahead;
|
||||
size_t written;
|
||||
size_t totwritten;
|
||||
int FadviseDrop(off_t Offset, off_t Len);
|
||||
public:
|
||||
cUnbufferedFile(void);
|
||||
~cUnbufferedFile();
|
||||
int Open(const char *FileName, int Flags, mode_t Mode = DEFFILEMODE);
|
||||
int Close(void);
|
||||
void SetReadAhead(size_t ra);
|
||||
off_t Seek(off_t Offset, int Whence);
|
||||
ssize_t Read(void *Data, size_t Size);
|
||||
ssize_t Write(const void *Data, size_t Size);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: transfer.c 1.32 2006/01/28 14:23:38 kls Exp $
|
||||
* $Id: transfer.c 1.33 2006/01/29 17:24:39 kls Exp $
|
||||
*/
|
||||
|
||||
#include "transfer.h"
|
||||
@ -20,7 +20,6 @@ cTransfer::cTransfer(int VPid, const int *APids, const int *DPids, const int *SP
|
||||
{
|
||||
ringBuffer = new cRingBufferLinear(TRANSFERBUFSIZE, TS_SIZE * 2, true, "Transfer");
|
||||
remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids);
|
||||
needsBufferReserve = Setup.UseDolbyDigital && VPid != 0 && DPids && DPids[0] != 0;
|
||||
}
|
||||
|
||||
cTransfer::~cTransfer()
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: transfer.h 1.10 2005/08/13 10:16:02 kls Exp $
|
||||
* $Id: transfer.h 1.11 2006/01/29 17:24:43 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __TRANSFER_H
|
||||
@ -20,7 +20,6 @@ class cTransfer : public cReceiver, public cPlayer, public cThread {
|
||||
private:
|
||||
cRingBufferLinear *ringBuffer;
|
||||
cRemux *remux;
|
||||
bool needsBufferReserve;
|
||||
protected:
|
||||
virtual void Activate(bool On);
|
||||
virtual void Receive(uchar *Data, int Length);
|
||||
|
16
vdr.c
16
vdr.c
@ -22,7 +22,7 @@
|
||||
*
|
||||
* The project's page is at http://www.cadsoft.de/vdr
|
||||
*
|
||||
* $Id: vdr.c 1.246 2006/01/29 14:35:31 kls Exp $
|
||||
* $Id: vdr.c 1.249 2006/02/05 12:57:10 kls Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@ -97,6 +97,10 @@ static bool SetUser(const char *UserName)
|
||||
fprintf(stderr, "vdr: cannot set user id %u: %s\n", (unsigned int)user->pw_uid, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
if (prctl(PR_SET_DUMPABLE, 2, 0, 0, 0) < 0) {
|
||||
fprintf(stderr, "vdr: warning - cannot set dumpable: %s\n", strerror(errno));
|
||||
// always non-fatal, and will not work with kernel < 2.6.13
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -709,7 +713,7 @@ int main(int argc, char *argv[])
|
||||
if (Channel->Modification(CHANNELMOD_RETUNE)) {
|
||||
cRecordControls::ChannelDataModified(Channel);
|
||||
if (Channel->Number() == cDevice::CurrentChannel()) {
|
||||
if (!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice()) {
|
||||
if (!cDevice::PrimaryDevice()->Replaying() || cDevice::PrimaryDevice()->Transferring()) {
|
||||
if (cDevice::ActualDevice()->ProvidesTransponder(Channel)) { // avoids retune on devices that don't really access the transponder
|
||||
isyslog("retuning due to modification of channel %d", Channel->Number());
|
||||
Channels.SwitchTo(Channel->Number());
|
||||
@ -796,8 +800,12 @@ int main(int argc, char *argv[])
|
||||
bool WasMenu = Interact && Interact->IsMenu();
|
||||
if (Menu)
|
||||
DELETE_MENU;
|
||||
else if (cControl::Control() && cOsd::IsOpen())
|
||||
cControl::Control()->Hide();
|
||||
else if (cControl::Control()) {
|
||||
if (cOsd::IsOpen())
|
||||
cControl::Control()->Hide();
|
||||
else
|
||||
WasOpen = false;
|
||||
}
|
||||
if (!WasOpen || !WasMenu && !Setup.MenuButtonCloses)
|
||||
Menu = new cMenuMain;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user