summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-02-13 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2005-02-13 18:00:00 +0100
commitdbacda8274e2d76b0ea42f90b94353b672fa9343 (patch)
treed3ae7234a22dddafc04d95893bc2b2f1c2898472
parent4d477cd144c8df2b3791b60f15337448292066fe (diff)
downloadvdr-patch-lnbsharing-vdr-1.3.21.tar.gz
vdr-patch-lnbsharing-vdr-1.3.21.tar.bz2
Version 1.3.21vdr-1.3.21
- Fixed cDvbDevice::SetAudioTrackDevice() to avoid a blank screen after switching back to live mode if a recording is currently active on the primary device. - Fixed a possible freeze in pause mode in case a device's PlayPesPacket() function permanently returns 0 (thanks to Reinhard Nissl and Olaf Titz). - Completed the Finnish OSD texts (thanks to Rolf Ahrenberg). - Restricted the "setting audio track" log message to automatic changes during replay. - Fixed handling Transfer Mode for radio channels (thanks to Andreas Regel for reporting this one). - Fixed handling symbolic links in cRecordings::ScanVideoDir() (thanks to Stefan Huelswitt). - Completed the Danish OSD texts (thanks to Mogens Elneff). - Forcing a new resync after a call to cRemux::Clear() (suggested by Marco Schlüßler). - The cAudio::Play() function now has an additional parameter 'uchar Id' which tells the function the substream id of the given audio packet, so that a plugin can take the right action for the various kinds if audio data - which now also includes "normal" audio with ids 0xC0...0xDF (based on suggestions by Werner Fink and Macro Schlüßler). - Removed the "Cleared/PlayPes(NULL, 0)" handling from cTransfer::Action(), since this is now done when attaching the player to the device (thanks to Marco Schlüßler). - Making sure the buffer reserve in cTransfer::Action() is re-established after clearing the buffer. - Added DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer (thanks to Marco Schlüßler). - Fixed a typo in detecting UTF-8 (thanks to Reinhard Nissl). - Now using twice the buffer reserve in cTransfer if the primary DVB card is an unmodified version with only 2MB of SDRAM, to avoid audio stuttering when playing Dolby Digital over the DVB card (thanks to Christian Jacobsen and Chad Flynt for suggestions and experiments in that area). - Making sure the first audio packet is not dropped when switching to "pre 1.3.19 Dolby Digital compatibility mode". - The 'plugins-clean' target of the Makefile now only deletes the actual plugin library files from this version of VDR (suggested by Andreas Brachold). - Added a missing 'resultSkipped = 0' to cRemux::Clear() (thanks to Marco Schlüßler for reporting this one). - The new function cDvbDevice::SetTransferModeForDolbyDigital() can be used by plugins that implement Dolby Digital output and thus want to prevent the cDvbDevice from starting Transfer Mode in order to replay DD over the DVB device. - Added missing reset of the 'repacker' to cTS2PES::Clear() (thanks to Marco Schlüßler for reporting this one).
-rw-r--r--CONTRIBUTORS23
-rw-r--r--HISTORY42
-rw-r--r--INSTALL2
-rw-r--r--Makefile10
-rw-r--r--PLUGINS.html41
-rw-r--r--audio.c35
-rw-r--r--audio.h23
-rw-r--r--channels.conf10
-rw-r--r--config.h6
-rw-r--r--device.c23
-rw-r--r--dvbdevice.c20
-rw-r--r--dvbdevice.h5
-rw-r--r--dvbosd.c9
-rw-r--r--i18n.c6
-rw-r--r--player.h4
-rw-r--r--recording.c7
-rw-r--r--remux.c10
-rw-r--r--tools.h4
-rw-r--r--transfer.c38
-rw-r--r--vdr.c6
20 files changed, 219 insertions, 105 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 0c29e35..94258a4 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -192,6 +192,7 @@ Stefan Huelswitt <huels@iname.com>
for fixing a possible race condition in cDevice::Action() and cTSBuffer::Action()
for reporting several memory leaks that were introduced through the use of cString
for adding MPEG1 replay capability to cPesAssembler
+ for fixing handling symbolic links in cRecordings::ScanVideoDir()
Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than 27500
@@ -272,6 +273,7 @@ Werner Fink <werner@suse.de>
recordings can be triggered in the default branch
for pointing out that pesAssembler->Reset() needs to be called between subsequent
Transfer Modes
+ for suggestions that led to the addition of the 'Id' parameter to cAudio::Play().
Rolf Hakenes <hakenes@hippomi.de>
for providing 'libdtv' and adapting the EIT mechanisms to it
@@ -789,10 +791,12 @@ Christoph Friederich <christoph.friederich@gmx.de>
for reporting a bug in deleting the last recording in the "Recordings" menu, which
started pausing live video
-Andreas Brachold <andy03@deltab.de>
+Andreas Brachold <vdr04@deltab.de>
for his support in keeping 'channels.conf.terr' up to date
for fixing 'newplugin' and libsi/Makefile to use the compiler defined in $(CXX)
for generating file dependencies
+ for suggesting that the 'plugins-clean' target of the Makefile should only delete
+ the actual plugin library files from this version of VDR
Manuel Hartl <icecep@gmx.net>
for suggesting to extend the logging info when starting/stopping timers
@@ -805,6 +809,7 @@ 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
for reporting a problem in case a station defines all 32 audio PIDs
+ for suggestions and experiments regarding the buffer reserve in cTransfer
Andreas Mair <Andreas.Mair@linogate.com>
for reporting a short display of the main menu if a plugin displays its own OSD and
@@ -925,6 +930,9 @@ Reinhard Nissl <rnissl@gmx.de>
for extending some buffer sizes to allow handling HDTV streams
for adding substream handling to cDolbyRepacker
for modifying cDolbyRepacker to make sure PES packets don't exceed the requested length
+ for fixing a possible freeze in pause mode in case a device's PlayPesPacket()
+ function permanently returns 0
+ for fixing a typo in detecting UTF-8
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the
@@ -1042,6 +1050,7 @@ Andreas Regel <andreas.regel@gmx.de>
video directory is empty
for pointing out a missing call to cStatus::MsgOsdtatusMessage(NULL) in
cSkins::Message()
+ for reporting a problem in handling Transfer Mode for radio channels
Thomas Bergwinkl <Thomas.Bergwinkl@t-online.de>
for fixing the validity check for channel IDs, because some providers use TIDs
@@ -1131,6 +1140,13 @@ Marco Schlüßler <marco@lordzodiac.de>
for pointing out that PlayPes(NULL, 0) needs to be called in cTransfer::Action()
when clearing the transfer buffer to avoid overflows
for adding CMD_SPU_CHG_COLCON to cDvbSpuDecoder::setTime()
+ for suggesting to force a new resync after a call to cRemux::Clear()
+ for suggestions that led to the addition of the 'Id' parameter to cAudio::Play().
+ for removing the "Cleared/PlayPes(NULL, 0)" handling from cTransfer::Action(), since
+ this is now done when attaching the player to the device
+ for adding DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer
+ for reporting a missing 'resultSkipped = 0' in cRemux::Clear()
+ for reporting a missing reset of the 'repacker' in cTS2PES::Clear()
Jürgen Schmitz <j.schmitz@web.de>
for reporting a bug in displaying the current channel when switching via the SVDRP
@@ -1215,6 +1231,8 @@ Dino Ravnic <dino.ravnic@fer.hr>
Olaf Titz <olaf@bigred.inka.de>
for fixing some typos in the Makefile's 'font' target
+ for reporting a problem and some advice in fixing a possible freeze in pause mode
+ in case a device's PlayPesPacket() function permanently returns 0
Darren Salt <linux@youmustbejoking.demon.co.uk>
for pointing out that the '-' and 'ö' characters need to be escaped in the man
@@ -1250,3 +1268,6 @@ Rolf Groppe <rolf@groppe.de>
Wolfgang Rohdewald <wolfgang@rohdewald.de>
for pointing out that primaryDevice = NULL should be done before deleting the devices
in cDevice::Shutdown()
+
+Chad Flynt <hoochster@sofnet.com>
+ for suggestions and experiments regarding the buffer reserve in cTransfer
diff --git a/HISTORY b/HISTORY
index 2beb808..41b36eb 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3373,3 +3373,45 @@ Video Disk Recorder Revision History
residual data in replay and Transfer Mode (thanks to Werner Fink for pointing this
out).
- Added MPEG1 replay capability to cPesAssembler (thanks to Stefan Huelswitt).
+
+2005-02-13: Version 1.3.21
+
+- Fixed cDvbDevice::SetAudioTrackDevice() to avoid a blank screen after switching
+ back to live mode if a recording is currently active on the primary device.
+- Fixed a possible freeze in pause mode in case a device's PlayPesPacket() function
+ permanently returns 0 (thanks to Reinhard Nissl and Olaf Titz).
+- Completed the Finnish OSD texts (thanks to Rolf Ahrenberg).
+- Restricted the "setting audio track" log message to automatic changes during replay.
+- Fixed handling Transfer Mode for radio channels (thanks to Andreas Regel for
+ reporting this one).
+- Fixed handling symbolic links in cRecordings::ScanVideoDir() (thanks to Stefan
+ Huelswitt).
+- Completed the Danish OSD texts (thanks to Mogens Elneff).
+- Forcing a new resync after a call to cRemux::Clear() (suggested by Marco Schlüßler).
+- The cAudio::Play() function now has an additional parameter 'uchar Id' which tells
+ the function the substream id of the given audio packet, so that a plugin can
+ take the right action for the various kinds if audio data - which now also includes
+ "normal" audio with ids 0xC0...0xDF (based on suggestions by Werner Fink and Macro
+ Schlüßler).
+- Removed the "Cleared/PlayPes(NULL, 0)" handling from cTransfer::Action(), since this
+ is now done when attaching the player to the device (thanks to Marco Schlüßler).
+- Making sure the buffer reserve in cTransfer::Action() is re-established after
+ clearing the buffer.
+- Added DeviceClrAvailableTracks() and DeviceSetCurrentAudioTrack() to cPlayer
+ (thanks to Marco Schlüßler).
+- Fixed a typo in detecting UTF-8 (thanks to Reinhard Nissl).
+- Now using twice the buffer reserve in cTransfer if the primary DVB card is an
+ unmodified version with only 2MB of SDRAM, to avoid audio stuttering when
+ playing Dolby Digital over the DVB card (thanks to Christian Jacobsen and Chad
+ Flynt for suggestions and experiments in that area).
+- Making sure the first audio packet is not dropped when switching to "pre 1.3.19
+ Dolby Digital compatibility mode".
+- The 'plugins-clean' target of the Makefile now only deletes the actual plugin
+ library files from this version of VDR (suggested by Andreas Brachold).
+- Added a missing 'resultSkipped = 0' to cRemux::Clear() (thanks to Marco Schlüßler
+ for reporting this one).
+- The new function cDvbDevice::SetTransferModeForDolbyDigital() can be used by
+ plugins that implement Dolby Digital output and thus want to prevent the cDvbDevice
+ from starting Transfer Mode in order to replay DD over the DVB device.
+- Added missing reset of the 'repacker' to cTS2PES::Clear() (thanks to Marco
+ Schlüßler for reporting this one).
diff --git a/INSTALL b/INSTALL
index f054d7a..df57170 100644
--- a/INSTALL
+++ b/INSTALL
@@ -268,7 +268,7 @@ name you use with '-v' is a clean and absolute path name (no '..' or
multiple slashes).
Note that the file system need not be 64-bit proof, since the 'vdr'
-program splits video files into chunks of about 1GB. You should use
+program splits video files into chunks of about 2GB. You should use
a disk with several gigabytes of free space. One GB can store roughly
half an hour of video data.
diff --git a/Makefile b/Makefile
index f70a2e9..59e7e78 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
-# $Id: Makefile 1.73 2004/12/18 13:39:19 kls Exp $
+# $Id: Makefile 1.74 2005/02/13 10:13:45 kls Exp $
.DELETE_ON_ERROR:
@@ -71,6 +71,10 @@ DEFINES += -D_GNU_SOURCE
DEFINES += -DVIDEODIR=\"$(VIDEODIR)\"
DEFINES += -DPLUGINDIR=\"$(PLUGINLIBDIR)\"
+# The version number of VDR (taken from VDR's "config.h"):
+
+VDRVERSION = $(shell grep 'define VDRVERSION ' config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+
ifdef VFAT
# for people who want their video directory on a VFAT partition
DEFINES += -DVFAT
@@ -166,7 +170,7 @@ plugins: include-dir
plugins-clean:
@for i in `ls $(PLUGINDIR)/src | grep -v '[^a-z0-9]'`; do $(MAKE) -C "$(PLUGINDIR)/src/$$i" clean; done
- @-rm -f $(PLUGINLIBDIR)/*
+ @-rm -f $(PLUGINLIBDIR)/libvdr-*.so.$(VDRVERSION)
# Install the files:
@@ -183,7 +187,7 @@ install:
srcdoc:
@cp $(DOXYFILE) $(DOXYFILE).tmp
- @echo PROJECT_NUMBER = `grep VDRVERSION config.h | awk '{ print $$3 }'` >> $(DOXYFILE).tmp
+ @echo PROJECT_NUMBER = $(VDRVERSION) >> $(DOXYFILE).tmp
$(DOXYGEN) $(DOXYFILE).tmp
@rm $(DOXYFILE).tmp
diff --git a/PLUGINS.html b/PLUGINS.html
index df6d0fa..67b96d9 100644
--- a/PLUGINS.html
+++ b/PLUGINS.html
@@ -14,18 +14,18 @@ Copyright &copy; 2004 Klaus Schmidinger<br>
<a href="http://www.cadsoft.de/vdr">www.cadsoft.de/vdr</a>
</center>
<p>
-<!--X1.3.8--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</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=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.3.18--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</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=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.3.19--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.3.19 are marked like this.
<!--X1.3.19--></td></tr></table>
-<!--X1.3.20--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.3.20--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.3.20 are marked like this.
<!--X1.3.20--></td></tr></table>
+<!--X1.3.21--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+Important modifications introduced in version 1.3.21 are marked like this.
+<!--X1.3.21--></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.
@@ -58,7 +58,7 @@ structures and allows it to hook itself into specific areas to perform special a
<li><a href="#Command line arguments">Command line arguments</a>
<li><a href="#Command line help">Command line help</a>
<li><a href="#Getting started">Getting started</a>
-<!--X1.3.20--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.3.20--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<li><a href="#Shutting down">Shutting down</a>
<!--X1.3.20--></td></tr></table>
<li><a href="#Main menu entry">Main menu entry</a>
@@ -81,7 +81,9 @@ structures and allows it to hook itself into specific areas to perform special a
<li><a href="#Skins">Skins</a>
<li><a href="#Themes">Themes</a>
<li><a href="#Devices">Devices</a>
-<li><a href="#Dolby Digital">Dolby Digital</a>
+<!--X1.3.21--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<li><a href="#Audio">Audio</a>
+<!--X1.3.21--></td></tr></table>
<li><a href="#Remote Control">Remote Control</a>
</ul>
</ul>
@@ -306,7 +308,7 @@ since VDR, for instance, has to create the plugin objects in order to get their
command line help - and after that immediately destroys them again.
<p>
The <b>destructor</b> has to clean up any data created by the plugin.
-<!--X1.3.20--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.3.20--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
Any threads the plugin may have created shall be stopped in the
<a href="#Shutting down"><tt>Stop()</tt></a> function.
<!--X1.3.20--></td></tr></table>
@@ -504,7 +506,7 @@ VDR to exit.
If the plugin doesn't implement any background functionality or internationalized
texts, it doesn't need to implement either of these functions.
-<!--X1.3.20--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+<!--X1.3.20--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<a name="Shutting down"><hr><h2>Shutting down</h2>
<center><i><b>Stop it, right there!</b></i></center><p>
@@ -1044,7 +1046,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=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.3.18--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
To play the actual data, the player needs to call its member function
<p><table><tr><td bgcolor=#F0F0F0><pre>
@@ -1067,7 +1069,7 @@ bool DevicePoll(cPoller &amp;Poller, int TimeoutMs = 0);
to determine whether the device is ready for further data.
<p>
-<!--X1.3.18--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.3.18--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</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
@@ -1204,7 +1206,7 @@ public:
};
cMyReceiver::cMyReceiver(int Pid)
-<!--X1.3.19--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
+<!--X1.3.19--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
:cReceiver(0, -1, Pid)
<!--X1.3.19--></td></tr></table>
{
@@ -1382,7 +1384,7 @@ public:
virtual cSkinDisplayMenu *DisplayMenu(void);
virtual cSkinDisplayReplay *DisplayReplay(bool ModeOnly);
virtual cSkinDisplayVolume *DisplayVolume(void);
-<!--X1.3.18--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.3.18--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
virtual cSkinDisplayMessage *DisplayTrack(int NumTracks, const char * const *Tracks);
<!--X1.3.18--></td></tr></table>
virtual cSkinDisplayMessage *DisplayMessage(void);
@@ -1404,7 +1406,6 @@ 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=#0000AA>&nbsp;</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
@@ -1414,8 +1415,6 @@ skinxyz
where <tt>xyz</tt> is the actual name of the skin.
-<!--X1.3.8--></td></tr></table>
-
<a name="Themes"><hr><h2>Themes</h2>
<center><i><b>Eye of the beholder...</b></i></center><p>
@@ -1514,7 +1513,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=#00AA00>&nbsp;</td><td width=100%>
+<!--X1.3.18--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
<p><table><tr><td bgcolor=#F0F0F0><pre>
virtual void SetAudioTrackDevice(eTrackType Type);
virtual int GetAudioChannelDevice(void);
@@ -1659,7 +1658,7 @@ shut down (delete) all devices when the program terminates. It is therefore
important that the devices are created on the heap, using the <tt>new</tt>
operator!
-<a name="Dolby Digital"><hr><h2>Dolby Digital</h2>
+<a name="Audio"><hr><h2>Audio</h2>
<center><i><b>"The stereo effect may only be experienced if stereo equipment is used!"</b></i></center><p>
@@ -1679,7 +1678,9 @@ private:
virtual void Action(void);
public:
cMyAudio(void);
- virtual void Play(const uchar *Data, int Length);
+<!--X1.3.21--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
+ virtual void Play(const uchar *Data, int Length, uchar Id);
+<!--X1.3.21--></td></tr></table>
virtual void Mute(bool On);
virtual void Clear(void);
};
diff --git a/audio.c b/audio.c
index c958256..742c50b 100644
--- a/audio.c
+++ b/audio.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: audio.c 1.2 2002/11/03 11:53:34 kls Exp $
+ * $Id: audio.c 1.3 2005/02/12 12:40:51 kls Exp $
*/
#include "audio.h"
@@ -25,10 +25,10 @@ cAudio::~cAudio()
cAudios Audios;
-void cAudios::PlayAudio(const uchar *Data, int Length)
+void cAudios::PlayAudio(const uchar *Data, int Length, uchar Id)
{
for (cAudio *audio = First(); audio; audio = Next(audio))
- audio->Play(Data, Length);
+ audio->Play(Data, Length, Id);
}
void cAudios::MuteAudio(bool On)
@@ -56,25 +56,24 @@ cExternalAudio::~cExternalAudio()
free(command);
}
-void cExternalAudio::Play(const uchar *Data, int Length)
+void cExternalAudio::Play(const uchar *Data, int Length, uchar Id)
{
if (command && !mute) {
if (pipe || pipe.Open(command, "w")) {
- if (Data[0] == 0x00 && Data[1] == 0x00 && Data[2] == 0x01) {
- if (Data[3] == 0xBD) { // dolby
- //XXX??? int written = Data[8] + (skipAC3bytes ? 13 : 9); // skips the PES header
- int written = Data[8] + 9; // skips the PES header
- Length -= written;
- while (Length > 0) {
- int w = fwrite(Data + written, 1, Length, pipe);
- if (w < 0) {
- LOG_ERROR;
- break;
- }
- Length -= w;
- written += w;
+ if (0x80 <= Id && Id <= 0x87 || Id == 0xBD) { // AC3
+ int written = Data[8] + 9; // skips the PES header
+ if (Id != 0xBD)
+ written += 4; // skips AC3 bytes
+ Length -= written;
+ while (Length > 0) {
+ int w = fwrite(Data + written, 1, Length, pipe);
+ if (w < 0) {
+ LOG_ERROR;
+ break;
}
- }
+ Length -= w;
+ written += w;
+ }
}
}
else {
diff --git a/audio.h b/audio.h
index 565bd97..03ec01d 100644
--- a/audio.h
+++ b/audio.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: audio.h 1.2 2002/11/03 11:50:02 kls Exp $
+ * $Id: audio.h 1.3 2005/02/12 12:20:19 kls Exp $
*/
#ifndef __AUDIO_H
@@ -18,21 +18,22 @@ protected:
cAudio(void);
public:
virtual ~cAudio();
- virtual void Play(const uchar *Data, int Length) = 0;
- // Plays the given block of audio Data. Must return as soon as possible.
- // If the entire block of data can't be processed immediately, it must
- // be copied and processed in a separate thread. The Data is always a
- // complete PES audio packet.
+ virtual void Play(const uchar *Data, int Length, uchar Id) = 0;
+ ///< Plays the given block of audio Data. Must return as soon as possible.
+ ///< If the entire block of data can't be processed immediately, it must
+ ///< be copied and processed in a separate thread. The Data is always a
+ ///< complete PES audio packet. Id indicates the type of audio data this
+ ///< packet holds.
virtual void Mute(bool On) = 0;
- // Immediately sets the audio device to be silent (On==true) or to
- // normal replay (On==false).
+ ///< Immediately sets the audio device to be silent (On==true) or to
+ ///< normal replay (On==false).
virtual void Clear(void) = 0;
- // Clears all data that might still be awaiting processing.
+ ///< Clears all data that might still be awaiting processing.
};
class cAudios : public cList<cAudio> {
public:
- void PlayAudio(const uchar *Data, int Length);
+ void PlayAudio(const uchar *Data, int Length, uchar Id);
void MuteAudio(bool On);
void ClearAudio(void);
};
@@ -47,7 +48,7 @@ private:
public:
cExternalAudio(const char *Command);
virtual ~cExternalAudio();
- virtual void Play(const uchar *Data, int Length);
+ virtual void Play(const uchar *Data, int Length, uchar Id);
virtual void Mute(bool On);
virtual void Clear(void);
};
diff --git a/channels.conf b/channels.conf
index 836e3be..d05e252 100644
--- a/channels.conf
+++ b/channels.conf
@@ -45,21 +45,21 @@ rbb Berlin;ARD:12109:hC34:S19.2E:27500:601:602=deu:604:0:28206:1:1073:0
:Premiere World
PREMIERE START,START;PREMIERE:11797:hC34:S19.2E:27500:255:256=deu:32:1702,1801,1722:8:133:2:0
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 2,PREM 2;PREMIERE:11797:hC34:S19.2E:27500:1791:1792=deu,1793=deu;1795=deu:32:1702,1722,1801: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,769=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 5,PREM 5;PREMIERE:11797:hC34:S19.2E:27500:1279:1280=deu,1281=deu:32:1722,1702,1801: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:1801,1722,1702:34:133:17:0
+DISNEY CHANNEL,DISNEY;PREMIERE:11758:hC34:S19.2E:27500:2559:2560=deu:0:1722,1702,1801:34:133:17:0
:Premiere Direkt
PREMIERE DIREKT,DIREKT;PREMIERE:12031:hC34:S19.2E:27500:2815:2816=deu,2817=deu;2819=deu:0:0:18:133:4:0
:PW Erotic
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
-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
+Konferenz:11719:hC34:S19.2E:27500:255:256=deu,257=deu:32:1702,1801,1722:17:133:3:0
+PREMIERE SPORT 2,SPORT 2;PREMIERE:12031:hC34:S19.2E:27500:3839:3840=deu,3841=deu:32:1722,1702,1801: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
diff --git a/config.h b/config.h
index 64ebe7c..7dffe14 100644
--- a/config.h
+++ b/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.212 2005/02/05 10:43:22 kls Exp $
+ * $Id: config.h 1.213 2005/02/08 11:22:14 kls Exp $
*/
#ifndef __CONFIG_H
@@ -20,8 +20,8 @@
#include "i18n.h"
#include "tools.h"
-#define VDRVERSION "1.3.20"
-#define VDRVERSNUM 10320 // Version * 10000 + Major * 100 + Minor
+#define VDRVERSION "1.3.21"
+#define VDRVERSNUM 10321 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99
#define MAXLIFETIME 99
diff --git a/device.c b/device.c
index 46e23bc..f270b5a 100644
--- a/device.c
+++ b/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.87 2005/02/06 14:10:37 kls Exp $
+ * $Id: device.c 1.92 2005/02/13 09:51:48 kls Exp $
*/
#include "device.h"
@@ -756,7 +756,8 @@ void cDevice::EnsureAudioTrack(bool Force)
// Make sure we're set to an available audio track:
const tTrackId *Track = GetTrack(GetCurrentAudioTrack());
if (Force || !Track || !Track->id || PreferredTrack != GetCurrentAudioTrack()) {
- dsyslog("setting audio track to %d", PreferredTrack);
+ if (!Force) // only log this for automatic changes
+ dsyslog("setting audio track to %d", PreferredTrack);
SetCurrentAudioTrack(PreferredTrack);
}
}
@@ -882,8 +883,11 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
break;
case 0xC0 ... 0xDF: // audio
SetAvailableTrack(ttAudio, c - 0xC0, c);
- if (!VideoOnly && c == availableTracks[currentAudioTrack].id)
+ if (!VideoOnly && c == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
+ if (FirstLoop)
+ Audios.PlayAudio(Data, Length, c);
+ }
break;
case 0xBD: { // private stream 1
int PayloadOffset = Data[8] + 9;
@@ -892,6 +896,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
uchar SubStreamIndex = SubStreamId & 0x1F;
// Compatibility mode for old VDR recordings, where 0xBD was only AC3:
+pre_1_3_19_PrivateStreamDeteced:
if (pre_1_3_19_PrivateStream) {
SubStreamId = c;
SubStreamType = 0x80;
@@ -907,15 +912,18 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
SetAvailableTrack(ttDolby, SubStreamIndex, SubStreamId);
if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
- if (FirstLoop && !(SubStreamId & 0x08)) // no DTS
- Audios.PlayAudio(Data, Length);
+ if (FirstLoop)
+ Audios.PlayAudio(Data, Length, SubStreamId);
}
}
break;
case 0xA0: // LPCM
SetAvailableTrack(ttAudio, SubStreamIndex, SubStreamId);
- if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id)
+ if (!VideoOnly && SubStreamId == availableTracks[currentAudioTrack].id) {
w = PlayAudio(Start, d);
+ if (FirstLoop)
+ Audios.PlayAudio(Data, Length, SubStreamId);
+ }
break;
default:
// Compatibility mode for old VDR recordings, where 0xBD was only AC3:
@@ -923,6 +931,7 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly)
dsyslog("switching to pre 1.3.19 Dolby Digital compatibility mode");
ClrAvailableTracks();
pre_1_3_19_PrivateStream = true;
+ goto pre_1_3_19_PrivateStreamDeteced;
}
}
}
@@ -984,7 +993,7 @@ int cDevice::PlayPes(const uchar *Data, int Length, bool VideoOnly)
int w = PlayPesPacket(Data + i, l, VideoOnly);
if (w > 0)
i += l;
- else if (w < 0)
+ else
return i == 0 ? w : i;
}
else
diff --git a/dvbdevice.c b/dvbdevice.c
index 269c0a2..741848a 100644
--- a/dvbdevice.c
+++ b/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.117 2005/02/06 12:30:14 kls Exp $
+ * $Id: dvbdevice.c 1.120 2005/02/13 14:26:37 kls Exp $
*/
#include "dvbdevice.h"
@@ -346,6 +346,7 @@ void cDvbTuner::Action(void)
// --- cDvbDevice ------------------------------------------------------------
int cDvbDevice::devVideoOffset = -1;
+bool cDvbDevice::setTransferModeForDolbyDigital = true;
cDvbDevice::cDvbDevice(int n)
{
@@ -768,8 +769,8 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
);
bool StartTransferMode = IsPrimaryDevice() && !IsEncrypted && !DoTune
- && (LiveView && HasPid(Channel->Vpid()) && pidHandles[ptVideo].pid != Channel->Vpid() // the PID is already set as DMX_PES_OTHER
- || !LiveView && pidHandles[ptVideo].pid == Channel->Vpid() // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
+ && (LiveView && HasPid(Channel->Vpid() ? Channel->Vpid() : Channel->Apid(0)) && (pidHandles[ptVideo].pid != Channel->Vpid() || pidHandles[ptAudio].pid != Channel->Apid(0))// the PID is already set as DMX_PES_OTHER
+ || !LiveView && (pidHandles[ptVideo].pid == Channel->Vpid() || pidHandles[ptAudio].pid == Channel->Apid(0)) // a recording is going to shift the PIDs from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
);
bool TurnOnLivePIDs = HasDecoder() && !StartTransferMode
@@ -861,15 +862,24 @@ void cDvbDevice::SetDigitalAudioDevice(bool On)
}
}
+void cDvbDevice::SetTransferModeForDolbyDigital(bool On)
+{
+ setTransferModeForDolbyDigital = On;
+}
+
void cDvbDevice::SetAudioTrackDevice(eTrackType Type)
{
const tTrackId *TrackId = GetTrack(Type);
if (TrackId && TrackId->id) {
if (IS_AUDIO_TRACK(Type)) {
- pidHandles[ptAudio].pid = TrackId->id;
- SetPid(&pidHandles[ptAudio], ptAudio, true);
+ if (pidHandles[ptAudio].pid) {
+ pidHandles[ptAudio].pid = TrackId->id;
+ SetPid(&pidHandles[ptAudio], ptAudio, true);
+ }
}
else if (IS_DOLBY_TRACK(Type)) {
+ if (!setTransferModeForDolbyDigital)
+ return;
// Currently this works only in Transfer Mode
cChannel *Channel = Channels.GetByNumber(CurrentChannel());
if (Channel)
diff --git a/dvbdevice.h b/dvbdevice.h
index 233515d..99456e7 100644
--- a/dvbdevice.h
+++ b/dvbdevice.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.h 1.32 2005/01/06 13:30:51 kls Exp $
+ * $Id: dvbdevice.h 1.33 2005/02/13 14:14:31 kls Exp $
*/
#ifndef __DVBDEVICE_H
@@ -99,11 +99,14 @@ protected:
private:
bool digitalAudio;
+ static bool setTransferModeForDolbyDigital;
protected:
virtual int GetAudioChannelDevice(void);
virtual void SetAudioChannelDevice(int AudioChannel);
virtual void SetVolumeDevice(int Volume);
virtual void SetDigitalAudioDevice(bool On);
+public:
+ static void SetTransferModeForDolbyDigital(bool On);
// Player facilities
diff --git a/dvbosd.c b/dvbosd.c
index fbf6f61..360825f 100644
--- a/dvbosd.c
+++ b/dvbosd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbosd.c 1.25 2004/11/20 14:29:25 kls Exp $
+ * $Id: dvbosd.c 1.26 2005/02/12 15:36:31 kls Exp $
*/
#include "dvbosd.h"
@@ -48,6 +48,13 @@ cDvbOsd::cDvbOsd(int Left, int Top, int OsdDev)
cap.cmd = OSD_CAP_MEMSIZE;
if (ioctl(osdDev, OSD_GET_CAPABILITY, &cap) == 0)
osdMem = cap.val;
+ #define FW_NEEDS_BUFFER_RESERVE_FOR_AC3
+ #ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
+ //XXX This is a very ugly hack to allow cDvbOsd to reduce the buffer
+ //XXX requirements in cTransfer if it detects a 4MB full featured DVB card.
+ extern bool DvbCardWith4MBofSDRAM;
+ DvbCardWith4MBofSDRAM = osdMem >= 1000000;
+ #endif
#endif
// must clear all windows here to avoid flashing effects - doesn't work if done
// in Flush() only for the windows that are actually used...
diff --git a/i18n.c b/i18n.c
index b6c8800..9d7417c 100644
--- a/i18n.c
+++ b/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.175 2005/02/05 10:46:30 kls Exp $
+ * $Id: i18n.c 1.177 2005/02/12 10:26:51 kls Exp $
*
* Translations provided by:
*
@@ -2829,6 +2829,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO
"Durée affichage infos chaînes (s)",
"",// TODO
+ "Kanavatiedon esitysaika (s)",
"",// TODO
"",// TODO
"",// TODO
@@ -2839,8 +2840,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO
"",// TODO
"",// TODO
- "",// TODO
- "",// TODO
+ "Tid kanalinfo skal vises (s)",
},
{ "Setup.OSD$Info on channel switch",
"Info beim Kanalwechsel",
diff --git a/player.h b/player.h
index 3ffc7e3..6b08178 100644
--- a/player.h
+++ b/player.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: player.h 1.15 2005/02/06 11:44:56 kls Exp $
+ * $Id: player.h 1.16 2005/02/12 14:45:29 kls Exp $
*/
#ifndef __PLAYER_H
@@ -19,7 +19,9 @@ private:
cDevice *device;
ePlayMode playMode;
protected:
+ void DeviceClrAvailableTracks(bool DescriptionsOnly = false) { if (device) device->ClrAvailableTracks(DescriptionsOnly); }
bool DeviceSetAvailableTrack(eTrackType Type, int Index, uint16_t Id, const char *Language = NULL, const char *Description = NULL) { return device ? device->SetAvailableTrack(Type, Index, Id, Language, Description) : false; }
+ bool DeviceSetCurrentAudioTrack(eTrackType Type) { return device ? device->SetCurrentAudioTrack(Type) : false; }
bool DevicePoll(cPoller &Poller, int TimeoutMs = 0) { return device ? device->Poll(Poller, TimeoutMs) : false; }
bool DeviceFlush(int TimeoutMs = 0) { return device ? device->Flush(TimeoutMs) : true; }
void DeviceTrickSpeed(int Speed) { if (device) device->TrickSpeed(Speed); }
diff --git a/recording.c b/recording.c
index c6460f2..e50dfcb 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.95 2005/02/06 09:46:31 kls Exp $
+ * $Id: recording.c 1.96 2005/02/12 10:17:47 kls Exp $
*/
#include "recording.h"
@@ -637,8 +637,9 @@ void cRecordings::ScanVideoDir(const char *DirName)
struct stat st;
if (stat(buffer, &st) == 0) {
if (S_ISLNK(st.st_mode)) {
- free(buffer);
- buffer = ReadLink(buffer);
+ char *old = buffer;
+ buffer = ReadLink(old);
+ free(old);
if (!buffer)
continue;
if (stat(buffer, &st) != 0) {
diff --git a/remux.c b/remux.c
index 49bd898..ca65a61 100644
--- a/remux.c
+++ b/remux.c
@@ -11,7 +11,7 @@
* 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.28 2005/02/05 11:56:42 kls Exp $
+ * $Id: remux.c 1.31 2005/02/13 14:36:23 kls Exp $
*/
#include "remux.h"
@@ -29,6 +29,7 @@ protected:
public:
cRepacker(void) { maxPacketSize = 6 + 65535; subStreamId = 0; }
virtual ~cRepacker() {}
+ virtual void Reset(void) {}
virtual int Put(cRingBufferLinear *ResultBuffer, const uchar *Data, int Count) = 0;
virtual int BreakAt(const uchar *Data, int Count) = 0;
void SetMaxPacketSize(int MaxPacketSize) { maxPacketSize = MaxPacketSize; }
@@ -56,13 +57,13 @@ private:
get_length,
output_packet
} state;
- void Reset(void);
void ResetPesHeader(void);
void AppendSubStreamID(void);
bool FinishRemainder(cRingBufferLinear *ResultBuffer, const uchar *const Data, const int Todo, int &Done, int &Bite);
bool StartNewPacket(cRingBufferLinear *ResultBuffer, const uchar *const Data, const int Todo, int &Done, int &Bite);
public:
cDolbyRepacker(void);
+ virtual void Reset(void);
virtual int Put(cRingBufferLinear *ResultBuffer, const uchar *Data, int Count);
virtual int BreakAt(const uchar *Data, int Count);
};
@@ -474,6 +475,8 @@ cTS2PES::~cTS2PES()
void cTS2PES::Clear(void)
{
reset_ipack();
+ if (repacker)
+ repacker->Reset();
}
void cTS2PES::store(uint8_t *Data, int Count)
@@ -1007,6 +1010,9 @@ void cRemux::Clear(void)
for (int t = 0; t < numTracks; t++)
ts2pes[t]->Clear();
resultBuffer->Clear();
+ synced = false;
+ skipped = 0;
+ resultSkipped = 0;
}
void cRemux::SetBrokenLink(uchar *Data, int Length)
diff --git a/tools.h b/tools.h
index bf19089..be8782b 100644
--- a/tools.h
+++ b/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.66 2005/02/05 10:00:22 kls Exp $
+ * $Id: tools.h 1.67 2005/02/12 10:17:14 kls Exp $
*/
#ifndef __TOOLS_H
@@ -95,7 +95,7 @@ bool DirectoryOk(const char *DirName, bool LogErrors = false);
bool MakeDirs(const char *FileName, bool IsDirectory = false);
bool RemoveFileOrDir(const char *FileName, bool FollowSymlinks = false);
bool RemoveEmptyDirectories(const char *DirName, bool RemoveThis = false);
-char *ReadLink(const char *FileName);
+char *ReadLink(const char *FileName); ///< returns a new strings allocated on the heap, which the caller must delete (or NULL in case of an error)
bool SpinUpDisk(const char *FileName);
time_t LastModifiedTime(const char *FileName);
cString WeekDayName(int WeekDay);
diff --git a/transfer.c b/transfer.c
index b3cbec4..331ac62 100644
--- a/transfer.c
+++ b/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.25 2005/01/23 14:27:40 kls Exp $
+ * $Id: transfer.c 1.27 2005/02/12 15:54:06 kls Exp $
*/
#include "transfer.h"
@@ -54,24 +54,26 @@ void cTransfer::Receive(uchar *Data, int Length)
}
}
+#define FW_NEEDS_BUFFER_RESERVE_FOR_AC3
+#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
+//XXX This is a very ugly hack to allow cDvbOsd to reduce the buffer
+//XXX requirements in cTransfer if it detects a 4MB full featured DVB card.
+bool DvbCardWith4MBofSDRAM = false;
+#endif
+
void cTransfer::Action(void)
{
int PollTimeouts = 0;
uchar *p = NULL;
int Result = 0;
-#define FW_NEEDS_BUFFER_RESERVE_FOR_AC3
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
- bool Cleared = false;
bool GotBufferReserve = false;
+ int RequiredBufferReserve = KILOBYTE(DvbCardWith4MBofSDRAM ? 288 : 576);
#endif
active = true;
while (active) {
#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
- if (needsBufferReserve) {
- if (IsAttached() && !Cleared) {
- PlayPes(NULL, 0);
- Cleared = true;
- }
+ if (needsBufferReserve && !GotBufferReserve) {
//XXX For dolby we've to fill the buffer because the firmware does
//XXX not decode dolby but use a PCM stream for transport, therefore
//XXX the firmware has not enough buffer for noiseless skipping early
@@ -79,14 +81,12 @@ void cTransfer::Action(void)
//XXX audio is mostly to early in comparison to video).
//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 * 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;
- }
- else
- GotBufferReserve = true;
+ if (ringBuffer->Available() < RequiredBufferReserve) { // 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;
}
+ else
+ GotBufferReserve = true;
}
#endif
int Count;
@@ -98,10 +98,14 @@ void cTransfer::Action(void)
// So let's clear the buffer instead of suffering from permanent
// overflows.
dsyslog("clearing transfer buffer to avoid overflows");
+ DeviceClear();
ringBuffer->Clear();
remux->Clear();
PlayPes(NULL, 0);
p = NULL;
+#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
+ GotBufferReserve = false;
+#endif
continue;
}
Count = remux->Put(b, Count);
@@ -132,7 +136,11 @@ void cTransfer::Action(void)
DeviceClear();
ringBuffer->Clear();
remux->Clear();
+ PlayPes(NULL, 0);
p = NULL;
+#ifdef FW_NEEDS_BUFFER_RESERVE_FOR_AC3
+ GotBufferReserve = false;
+#endif
}
}
}
diff --git a/vdr.c b/vdr.c
index 6b2ac37..15aff94 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/vdr
*
- * $Id: vdr.c 1.201 2005/01/30 14:15:50 kls Exp $
+ * $Id: vdr.c 1.202 2005/02/12 15:06:16 kls Exp $
*/
#include <getopt.h>
@@ -100,8 +100,8 @@ int main(int argc, char *argv[])
// Check for UTF-8 and exit if present - asprintf() will fail if it encounters 8 bit ASCII codes
char *LangEnv;
- if ((LangEnv = getenv("LANG")) != NULL && strcasestr(LangEnv, "utf") ||
- (LangEnv = getenv("LC_TYPE")) != NULL && strcasestr(LangEnv, "utf")) {
+ if ((LangEnv = getenv("LANG")) != NULL && strcasestr(LangEnv, "utf") ||
+ (LangEnv = getenv("LC_CTYPE")) != NULL && strcasestr(LangEnv, "utf")) {
fprintf(stderr, "vdr: please turn off UTF-8 before starting VDR\n");
return 2;
}