mirror of
				https://github.com/vdr-projects/vdr.git
				synced 2025-03-01 10:50:46 +00:00 
			
		
		
		
	Version 1.3.19
- Making sure at least the default skin is available at program start in case a plugin needs to issue an error message (thanks to Achim Tuffentshammer for reporting a crash in such a case). Also checking if there is a current skin in cSkins::Message(). - Completed the Finnish OSD texts and fixed internationalization of the text for "Setup/DVB/Audio language(s)" (thanks to Rolf Ahrenberg). - Completed the Estonian OSD texts and switched to iso8859-13 character set (thanks to Arthur Konovalov). - Made cCondWait::SleepMs() sleep at least 3ms to avoid a possible busy wait. - Fixed canceling the LIRC thread (thanks to Marco Schlüßler for pointing out this one). - The "Green" button in the "Main" menu is now always "Audio", since the audio channel might be changed even if there is only one actual audio PID. - Fixed handling the '-E' option which was broken in version 1.3.18 (thanks to Christian Jacobsen for reporting this one). - Added 'channels.conf.terr' entries for Mainz (thanks to Michael Heyse). - Implemented cDolbyRepacker for better handling of Dolby Digital PES packets (thanks to Reinhard Nissl). - Fixed playing files with PES packets longer than 2048 byte through the full featured DVB card (thanks to Marco Kremer for reporting this one and providing a test sample). - Recording and Transfer Mode now handle more than 2 audio PIDs. For this the interfaces of the following functions have been changed: cTransferControl::cTransferControl() cTransfer::cTransfer() cRecorder::cRecorder() cReceiver::cReceiver() cRemux::cRemux() - Fixed a possible race condition in cDevice::Action() and cTSBuffer::Action() (thanks to Stefan Huelswitt). - Extended some buffer sizes to allow handling HDTV streams (thanks to Reinhard Nissl). - Added 'channels.conf.terr' entries for Düsseldorf and Köln (thanks to Walter Koch). - Falling back to 'stereo' when switching channels in case the user had switched to 'left' or 'right' (suggested by Rolf Groppe). - Completed the Danish OSD texts (thanks to Mogens Elneff). - Recording and Transfer Mode can now handle up to 8 Dolby Digital tracks (thanks to Marco Schlüßler for a patch that implements substream handling into cDevice::PlayPesPacket(), and Reinhard Nissl for adding substream handling to cDolbyRepacker). - Added PlayPes(NULL, 0) to cTransfer::Action() when clearing the transfer buffer to avoid overflows (thanks to Marco Schlüßler for pointing this out).
This commit is contained in:
		
							
								
								
									
										33
									
								
								CONTRIBUTORS
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								CONTRIBUTORS
									
									
									
									
									
								
							@@ -189,6 +189,7 @@ Stefan Huelswitt <huels@iname.com>
 | 
			
		||||
 skin in case a shorter title is set after a longer one
 | 
			
		||||
 for fixing handling of pmAudioOnlyBlack
 | 
			
		||||
 for pointing out possible race conditions in handling childTid in cThread
 | 
			
		||||
 for fixing a possible race condition in cDevice::Action() and cTSBuffer::Action()
 | 
			
		||||
 | 
			
		||||
Ulrich R<>der <roeder@efr-net.de>
 | 
			
		||||
 for pointing out that there are channels that have a symbol rate higher than
 | 
			
		||||
@@ -791,6 +792,7 @@ Benjamin Harling <benjamin.harling@web.de>
 | 
			
		||||
 | 
			
		||||
Christian Jacobsen <christian.jacobsen@stageholding.de>
 | 
			
		||||
 for making the LIRC interface skip keys that come in too fast
 | 
			
		||||
 for reporting a problem in handling the '-E' options in version 1.3.18
 | 
			
		||||
 | 
			
		||||
Andreas Mair <Andreas.Mair@linogate.com>
 | 
			
		||||
 for reporting a short display of the main menu if a plugin displays its own OSD and
 | 
			
		||||
@@ -835,9 +837,13 @@ Lars Bl
 | 
			
		||||
 for reporting a bug in EPG bugfix statistics which made log entires for undefined
 | 
			
		||||
 channels
 | 
			
		||||
 | 
			
		||||
Niko Tarnanen <niko.tarnanen@hut.fi> and Rolf Ahrenberg <rahrenbe@cc.hut.fi>
 | 
			
		||||
Niko Tarnanen <niko.tarnanen@hut.fi>
 | 
			
		||||
 for translating OSD texts to the Finnish language
 | 
			
		||||
 | 
			
		||||
Rolf Ahrenberg <rahrenbe@cc.hut.fi>
 | 
			
		||||
 for translating OSD texts to the Finnish language
 | 
			
		||||
 for fixing internationalization of the text for "Setup/DVB/Audio language(s)"
 | 
			
		||||
 | 
			
		||||
Ralf Klueber <ralf.klueber@vodafone.com>
 | 
			
		||||
 for reporting a bug in cutting a recording if there is only a single editing mark
 | 
			
		||||
 for reporting a bug in handling a channels.conf that contains a ":@nnn" line as
 | 
			
		||||
@@ -902,6 +908,9 @@ Reinhard Nissl <rnissl@gmx.de>
 | 
			
		||||
 for reporting a high CPU load in still picture mode after removing the usleep()
 | 
			
		||||
 call from cDvbPlayer::Action()
 | 
			
		||||
 for reporting a race condition in starting a thread
 | 
			
		||||
 for implementing cDolbyRepacker for better handling of Dolby Digital PES packets
 | 
			
		||||
 for extending some buffer sizes to allow handling HDTV streams
 | 
			
		||||
 for adding substream handling to cDolbyRepacker
 | 
			
		||||
 | 
			
		||||
Richard Robson <richard_robson@beeb.net>
 | 
			
		||||
 for reporting freezing replay if a timer starts while in Transfer Mode from the
 | 
			
		||||
@@ -1103,6 +1112,10 @@ Marco Schl
 | 
			
		||||
 type errors"
 | 
			
		||||
 for some improvements to cPoller
 | 
			
		||||
 for implementing displaying mandatory subtitles in the SPU decoder
 | 
			
		||||
 for pointing out a problem with canceling the LIRC thread
 | 
			
		||||
 for a patch that implements substream handling into cDevice::PlayPesPacket()
 | 
			
		||||
 for pointing out that PlayPes(NULL, 0) needs to be called in cTransfer::Action()
 | 
			
		||||
 when clearing the transfer buffer to avoid overflows
 | 
			
		||||
 | 
			
		||||
J<EFBFBD>rgen Schmitz <j.schmitz@web.de>
 | 
			
		||||
 for reporting a bug in displaying the current channel when switching via the SVDRP
 | 
			
		||||
@@ -1200,3 +1213,21 @@ Laurence Abbott <laz@club-burniston.co.uk>
 | 
			
		||||
 | 
			
		||||
Patrick Gleichmann <patrick@feedface.com>
 | 
			
		||||
 for fixing the default quality value when grabbing a JPEG image
 | 
			
		||||
 | 
			
		||||
Achim Tuffentsammer <a.tuffentsammer@web.de>
 | 
			
		||||
 for reporting a crash in case a plugin needs to issue an error message before the
 | 
			
		||||
 skin has been set up
 | 
			
		||||
 | 
			
		||||
Michael Heyse <mhk@designassembly.de>
 | 
			
		||||
 for his help in keeping 'channels.conf.terr' up to date
 | 
			
		||||
 | 
			
		||||
Marco Kremer <vdr.hgm.bg@gmx.net>
 | 
			
		||||
 for reporting a problem with playing files with PES packets longer than 2048 byte
 | 
			
		||||
 through the full featured DVB card
 | 
			
		||||
 | 
			
		||||
Walter Koch <koch@u32.de>
 | 
			
		||||
 for adding channels for DVB-T D<>sseldorf and K<>ln (Germany) to channels.cont.terr
 | 
			
		||||
 | 
			
		||||
Rolf Groppe <rolf@groppe.de>
 | 
			
		||||
 for suggesting to fall back to 'stereo' when switching channels in case the user
 | 
			
		||||
 had switched to 'left' or 'right'
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										45
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								HISTORY
									
									
									
									
									
								
							@@ -3287,3 +3287,48 @@ Video Disk Recorder Revision History
 | 
			
		||||
- Added support for circular polarization (thanks to Jonan Santiago).
 | 
			
		||||
- Thanks to Werner Fink, Reinhard Nissl, Sascha Volkenandt and Bj<42>rnar Nilsen for
 | 
			
		||||
  their support in testing and fine tuning this version.
 | 
			
		||||
 | 
			
		||||
2005-01-23: Version 1.3.19
 | 
			
		||||
 | 
			
		||||
- Making sure at least the default skin is available at program start in case a
 | 
			
		||||
  plugin needs to issue an error message (thanks to Achim Tuffentshammer for
 | 
			
		||||
  reporting a crash in such a case). Also checking if there is a current skin
 | 
			
		||||
  in cSkins::Message().
 | 
			
		||||
- Completed the Finnish OSD texts and fixed internationalization of the text
 | 
			
		||||
  for "Setup/DVB/Audio language(s)" (thanks to Rolf Ahrenberg).
 | 
			
		||||
- Completed the Estonian OSD texts and switched to iso8859-13 character set
 | 
			
		||||
  (thanks to Arthur Konovalov).
 | 
			
		||||
- Made cCondWait::SleepMs() sleep at least 3ms to avoid a possible busy wait.
 | 
			
		||||
- Fixed canceling the LIRC thread (thanks to Marco Schl<68><6C>ler for pointing out
 | 
			
		||||
  this one).
 | 
			
		||||
- The "Green" button in the "Main" menu is now always "Audio", since the audio
 | 
			
		||||
  channel might be changed even if there is only one actual audio PID.
 | 
			
		||||
- Fixed handling the '-E' option which was broken in version 1.3.18 (thanks to
 | 
			
		||||
  Christian Jacobsen for reporting this one).
 | 
			
		||||
- Added 'channels.conf.terr' entries for Mainz (thanks to Michael Heyse).
 | 
			
		||||
- Implemented cDolbyRepacker for better handling of Dolby Digital PES packets
 | 
			
		||||
  (thanks to Reinhard Nissl).
 | 
			
		||||
- Fixed playing files with PES packets longer than 2048 byte through the full
 | 
			
		||||
  featured DVB card (thanks to Marco Kremer for reporting this one and providing
 | 
			
		||||
  a test sample).
 | 
			
		||||
- Recording and Transfer Mode now handle more than 2 audio PIDs. For this the
 | 
			
		||||
  interfaces of the following functions have been changed:
 | 
			
		||||
  cTransferControl::cTransferControl()
 | 
			
		||||
  cTransfer::cTransfer()
 | 
			
		||||
  cRecorder::cRecorder()
 | 
			
		||||
  cReceiver::cReceiver()
 | 
			
		||||
  cRemux::cRemux()
 | 
			
		||||
- Fixed a possible race condition in cDevice::Action() and cTSBuffer::Action()
 | 
			
		||||
  (thanks to Stefan Huelswitt).
 | 
			
		||||
- Extended some buffer sizes to allow handling HDTV streams (thanks to Reinhard
 | 
			
		||||
  Nissl).
 | 
			
		||||
- Added 'channels.conf.terr' entries for D<>sseldorf and K<>ln (thanks to Walter Koch).
 | 
			
		||||
- Falling back to 'stereo' when switching channels in case the user had switched
 | 
			
		||||
  to 'left' or 'right' (suggested by Rolf Groppe).
 | 
			
		||||
- Completed the Danish OSD texts (thanks to Mogens Elneff).
 | 
			
		||||
- Recording and Transfer Mode can now handle up to 8 Dolby Digital tracks (thanks
 | 
			
		||||
  to Marco Schl<68><6C>ler for a patch that implements substream handling into
 | 
			
		||||
  cDevice::PlayPesPacket(), and Reinhard Nissl for adding substream handling to
 | 
			
		||||
  cDolbyRepacker).
 | 
			
		||||
- Added PlayPes(NULL, 0) to cTransfer::Action() when clearing the transfer buffer
 | 
			
		||||
  to avoid overflows (thanks to Marco Schl<68><6C>ler for pointing this out).
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										38
									
								
								PLUGINS.html
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								PLUGINS.html
									
									
									
									
									
								
							@@ -14,18 +14,18 @@ Copyright © 2004 Klaus Schmidinger<br>
 | 
			
		||||
<a href="http://www.cadsoft.de/vdr">www.cadsoft.de/vdr</a>
 | 
			
		||||
</center>
 | 
			
		||||
<p>
 | 
			
		||||
<!--X1.3.0--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%>
 | 
			
		||||
Important modifications introduced in version 1.3.0 are marked like this.
 | 
			
		||||
<!--X1.3.0--></td></tr></table>
 | 
			
		||||
<!--X1.3.7--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%>
 | 
			
		||||
<!--X1.3.7--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%>
 | 
			
		||||
Important modifications introduced in version 1.3.7 are marked like this.
 | 
			
		||||
<!--X1.3.7--></td></tr></table>
 | 
			
		||||
<!--X1.3.8--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%>
 | 
			
		||||
<!--X1.3.8--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%>
 | 
			
		||||
Important modifications introduced in version 1.3.8 are marked like this.
 | 
			
		||||
<!--X1.3.8--></td></tr></table>
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%>
 | 
			
		||||
Important modifications introduced in version 1.3.18 are marked like this.
 | 
			
		||||
<!--X1.3.18--></td></tr></table>
 | 
			
		||||
<!--X1.3.19--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
 | 
			
		||||
Important modifications introduced in version 1.3.19 are marked like this.
 | 
			
		||||
<!--X1.3.19--></td></tr></table>
 | 
			
		||||
<p>
 | 
			
		||||
VDR provides an easy to use plugin interface that allows additional functionality
 | 
			
		||||
to be added to the program by implementing a dynamically loadable library file.
 | 
			
		||||
@@ -73,11 +73,9 @@ structures and allows it to hook itself into specific areas to perform special a
 | 
			
		||||
<li><a href="#Status monitor">Status monitor</a>
 | 
			
		||||
<li><a href="#Players">Players</a>
 | 
			
		||||
<li><a href="#Receivers">Receivers</a>
 | 
			
		||||
<!--X1.3.0--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%>
 | 
			
		||||
<li><a href="#Filters">Filters</a>
 | 
			
		||||
<!--X1.3.0--></td></tr></table>
 | 
			
		||||
<li><a href="#The On Screen Display">The On Screen Display</a>
 | 
			
		||||
<!--X1.3.7--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%>
 | 
			
		||||
<!--X1.3.7--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%>
 | 
			
		||||
<li><a href="#Skins">Skins</a>
 | 
			
		||||
<li><a href="#Themes">Themes</a>
 | 
			
		||||
<!--X1.3.7--></td></tr></table>
 | 
			
		||||
@@ -1023,7 +1021,7 @@ public:
 | 
			
		||||
Take a look at the files <tt>player.h</tt> and <tt>dvbplayer.c</tt> to see how VDR implements
 | 
			
		||||
its own player for the VDR recordings.
 | 
			
		||||
<p>
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%>
 | 
			
		||||
To play the actual data, the player needs to call its member function
 | 
			
		||||
 | 
			
		||||
<p><table><tr><td bgcolor=#F0F0F0><pre>
 | 
			
		||||
@@ -1046,7 +1044,7 @@ bool DevicePoll(cPoller &Poller, int TimeoutMs = 0);
 | 
			
		||||
 | 
			
		||||
to determine whether the device is ready for further data.
 | 
			
		||||
<p>
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%>
 | 
			
		||||
By default all audio track handling is done by the device a player is
 | 
			
		||||
attached to.
 | 
			
		||||
If the player can provide more than a single audio track, and has special
 | 
			
		||||
@@ -1183,7 +1181,9 @@ public:
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
cMyReceiver::cMyReceiver(int Pid)
 | 
			
		||||
:cReceiver(0, -1, 1, Pid)
 | 
			
		||||
<!--X1.3.19--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
 | 
			
		||||
:cReceiver(0, -1, Pid)
 | 
			
		||||
<!--X1.3.19--></td></tr></table>
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1223,7 +1223,6 @@ Mode</i>).
 | 
			
		||||
If the <tt>cReceiver</tt> isn't needed any more, it may simply be <i>deleted</i>
 | 
			
		||||
and will automatically detach itself from the <tt>cDevice</tt>.
 | 
			
		||||
 | 
			
		||||
<!--X1.3.0--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%>
 | 
			
		||||
<a name="Filters"><hr><h2>Filters</h2>
 | 
			
		||||
 | 
			
		||||
<center><i><b>A Fistful of Datas</b></i></center><p>
 | 
			
		||||
@@ -1267,9 +1266,8 @@ If the <tt>cFilter</tt> isn't needed any more, it may simply be <i>deleted</i>
 | 
			
		||||
and will automatically detach itself from the <tt>cDevice</tt>.
 | 
			
		||||
<p>
 | 
			
		||||
See VDR/eit.c or VDR/pat.c to learn how to process filter data.
 | 
			
		||||
<!--X1.3.0--></td></tr></table>
 | 
			
		||||
 | 
			
		||||
<!--X1.3.7--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%>
 | 
			
		||||
<!--X1.3.7--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%>
 | 
			
		||||
<a name="The On Screen Display"><hr><h2>The On Screen Display</h2>
 | 
			
		||||
 | 
			
		||||
<center><i><b>Window to the world</b></i></center><p>
 | 
			
		||||
@@ -1362,7 +1360,7 @@ public:
 | 
			
		||||
  virtual cSkinDisplayMenu *DisplayMenu(void);
 | 
			
		||||
  virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly);
 | 
			
		||||
  virtual cSkinDisplayVolume *DisplayVolume(void);
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%>
 | 
			
		||||
  virtual cSkinDisplayMessage *DisplayTrack(int NumTracks, const char * const *Tracks);
 | 
			
		||||
<!--X1.3.18--></td></tr></table>
 | 
			
		||||
  virtual cSkinDisplayMessage *DisplayMessage(void);
 | 
			
		||||
@@ -1384,7 +1382,7 @@ new cMySkin;
 | 
			
		||||
in the <a href="#Getting started"><tt>Start()</tt></a> function of your plugin.
 | 
			
		||||
Do not delete this object, it will be automatically deleted when the program ends.
 | 
			
		||||
<p>
 | 
			
		||||
<!--X1.3.8--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%>
 | 
			
		||||
<!--X1.3.8--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%>
 | 
			
		||||
In order to be able to easily identify plugins that implement a skin it is recommended
 | 
			
		||||
that the name of such a plugin should be
 | 
			
		||||
 | 
			
		||||
@@ -1495,7 +1493,7 @@ repectively.
 | 
			
		||||
If the device can provide more than a single audio track, it can implement the
 | 
			
		||||
following function to make them available:
 | 
			
		||||
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#FF0000> </td><td width=100%>
 | 
			
		||||
<!--X1.3.18--><table width=100%><tr><td bgcolor=#AA0000> </td><td width=100%>
 | 
			
		||||
<p><table><tr><td bgcolor=#F0F0F0><pre>
 | 
			
		||||
virtual void SetAudioTrackDevice(eTrackType Type);
 | 
			
		||||
virtual int GetAudioChannelDevice(void);
 | 
			
		||||
@@ -1558,7 +1556,6 @@ virtual void SetVideoFormat(bool VideoFormat16_9);
 | 
			
		||||
virtual void SetVolumeDevice(int Volume);
 | 
			
		||||
</pre></td></tr></table><p>
 | 
			
		||||
 | 
			
		||||
<!--X1.3.0--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%>
 | 
			
		||||
<p>
 | 
			
		||||
<b>Section Filtering</b>
 | 
			
		||||
<p>
 | 
			
		||||
@@ -1583,12 +1580,11 @@ from its constructor.
 | 
			
		||||
<p>
 | 
			
		||||
See <a href="#Filters">Filters</a> on how to set up actual filters that can
 | 
			
		||||
handle section data.
 | 
			
		||||
<!--X1.3.0--></td></tr></table>
 | 
			
		||||
 | 
			
		||||
<p>
 | 
			
		||||
<b>On Screen Display</b>
 | 
			
		||||
<p>
 | 
			
		||||
<!--X1.3.7--><table width=100%><tr><td bgcolor=#00AA00> </td><td width=100%>
 | 
			
		||||
<!--X1.3.7--><table width=100%><tr><td bgcolor=#0000AA> </td><td width=100%>
 | 
			
		||||
If your device provides On Screen Display (OSD) capabilities (which every device
 | 
			
		||||
that is supposed to be used as a primary device should do), it shall implement
 | 
			
		||||
an "OSD provider" class, derived from <tt>cOsdProvider</tt>, which, when its <tt>CreateOsd()</tt>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										13
									
								
								channels.c
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								channels.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: channels.c 1.33 2004/12/26 12:34:52 kls Exp $
 | 
			
		||||
 * $Id: channels.c 1.34 2005/01/16 13:49:30 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "channels.h"
 | 
			
		||||
@@ -193,6 +193,7 @@ cChannel::cChannel(const cChannel &Channel)
 | 
			
		||||
  ppid         = 0;
 | 
			
		||||
  apids[0]     = 0;
 | 
			
		||||
  dpids[0]     = 0;
 | 
			
		||||
  spids[0]     = 0;
 | 
			
		||||
  tpid         = 0;
 | 
			
		||||
  caids[0]     = 0;
 | 
			
		||||
  nid          = 0;
 | 
			
		||||
@@ -421,8 +422,8 @@ void cChannel::SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dp
 | 
			
		||||
  if (!modified)
 | 
			
		||||
     modified = IntArraysDiffer(apids, Apids, alangs, ALangs) || IntArraysDiffer(dpids, Dpids, dlangs, DLangs);
 | 
			
		||||
  if (modified) {
 | 
			
		||||
     char OldApidsBuf[MAXAPIDS * 2 * 10 + 10]; // 2: Apids and Dpids, 10: 5 digits plus delimiting ',' or ';' plus optional '=cod', +10: paranoia
 | 
			
		||||
     char NewApidsBuf[MAXAPIDS * 2 * 10 + 10];
 | 
			
		||||
     char OldApidsBuf[(MAXAPIDS + MAXDPIDS) * 10 + 10]; // 10: 5 digits plus delimiting ',' or ';' plus optional '=cod', +10: paranoia
 | 
			
		||||
     char NewApidsBuf[(MAXAPIDS + MAXDPIDS) * 10 + 10];
 | 
			
		||||
     char *q = OldApidsBuf;
 | 
			
		||||
     q += IntArrayToString(q, apids, 10, alangs);
 | 
			
		||||
     if (dpids[0]) {
 | 
			
		||||
@@ -443,6 +444,8 @@ void cChannel::SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dp
 | 
			
		||||
     for (int i = 0; i <= MAXAPIDS; i++) { // <= to copy the terminating 0
 | 
			
		||||
         apids[i] = Apids[i];
 | 
			
		||||
         strn0cpy(alangs[i], ALangs[i], 4);
 | 
			
		||||
         }
 | 
			
		||||
     for (int i = 0; i <= MAXDPIDS; i++) { // <= to copy the terminating 0
 | 
			
		||||
         dpids[i] = Dpids[i];
 | 
			
		||||
         strn0cpy(dlangs[i], DLangs[i], 4);
 | 
			
		||||
         }
 | 
			
		||||
@@ -623,7 +626,7 @@ cString cChannel::ToText(const cChannel *Channel)
 | 
			
		||||
     if (Channel->ppid && Channel->ppid != Channel->vpid)
 | 
			
		||||
        q += snprintf(q, sizeof(vpidbuf) - (q - vpidbuf), "+%d", Channel->ppid);
 | 
			
		||||
     *q = 0;
 | 
			
		||||
     char apidbuf[MAXAPIDS * 2 * 10 + 10]; // 2: Apids and Dpids, 10: 5 digits plus delimiting ',' or ';' plus optional '=cod', +10: paranoia
 | 
			
		||||
     char apidbuf[(MAXAPIDS + MAXDPIDS) * 10 + 10]; // 10: 5 digits plus delimiting ',' or ';' plus optional '=cod', +10: paranoia
 | 
			
		||||
     q = apidbuf;
 | 
			
		||||
     q += IntArrayToString(q, Channel->apids, 10, Channel->alangs);
 | 
			
		||||
     if (Channel->dpids[0]) {
 | 
			
		||||
@@ -726,7 +729,7 @@ bool cChannel::Parse(const char *s, bool AllowNonUniqueID)
 | 
			
		||||
              int NumDpids = 0;
 | 
			
		||||
              char *strtok_next;
 | 
			
		||||
              while ((q = strtok_r(p, ",", &strtok_next)) != NULL) {
 | 
			
		||||
                    if (NumDpids < MAXAPIDS) {
 | 
			
		||||
                    if (NumDpids < MAXDPIDS) {
 | 
			
		||||
                       char *l = strchr(q, '=');
 | 
			
		||||
                       if (l) {
 | 
			
		||||
                          *l++ = 0;
 | 
			
		||||
 
 | 
			
		||||
@@ -26,7 +26,7 @@ NEUN LIVE Television,NEUN LIVE;BetaDigital:12480:vC34:S19.2E:27500:767:768=deu:3
 | 
			
		||||
DSF;BetaDigital:12480:vC34:S19.2E:27500:1023:1024=deu:0: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
 | 
			
		||||
EURONEWS;CSAT:11817:vC34:S19.2E:27500:163:92=fra,93=eng,94=ita,95=esl,91=rus,98=por,99=deu:0:2:8004:1:1070:0
 | 
			
		||||
rbb Brandenburg;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28205:1:1073:0
 | 
			
		||||
Sky News;BSkyB:11597:vC56:S19.2E:22000:305+131:306=eng:0:0:28707:1:1026:0
 | 
			
		||||
Veronica/FoxKids;CANAL+:12574:hC56:S19.2E:22000:518+8190:92=dut:38:622,602,100:5020:53:1109:0
 | 
			
		||||
@@ -47,8 +47,8 @@ PREMIERE START,START;PREMIERE:11797:hC34:S19.2E:27500:255:256=deu:32:1702,1801,1
 | 
			
		||||
PREMIERE 1,PREM 1;PREMIERE:11797:hC34:S19.2E:27500:511:512=deu,513=deu;515=deu:32:1722,1702,1801:10:133:2:0
 | 
			
		||||
PREMIERE 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu,1793=deu;1795=deu:32:1722,1801,1702:11:133:2:0
 | 
			
		||||
PREMIERE 3,PREM 3;PREMIERE:11797:hC34:S19.2E:27500:2303:2304=deu,2305=deu:32:1722,1801,1702:43:133:2:0
 | 
			
		||||
PREMIERE 4,PREM 4;PREMIERE:11797:hC34:S19.2E:27500:767:768=deu:32:1801,1722,1702:9:133:2:0
 | 
			
		||||
PREMIERE 5,PREM 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu,1281=deu:32:1801,1722,1702:29: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:1801,1722,1702:29:133:2:0
 | 
			
		||||
PREMIERE 6,PREM 6;PREMIERE:11797:hC34:S19.2E:27500:1535:1536=deu:32:1702,1801,1722:41:133:2:0
 | 
			
		||||
PREMIERE 7,PREM 7;PREMIERE:11797:hC34:S19.2E:27500:1023:1024=deu:32:1722,1801,1702:20:133:2:0
 | 
			
		||||
DISNEY CHANNEL,DISNEY;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:0:1722,1801,1702:34:133:17:0
 | 
			
		||||
@@ -58,8 +58,8 @@ PREMIERE DIREKT,DIREKT;PREMIERE:12031:hC34:S19.2E:27500:2815:2816=deu,2817=deu;2
 | 
			
		||||
BEATE-UHSE.TV,B-UHSE;PREMIERE:12070:hC34:S19.2E:27500:1023:1024=deu:32:1702,1801,1722:21:133:1:0
 | 
			
		||||
DIREKT EROTIK,EROTIK;PREMIERE:12031:hC34:S19.2E:27500:1279:0:0:1722,1801,1702:513:133:4:0
 | 
			
		||||
:Sportsworld
 | 
			
		||||
PREMIERE SPORT 1,SPORT 1;PREMIERE:11719:hC34:S19.2E:27500:255:256=deu,257=deu:32:1702,1722,1801:17:133:3:0
 | 
			
		||||
PREMIERE SPORT 2,SPORT 2;PREMIERE:12031:hC34:S19.2E:27500:3839:3840=deu:32:1702,1801,1722:27:133:4:0
 | 
			
		||||
Konferenz:11719:hC34:S19.2E:27500:255:256=deu,257=deu:32:1702,1722,1801:17:133:3:0
 | 
			
		||||
PREMIERE SPORT 2,SPORT 2;PREMIERE:12031:hC34:S19.2E:27500:3839:3840=deu,3841=deu:32:1702,1801,1722:27:133:4:0
 | 
			
		||||
:Beta Digital
 | 
			
		||||
N24;ProSiebenSat.1:12480:vC34:S19.2E:27500:2047:2048=deu:36:0:47:133:33:0
 | 
			
		||||
LibertyTV FR;LibertyTV.com:12610:vC56:S19.2E:22000:941:943=deu:0:0:12199:1:1112:0
 | 
			
		||||
@@ -113,8 +113,8 @@ Animal Plnt+;BSkyB:12070:hC23:S28.2E:27500:2314+2307:2315=eng:0:960,961:50002:2:
 | 
			
		||||
S1T;BSkyB:12285:vC23:S28.2E:27500:2311+2304:2312=eng,2313=NAR:2307:960,961:4409:2:2030:0
 | 
			
		||||
CNN;BSkyB:12051:vC23:S28.2E:27500:2313:2315=eng:2314:0:7140:2:2018:0
 | 
			
		||||
BBC PARL'MNT:12129:vC23:S28.2E:27500:2304:2306=eng,2307=eng:2305:0:7300:2:2022:0
 | 
			
		||||
Olisat / Telefe;T-Systems/MTI:11200:vC56:S13.0E:27500:413:414=ita:0:0:4733:318:13400:0
 | 
			
		||||
ADRIATICOSAT;T-Systems/MTI:11200:vC56:S13.0E:27500:413:414=ita:0:0:4733:318:13400:0
 | 
			
		||||
Euro1080;EURO1080:12168:vC34:S19.2E:27500:308:256:0:FF:21100:1:1088:0
 | 
			
		||||
Astra HD:12441:vC34:S19.2E:27500:133+80:134:0:FF:29700:0:0:0
 | 
			
		||||
Astra HD:12441:vC34:S19.2E:27500:133+80:134=eng:0:FF:29700:0:0:0
 | 
			
		||||
eng-WRN-multi;WRN:12597:vC34:S13.0E:27500:0:2132:0:0:8230:318:9400:0
 | 
			
		||||
:@1000 New channels
 | 
			
		||||
 
 | 
			
		||||
@@ -112,3 +112,72 @@ RTL Television:626000:I999B8C23D23M16T8G4Y0:T:27500:337:338:343:0:16405:0:0:0
 | 
			
		||||
RTL2:626000:I999B8C23D23M16T8G4Y0:T:27500:353:354:359:0:16406:0:0:0
 | 
			
		||||
Super RTL:626000:I999B8C23D23M16T8G4Y0:T:27500:369:370:375:0:16407:0:0:0
 | 
			
		||||
VOX:626000:I999B8C23D23M16T8G4Y0:T:27500:545:546:551:0:16418:0:0:0
 | 
			
		||||
: DVB-T Mainz, Germany
 | 
			
		||||
Das Erste:198500000:C34D12M16B7T8G4Y0:T:27500:101:102=deu:104:0:1:8468:9985:0
 | 
			
		||||
arte:198500000:C34D12M16B7T8G4Y0:T:27500:201:202=deu,203=fra:204:0:2:8468:9985:0
 | 
			
		||||
PHOENIX:198500000:C34D12M16B7T8G4Y0:T:27500:301:302=deu:304:0:3:8468:9985:0
 | 
			
		||||
ZDF:482000000:C23D23M16B8T8G4Y0:T:27500:545:546=deu,547=2ch;559=deu:551:0:514:8468:514:0
 | 
			
		||||
Info/3sat:482000000:C23D23M16B8T8G4Y0:T:27500:561:562=deu,563=2ch:567:0:515:8468:514:0
 | 
			
		||||
Doku/KiKa:482000000:C23D23M16B8T8G4Y0:T:27500:593:594=deu:599:0:517:8468:514:0
 | 
			
		||||
RTL,RTL Television:578000000:C23D23M16B8T8G4Y0:T:27500:337:338=deu:343:0:16405:8468:8706:0
 | 
			
		||||
RTL2:578000000:C23D23M16B8T8G4Y0:T:27500:353:354=deu:359:0:16406:8468:8706:0
 | 
			
		||||
S RTL,Super RTL:578000000:C23D23M16B8T8G4Y0:T:27500:369:370=deu:375:0:16411:8468:8706:0
 | 
			
		||||
VOX:578000000:C23D23M16B8T8G4Y0:T:27500:545:546=deu:551:0:16418:8468:8706:0
 | 
			
		||||
N24:738000000:C23D23M16B8T8G4Y0:T:27500:225:226=deu:231:0:16398:8468:8705:0
 | 
			
		||||
ProSieben:738000000:C23D23M16B8T8G4Y0:T:27500:305:306=deu;312=deu:311:0:16403:8468:8705:0
 | 
			
		||||
KABEL1:738000000:C23D23M16B8T8G4Y0:T:27500:161:162=deu:167:0:16394:8468:8705:0
 | 
			
		||||
SAT.1:738000000:C23D23M16B8T8G4Y0:T:27500:385:386=deu;392=deu:391:0:16408:8468:8705:0
 | 
			
		||||
EinsFestival:762000000:C23D12M16B8T8G4Y0:T:27500:701:702=deu:0:0:5:8468:10241:0
 | 
			
		||||
Bayerisches FS:762000000:C23D12M16B8T8G4Y0:T:27500:501:502=deu:504:0:33:8468:10241:0
 | 
			
		||||
hr-fernsehen:762000000:C23D12M16B8T8G4Y0:T:27500:401:402=deu:404:0:65:8468:10241:0
 | 
			
		||||
S<EFBFBD>DWEST RP:762000000:C23D12M16B8T8G4Y0:T:27500:601:602=deu:604:0:226:8468:10241:0
 | 
			
		||||
rheinmaintv:818000000:C23D23M16B8T8G4Y0:T:27500:2817:2818=deu:2823:0:19200:8468:8707:0
 | 
			
		||||
TERRA NOVA:818000000:C23D23M16B8T8G4Y0:T:27500:609:610=deu,611=fra:615:0:16422:8468:8707:0
 | 
			
		||||
Eurosport:818000000:C23D23M16B8T8G4Y0:T:27500:577:578=deu:583:0:16420:8468:8707:0
 | 
			
		||||
tvnah:818000000:C23D23M16B8T8G4Y0:T:27500:2833:2834=eng:0:0:19216:8468:8707:0
 | 
			
		||||
: DVB-T D<>sseldorf, Germany
 | 
			
		||||
RTL Television,RTL;RTL World:538000000:I0C23D23M16B8T8G4Y0:T:27500:337:338=deu:343:0:16405:8468:8706:0
 | 
			
		||||
RTL2;RTL World:538000000:I0C23D23M16B8T8G4Y0:T:27500:353:354=deu:359:0:16406:8468:8706:0
 | 
			
		||||
Super RTL,S RTL;RTL World:538000000:I0C23D23M16B8T8G4Y0:T:27500:433:434=deu:439:0:16411:8468:8706:0
 | 
			
		||||
VOX;RTL World:538000000:I0C23D23M16B8T8G4Y0:T:27500:545:546=deu:551:0:16418:8468:8706:0
 | 
			
		||||
ZDF:586000:I0C23D23M16B8T8G4Y0:T:27500:545:546=deu,547=2ch;559=dd:551:0:514:0:0:0
 | 
			
		||||
Info/3sat:586000:I0C23D23M16B8T8G4Y0:T:27500:561:562=deu:567:0:515:0:0:0
 | 
			
		||||
Doku/KiKa:586000:I0C23D23M16B8T8G4Y0:T:27500:593:594=deu:599:0:517:0:0:0
 | 
			
		||||
ProSieben;ProSiebenSat.1:746000000:I0C23D23M16B8T8G4Y0:T:27500:305:306=deu;312=deu:311:0:16403:8468:8705:0
 | 
			
		||||
SAT.1;ProSiebenSat.1:746000000:I0C23D23M16B8T8G4Y0:T:27500:385:386=deu;392=deu:391:0:16408:8468:8705:0
 | 
			
		||||
KABEL1;ProSiebenSat.1:746000000:I0C23D23M16B8T8G4Y0:T:27500:161:162=deu:167:0:16394:8468:8705:0
 | 
			
		||||
N24;ProSiebenSat.1:746000000:I0C23D23M16B8T8G4Y0:T:27500:225:226=deu:231:0:16398:8468:8705:0
 | 
			
		||||
arte;ARD:818000000:I0C23D23M16B8T8G4Y0:T:27500:4897:4898=deu,4899=fra:4900:0:2:8468:6656:0
 | 
			
		||||
Phoenix;ARD:818000000:I0C23D23M16B8T8G4Y0:T:27500:4913:4914=deu:4916:0:3:8468:6656:0
 | 
			
		||||
Das Erste;ARD:818000000:I0C23D23M16B8T8G4Y0:T:27500:4881:4882=deu,4883=mis:4884:0:256:8468:6656:0
 | 
			
		||||
WDR Dortmund;ARD:818000000:I0C23D23M16B8T8G4Y0:T:27500:4929:4930=deu,4931=mis:4932:0:259:8468:6656:0
 | 
			
		||||
WDR D<>sseldorf;ARD:818000000:I0C23D23M16B8T8G4Y0:T:27500:4929:4930=deu,4931=mis:4932:0:260:8468:6656:0
 | 
			
		||||
WDR Essen;ARD:818000000:I0C23D23M16B8T8G4Y0:T:27500:4929:4930=deu,4931=mis:4932:0:261:8468:6656:0
 | 
			
		||||
Eurosport;ZDFvision:834000:I0C23D23M16B8T8G4Y0:T:27500:577:578=deu:583:0:16420:8468:8707:0
 | 
			
		||||
VIVA;VIVA Fernsehen GmbH & Co. KG:834000:I0C23D23M16B8T8G4Y0:T:27500:513:514=deu:519:0:16416:8468:8707:0
 | 
			
		||||
TERRA NOVA;ABSAT:834000:I0C23D23M16B8T8G4Y0:T:27500:609:610=deu,611=fra:615:0:16422:8468:8707:0
 | 
			
		||||
CNN Int.;CNN:834000:I0C23D23M16B8T8G4Y0:T:27500:97:98=eng:103:0:16390:8468:8707:0
 | 
			
		||||
: DVB-T, K<>ln, Germany
 | 
			
		||||
RTL Television,RTL;RTL World:538000000:I0C23D23M16B8T8G4Y0:T:27500:337:338=deu:343:0:16405:8468:8706:0
 | 
			
		||||
RTL2;RTL World:538000000:I0C23D23M16B8T8G4Y0:T:27500:353:354=deu:359:0:16406:8468:8706:0
 | 
			
		||||
Super RTL,S RTL;RTL World:538000000:I0C23D23M16B8T8G4Y0:T:27500:433:434=deu:439:0:16411:8468:8706:0
 | 
			
		||||
VOX;RTL World:538000000:I0C23D23M16B8T8G4Y0:T:27500:545:546=deu:551:0:16418:8468:8706:0
 | 
			
		||||
ZDF;ZDFmobil:514000000:I0C23D23M16B8T8G4Y0:T:27500:545:546=deu,547=2ch;559=dd:551:0:514:8468:514:0
 | 
			
		||||
Info/3sat;ZDFmobil:514000000:I0C23D23M16B8T8G4Y0:T:27500:561:562=deu:567:0:515:8468:514:0
 | 
			
		||||
Doku/KiKa;ZDFmobil:514000000:I0C23D23M16B8T8G4Y0:T:27500:593:594=deu:599:0:517:8468:514:0
 | 
			
		||||
KABEL1:650000:I0C23D23M16B8T8G4Y0:T:27500:161:162=deu:167:0:16394:0:0:0
 | 
			
		||||
N24:650000:I0C23D23M16B8T8G4Y0:T:27500:225:226=deu:231:0:16398:0:0:0
 | 
			
		||||
ProSieben:650000:I0C23D23M16B8T8G4Y0:T:27500:305:306=deu;312=deu:311:0:16403:0:0:0
 | 
			
		||||
SAT.1:650000:I0C23D23M16B8T8G4Y0:T:27500:385:386=deu;392=deu:391:0:16408:0:0:0
 | 
			
		||||
WDR K<>ln;ARD:698000000:I0C23D23M16B8T8G4Y0:T:27500:4625:4626=deu,4627=mis:4628:0:262:8468:6400:0
 | 
			
		||||
NDR FS NDS;ARD:698000000:I0C23D23M16B8T8G4Y0:T:27500:4641:4642=deu:4644:0:129:8468:6400:0
 | 
			
		||||
S<EFBFBD>DWEST RP;ARD:698000000:I0C23D23M16B8T8G4Y0:T:27500:4673:4674=deu:4676:0:226:8468:6400:0
 | 
			
		||||
MDR Fernsehen;ARD:698000000:I0C23D23M16B8T8G4Y0:T:27500:4657:4658=deu:4660:0:100:8468:6400:0
 | 
			
		||||
Das Erste;ARD:826000000:I0C23D23M16B8T8G4Y0:T:27500:4369:4370=deu,4371=mis:4372:0:256:8468:6144:0
 | 
			
		||||
arte;ARD:826000000:I0C23D23M16B8T8G4Y0:T:27500:4385:4386=deu,4387=fra:4388:0:2:8468:6144:0
 | 
			
		||||
Phoenix;ARD:826000000:I0C23D23M16B8T8G4Y0:T:27500:4401:4402=deu:4404:0:3:8468:6144:0
 | 
			
		||||
EinsMuXx;ARD:826000000:I0C23D23M16B8T8G4Y0:T:27500:4417:4418=deu:4372:0:6:8468:6144:0
 | 
			
		||||
Eurosport;ZDFvision:834000:I0C23D23M16B8T8G4Y0:T:27500:577:578=deu:583:0:16420:8468:8707:0
 | 
			
		||||
VIVA;VIVA Fernsehen GmbH & Co. KG:834000:I0C23D23M16B8T8G4Y0:T:27500:513:514=deu:519:0:16416:8468:8707:0
 | 
			
		||||
TERRA NOVA;ABSAT:834000:I0C23D23M16B8T8G4Y0:T:27500:609:610=deu,611=fra:615:0:16422:8468:8707:0
 | 
			
		||||
CNN Int.;CNN:834000:I0C23D23M16B8T8G4Y0:T:27500:97:98=eng:103:0:16390:8468:8707:0
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										23
									
								
								channels.h
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								channels.h
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: channels.h 1.24 2004/12/26 12:15:52 kls Exp $
 | 
			
		||||
 * $Id: channels.h 1.25 2005/01/16 13:46:41 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __CHANNELS_H
 | 
			
		||||
@@ -30,8 +30,10 @@
 | 
			
		||||
#define CHANNELSMOD_AUTO    1
 | 
			
		||||
#define CHANNELSMOD_USER    2
 | 
			
		||||
 | 
			
		||||
#define MAXAPIDS 32
 | 
			
		||||
#define MAXCAIDS  8
 | 
			
		||||
#define MAXAPIDS 32 // audio
 | 
			
		||||
#define MAXDPIDS  8 // dolby
 | 
			
		||||
#define MAXSPIDS  8 // subtitles
 | 
			
		||||
#define MAXCAIDS  8 // conditional access
 | 
			
		||||
 | 
			
		||||
struct tChannelParameterMap {
 | 
			
		||||
  int userValue;
 | 
			
		||||
@@ -100,8 +102,10 @@ private:
 | 
			
		||||
  int ppid;
 | 
			
		||||
  int apids[MAXAPIDS + 1]; // list is zero-terminated
 | 
			
		||||
  char alangs[MAXAPIDS][4];
 | 
			
		||||
  int dpids[MAXAPIDS + 1]; // list is zero-terminated
 | 
			
		||||
  char dlangs[MAXAPIDS][4];
 | 
			
		||||
  int dpids[MAXDPIDS + 1]; // list is zero-terminated
 | 
			
		||||
  char dlangs[MAXDPIDS][4];
 | 
			
		||||
  int spids[MAXSPIDS + 1]; // list is zero-terminated
 | 
			
		||||
  char slangs[MAXSPIDS][4];
 | 
			
		||||
  int tpid;
 | 
			
		||||
  int caids[MAXCAIDS + 1]; // list is zero-terminated
 | 
			
		||||
  int nid;
 | 
			
		||||
@@ -144,10 +148,15 @@ public:
 | 
			
		||||
  int Srate(void) const { return srate; }
 | 
			
		||||
  int Vpid(void) const { return vpid; }
 | 
			
		||||
  int Ppid(void) const { return ppid; }
 | 
			
		||||
  const int *Apids(void) const { return apids; }
 | 
			
		||||
  const int *Dpids(void) const { return dpids; }
 | 
			
		||||
  const int *Spids(void) const { return spids; }
 | 
			
		||||
  int Apid(int i) const { return (0 <= i && i < MAXAPIDS) ? apids[i] : 0; }
 | 
			
		||||
  int Dpid(int i) const { return (0 <= i && i < MAXAPIDS) ? dpids[i] : 0; }
 | 
			
		||||
  int Dpid(int i) const { return (0 <= i && i < MAXDPIDS) ? dpids[i] : 0; }
 | 
			
		||||
  int Spid(int i) const { return (0 <= i && i < MAXSPIDS) ? spids[i] : 0; }
 | 
			
		||||
  const char *Alang(int i) const { return (0 <= i && i < MAXAPIDS) ? alangs[i] : ""; }
 | 
			
		||||
  const char *Dlang(int i) const { return (0 <= i && i < MAXAPIDS) ? dlangs[i] : ""; }
 | 
			
		||||
  const char *Dlang(int i) const { return (0 <= i && i < MAXDPIDS) ? dlangs[i] : ""; }
 | 
			
		||||
  const char *Slang(int i) const { return (0 <= i && i < MAXSPIDS) ? slangs[i] : ""; }
 | 
			
		||||
  int Tpid(void) const { return tpid; }
 | 
			
		||||
  int Ca(int Index = 0) const { return Index < MAXCAIDS ? caids[Index] : 0; }
 | 
			
		||||
  int Nid(void) const { return nid; }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										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.209 2005/01/09 12:14:33 kls Exp $
 | 
			
		||||
 * $Id: config.h 1.210 2005/01/09 16:50:11 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __CONFIG_H
 | 
			
		||||
@@ -20,8 +20,8 @@
 | 
			
		||||
#include "i18n.h"
 | 
			
		||||
#include "tools.h"
 | 
			
		||||
 | 
			
		||||
#define VDRVERSION  "1.3.18"
 | 
			
		||||
#define VDRVERSNUM   10318  // Version * 10000 + Major * 100 + Minor
 | 
			
		||||
#define VDRVERSION  "1.3.19"
 | 
			
		||||
#define VDRVERSNUM   10319  // Version * 10000 + Major * 100 + Minor
 | 
			
		||||
 | 
			
		||||
#define MAXPRIORITY 99
 | 
			
		||||
#define MAXLIFETIME 99
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										77
									
								
								device.c
									
									
									
									
									
								
							
							
						
						
									
										77
									
								
								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.73 2005/01/09 12:36:48 kls Exp $
 | 
			
		||||
 * $Id: device.c 1.78 2005/01/23 15:41:05 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "device.h"
 | 
			
		||||
@@ -512,7 +512,7 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
 | 
			
		||||
     if (CaDevice && CanReplay()) {
 | 
			
		||||
        cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
 | 
			
		||||
        if (CaDevice->SetChannel(Channel, false) == scrOk) // calling SetChannel() directly, not SwitchChannel()!
 | 
			
		||||
           cControl::Launch(new cTransferControl(CaDevice, Channel->Vpid(), Channel->Apid(0), Channel->Apid(1), Channel->Dpid(0), Channel->Dpid(1)));
 | 
			
		||||
           cControl::Launch(new cTransferControl(CaDevice, Channel->Vpid(), Channel->Apids(), Channel->Dpids(), Channel->Spids()));
 | 
			
		||||
        else
 | 
			
		||||
           Result = scrNoTransfer;
 | 
			
		||||
        }
 | 
			
		||||
@@ -545,11 +545,12 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
 | 
			
		||||
        // Set the available audio tracks:
 | 
			
		||||
        ClrAvailableTracks();
 | 
			
		||||
        currentAudioTrack = ttAudioFirst;
 | 
			
		||||
        for (int i = 0; i < MAXAPIDS; i++) {
 | 
			
		||||
        for (int i = 0; i < MAXAPIDS; i++)
 | 
			
		||||
            SetAvailableTrack(ttAudio, i, Channel->Apid(i), Channel->Alang(i));
 | 
			
		||||
            if (Setup.UseDolbyDigital)
 | 
			
		||||
        if (Setup.UseDolbyDigital) {
 | 
			
		||||
           for (int i = 0; i < MAXDPIDS; i++)
 | 
			
		||||
               SetAvailableTrack(ttDolby, i, Channel->Dpid(i), Channel->Dlang(i));
 | 
			
		||||
            }
 | 
			
		||||
           }
 | 
			
		||||
        // Select the preferred audio track:
 | 
			
		||||
        eTrackType PreferredTrack = ttAudioFirst;
 | 
			
		||||
        int LanguagePreference = -1;
 | 
			
		||||
@@ -568,6 +569,8 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
 | 
			
		||||
        const tTrackId *Track = GetTrack(GetCurrentAudioTrack());
 | 
			
		||||
        if (!Track || !Track->id || PreferredTrack != GetCurrentAudioTrack())
 | 
			
		||||
           SetCurrentAudioTrack(PreferredTrack);
 | 
			
		||||
        // Fall back to stereo:
 | 
			
		||||
        SetAudioChannel(0);
 | 
			
		||||
        }
 | 
			
		||||
     cStatus::MsgChannelSwitch(this, Channel->Number()); // only report status if channel switch successfull
 | 
			
		||||
     }
 | 
			
		||||
@@ -657,8 +660,10 @@ void cDevice::ClrAvailableTracks(bool DescriptionsOnly)
 | 
			
		||||
     for (int i = ttNone; i < ttMaxTrackTypes; i++)
 | 
			
		||||
         *availableTracks[i].description = 0;
 | 
			
		||||
     }
 | 
			
		||||
  else
 | 
			
		||||
  else {
 | 
			
		||||
     memset(availableTracks, 0, sizeof(availableTracks));
 | 
			
		||||
     pre_1_3_19_PrivateStream = false;
 | 
			
		||||
     }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool cDevice::SetAvailableTrack(eTrackType Type, int Index, uint16_t Id, const char *Language, const char *Description, uint32_t Flags)
 | 
			
		||||
@@ -834,22 +839,49 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
 | 
			
		||||
               if (!VideoOnly && c == availableTracks[currentAudioTrack].id)
 | 
			
		||||
                  w = PlayAudio(Start, d);
 | 
			
		||||
               break;
 | 
			
		||||
          case 0xBD: // dolby
 | 
			
		||||
               if (Setup.UseDolbyDigital) {
 | 
			
		||||
                  SetAvailableTrack(ttDolby, 0, c);
 | 
			
		||||
                  if (!VideoOnly && c == availableTracks[currentAudioTrack].id) {
 | 
			
		||||
                     w = PlayAudio(Start, d);
 | 
			
		||||
                     if (FirstLoop)
 | 
			
		||||
                        Audios.PlayAudio(Data, Length);
 | 
			
		||||
                     }
 | 
			
		||||
          case 0xBD: { // private stream 1
 | 
			
		||||
               int PayloadOffset = Data[8] + 9;
 | 
			
		||||
               uchar SubStreamId = Data[PayloadOffset];
 | 
			
		||||
               uchar SubStreamType = SubStreamId & 0xE0;
 | 
			
		||||
               uchar SubStreamIndex = SubStreamId & 0x1F;
 | 
			
		||||
 | 
			
		||||
               // Compatibility mode for old VDR recordings, where 0xBD was only AC3:
 | 
			
		||||
               //TODO apparently this doesn't work for old ORF Dolby Digital recordings
 | 
			
		||||
               if (!pre_1_3_19_PrivateStream && (Data[6] & 4) && Data[PayloadOffset] == 0x0B && Data[PayloadOffset + 1] == 0x77)
 | 
			
		||||
                  pre_1_3_19_PrivateStream = true;
 | 
			
		||||
               if (pre_1_3_19_PrivateStream) {
 | 
			
		||||
                  SubStreamId = c;
 | 
			
		||||
                  SubStreamType = 0x80;
 | 
			
		||||
                  SubStreamIndex = 0;
 | 
			
		||||
                  }
 | 
			
		||||
 | 
			
		||||
               switch (SubStreamType) {
 | 
			
		||||
                 case 0x20: // SPU
 | 
			
		||||
                      break;
 | 
			
		||||
                 case 0x80: // AC3 & DTS
 | 
			
		||||
                      if (Setup.UseDolbyDigital) {
 | 
			
		||||
                         SetAvailableTrack(ttDolby, SubStreamIndex, SubStreamId);
 | 
			
		||||
                         if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
 | 
			
		||||
                            w = PlayAudio(Start, d);
 | 
			
		||||
                            if (FirstLoop && !(SubStreamId & 0x08)) // no DTS
 | 
			
		||||
                               Audios.PlayAudio(Data, Length);
 | 
			
		||||
                            }
 | 
			
		||||
                         }
 | 
			
		||||
                      break;
 | 
			
		||||
                 case 0xA0: // LPCM
 | 
			
		||||
                      SetAvailableTrack(ttAudio, SubStreamIndex, SubStreamId);
 | 
			
		||||
                      if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id)
 | 
			
		||||
                         w = PlayAudio(Start, d);
 | 
			
		||||
                      break;
 | 
			
		||||
                 }
 | 
			
		||||
               }
 | 
			
		||||
               break;
 | 
			
		||||
          default:
 | 
			
		||||
               ;//esyslog("ERROR: unexpected packet id %02X", c);
 | 
			
		||||
          }
 | 
			
		||||
        if (w > 0)
 | 
			
		||||
           Start += w;
 | 
			
		||||
        else if (w <= 0) {
 | 
			
		||||
        else {
 | 
			
		||||
           if (Start != Data)
 | 
			
		||||
              esyslog("ERROR: incomplete PES packet write!");
 | 
			
		||||
           return Start == Data ? w : Start - Data;
 | 
			
		||||
@@ -990,8 +1022,7 @@ bool cDevice::Receiving(bool CheckAny) const
 | 
			
		||||
 | 
			
		||||
void cDevice::Action(void)
 | 
			
		||||
{
 | 
			
		||||
  active = true;
 | 
			
		||||
  if (OpenDvr()) {
 | 
			
		||||
  if (active && OpenDvr()) {
 | 
			
		||||
     for (; active;) {
 | 
			
		||||
         // Read data from the DVR device:
 | 
			
		||||
         uchar *b = NULL;
 | 
			
		||||
@@ -1041,7 +1072,7 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
 | 
			
		||||
  cMutexLock MutexLock(&mutexReceiver);
 | 
			
		||||
  for (int i = 0; i < MAXRECEIVERS; i++) {
 | 
			
		||||
      if (!receiver[i]) {
 | 
			
		||||
         for (int n = 0; n < MAXRECEIVEPIDS; n++) {
 | 
			
		||||
         for (int n = 0; n < Receiver->numPids; n++) {
 | 
			
		||||
             if (!AddPid(Receiver->pids[n])) {
 | 
			
		||||
                for ( ; n-- > 0; )
 | 
			
		||||
                    DelPid(Receiver->pids[n]);
 | 
			
		||||
@@ -1053,7 +1084,10 @@ bool cDevice::AttachReceiver(cReceiver *Receiver)
 | 
			
		||||
         Receiver->device = this;
 | 
			
		||||
         receiver[i] = Receiver;
 | 
			
		||||
         Unlock();
 | 
			
		||||
         Start();
 | 
			
		||||
         if (!active) {
 | 
			
		||||
            active = true;
 | 
			
		||||
            Start();
 | 
			
		||||
            }
 | 
			
		||||
         return true;
 | 
			
		||||
         }
 | 
			
		||||
      }
 | 
			
		||||
@@ -1074,7 +1108,7 @@ void cDevice::Detach(cReceiver *Receiver)
 | 
			
		||||
         receiver[i] = NULL;
 | 
			
		||||
         Receiver->device = NULL;
 | 
			
		||||
         Unlock();
 | 
			
		||||
         for (int n = 0; n < MAXRECEIVEPIDS; n++)
 | 
			
		||||
         for (int n = 0; n < Receiver->numPids; n++)
 | 
			
		||||
             DelPid(Receiver->pids[n]);
 | 
			
		||||
         }
 | 
			
		||||
      else if (receiver[i])
 | 
			
		||||
@@ -1093,10 +1127,10 @@ cTSBuffer::cTSBuffer(int File, int Size, int CardIndex)
 | 
			
		||||
  SetDescription("TS buffer on device %d", CardIndex);
 | 
			
		||||
  f = File;
 | 
			
		||||
  cardIndex = CardIndex;
 | 
			
		||||
  active = false;
 | 
			
		||||
  delivered = false;
 | 
			
		||||
  ringBuffer = new cRingBufferLinear(Size, TS_SIZE, true, "TS");
 | 
			
		||||
  ringBuffer->SetTimeouts(100, 100);
 | 
			
		||||
  active = true;
 | 
			
		||||
  Start();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1112,7 +1146,6 @@ void cTSBuffer::Action(void)
 | 
			
		||||
  if (ringBuffer) {
 | 
			
		||||
     bool firstRead = true;
 | 
			
		||||
     cPoller Poller(f);
 | 
			
		||||
     active = true;
 | 
			
		||||
     for (; active;) {
 | 
			
		||||
         if (firstRead || Poller.Poll(100)) {
 | 
			
		||||
            firstRead = false;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								device.h
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								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.51 2005/01/07 14:57:01 kls Exp $
 | 
			
		||||
 * $Id: device.h 1.53 2005/01/22 14:58:07 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __DEVICE_H
 | 
			
		||||
@@ -22,7 +22,7 @@
 | 
			
		||||
#include "tools.h"
 | 
			
		||||
 | 
			
		||||
#define MAXDEVICES         16 // the maximum number of devices in the system
 | 
			
		||||
#define MAXPIDHANDLES      16 // the maximum number of different PIDs per device
 | 
			
		||||
#define MAXPIDHANDLES      64 // the maximum number of different PIDs per device
 | 
			
		||||
#define MAXRECEIVERS       16 // the maximum number of receivers per device
 | 
			
		||||
#define MAXVOLUME         255
 | 
			
		||||
#define VOLUMEDELTA         5 // used to increase/decrease the volume
 | 
			
		||||
@@ -59,14 +59,14 @@ enum eVideoSystem { vsPAL,
 | 
			
		||||
enum eTrackType { ttNone,
 | 
			
		||||
                  ttAudio,
 | 
			
		||||
                  ttAudioFirst = ttAudio,
 | 
			
		||||
                  ttAudioLast  = ttAudioFirst + 31/*XXX MAXAPIDS - 1*/,
 | 
			
		||||
                  ttAudioLast  = ttAudioFirst + 31, // MAXAPIDS - 1
 | 
			
		||||
                  ttDolby,
 | 
			
		||||
                  ttDolbyFirst = ttDolby,
 | 
			
		||||
                  ttDolbyLast  = ttDolbyFirst + 31/*XXX MAXAPIDS - 1*/,
 | 
			
		||||
                  ttDolbyLast  = ttDolbyFirst + 8, // MAXDPIDS - 1
 | 
			
		||||
                  /* future...
 | 
			
		||||
                  ttSubtitle,
 | 
			
		||||
                  ttSubtitleFirst = ttSubtitle,
 | 
			
		||||
                  ttSubtitleLast  = ttSubtitleFirst + 31,
 | 
			
		||||
                  ttSubtitleLast  = ttSubtitleFirst + 8, // MAXSPIDS - 1
 | 
			
		||||
                  */
 | 
			
		||||
                  ttMaxTrackTypes
 | 
			
		||||
                };
 | 
			
		||||
@@ -315,6 +315,7 @@ public:
 | 
			
		||||
private:
 | 
			
		||||
  tTrackId availableTracks[ttMaxTrackTypes];
 | 
			
		||||
  eTrackType currentAudioTrack;
 | 
			
		||||
  bool pre_1_3_19_PrivateStream;
 | 
			
		||||
protected:
 | 
			
		||||
  virtual void SetAudioTrackDevice(eTrackType Type);
 | 
			
		||||
       ///< Sets the current audio track to the given value.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										10
									
								
								dvbdevice.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								dvbdevice.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: dvbdevice.c 1.113 2005/01/09 13:04:20 kls Exp $
 | 
			
		||||
 * $Id: dvbdevice.c 1.116 2005/01/16 12:05:13 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "dvbdevice.h"
 | 
			
		||||
@@ -813,7 +813,7 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
 | 
			
		||||
     CHECK(ioctl(fd_audio, AUDIO_SET_AV_SYNC, true));
 | 
			
		||||
     }
 | 
			
		||||
  else if (StartTransferMode)
 | 
			
		||||
     cControl::Launch(new cTransferControl(this, Channel->Vpid(), Channel->Apid(0), Channel->Apid(1), Channel->Dpid(0), Channel->Dpid(1)));
 | 
			
		||||
     cControl::Launch(new cTransferControl(this, Channel->Vpid(), Channel->Apids(), Channel->Dpids(), Channel->Spids()));
 | 
			
		||||
 | 
			
		||||
  return true;
 | 
			
		||||
}
 | 
			
		||||
@@ -1111,7 +1111,7 @@ void cDvbDevice::StillPicture(const uchar *Data, int Length)
 | 
			
		||||
#define MIN_IFRAME 400000
 | 
			
		||||
  for (int i = MIN_IFRAME / Length + 1; i > 0; i--) {
 | 
			
		||||
      safe_write(fd_video, Data, Length);
 | 
			
		||||
      cCondWait::SleepMs(1); // allows the buffer to be displayed in case the progress display is active
 | 
			
		||||
      cCondWait::SleepMs(3); // allows the buffer to be displayed in case the progress display is active
 | 
			
		||||
      }
 | 
			
		||||
#endif
 | 
			
		||||
}
 | 
			
		||||
@@ -1130,12 +1130,12 @@ bool cDvbDevice::Flush(int TimeoutMs)
 | 
			
		||||
 | 
			
		||||
int cDvbDevice::PlayVideo(const uchar *Data, int Length)
 | 
			
		||||
{
 | 
			
		||||
  return write(fd_video, Data, Length);
 | 
			
		||||
  return WriteAllOrNothing(fd_video, Data, Length, 1000, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int cDvbDevice::PlayAudio(const uchar *Data, int Length)
 | 
			
		||||
{
 | 
			
		||||
  return write(fd_audio, Data, Length);
 | 
			
		||||
  return WriteAllOrNothing(fd_audio, Data, Length, 1000, 10);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool cDvbDevice::OpenDvr(void)
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: dvbplayer.c 1.29 2004/12/26 11:45:34 kls Exp $
 | 
			
		||||
 * $Id: dvbplayer.c 1.30 2005/01/14 14:00:56 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "dvbplayer.h"
 | 
			
		||||
@@ -439,7 +439,7 @@ void cDvbPlayer::Action(void)
 | 
			
		||||
                    }
 | 
			
		||||
                 }
 | 
			
		||||
              else
 | 
			
		||||
                 cCondWait::SleepMs(1); // this keeps the CPU load low
 | 
			
		||||
                 cCondWait::SleepMs(3); // this keeps the CPU load low
 | 
			
		||||
              }
 | 
			
		||||
 | 
			
		||||
           // Store the frame in the buffer:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								font.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								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.10 2004/12/18 13:41:19 kls Exp $
 | 
			
		||||
 * $Id: font.c 1.11 2005/01/14 13:25:35 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "config.h"
 | 
			
		||||
@@ -28,10 +28,13 @@
 | 
			
		||||
#include "fontosd-iso8859-7.c"
 | 
			
		||||
#include "fontsml-iso8859-7.c"
 | 
			
		||||
 | 
			
		||||
#include "fontfix-iso8859-13.c"
 | 
			
		||||
#include "fontosd-iso8859-13.c"
 | 
			
		||||
#include "fontsml-iso8859-13.c"
 | 
			
		||||
 | 
			
		||||
#include "fontfix-iso8859-15.c"
 | 
			
		||||
#include "fontosd-iso8859-15.c"
 | 
			
		||||
#include "fontsml-iso8859-15.c"
 | 
			
		||||
 | 
			
		||||
// --- cFont -----------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
static void *FontData[eDvbCodeSize][eDvbFontSize] = {
 | 
			
		||||
@@ -39,6 +42,7 @@ static void *FontData[eDvbCodeSize][eDvbFontSize] = {
 | 
			
		||||
  { FontOsd_iso8859_2,  FontFix_iso8859_2,  FontSml_iso8859_2 },
 | 
			
		||||
  { FontOsd_iso8859_5,  FontFix_iso8859_5,  FontSml_iso8859_5 },
 | 
			
		||||
  { FontOsd_iso8859_7,  FontFix_iso8859_7,  FontSml_iso8859_7 },
 | 
			
		||||
  { FontOsd_iso8859_13, FontFix_iso8859_13, FontSml_iso8859_13 },
 | 
			
		||||
  { FontOsd_iso8859_15, FontFix_iso8859_15, FontSml_iso8859_15 },
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
@@ -47,6 +51,7 @@ static const char *FontCode[eDvbCodeSize] = {
 | 
			
		||||
  "iso8859-2",
 | 
			
		||||
  "iso8859-5",
 | 
			
		||||
  "iso8859-7",
 | 
			
		||||
  "iso8859-13",
 | 
			
		||||
  "iso8859-15",
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								font.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								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.9 2004/10/23 14:06:37 kls Exp $
 | 
			
		||||
 * $Id: font.h 1.10 2005/01/14 13:25:35 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __FONT_H
 | 
			
		||||
@@ -24,6 +24,7 @@ enum eDvbCode {
 | 
			
		||||
  code_iso8859_2,
 | 
			
		||||
  code_iso8859_5,
 | 
			
		||||
  code_iso8859_7,
 | 
			
		||||
  code_iso8859_13,
 | 
			
		||||
  code_iso8859_15,
 | 
			
		||||
#define eDvbCodeSize (code_iso8859_15 + 1)
 | 
			
		||||
  };
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6498
									
								
								fontfix-iso8859-13.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6498
									
								
								fontfix-iso8859-13.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										6722
									
								
								fontosd-iso8859-13.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6722
									
								
								fontosd-iso8859-13.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										5602
									
								
								fontsml-iso8859-13.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5602
									
								
								fontsml-iso8859-13.c
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										66
									
								
								i18n.c
									
									
									
									
									
								
							
							
						
						
									
										66
									
								
								i18n.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: i18n.c 1.169 2005/01/09 12:17:44 kls Exp $
 | 
			
		||||
 * $Id: i18n.c 1.172 2005/01/22 10:38:44 kls Exp $
 | 
			
		||||
 *
 | 
			
		||||
 * Translations provided by:
 | 
			
		||||
 *
 | 
			
		||||
@@ -121,7 +121,7 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "iso8859-1",
 | 
			
		||||
    "iso8859-5",
 | 
			
		||||
    "iso8859-2",
 | 
			
		||||
    "iso8859-15", // or iso8859-1 as alternative
 | 
			
		||||
    "iso8859-13",
 | 
			
		||||
    "iso8859-1",
 | 
			
		||||
  },
 | 
			
		||||
  // The 3-letter names of the language (this MUST be the third phrase!):
 | 
			
		||||
@@ -1029,7 +1029,7 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?",
 | 
			
		||||
    "Obrisati snimku?",
 | 
			
		||||
    "Kustutan salvestuse?",
 | 
			
		||||
    "Slet optagelse",
 | 
			
		||||
    "Slet optagelse?",
 | 
			
		||||
  },
 | 
			
		||||
  { "Timer still recording - really delete?",
 | 
			
		||||
    "Timer zeichnet auf - trotzdem l<>schen?",
 | 
			
		||||
@@ -2302,6 +2302,7 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "<EFBFBD><EFBFBD>nen kieli ei ole valittavissa!",
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
@@ -2311,9 +2312,8 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "Audio k<>ttesaamatu!",
 | 
			
		||||
    "Ingen lyd tilg<6C>ngelig!",
 | 
			
		||||
  },
 | 
			
		||||
  // Setup pages:
 | 
			
		||||
  { "OSD",
 | 
			
		||||
@@ -3102,6 +3102,7 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "K<EFBFBD>yt<EFBFBD> Dolby Digital -<2D><>nt<6E>",
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
@@ -3111,9 +3112,8 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "Dolby Digital kasutamine",
 | 
			
		||||
    "Anvend Dolby Digital",
 | 
			
		||||
  },
 | 
			
		||||
  { "Setup.DVB$Update channels",
 | 
			
		||||
    "Kan<EFBFBD>le aktualisieren",
 | 
			
		||||
@@ -3220,6 +3220,48 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "lisa uued transponderid",
 | 
			
		||||
    "tilf. ny transp.",
 | 
			
		||||
  },
 | 
			
		||||
  { "Setup.DVB$Audio languages",  // note the plural
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "<EFBFBD><EFBFBD>nen kielet",
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
  },
 | 
			
		||||
  { "Setup.DVB$Audio language",  // note the singular
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "<EFBFBD><EFBFBD>nen kieli",
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
    "",//TODO
 | 
			
		||||
  },
 | 
			
		||||
  { "Setup.LNB$SLOF (MHz)",
 | 
			
		||||
    "SLOF (MHz)",
 | 
			
		||||
    "Frekvenca preklopa (MHz)",
 | 
			
		||||
@@ -4639,6 +4681,7 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "<EFBFBD><EFBFBD>ni",
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
@@ -4648,9 +4691,8 @@ const tI18nPhrase Phrases[] = {
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "",// TODO
 | 
			
		||||
    "Audio",
 | 
			
		||||
    "Audio",
 | 
			
		||||
  },
 | 
			
		||||
  // Miscellaneous:
 | 
			
		||||
  { "yes",
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								lirc.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								lirc.c
									
									
									
									
									
								
							@@ -6,7 +6,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 * LIRC support added by Carsten Koch <Carsten.Koch@icem.de>  2000-06-16.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: lirc.c 1.9 2004/12/19 18:05:13 kls Exp $
 | 
			
		||||
 * $Id: lirc.c 1.10 2005/01/14 14:18:42 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "lirc.h"
 | 
			
		||||
@@ -40,9 +40,11 @@ cLircRemote::cLircRemote(char *DeviceName)
 | 
			
		||||
 | 
			
		||||
cLircRemote::~cLircRemote()
 | 
			
		||||
{
 | 
			
		||||
  int fh = f;
 | 
			
		||||
  f = -1;
 | 
			
		||||
  Cancel();
 | 
			
		||||
  if (f >= 0)
 | 
			
		||||
     close(f);
 | 
			
		||||
  if (fh >= 0)
 | 
			
		||||
     close(fh);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool cLircRemote::Ready(void)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										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.334 2005/01/09 13:04:49 kls Exp $
 | 
			
		||||
 * $Id: menu.c 1.337 2005/01/15 16:32:34 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "menu.h"
 | 
			
		||||
@@ -1947,7 +1947,7 @@ void cMenuSetupDVB::Setup(void)
 | 
			
		||||
  Add(new cMenuEditStraItem(tr("Setup.DVB$Update channels"),       &data.UpdateChannels, 5, updateChannelsTexts));
 | 
			
		||||
  Add(new cMenuEditIntItem( tr("Setup.DVB$Audio languages"),       &numAudioLanguages, 0, I18nNumLanguages));
 | 
			
		||||
  for (int i = 0; i < numAudioLanguages; i++)
 | 
			
		||||
     Add(new cMenuEditStraItem(tr("Setup.EPG$Audio language"),     &data.AudioLanguages[i], I18nNumLanguages, I18nLanguages()));
 | 
			
		||||
      Add(new cMenuEditStraItem(tr("Setup.DVB$Audio language"),    &data.AudioLanguages[i], I18nNumLanguages, I18nLanguages()));
 | 
			
		||||
 | 
			
		||||
  SetCurrent(Get(current));
 | 
			
		||||
  Display();
 | 
			
		||||
@@ -2452,7 +2452,7 @@ void cMenuMain::Set(const char *Plugin)
 | 
			
		||||
 | 
			
		||||
  // Color buttons:
 | 
			
		||||
 | 
			
		||||
  SetHelp(!replaying ? tr("Record") : NULL, cDevice::PrimaryDevice()->NumAudioTracks() > 1 ? tr("Audio") : NULL, replaying ? NULL : tr("Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL);
 | 
			
		||||
  SetHelp(!replaying ? tr("Record") : NULL, tr("Audio"), replaying ? NULL : tr("Pause"), replaying ? tr("Button$Stop") : cReplayControl::LastReplayed() ? tr("Resume") : NULL);
 | 
			
		||||
  Display();
 | 
			
		||||
  lastActivity = time(NULL);
 | 
			
		||||
}
 | 
			
		||||
@@ -3019,7 +3019,7 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause)
 | 
			
		||||
  isyslog("record %s", fileName);
 | 
			
		||||
  if (MakeDirs(fileName, true)) {
 | 
			
		||||
     const cChannel *ch = timer->Channel();
 | 
			
		||||
     recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apid(0), ch->Apid(1), ch->Dpid(0), ch->Dpid(1));
 | 
			
		||||
     recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apids(), ch->Dpids(), ch->Spids());
 | 
			
		||||
     if (device->AttachReceiver(recorder)) {
 | 
			
		||||
        Recording.WriteSummary();
 | 
			
		||||
        cStatus::MsgRecording(device, Recording.Name());
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								pat.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								pat.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: pat.c 1.10 2004/10/16 10:01:12 kls Exp $
 | 
			
		||||
 * $Id: pat.c 1.11 2005/01/16 13:54:34 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "pat.h"
 | 
			
		||||
@@ -325,9 +325,9 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
 | 
			
		||||
        int Vpid = 0;
 | 
			
		||||
        int Ppid = pmt.getPCRPid();
 | 
			
		||||
        int Apids[MAXAPIDS] = { 0 };
 | 
			
		||||
        int Dpids[MAXAPIDS] = { 0 };
 | 
			
		||||
        int Dpids[MAXDPIDS] = { 0 };
 | 
			
		||||
        char ALangs[MAXAPIDS][4] = { "" };
 | 
			
		||||
        char DLangs[MAXAPIDS][4] = { "" };
 | 
			
		||||
        char DLangs[MAXDPIDS][4] = { "" };
 | 
			
		||||
        int Tpid = 0;
 | 
			
		||||
        int NumApids = 0;
 | 
			
		||||
        int NumDpids = 0;
 | 
			
		||||
@@ -386,7 +386,7 @@ void cPatFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length
 | 
			
		||||
                          delete d;
 | 
			
		||||
                          }
 | 
			
		||||
                      if (dpid) {
 | 
			
		||||
                         if (NumDpids < MAXAPIDS) {
 | 
			
		||||
                         if (NumDpids < MAXDPIDS) {
 | 
			
		||||
                            Dpids[NumDpids] = dpid;
 | 
			
		||||
                            strn0cpy(DLangs[NumDpids], lang, 4);
 | 
			
		||||
                            NumDpids++;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										37
									
								
								receiver.c
									
									
									
									
									
								
							
							
						
						
									
										37
									
								
								receiver.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: receiver.c 1.3 2002/07/28 15:14:49 kls Exp $
 | 
			
		||||
 * $Id: receiver.c 1.4 2005/01/16 14:03:01 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
@@ -12,25 +12,28 @@
 | 
			
		||||
#include "receiver.h"
 | 
			
		||||
#include "tools.h"
 | 
			
		||||
 | 
			
		||||
cReceiver::cReceiver(int Ca, int Priority, int NumPids, ...)
 | 
			
		||||
cReceiver::cReceiver(int Ca, int Priority, int Pid, const int *Pids1, const int *Pids2, const int *Pids3)
 | 
			
		||||
{
 | 
			
		||||
  device = NULL;
 | 
			
		||||
  ca = Ca;
 | 
			
		||||
  priority = Priority;
 | 
			
		||||
  for (int i = 0; i < MAXRECEIVEPIDS; i++)
 | 
			
		||||
      pids[i] = 0;
 | 
			
		||||
  if (NumPids) {
 | 
			
		||||
     va_list ap;
 | 
			
		||||
     va_start(ap, NumPids);
 | 
			
		||||
     int n = 0;
 | 
			
		||||
     while (n < MAXRECEIVEPIDS && NumPids--) {
 | 
			
		||||
           if ((pids[n] = va_arg(ap, int)) != 0)
 | 
			
		||||
              n++;
 | 
			
		||||
           }
 | 
			
		||||
     va_end(ap);
 | 
			
		||||
  numPids = 0;
 | 
			
		||||
  if (Pid)
 | 
			
		||||
     pids[numPids++] = Pid;
 | 
			
		||||
  if (Pids1) {
 | 
			
		||||
     while (*Pids1 && numPids < MAXRECEIVEPIDS)
 | 
			
		||||
           pids[numPids++] = *Pids1++;
 | 
			
		||||
     }
 | 
			
		||||
  else
 | 
			
		||||
     esyslog("ERROR: cReceiver called without a PID!");
 | 
			
		||||
  if (Pids2) {
 | 
			
		||||
     while (*Pids2 && numPids < MAXRECEIVEPIDS)
 | 
			
		||||
           pids[numPids++] = *Pids2++;
 | 
			
		||||
     }
 | 
			
		||||
  if (Pids3) {
 | 
			
		||||
     while (*Pids3 && numPids < MAXRECEIVEPIDS)
 | 
			
		||||
           pids[numPids++] = *Pids3++;
 | 
			
		||||
     }
 | 
			
		||||
  if (numPids >= MAXRECEIVEPIDS)
 | 
			
		||||
     dsyslog("too many PIDs in cReceiver");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cReceiver::~cReceiver()
 | 
			
		||||
@@ -41,11 +44,9 @@ cReceiver::~cReceiver()
 | 
			
		||||
bool cReceiver::WantsPid(int Pid)
 | 
			
		||||
{
 | 
			
		||||
  if (Pid) {
 | 
			
		||||
     for (int i = 0; i < MAXRECEIVEPIDS; i++) {
 | 
			
		||||
     for (int i = 0; i < numPids; i++) {
 | 
			
		||||
         if (pids[i] == Pid)
 | 
			
		||||
            return true;
 | 
			
		||||
         if (!pids[i])
 | 
			
		||||
            break;
 | 
			
		||||
         }
 | 
			
		||||
     }
 | 
			
		||||
  return false;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										42
									
								
								receiver.h
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								receiver.h
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: receiver.h 1.2 2002/07/28 11:22:01 kls Exp $
 | 
			
		||||
 * $Id: receiver.h 1.3 2005/01/16 14:05:10 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __RECEIVER_H
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
 | 
			
		||||
#include "device.h"
 | 
			
		||||
 | 
			
		||||
#define MAXRECEIVEPIDS  16 // the maximum number of PIDs per receiver
 | 
			
		||||
#define MAXRECEIVEPIDS  64 // the maximum number of PIDs per receiver
 | 
			
		||||
 | 
			
		||||
class cReceiver {
 | 
			
		||||
  friend class cDevice;
 | 
			
		||||
@@ -21,30 +21,32 @@ private:
 | 
			
		||||
  int ca;
 | 
			
		||||
  int priority;
 | 
			
		||||
  int pids[MAXRECEIVEPIDS];
 | 
			
		||||
  int numPids;
 | 
			
		||||
  bool WantsPid(int Pid);
 | 
			
		||||
protected:
 | 
			
		||||
  void Detach(void);
 | 
			
		||||
  virtual void Activate(bool On) {}
 | 
			
		||||
               // This function is called just before the cReceiver gets attached to
 | 
			
		||||
               // (On == true) or detached from (On == false) a cDevice. It can be used
 | 
			
		||||
               // to do things like starting/stopping a thread.
 | 
			
		||||
               // It is guaranteed that Receive() will not be called before Activate(true).
 | 
			
		||||
               ///< This function is called just before the cReceiver gets attached to
 | 
			
		||||
               ///< (On == true) or detached from (On == false) a cDevice. It can be used
 | 
			
		||||
               ///< to do things like starting/stopping a thread.
 | 
			
		||||
               ///< It is guaranteed that Receive() will not be called before Activate(true).
 | 
			
		||||
  virtual void Receive(uchar *Data, int Length) = 0;
 | 
			
		||||
               // This function is called from the cDevice we are attached to, and
 | 
			
		||||
               // delivers one TS packet from the set of PIDs the cReceiver has requested.
 | 
			
		||||
               // The data packet must be accepted immediately, and the call must return
 | 
			
		||||
               // as soon as possible, without any unnecessary delay. Each TS packet
 | 
			
		||||
               // will be delivered only ONCE, so the cReceiver must make sure that
 | 
			
		||||
               // it will be able to buffer the data if necessary.
 | 
			
		||||
               ///< This function is called from the cDevice we are attached to, and
 | 
			
		||||
               ///< delivers one TS packet from the set of PIDs the cReceiver has requested.
 | 
			
		||||
               ///< The data packet must be accepted immediately, and the call must return
 | 
			
		||||
               ///< as soon as possible, without any unnecessary delay. Each TS packet
 | 
			
		||||
               ///< will be delivered only ONCE, so the cReceiver must make sure that
 | 
			
		||||
               ///< it will be able to buffer the data if necessary.
 | 
			
		||||
public:
 | 
			
		||||
  cReceiver(int Ca, int Priority, int NumPids, ...);
 | 
			
		||||
               // Creates a new receiver that requires conditional access Ca and has
 | 
			
		||||
               // the given Priority. NumPids defines the number of PIDs that follow
 | 
			
		||||
               // this parameter. If any of these PIDs are 0, they will be silently ignored.
 | 
			
		||||
               // The total number of non-zero PIDs must not exceed MAXRECEIVEPIDS.
 | 
			
		||||
               // Priority may be any value in the range 0..99. Negative values indicate
 | 
			
		||||
               // that this cReceiver may be detached at any time (without blocking the
 | 
			
		||||
               // cDevice it is attached to).
 | 
			
		||||
  cReceiver(int Ca, int Priority, int Pid, const int *Pids1 = NULL, const int *Pids2 = NULL, const int *Pids3 = NULL);
 | 
			
		||||
               ///< Creates a new receiver that requires conditional access Ca and has
 | 
			
		||||
               ///< the given Priority. Pid is a single PID (typically the video PID), while
 | 
			
		||||
               ///< Pids1...Pids3 are pointers to zero terminated lists of PIDs.
 | 
			
		||||
               ///< If any of these PIDs are 0, they will be silently ignored.
 | 
			
		||||
               ///< The total number of non-zero PIDs must not exceed MAXRECEIVEPIDS.
 | 
			
		||||
               ///< Priority may be any value in the range 0..99. Negative values indicate
 | 
			
		||||
               ///< that this cReceiver may be detached at any time (without blocking the
 | 
			
		||||
               ///< cDevice it is attached to).
 | 
			
		||||
  virtual ~cReceiver();
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: recorder.c 1.12 2005/01/09 12:16:36 kls Exp $
 | 
			
		||||
 * $Id: recorder.c 1.13 2005/01/16 12:53:17 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <stdarg.h>
 | 
			
		||||
@@ -127,8 +127,8 @@ void cFileWriter::Action(void)
 | 
			
		||||
  active = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cRecorder::cRecorder(const char *FileName, int Ca, int Priority, int VPid, int APid1, int APid2, int DPid1, int DPid2)
 | 
			
		||||
:cReceiver(Ca, Priority, Setup.UseDolbyDigital ? 5 : 3, VPid, APid1, APid2, DPid1, DPid2)
 | 
			
		||||
cRecorder::cRecorder(const char *FileName, int Ca, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids)
 | 
			
		||||
:cReceiver(Ca, Priority, VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids)
 | 
			
		||||
,cThread("recording")
 | 
			
		||||
{
 | 
			
		||||
  active = false;
 | 
			
		||||
@@ -139,7 +139,7 @@ cRecorder::cRecorder(const char *FileName, int Ca, int Priority, int VPid, int A
 | 
			
		||||
 | 
			
		||||
  ringBuffer = new cRingBufferLinear(RECORDERBUFSIZE, TS_SIZE * 2, true, "Recorder");
 | 
			
		||||
  ringBuffer->SetTimeouts(0, 100);
 | 
			
		||||
  remux = new cRemux(VPid, APid1, APid2, DPid1, DPid2, true);
 | 
			
		||||
  remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids, true);
 | 
			
		||||
  writer = new cFileWriter(FileName, remux);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: recorder.h 1.2 2004/10/10 11:22:38 kls Exp $
 | 
			
		||||
 * $Id: recorder.h 1.3 2005/01/15 16:35:53 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __RECORDER_H
 | 
			
		||||
@@ -29,7 +29,7 @@ protected:
 | 
			
		||||
  virtual void Receive(uchar *Data, int Length);
 | 
			
		||||
  virtual void Action(void);
 | 
			
		||||
public:
 | 
			
		||||
  cRecorder(const char *FileName, int Ca, int Priority, int VPid, int APid1, int APid2, int DPid1, int DPid2);
 | 
			
		||||
  cRecorder(const char *FileName, int Ca, int Priority, int VPid, const int *APids, const int *DPids, const int *SPids);
 | 
			
		||||
               // Creates a new recorder that requires conditional access Ca, has
 | 
			
		||||
               // the given Priority and will record the given PIDs into the file FileName.
 | 
			
		||||
  virtual ~cRecorder();
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: recording.h 1.33 2004/12/26 11:47:35 kls Exp $
 | 
			
		||||
 * $Id: recording.h 1.34 2005/01/16 15:11:31 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __RECORDING_H
 | 
			
		||||
@@ -121,8 +121,8 @@ public:
 | 
			
		||||
//XXX+
 | 
			
		||||
#define FRAMESPERSEC 25
 | 
			
		||||
 | 
			
		||||
// The maximum size of a single frame:
 | 
			
		||||
#define MAXFRAMESIZE  KILOBYTE(192)
 | 
			
		||||
// The maximum size of a single frame (up to HDTV 1920x1080):
 | 
			
		||||
#define MAXFRAMESIZE  KILOBYTE(512)
 | 
			
		||||
 | 
			
		||||
// The maximum file size is limited by the range that can be covered
 | 
			
		||||
// with 'int'. 4GB might be possible (if the range is considered
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										412
									
								
								remux.c
									
									
									
									
									
								
							
							
						
						
									
										412
									
								
								remux.c
									
									
									
									
									
								
							@@ -8,14 +8,296 @@
 | 
			
		||||
 * the Linux DVB driver's 'tuxplayer' example and were rewritten to suit
 | 
			
		||||
 * VDR's needs.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: remux.c 1.23 2004/12/18 13:15:02 kls Exp $
 | 
			
		||||
 * The cDolbyRepacker 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.27 2005/01/23 12:56:39 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "remux.h"
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include "channels.h"
 | 
			
		||||
#include "thread.h"
 | 
			
		||||
#include "tools.h"
 | 
			
		||||
 | 
			
		||||
// --- cRepacker -------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
class cRepacker {
 | 
			
		||||
protected:
 | 
			
		||||
  uint8_t subStreamId;
 | 
			
		||||
public:
 | 
			
		||||
  cRepacker(void) { subStreamId = 0; }
 | 
			
		||||
  virtual ~cRepacker() {}
 | 
			
		||||
  virtual int Put(cRingBufferLinear *ResultBuffer, const uchar *Data, int Count) = 0;
 | 
			
		||||
  virtual int BreakAt(const uchar *Data, int Count) = 0;
 | 
			
		||||
  void SetSubStreamId(uint8_t SubStreamId) { subStreamId = SubStreamId; }
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
// --- cDolbyRepacker --------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
class cDolbyRepacker : public cRepacker {
 | 
			
		||||
private:
 | 
			
		||||
  static int frameSizes[];
 | 
			
		||||
  uchar fragmentData[6 + 65535];
 | 
			
		||||
  int fragmentLen;
 | 
			
		||||
  uchar pesHeader[6 + 3 + 255 + 4 + 4];
 | 
			
		||||
  int pesHeaderLen;
 | 
			
		||||
  uchar chk1;
 | 
			
		||||
  uchar chk2;
 | 
			
		||||
  int ac3todo;
 | 
			
		||||
  enum {
 | 
			
		||||
    find_0b,
 | 
			
		||||
    find_77,
 | 
			
		||||
    store_chk1,
 | 
			
		||||
    store_chk2,
 | 
			
		||||
    get_length
 | 
			
		||||
    } state;
 | 
			
		||||
  void Reset(void);
 | 
			
		||||
public:
 | 
			
		||||
  cDolbyRepacker(void);
 | 
			
		||||
  virtual int Put(cRingBufferLinear *ResultBuffer, const uchar *Data, int Count);
 | 
			
		||||
  virtual int BreakAt(const uchar *Data, int Count);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
int cDolbyRepacker::frameSizes[] = {
 | 
			
		||||
  // fs = 48 kHz
 | 
			
		||||
    64,   64,   80,   80,   96,   96,  112,  112,  128,  128,  160,  160,  192,  192,  224,  224,
 | 
			
		||||
   256,  256,  320,  320,  384,  384,  448,  448,  512,  512,  640,  640,  768,  768,  896,  896,
 | 
			
		||||
  1024, 1024, 1152, 1152, 1280, 1280,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
  // fs = 44.1 kHz
 | 
			
		||||
    69,   70,   87,   88,  104,  105,  121,  122,  139,  140,  174,  175,  208,  209,  243,  244,
 | 
			
		||||
   278,  279,  348,  349,  417,  418,  487,  488,  557,  558,  696,  697,  835,  836,  975,  976,
 | 
			
		||||
  1114, 1115, 1253, 1254, 1393, 1394,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
  // fs = 32 kHz
 | 
			
		||||
    96,   96,  120,  120,  144,  144,  168,  168,  192,  192,  240,  240,  288,  288,  336,  336,
 | 
			
		||||
   384,  384,  480,  480,  576,  576,  672,  672,  768,  768,  960,  960, 1152, 1152, 1344, 1344,
 | 
			
		||||
  1536, 1536, 1728, 1728, 1920, 1920,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
  //
 | 
			
		||||
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
     0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
cDolbyRepacker::cDolbyRepacker(void)
 | 
			
		||||
{
 | 
			
		||||
  pesHeader[0] = 0x00;
 | 
			
		||||
  pesHeader[1] = 0x00;
 | 
			
		||||
  pesHeader[2] = 0x01;
 | 
			
		||||
  pesHeader[3] = 0xBD;
 | 
			
		||||
  pesHeader[4] = 0x00;
 | 
			
		||||
  pesHeader[5] = 0x00;
 | 
			
		||||
  Reset();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cDolbyRepacker::Reset()
 | 
			
		||||
{
 | 
			
		||||
  state = find_0b;
 | 
			
		||||
  pesHeader[6] = 0x80;
 | 
			
		||||
  pesHeader[7] = 0x00;
 | 
			
		||||
  pesHeader[8] = 0x00;
 | 
			
		||||
  pesHeaderLen = 9;
 | 
			
		||||
  ac3todo = 0;
 | 
			
		||||
  chk1 = 0;
 | 
			
		||||
  chk2 = 0;
 | 
			
		||||
  fragmentLen = 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int cDolbyRepacker::Put(cRingBufferLinear *ResultBuffer, const uchar *Data, int Count)
 | 
			
		||||
{
 | 
			
		||||
  // check for MPEG 2
 | 
			
		||||
  if ((Data[6] & 0xC0) != 0x80)
 | 
			
		||||
     return 0;
 | 
			
		||||
  // copy header information for later use
 | 
			
		||||
  if (Data[6] != 0x80 || Data[7] != 0x00 || Data[8] != 0x00) {
 | 
			
		||||
     pesHeaderLen = Data[8] + 6 + 3;
 | 
			
		||||
     memcpy(pesHeader, Data, pesHeaderLen);
 | 
			
		||||
     }
 | 
			
		||||
 | 
			
		||||
  const uchar *data = Data + pesHeaderLen;
 | 
			
		||||
  int done = pesHeaderLen;
 | 
			
		||||
  int todo = Count - done;
 | 
			
		||||
 | 
			
		||||
  // finish remainder of ac3 frame
 | 
			
		||||
  if (ac3todo > 0) {
 | 
			
		||||
     int bite;
 | 
			
		||||
     // enough data available to put PES packet into buffer?
 | 
			
		||||
     if (ac3todo <= todo) {
 | 
			
		||||
        // output a previous fragment first
 | 
			
		||||
        if (fragmentLen > 0) {
 | 
			
		||||
           bite = fragmentLen;
 | 
			
		||||
           int n = ResultBuffer->Put(fragmentData, bite);
 | 
			
		||||
           if (bite != n) {
 | 
			
		||||
              Reset();
 | 
			
		||||
              return done;
 | 
			
		||||
              }
 | 
			
		||||
           fragmentLen = 0;
 | 
			
		||||
           }
 | 
			
		||||
        bite = ac3todo;
 | 
			
		||||
        int n = ResultBuffer->Put(data, bite);
 | 
			
		||||
        if (bite != n) {
 | 
			
		||||
           Reset();
 | 
			
		||||
           return done + n;
 | 
			
		||||
           }
 | 
			
		||||
        }
 | 
			
		||||
     else {
 | 
			
		||||
        // copy the fragment into separate buffer for later processing
 | 
			
		||||
        bite = todo;
 | 
			
		||||
        if (fragmentLen + bite > (int)sizeof(fragmentData)) {
 | 
			
		||||
           Reset();
 | 
			
		||||
           return done;
 | 
			
		||||
           }
 | 
			
		||||
        memcpy(fragmentData + fragmentLen, data, bite);
 | 
			
		||||
        fragmentLen += bite;
 | 
			
		||||
        }
 | 
			
		||||
     data += bite;
 | 
			
		||||
     done += bite;
 | 
			
		||||
     todo -= bite;
 | 
			
		||||
     ac3todo -= bite;
 | 
			
		||||
     }
 | 
			
		||||
 | 
			
		||||
  // look for 0x0B 0x77 <chk1> <chk2> <frameSize>
 | 
			
		||||
  while (todo > 0) {
 | 
			
		||||
        switch (state) {
 | 
			
		||||
          case find_0b:
 | 
			
		||||
               if (*data == 0x0B)
 | 
			
		||||
                  ++(int &)state;
 | 
			
		||||
               data++;
 | 
			
		||||
               done++;
 | 
			
		||||
               todo--;
 | 
			
		||||
               continue;
 | 
			
		||||
          case find_77:
 | 
			
		||||
               if (*data != 0x77) {
 | 
			
		||||
                  state = find_0b;
 | 
			
		||||
                  continue;
 | 
			
		||||
                  }
 | 
			
		||||
               data++;
 | 
			
		||||
               done++;
 | 
			
		||||
               todo--;
 | 
			
		||||
               ++(int &)state;
 | 
			
		||||
               continue;
 | 
			
		||||
          case store_chk1:
 | 
			
		||||
               chk1 = *data++;
 | 
			
		||||
               done++;
 | 
			
		||||
               todo--;
 | 
			
		||||
               ++(int &)state;
 | 
			
		||||
               continue;
 | 
			
		||||
          case store_chk2:
 | 
			
		||||
               chk2 = *data++;
 | 
			
		||||
               done++;
 | 
			
		||||
               todo--;
 | 
			
		||||
               ++(int &)state;
 | 
			
		||||
               continue;
 | 
			
		||||
          case get_length: {
 | 
			
		||||
               ac3todo = 2 * frameSizes[*data];
 | 
			
		||||
               // frameSizeCode was invalid => restart searching
 | 
			
		||||
               if (ac3todo <= 0) {
 | 
			
		||||
                  if (chk1 == 0x0B) {
 | 
			
		||||
                     if (chk2 == 0x77) {
 | 
			
		||||
                        state = store_chk1;
 | 
			
		||||
                        continue;
 | 
			
		||||
                        }
 | 
			
		||||
                     if (chk2 == 0x0B) {
 | 
			
		||||
                        state = find_77;
 | 
			
		||||
                        continue;
 | 
			
		||||
                        }
 | 
			
		||||
                     state = find_0b;
 | 
			
		||||
                     continue;
 | 
			
		||||
                     }
 | 
			
		||||
                  if (chk2 == 0x0B) {
 | 
			
		||||
                     state = find_77;
 | 
			
		||||
                     continue;
 | 
			
		||||
                     }
 | 
			
		||||
                  state = find_0b;
 | 
			
		||||
                  continue;
 | 
			
		||||
                  }
 | 
			
		||||
               // adjust PES packet length and output packet
 | 
			
		||||
               if (subStreamId) {
 | 
			
		||||
                  pesHeader[pesHeaderLen++] = subStreamId;
 | 
			
		||||
                  pesHeader[pesHeaderLen++] = 0x00;
 | 
			
		||||
                  pesHeader[pesHeaderLen++] = 0x00;
 | 
			
		||||
                  pesHeader[pesHeaderLen++] = 0x00;
 | 
			
		||||
                  }
 | 
			
		||||
               int packetLen = pesHeaderLen - 6 + ac3todo;
 | 
			
		||||
               pesHeader[4] = packetLen >> 8;
 | 
			
		||||
               pesHeader[5] = packetLen & 0xFF;
 | 
			
		||||
               pesHeader[pesHeaderLen + 0] = 0x0B;
 | 
			
		||||
               pesHeader[pesHeaderLen + 1] = 0x77;
 | 
			
		||||
               pesHeader[pesHeaderLen + 2] = chk1;
 | 
			
		||||
               pesHeader[pesHeaderLen + 3] = chk2;
 | 
			
		||||
               ac3todo -= 4;
 | 
			
		||||
               int bite = pesHeaderLen + 4;
 | 
			
		||||
               // enough data available to put PES packet into buffer?
 | 
			
		||||
               if (ac3todo <= todo) {
 | 
			
		||||
                  int n = ResultBuffer->Put(pesHeader, bite);
 | 
			
		||||
                  if (bite != n) {
 | 
			
		||||
                     Reset();
 | 
			
		||||
                     return done;
 | 
			
		||||
                     }
 | 
			
		||||
                  bite = ac3todo;
 | 
			
		||||
                  n = ResultBuffer->Put(data, bite);
 | 
			
		||||
                  if (bite != n) {
 | 
			
		||||
                     Reset();
 | 
			
		||||
                     return done + n;
 | 
			
		||||
                     }
 | 
			
		||||
                  }
 | 
			
		||||
               else {
 | 
			
		||||
                  // copy the fragment into separate buffer for later processing
 | 
			
		||||
                  if (fragmentLen + bite > (int)sizeof(fragmentData)) {
 | 
			
		||||
                     Reset();
 | 
			
		||||
                     return done;
 | 
			
		||||
                     }
 | 
			
		||||
                  memcpy(fragmentData + fragmentLen, pesHeader, bite);
 | 
			
		||||
                  fragmentLen += bite;
 | 
			
		||||
                  bite = todo;
 | 
			
		||||
                  if (fragmentLen + bite > (int)sizeof(fragmentData)) {
 | 
			
		||||
                     Reset();
 | 
			
		||||
                     return done;
 | 
			
		||||
                     }
 | 
			
		||||
                  memcpy(fragmentData + fragmentLen, data, bite);
 | 
			
		||||
                  fragmentLen += bite;
 | 
			
		||||
                  }
 | 
			
		||||
               data += bite;
 | 
			
		||||
               done += bite;
 | 
			
		||||
               todo -= bite;
 | 
			
		||||
               ac3todo -= bite;
 | 
			
		||||
               // prepare for next packet
 | 
			
		||||
               pesHeader[6] = 0x80;
 | 
			
		||||
               pesHeader[7] = 0x00;
 | 
			
		||||
               pesHeader[8] = 0x00;
 | 
			
		||||
               pesHeaderLen = 9;
 | 
			
		||||
               state = find_0b;
 | 
			
		||||
               }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
  return Count;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int cDolbyRepacker::BreakAt(const uchar *Data, int Count)
 | 
			
		||||
{
 | 
			
		||||
  // enough data for test?
 | 
			
		||||
  if (Count < 6 + 3)
 | 
			
		||||
     return -1;
 | 
			
		||||
  // check for MPEG 2
 | 
			
		||||
  if ((Data[6] & 0xC0) != 0x80)
 | 
			
		||||
     return -1;
 | 
			
		||||
  int headerLen = Data[8] + 6 + 3;
 | 
			
		||||
  // break after fragment tail?
 | 
			
		||||
  if (ac3todo > 0)
 | 
			
		||||
     return headerLen + ac3todo;
 | 
			
		||||
  // enough data for test?
 | 
			
		||||
  if (Count < headerLen + 5)
 | 
			
		||||
     return -1;
 | 
			
		||||
  const uchar *data = Data + headerLen;
 | 
			
		||||
  // break after ac3 frame?
 | 
			
		||||
  if (data[0] == 0x0B && data[1] == 0x77 && frameSizes[data[4]] > 0)
 | 
			
		||||
     return headerLen + frameSizes[data[4]];
 | 
			
		||||
  return -1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// --- cTS2PES ---------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
#include <netinet/in.h>
 | 
			
		||||
@@ -52,7 +334,7 @@
 | 
			
		||||
#define ADAPT_FIELD    0x20
 | 
			
		||||
 | 
			
		||||
#define MAX_PLENGTH  0xFFFF          // the maximum PES packet length (theoretically)
 | 
			
		||||
#define MMAX_PLENGTH (8*MAX_PLENGTH) // some stations send PES packets that are extremely large, e.g. DVB-T in Finland
 | 
			
		||||
#define MMAX_PLENGTH (64*MAX_PLENGTH) // some stations send PES packets that are extremely large, e.g. DVB-T in Finland or HDTV 1920x1080
 | 
			
		||||
 | 
			
		||||
#define IPACKS 2048
 | 
			
		||||
 | 
			
		||||
@@ -64,12 +346,14 @@
 | 
			
		||||
 | 
			
		||||
class cTS2PES {
 | 
			
		||||
private:
 | 
			
		||||
  int pid;
 | 
			
		||||
  int size;
 | 
			
		||||
  int found;
 | 
			
		||||
  int count;
 | 
			
		||||
  uint8_t *buf;
 | 
			
		||||
  uint8_t cid;
 | 
			
		||||
  uint8_t audioCid;
 | 
			
		||||
  uint8_t subStreamId;
 | 
			
		||||
  int plength;
 | 
			
		||||
  uint8_t plen[2];
 | 
			
		||||
  uint8_t flag1;
 | 
			
		||||
@@ -83,6 +367,7 @@ private:
 | 
			
		||||
  int tsErrors;
 | 
			
		||||
  int ccErrors;
 | 
			
		||||
  int ccCounter;
 | 
			
		||||
  cRepacker *repacker;
 | 
			
		||||
  static uint8_t headr[];
 | 
			
		||||
  void store(uint8_t *Data, int Count);
 | 
			
		||||
  void reset_ipack(void);
 | 
			
		||||
@@ -90,19 +375,25 @@ private:
 | 
			
		||||
  void write_ipack(const uint8_t *Data, int Count);
 | 
			
		||||
  void instant_repack(const uint8_t *Buf, int Count);
 | 
			
		||||
public:
 | 
			
		||||
  cTS2PES(cRingBufferLinear *ResultBuffer, int Size, uint8_t AudioCid = 0x00);
 | 
			
		||||
  cTS2PES(int Pid, cRingBufferLinear *ResultBuffer, int Size, uint8_t AudioCid = 0x00, uint8_t SubStreamId = 0x00, cRepacker *Repacker = NULL);
 | 
			
		||||
  ~cTS2PES();
 | 
			
		||||
  int Pid(void) { return pid; }
 | 
			
		||||
  void ts_to_pes(const uint8_t *Buf); // don't need count (=188)
 | 
			
		||||
  void Clear(void);
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
uint8_t cTS2PES::headr[] = { 0x00, 0x00, 0x01 };
 | 
			
		||||
 | 
			
		||||
cTS2PES::cTS2PES(cRingBufferLinear *ResultBuffer, int Size, uint8_t AudioCid)
 | 
			
		||||
cTS2PES::cTS2PES(int Pid, cRingBufferLinear *ResultBuffer, int Size, uint8_t AudioCid, uint8_t SubStreamId, cRepacker *Repacker)
 | 
			
		||||
{
 | 
			
		||||
  pid = Pid;
 | 
			
		||||
  resultBuffer = ResultBuffer;
 | 
			
		||||
  size = Size;
 | 
			
		||||
  audioCid = AudioCid;
 | 
			
		||||
  subStreamId = SubStreamId;
 | 
			
		||||
  repacker = Repacker;
 | 
			
		||||
  if (repacker)
 | 
			
		||||
     repacker->SetSubStreamId(subStreamId);
 | 
			
		||||
 | 
			
		||||
  tsErrors = 0;
 | 
			
		||||
  ccErrors = 0;
 | 
			
		||||
@@ -119,6 +410,7 @@ cTS2PES::~cTS2PES()
 | 
			
		||||
  if (tsErrors || ccErrors)
 | 
			
		||||
     dsyslog("cTS2PES got %d TS errors, %d TS continuity errors", tsErrors, ccErrors);
 | 
			
		||||
  free(buf);
 | 
			
		||||
  delete repacker;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cTS2PES::Clear(void)
 | 
			
		||||
@@ -128,7 +420,7 @@ void cTS2PES::Clear(void)
 | 
			
		||||
 | 
			
		||||
void cTS2PES::store(uint8_t *Data, int Count)
 | 
			
		||||
{
 | 
			
		||||
  int n = resultBuffer->Put(Data, Count);
 | 
			
		||||
  int n = repacker ? repacker->Put(resultBuffer, Data, Count) : resultBuffer->Put(Data, Count);
 | 
			
		||||
  if (n != Count)
 | 
			
		||||
     esyslog("ERROR: result buffer overflow, dropped %d out of %d byte", Count - n, Count);
 | 
			
		||||
}
 | 
			
		||||
@@ -178,17 +470,48 @@ void cTS2PES::write_ipack(const uint8_t *Data, int Count)
 | 
			
		||||
     count = 6;
 | 
			
		||||
     }
 | 
			
		||||
 | 
			
		||||
  if (count + Count < size) {
 | 
			
		||||
     memcpy(buf + count, Data, Count);
 | 
			
		||||
     count += Count;
 | 
			
		||||
  // determine amount of data to process
 | 
			
		||||
  int bite = Count;
 | 
			
		||||
  if (count + bite > size)
 | 
			
		||||
     bite = size - count;
 | 
			
		||||
  if (repacker) {
 | 
			
		||||
     int breakAt = repacker->BreakAt(buf, count);
 | 
			
		||||
     // avoid memcpy of data after break location
 | 
			
		||||
     if (0 <= breakAt && breakAt < count + bite) {
 | 
			
		||||
        bite = breakAt - count;
 | 
			
		||||
        if (bite < 0) // should never happen
 | 
			
		||||
           bite = 0;
 | 
			
		||||
        }
 | 
			
		||||
     }
 | 
			
		||||
  else {
 | 
			
		||||
     int rest = size - count;
 | 
			
		||||
     memcpy(buf + count, Data, rest);
 | 
			
		||||
     count += rest;
 | 
			
		||||
 | 
			
		||||
  memcpy(buf + count, Data, bite);
 | 
			
		||||
  count += bite;
 | 
			
		||||
 | 
			
		||||
  if (repacker) {
 | 
			
		||||
     // determine break location
 | 
			
		||||
     int breakAt = repacker->BreakAt(buf, count);
 | 
			
		||||
     if (breakAt > size) // won't fit into packet?
 | 
			
		||||
        breakAt = -1;
 | 
			
		||||
     if (breakAt > count) // not enough data?
 | 
			
		||||
        breakAt = -1;
 | 
			
		||||
     // push out data before break location
 | 
			
		||||
     if (breakAt > 0) {
 | 
			
		||||
        // adjust bite if above memcpy was to large
 | 
			
		||||
        bite -= count - breakAt;
 | 
			
		||||
        count = breakAt;
 | 
			
		||||
        send_ipack();
 | 
			
		||||
        // recurse for data after break location
 | 
			
		||||
        if (Count - bite > 0)
 | 
			
		||||
           write_ipack(Data + bite, Count - bite);
 | 
			
		||||
        }
 | 
			
		||||
     }
 | 
			
		||||
 | 
			
		||||
  // push out data when buffer is full
 | 
			
		||||
  if (count >= size) {
 | 
			
		||||
     send_ipack();
 | 
			
		||||
     if (Count - rest > 0)
 | 
			
		||||
        write_ipack(Data + rest, Count - rest);
 | 
			
		||||
     // recurse for remaining data
 | 
			
		||||
     if (Count - bite > 0)
 | 
			
		||||
        write_ipack(Data + bite, Count - bite);
 | 
			
		||||
     }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -395,35 +718,42 @@ void cTS2PES::ts_to_pes(const uint8_t *Buf) // don't need count (=188)
 | 
			
		||||
 | 
			
		||||
#define RESULTBUFFERSIZE KILOBYTE(256)
 | 
			
		||||
 | 
			
		||||
cRemux::cRemux(int VPid, int APid1, int APid2, int DPid1, int DPid2, bool ExitOnFailure)
 | 
			
		||||
cRemux::cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure)
 | 
			
		||||
{
 | 
			
		||||
  vPid = VPid;
 | 
			
		||||
  aPid1 = APid1;
 | 
			
		||||
  aPid2 = APid2;
 | 
			
		||||
  dPid1 = DPid1;
 | 
			
		||||
  dPid2 = DPid2;
 | 
			
		||||
  exitOnFailure = ExitOnFailure;
 | 
			
		||||
  isRadio = VPid == 0 || VPid == 1 || VPid == 0x1FFF;
 | 
			
		||||
  numUPTerrors = 0;
 | 
			
		||||
  synced = false;
 | 
			
		||||
  skipped = 0;
 | 
			
		||||
  numTracks = 0;
 | 
			
		||||
  resultSkipped = 0;
 | 
			
		||||
  resultBuffer = new cRingBufferLinear(RESULTBUFFERSIZE, IPACKS, false, "Result");
 | 
			
		||||
  resultBuffer->SetTimeouts(0, 100);
 | 
			
		||||
  vTS2PES  =         new cTS2PES(resultBuffer, IPACKS);
 | 
			
		||||
  aTS2PES1 =         new cTS2PES(resultBuffer, IPACKS, 0xC0);
 | 
			
		||||
  aTS2PES2 = aPid2 ? new cTS2PES(resultBuffer, IPACKS, 0xC1) : NULL;
 | 
			
		||||
  dTS2PES1 = dPid1 ? new cTS2PES(resultBuffer, IPACKS)       : NULL;
 | 
			
		||||
  //XXX don't yet know how to tell apart primary and secondary DD data...
 | 
			
		||||
  dTS2PES2 = /*XXX dPid2 ? new cTS2PES(resultBuffer, IPACKS) : XXX*/ NULL;
 | 
			
		||||
  if (VPid)
 | 
			
		||||
     ts2pes[numTracks++] = new cTS2PES(VPid, resultBuffer, IPACKS);
 | 
			
		||||
  if (APids) {
 | 
			
		||||
     int n = 0;
 | 
			
		||||
     while (*APids && numTracks < MAXTRACKS && n < MAXAPIDS)
 | 
			
		||||
           ts2pes[numTracks++] = new cTS2PES(*APids++, resultBuffer, IPACKS, 0xC0 + n++);
 | 
			
		||||
     }
 | 
			
		||||
  if (DPids) {
 | 
			
		||||
     int n = 0;
 | 
			
		||||
     while (*DPids && numTracks < MAXTRACKS && n < MAXDPIDS)
 | 
			
		||||
           ts2pes[numTracks++] = new cTS2PES(*DPids++, resultBuffer, IPACKS, 0x00, 0x80 + n++, new cDolbyRepacker);
 | 
			
		||||
     }
 | 
			
		||||
  /* future...
 | 
			
		||||
  if (SPids) {
 | 
			
		||||
     int n = 0;
 | 
			
		||||
     while (*SPids && numTracks < MAXTRACKS && n < MAXSPIDS)
 | 
			
		||||
           ts2pes[numTracks++] = new cTS2PES(*SPids++, resultBuffer, IPACKS, 0x00, 0x28 + n++);
 | 
			
		||||
     }
 | 
			
		||||
  */
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cRemux::~cRemux()
 | 
			
		||||
{
 | 
			
		||||
  delete vTS2PES;
 | 
			
		||||
  delete aTS2PES1;
 | 
			
		||||
  delete aTS2PES2;
 | 
			
		||||
  delete dTS2PES1;
 | 
			
		||||
  delete dTS2PES2;
 | 
			
		||||
  for (int t = 0; t < numTracks; t++)
 | 
			
		||||
      delete ts2pes[t];
 | 
			
		||||
  delete resultBuffer;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -495,11 +825,12 @@ int cRemux::Put(const uchar *Data, int Count)
 | 
			
		||||
         break; // A cTS2PES might write one full packet and also a small rest
 | 
			
		||||
      int pid = GetPid(Data + i + 1);
 | 
			
		||||
      if (Data[i + 3] & 0x10) { // got payload
 | 
			
		||||
         if      (pid == vPid)              vTS2PES->ts_to_pes(Data + i);
 | 
			
		||||
         else if (pid == aPid1)             aTS2PES1->ts_to_pes(Data + i);
 | 
			
		||||
         else if (pid == aPid2 && aTS2PES2) aTS2PES2->ts_to_pes(Data + i);
 | 
			
		||||
         else if (pid == dPid1 && dTS2PES1) dTS2PES1->ts_to_pes(Data + i);
 | 
			
		||||
         else if (pid == dPid2 && dTS2PES2) dTS2PES2->ts_to_pes(Data + i);
 | 
			
		||||
         for (int t = 0; t < numTracks; t++) {
 | 
			
		||||
             if (ts2pes[t]->Pid() == pid) {
 | 
			
		||||
                ts2pes[t]->ts_to_pes(Data + i);
 | 
			
		||||
                break;
 | 
			
		||||
                }
 | 
			
		||||
             }
 | 
			
		||||
         }
 | 
			
		||||
      used += TS_SIZE;
 | 
			
		||||
      }
 | 
			
		||||
@@ -537,7 +868,7 @@ uchar *cRemux::Get(int &Count, uchar *PictureType)
 | 
			
		||||
 | 
			
		||||
  // Special VPID case to enable recording radio channels:
 | 
			
		||||
 | 
			
		||||
  if (vPid == 0 || vPid == 1 || vPid == 0x1FFF) {
 | 
			
		||||
  if (isRadio) {
 | 
			
		||||
     // XXX actually '0' should be enough, but '1' must be used with encrypted channels (driver bug?)
 | 
			
		||||
     // XXX also allowing 0x1FFF to not break Michael Paar's original patch,
 | 
			
		||||
     // XXX but it would probably be best to only use '0'
 | 
			
		||||
@@ -615,11 +946,8 @@ void cRemux::Del(int Count)
 | 
			
		||||
 | 
			
		||||
void cRemux::Clear(void)
 | 
			
		||||
{
 | 
			
		||||
  if (vTS2PES)  vTS2PES->Clear();
 | 
			
		||||
  if (aTS2PES1) aTS2PES1->Clear();
 | 
			
		||||
  if (aTS2PES2) aTS2PES2->Clear();
 | 
			
		||||
  if (dTS2PES1) dTS2PES1->Clear();
 | 
			
		||||
  if (dTS2PES2) dTS2PES2->Clear();
 | 
			
		||||
  for (int t = 0; t < numTracks; t++)
 | 
			
		||||
      ts2pes[t]->Clear();
 | 
			
		||||
  resultBuffer->Clear();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										16
									
								
								remux.h
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								remux.h
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: remux.h 1.12 2004/10/15 12:31:16 kls Exp $
 | 
			
		||||
 * $Id: remux.h 1.13 2005/01/16 13:15:17 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __REMUX_H
 | 
			
		||||
@@ -21,23 +21,31 @@
 | 
			
		||||
#define P_FRAME    2
 | 
			
		||||
#define B_FRAME    3
 | 
			
		||||
 | 
			
		||||
#define MAXTRACKS 64
 | 
			
		||||
 | 
			
		||||
class cTS2PES;
 | 
			
		||||
 | 
			
		||||
class cRemux {
 | 
			
		||||
private:
 | 
			
		||||
  bool exitOnFailure;
 | 
			
		||||
  bool isRadio;
 | 
			
		||||
  int numUPTerrors;
 | 
			
		||||
  bool synced;
 | 
			
		||||
  int skipped;
 | 
			
		||||
  int vPid, aPid1, aPid2, dPid1, dPid2;
 | 
			
		||||
  cTS2PES *vTS2PES, *aTS2PES1, *aTS2PES2, *dTS2PES1, *dTS2PES2;
 | 
			
		||||
  cTS2PES *ts2pes[MAXTRACKS];
 | 
			
		||||
  int numTracks;
 | 
			
		||||
  cRingBufferLinear *resultBuffer;
 | 
			
		||||
  int resultSkipped;
 | 
			
		||||
  int GetPid(const uchar *Data);
 | 
			
		||||
  int GetPacketLength(const uchar *Data, int Count, int Offset);
 | 
			
		||||
  int ScanVideoPacket(const uchar *Data, int Count, int Offset, uchar &PictureType);
 | 
			
		||||
public:
 | 
			
		||||
  cRemux(int VPid, int APid1, int APid2, int DPid1, int DPid2, bool ExitOnFailure = false);
 | 
			
		||||
  cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure = false);
 | 
			
		||||
       ///< Creates a new remuxer for the given PIDs. VPid is the video PID, while
 | 
			
		||||
       ///< APids, DPids and SPids are pointers to zero terminated lists of audio,
 | 
			
		||||
       ///< dolby and subtitle PIDs (the pointers may be NULL if there is no such
 | 
			
		||||
       ///< PID). If ExitOnFailure is true, the remuxer will initiate an "emergency
 | 
			
		||||
       ///< exit" in case of problems with the data stream.
 | 
			
		||||
  ~cRemux();
 | 
			
		||||
  int Put(const uchar *Data, int Count);
 | 
			
		||||
       ///< Puts at most Count bytes of Data into the remuxer.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								skins.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								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.3 2004/11/07 09:46:46 kls Exp $
 | 
			
		||||
 * $Id: skins.c 1.4 2005/01/14 13:07:19 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "skins.h"
 | 
			
		||||
@@ -130,6 +130,7 @@ cSkin::cSkin(const char *Name, cTheme *Theme)
 | 
			
		||||
  if (theme)
 | 
			
		||||
     cThemes::Save(name, theme);
 | 
			
		||||
  Skins.Add(this);
 | 
			
		||||
  Skins.SetCurrent(Name);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cSkin::~cSkin()
 | 
			
		||||
@@ -172,6 +173,8 @@ eKeys cSkins::Message(eMessageType Type, const char *s, int Seconds)
 | 
			
		||||
    case mtError: esyslog("ERROR: %s", s); break;
 | 
			
		||||
    default: ;
 | 
			
		||||
    }
 | 
			
		||||
  if (!Current())
 | 
			
		||||
     return kNone;
 | 
			
		||||
  if (!cSkinDisplay::Current() && !displayMessage)
 | 
			
		||||
     displayMessage = Current()->DisplayMessage();
 | 
			
		||||
  cSkinDisplay::Current()->SetMessage(Type, s);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								thread.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								thread.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: thread.c 1.40 2004/12/19 10:43:14 kls Exp $
 | 
			
		||||
 * $Id: thread.c 1.41 2005/01/14 13:59:48 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "thread.h"
 | 
			
		||||
@@ -36,7 +36,7 @@ cCondWait::~cCondWait()
 | 
			
		||||
void cCondWait::SleepMs(int TimeoutMs)
 | 
			
		||||
{
 | 
			
		||||
  cCondWait w;
 | 
			
		||||
  w.Wait(TimeoutMs);
 | 
			
		||||
  w.Wait(max(TimeoutMs, 3)); // making sure the time is >2ms to avoid a possible busy wait
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool cCondWait::Wait(int TimeoutMs)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								thread.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								thread.h
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: thread.h 1.26 2004/12/19 10:43:10 kls Exp $
 | 
			
		||||
 * $Id: thread.h 1.27 2005/01/14 14:02:14 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __THREAD_H
 | 
			
		||||
@@ -26,6 +26,8 @@ public:
 | 
			
		||||
       ///< Creates a cCondWait object and uses it to sleep for TimeoutMs
 | 
			
		||||
       ///< milliseconds, immediately giving up the calling thread's time
 | 
			
		||||
       ///< slice and thus avoiding a "busy wait".
 | 
			
		||||
       ///< In order to avoid a possible busy wait, TimeoutMs will be automatically
 | 
			
		||||
       ///< limited to values >2.
 | 
			
		||||
  bool Wait(int TimeoutMs = 0);
 | 
			
		||||
       ///< Waits at most TimeoutMs milliseconds for a call to Signal(), or
 | 
			
		||||
       ///< forever if TimeoutMs is 0.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										26
									
								
								tools.c
									
									
									
									
									
								
							
							
						
						
									
										26
									
								
								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.87 2005/01/04 11:06:45 kls Exp $
 | 
			
		||||
 * $Id: tools.c 1.88 2005/01/16 11:47:44 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "tools.h"
 | 
			
		||||
@@ -65,6 +65,30 @@ void writechar(int filedes, char c)
 | 
			
		||||
  safe_write(filedes, &c, sizeof(c));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int WriteAllOrNothing(int fd, const uchar *Data, int Length, int TimeoutMs, int RetryMs)
 | 
			
		||||
{
 | 
			
		||||
  int written = 0;
 | 
			
		||||
  while (Length > 0) {
 | 
			
		||||
        int w = write(fd, Data + written, Length);
 | 
			
		||||
        if (w > 0) {
 | 
			
		||||
           Length -= w;
 | 
			
		||||
           written += w;
 | 
			
		||||
           }
 | 
			
		||||
        else if (written > 0 && !FATALERRNO) {
 | 
			
		||||
           // we've started writing, so we must finish it!
 | 
			
		||||
           cTimeMs t;
 | 
			
		||||
           cPoller Poller(fd, true);
 | 
			
		||||
           Poller.Poll(RetryMs);
 | 
			
		||||
           if (TimeoutMs > 0 && (TimeoutMs -= t.Elapsed()) <= 0)
 | 
			
		||||
              break;
 | 
			
		||||
           }
 | 
			
		||||
        else
 | 
			
		||||
           // nothing written yet (or fatal error), so we can just return the error code:
 | 
			
		||||
           return w;
 | 
			
		||||
        }
 | 
			
		||||
  return written;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
char *strcpyrealloc(char *dest, const char *src)
 | 
			
		||||
{
 | 
			
		||||
  if (src) {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								tools.h
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								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.64 2005/01/04 11:09:51 kls Exp $
 | 
			
		||||
 * $Id: tools.h 1.65 2005/01/16 11:39:58 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __TOOLS_H
 | 
			
		||||
@@ -71,6 +71,10 @@ public:
 | 
			
		||||
ssize_t safe_read(int filedes, void *buffer, size_t size);
 | 
			
		||||
ssize_t safe_write(int filedes, const void *buffer, size_t size);
 | 
			
		||||
void writechar(int filedes, char c);
 | 
			
		||||
int WriteAllOrNothing(int fd, const uchar *Data, int Length, int TimeoutMs = 0, int RetryMs = 0);
 | 
			
		||||
    ///< Writes either all Data to the given file descriptor, or nothing at all.
 | 
			
		||||
    ///< If TimeoutMs is greater than 0, it will only retry for that long, otherwise
 | 
			
		||||
    ///< it will retry forever. RetryMs defines the time between two retries.
 | 
			
		||||
char *strcpyrealloc(char *dest, const char *src);
 | 
			
		||||
char *strn0cpy(char *dest, const char *src, size_t n);
 | 
			
		||||
char *strreplace(char *s, char c1, char c2);
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								transfer.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								transfer.c
									
									
									
									
									
								
							@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: transfer.c 1.22 2005/01/07 15:44:30 kls Exp $
 | 
			
		||||
 * $Id: transfer.c 1.25 2005/01/23 14:27:40 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include "transfer.h"
 | 
			
		||||
@@ -14,13 +14,13 @@
 | 
			
		||||
 | 
			
		||||
// --- cTransfer -------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
cTransfer::cTransfer(int VPid, int APid1, int APid2, int DPid1, int DPid2)
 | 
			
		||||
:cReceiver(0, -1, 5, VPid, APid1, APid2, DPid1, DPid2)
 | 
			
		||||
cTransfer::cTransfer(int VPid, const int *APids, const int *DPids, const int *SPids)
 | 
			
		||||
:cReceiver(0, -1, VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids)
 | 
			
		||||
,cThread("transfer")
 | 
			
		||||
{
 | 
			
		||||
  ringBuffer = new cRingBufferLinear(TRANSFERBUFSIZE, TS_SIZE * 2, true, "Transfer");
 | 
			
		||||
  remux = new cRemux(VPid, APid1, APid2, DPid1, DPid2);
 | 
			
		||||
  needsBufferReserve = VPid != 0 && DPid1 != 0;
 | 
			
		||||
  remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids);
 | 
			
		||||
  needsBufferReserve = Setup.UseDolbyDigital && VPid != 0 && DPids && DPids[0] != 0;
 | 
			
		||||
  active = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -80,7 +80,7 @@ void cTransfer::Action(void)
 | 
			
		||||
           //XXX To resolve this, the remuxer or PlayPes() should synchronize
 | 
			
		||||
           //XXX audio with the video frames. 2004/09/09 Werner
 | 
			
		||||
           if (!GotBufferReserve) {
 | 
			
		||||
              if (ringBuffer->Available() < 3 * MAXFRAMESIZE / 2) {
 | 
			
		||||
              if (ringBuffer->Available() < 3 * KILOBYTE(192) / 2) { // used to be MAXFRAMESIZE, but the HDTV value of KILOBYTE(512) is way too much here
 | 
			
		||||
                 cCondWait::SleepMs(20); // allow the buffer to collect some reserve
 | 
			
		||||
                 continue;
 | 
			
		||||
                 }
 | 
			
		||||
@@ -100,6 +100,7 @@ void cTransfer::Action(void)
 | 
			
		||||
              dsyslog("clearing transfer buffer to avoid overflows");
 | 
			
		||||
              ringBuffer->Clear();
 | 
			
		||||
              remux->Clear();
 | 
			
		||||
              PlayPes(NULL, 0);
 | 
			
		||||
              p = NULL;
 | 
			
		||||
              continue;
 | 
			
		||||
              }
 | 
			
		||||
@@ -143,8 +144,8 @@ void cTransfer::Action(void)
 | 
			
		||||
 | 
			
		||||
cDevice *cTransferControl::receiverDevice = NULL;
 | 
			
		||||
 | 
			
		||||
cTransferControl::cTransferControl(cDevice *ReceiverDevice, int VPid, int APid1, int APid2, int DPid1, int DPid2)
 | 
			
		||||
:cControl(transfer = new cTransfer(VPid, APid1, APid2, DPid1, DPid2), true)
 | 
			
		||||
cTransferControl::cTransferControl(cDevice *ReceiverDevice, int VPid, const int *APids, const int *DPids, const int *SPids)
 | 
			
		||||
:cControl(transfer = new cTransfer(VPid, APids, DPids, SPids), true)
 | 
			
		||||
{
 | 
			
		||||
  ReceiverDevice->AttachReceiver(transfer);
 | 
			
		||||
  receiverDevice = ReceiverDevice;
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
 * See the main source file 'vdr.c' for copyright information and
 | 
			
		||||
 * how to reach the author.
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: transfer.h 1.8 2005/01/07 15:44:32 kls Exp $
 | 
			
		||||
 * $Id: transfer.h 1.9 2005/01/15 16:39:39 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#ifndef __TRANSFER_H
 | 
			
		||||
@@ -27,7 +27,7 @@ protected:
 | 
			
		||||
  virtual void Receive(uchar *Data, int Length);
 | 
			
		||||
  virtual void Action(void);
 | 
			
		||||
public:
 | 
			
		||||
  cTransfer(int VPid, int APid1, int APid2, int DPid1, int DPid2);
 | 
			
		||||
  cTransfer(int VPid, const int *APids, const int *DPids, const int *SPids);
 | 
			
		||||
  virtual ~cTransfer();
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
@@ -36,7 +36,7 @@ private:
 | 
			
		||||
  cTransfer *transfer;
 | 
			
		||||
  static cDevice *receiverDevice;
 | 
			
		||||
public:
 | 
			
		||||
  cTransferControl(cDevice *ReceiverDevice, int VPid, int APid1, int APid2, int DPid1, int DPid2);
 | 
			
		||||
  cTransferControl(cDevice *ReceiverDevice, int VPid, const int *APids, const int *DPids, const int *SPids);
 | 
			
		||||
  ~cTransferControl();
 | 
			
		||||
  virtual void Hide(void) {}
 | 
			
		||||
  static cDevice *ReceiverDevice(void) { return receiverDevice; }
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								vdr.5
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								vdr.5
									
									
									
									
									
								
							@@ -8,7 +8,7 @@
 | 
			
		||||
.\" License as specified in the file COPYING that comes with the
 | 
			
		||||
.\" vdr distribution.
 | 
			
		||||
.\"
 | 
			
		||||
.\" $Id: vdr.5 1.32 2005/01/09 13:16:40 kls Exp $
 | 
			
		||||
.\" $Id: vdr.5 1.34 2005/01/23 14:16:12 kls Exp $
 | 
			
		||||
.\"
 | 
			
		||||
.TH vdr 5 "19 Dec 2004" "1.3.18" "Video Disk Recorder Files"
 | 
			
		||||
.SH NAME
 | 
			
		||||
@@ -559,8 +559,10 @@ The files \fI001.vdr\fR...\fI255.vdr\fR are the actual recorded MPEG data
 | 
			
		||||
files. In order to keep the size of an individual file below a given limit,
 | 
			
		||||
a recording is split into several files. The contents of these files is
 | 
			
		||||
\fBPacketized Elementary Stream\fR (PES) and contains ES packets with ids
 | 
			
		||||
0xE0 for video, 0xC0 for audio 1 and 0xC1 for audio 2 (if available).
 | 
			
		||||
Dolby Digital data is stored in packets with ids 0xBD.
 | 
			
		||||
0xE0...0xEF for video (only one of these may actually occur in a file),
 | 
			
		||||
0xC0...0xDF for audio 1...32 (up to 32 audio tracks may occur).
 | 
			
		||||
Dolby Digital data is stored in packets with ids 0xBD ("Private Stream 1")
 | 
			
		||||
and substream ids 0x80...0x87.
 | 
			
		||||
.SS INDEX
 | 
			
		||||
The file \fIindex.vdr\fR (if present in a recording directory) contains
 | 
			
		||||
the (binary) index data into each of the the recording files
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								vdr.c
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								vdr.c
									
									
									
									
									
								
							@@ -22,7 +22,7 @@
 | 
			
		||||
 *
 | 
			
		||||
 * The project's page is at http://www.cadsoft.de/vdr
 | 
			
		||||
 *
 | 
			
		||||
 * $Id: vdr.c 1.198 2005/01/06 14:36:40 kls Exp $
 | 
			
		||||
 * $Id: vdr.c 1.200 2005/01/14 16:50:39 kls Exp $
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
#include <getopt.h>
 | 
			
		||||
@@ -412,7 +412,10 @@ int main(int argc, char *argv[])
 | 
			
		||||
        }
 | 
			
		||||
     else if (*EpgDataFileName != '/' && *EpgDataFileName != '.')
 | 
			
		||||
        EpgDirectory = VideoDirectory;
 | 
			
		||||
     cSchedules::SetEpgDataFileName(AddDirectory(EpgDirectory, EpgDataFileName));
 | 
			
		||||
     if (EpgDirectory)
 | 
			
		||||
        cSchedules::SetEpgDataFileName(AddDirectory(EpgDirectory, EpgDataFileName));
 | 
			
		||||
     else
 | 
			
		||||
        cSchedules::SetEpgDataFileName(EpgDataFileName);
 | 
			
		||||
     cSchedules::Read();
 | 
			
		||||
     }
 | 
			
		||||
 | 
			
		||||
@@ -460,15 +463,20 @@ int main(int argc, char *argv[])
 | 
			
		||||
 | 
			
		||||
  Interface = new cInterface(SVDRPport);
 | 
			
		||||
 | 
			
		||||
  // Default skins:
 | 
			
		||||
 | 
			
		||||
  new cSkinClassic;
 | 
			
		||||
  new cSkinSTTNG;
 | 
			
		||||
  Skins.SetCurrent(Setup.OSDSkin);
 | 
			
		||||
  cThemes::Load(Skins.Current()->Name(), Setup.OSDTheme, Skins.Current()->Theme());
 | 
			
		||||
 | 
			
		||||
  // Start plugins:
 | 
			
		||||
 | 
			
		||||
  if (!PluginManager.StartPlugins())
 | 
			
		||||
     EXIT(2);
 | 
			
		||||
 | 
			
		||||
  // Skins:
 | 
			
		||||
  // Set skin and theme in case they're implemented by a plugin:
 | 
			
		||||
 | 
			
		||||
  new cSkinClassic;
 | 
			
		||||
  new cSkinSTTNG;
 | 
			
		||||
  Skins.SetCurrent(Setup.OSDSkin);
 | 
			
		||||
  cThemes::Load(Skins.Current()->Name(), Setup.OSDTheme, Skins.Current()->Theme());
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user