Version 1.1.33

- Modified handling of audio packets in cDvbPlayer for better sync with external
  AC3 replay (thanks to Werner Fink).
- Fixed a memory leak in cNonBlockingFileReader (thanks to Stefan Huelswitt).
- Completed the French OSD texts (thanks to Gregoire Favre).
- Completed the Finnish OSD texts (thanks to Niko Tarnanen and Rolf Ahrenberg).
- Fixed I/O handling in case an explicit controlling terminal is given (thanks
  to Oliver Endriss).
- Fixed resume file handling in case the resume.vdr file can't be written
  (thanks to Gerhard Steiner).
- Fixed cutting a recording if there is only a single editing mark (thanks to
  Ralf Klueber for reporting this one).
- Fixed volume display in case a plugin has its own OSD open (thanks to Marcel
  Wiesweg).
- Fixed channel switching in the EPG scanner on single device systems.
- Completed the Swedish OSD texts (thanks to Tomas Prybil).
- Now switching to the channel used by the most recently started timer in case
  the original current channel becomes unavailable due to a recording on a
  different transponder. If this fails, a channel up/down switch is attempted as
  a fallback solution (thanks to Lauri Tischler for reporting this one, and to
  Hermann Gausterer for suggesting to switch to the recording channel).
- Fixed cReplayControl::Show() to avoid a compiler warning in g++ 3.2.3 (thanks
  to Jan Ekholm for reporting this one).
- Completed the Slovenian OSD texts (thanks to Matjaz Thaler).
- Changed the DEFAULTPRIORITY in device.c to -1, so that the primary device
  will be used for FTA recordings in case the CAM is connected to a non-primary
  device (thanks to Reinhard Walter Buchner for reporting this one).
- The cCiHandler now closes its file handle when it gets destroyed.
- Checking for duplicate recordings with the same file name and disabling the
  second timer (thanks to Peter Bieringer for reporting this one).
- Fixed handling newly created timers in case they are not confirmed with "Ok"
  (thanks to Gerhard Steiner for reporting this one).
- It is now possible to directly delete a timer that is currently recording
  (thanks to Alexander Damhuis for reporting this one).
This commit is contained in:
Klaus Schmidinger 2003-05-25 18:00:00 +02:00
parent 3bd9a7ccf3
commit 8ab980e1d9
17 changed files with 457 additions and 346 deletions

View File

@ -172,6 +172,7 @@ Stefan Huelswitt <huels@iname.com>
for implementing setting the "broken link" flag for GOPs at the beginning of a new for implementing setting the "broken link" flag for GOPs at the beginning of a new
video sequence, which avoids artefacts when cutting video sequence, which avoids artefacts when cutting
for suggesting to add VDRVERSNUM to config.h for suggesting to add VDRVERSNUM to config.h
for fixing a memory leak in cNonBlockingFileReader
Ulrich Röder <roeder@efr-net.de> Ulrich Röder <roeder@efr-net.de>
for pointing out that there are channels that have a symbol rate higher than for pointing out that there are channels that have a symbol rate higher than
@ -236,6 +237,8 @@ Werner Fink <werner@suse.de>
for improving keyboard detection for improving keyboard detection
for adding some missing cAudio handling calls for adding some missing cAudio handling calls
for replacing the 'for' loops in StripAudioPackets() with memset() calls for replacing the 'for' loops in StripAudioPackets() with memset() calls
for modifying handling of audio packets in cDvbPlayer for better sync with external
AC3 replay
Rolf Hakenes <hakenes@hippomi.de> Rolf Hakenes <hakenes@hippomi.de>
for providing 'libdtv' and adapting the EIT mechanisms to it for providing 'libdtv' and adapting the EIT mechanisms to it
@ -409,6 +412,7 @@ Rudi Hofer (Rudi.Hofer@cadsoft.de)
Gregoire Favre <greg@ulima.unil.ch> Gregoire Favre <greg@ulima.unil.ch>
for fixing some function headers to make them compile with gcc 3.x for fixing some function headers to make them compile with gcc 3.x
for reporting a bug in taking an active SVDRP connection into account when doing shutdown for reporting a bug in taking an active SVDRP connection into account when doing shutdown
for translating OSD texts to the French language
Sven Grothklags <sven@uni-paderborn.de> Sven Grothklags <sven@uni-paderborn.de>
for fixing the cutting mechanism to make it re-sync in case a frame is larger for fixing the cutting mechanism to make it re-sync in case a frame is larger
@ -471,15 +475,20 @@ Oliver Endriss <o.endriss@gmx.de>
for reporting a problem with cPlugin::Start() being called after trying to learn for reporting a problem with cPlugin::Start() being called after trying to learn
the remote control keys the remote control keys
for reporting a bug in reading 'epg.data' for channels with non-zero RID for reporting a bug in reading 'epg.data' for channels with non-zero RID
for fixing I/O handling in case an explicit controlling terminal is given
Reinhard Walter Buchner <rw.buchner@freenet.de> Reinhard Walter Buchner <rw.buchner@freenet.de>
for adding some satellites to 'sources.conf' for adding some satellites to 'sources.conf'
for his help in testing tuning with "Motor-DiSEqC" for his help in testing tuning with "Motor-DiSEqC"
for his help in debugging CAM support for his help in debugging CAM support
for reporting a problem with recording FTA channels on the CAM device in case
the CAM is not connected to the primary device
Lauri Tischler <lauri.tischler@efore.fi> Lauri Tischler <lauri.tischler@efore.fi>
for helping to test and debug the new channel source and DiSEqC handling for helping to test and debug the new channel source and DiSEqC handling
for reporting a faulty parameter initialization in menu.c for reporting a faulty parameter initialization in menu.c
for reporting a problem in case the original current channel becomes
unavailable due to a recording on a different transponder
Andy Carter <fruit@ukgateway.net> Andy Carter <fruit@ukgateway.net>
for helping to test new DVB-T handling for helping to test new DVB-T handling
@ -501,6 +510,9 @@ Gerhard Steiner <steiner@mail.austria.com>
records as a newline character records as a newline character
for reporting a bug in displaying messages in the status line in case they exceed for reporting a bug in displaying messages in the status line in case they exceed
the OSD width the OSD width
for fixing resume file handling in case the resume.vdr file can't be written
for reporting a problem with newly created timers in case they are not confirmed
with "Ok"
Jaakko Hyvätti <jaakko@hyvatti.iki.fi> Jaakko Hyvätti <jaakko@hyvatti.iki.fi>
for translating OSD texts to the Finnish language for translating OSD texts to the Finnish language
@ -573,12 +585,14 @@ Teemu Rantanen <tvr@iki.fi>
Jan Ekholm <chakie@infa.abo.fi> Jan Ekholm <chakie@infa.abo.fi>
for adding/improving some Swedish language OSD texts for adding/improving some Swedish language OSD texts
for reporting a compiler warning in g++ 3.2.3 regarding cReplayControl::Show()
Marcel Wiesweg <marcel.wiesweg@gmx.de> Marcel Wiesweg <marcel.wiesweg@gmx.de>
for pointing out a problem with high CPU load during replay for pointing out a problem with high CPU load during replay
for reporting broken support for raw OSDs of plugins for reporting broken support for raw OSDs of plugins
for reporting a problem with cReceivers that want to receive from PIDs that are for reporting a problem with cReceivers that want to receive from PIDs that are
currently not transmitting currently not transmitting
for fixing volume display in case a plugin has its own OSD open
Torsten Herz <torsten.herz@web.de> Torsten Herz <torsten.herz@web.de>
for fixing a possible deadlock when using the "Blue" button in the "Schedules" menu for fixing a possible deadlock when using the "Blue" button in the "Schedules" menu
@ -669,3 +683,19 @@ Marc Rovira Vall <tm05462@salleURL.edu> and Ramon Roca <ramon.roca@xcombo.com>
Lars Bläser <LBlaeser@hofheim.de> Lars Bläser <LBlaeser@hofheim.de>
for reporting a bug in EPG bugfix statistics which made log entires for undefined for reporting a bug in EPG bugfix statistics which made log entires for undefined
channels channels
Niko Tarnanen <niko.tarnanen@hut.fi> and Rolf Ahrenberg <rahrenbe@cc.hut.fi>
for translating OSD texts to the Finnish language
Ralf Klueber <ralf.klueber@vodafone.com>
for reporting a bug in cutting a recording if there is only a single editing mark
Hermann Gausterer <mrq1@gmx.net>
for suggesting to switch to the recording channel in case the current channel
becomes unavailable
Peter Bieringer <pb@bieringer.de>
for reporting a problem with duplicate recordings with the same file name
Alexander Damhuis <ad@phonedation.de>
for reporting problems when deleting a timer that is currently recording

36
HISTORY
View File

@ -2172,3 +2172,39 @@ Video Disk Recorder Revision History
to Lars Bläser for reporting this one). to Lars Bläser for reporting this one).
- No longer waiting inside cIndexFile::CatchUp() to avoid shortly blocking replay - No longer waiting inside cIndexFile::CatchUp() to avoid shortly blocking replay
at the end of a recording. at the end of a recording.
2003-05-25: Version 1.1.33
- Modified handling of audio packets in cDvbPlayer for better sync with external
AC3 replay (thanks to Werner Fink).
- Fixed a memory leak in cNonBlockingFileReader (thanks to Stefan Huelswitt).
- Completed the French OSD texts (thanks to Gregoire Favre).
- Completed the Finnish OSD texts (thanks to Niko Tarnanen and Rolf Ahrenberg).
- Fixed I/O handling in case an explicit controlling terminal is given (thanks
to Oliver Endriss).
- Fixed resume file handling in case the resume.vdr file can't be written
(thanks to Gerhard Steiner).
- Fixed cutting a recording if there is only a single editing mark (thanks to
Ralf Klueber for reporting this one).
- Fixed volume display in case a plugin has its own OSD open (thanks to Marcel
Wiesweg).
- Fixed channel switching in the EPG scanner on single device systems.
- Completed the Swedish OSD texts (thanks to Tomas Prybil).
- Now switching to the channel used by the most recently started timer in case
the original current channel becomes unavailable due to a recording on a
different transponder. If this fails, a channel up/down switch is attempted as
a fallback solution (thanks to Lauri Tischler for reporting this one, and to
Hermann Gausterer for suggesting to switch to the recording channel).
- Fixed cReplayControl::Show() to avoid a compiler warning in g++ 3.2.3 (thanks
to Jan Ekholm for reporting this one).
- Completed the Slovenian OSD texts (thanks to Matjaz Thaler).
- Changed the DEFAULTPRIORITY in device.c to -1, so that the primary device
will be used for FTA recordings in case the CAM is connected to a non-primary
device (thanks to Reinhard Walter Buchner for reporting this one).
- The cCiHandler now closes its file handle when it gets destroyed.
- Checking for duplicate recordings with the same file name and disabling the
second timer (thanks to Peter Bieringer for reporting this one).
- Fixed handling newly created timers in case they are not confirmed with "Ok"
(thanks to Gerhard Steiner for reporting this one).
- It is now possible to directly delete a timer that is currently recording
(thanks to Alexander Damhuis for reporting this one).

View File

@ -20,19 +20,6 @@ The <i>external</i> interface handles everything necessary for a plugin to get h
VDR program and present itself to the user. VDR program and present itself to the user.
The <i>internal</i> interface provides the plugin code access to VDR's internal data The <i>internal</i> interface provides the plugin code access to VDR's internal data
structures and allows it to hook itself into specific areas to perform special actions. structures and allows it to hook itself into specific areas to perform special actions.
<p>
<!--X1.1.17--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.17 are marked like this.
<!--X1.1.17--></td></tr></table>
<!--X1.1.27--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.27 are marked like this.
<!--X1.1.27--></td></tr></table>
<!--X1.1.31--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.31 are marked like this.
<!--X1.1.31--></td></tr></table>
<!--X1.1.32--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
Important modifications introduced in version 1.1.32 are marked like this.
<!--X1.1.32--></td></tr></table>
<hr> <hr>
<h1>Table Of Contents</h1> <h1>Table Of Contents</h1>
@ -284,10 +271,8 @@ The <b>constructor</b> shall initialize any member variables the plugin defines,
<b>must not access any global structures of VDR</b>. <b>must not access any global structures of VDR</b>.
It also must not create any threads or other large data structures. These things It also must not create any threads or other large data structures. These things
are done in the are done in the
<!--X1.1.31--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<a href="#Getting started"><tt>Initialize()</tt></a> or <a href="#Getting started"><tt>Initialize()</tt></a> or
<a href="#Getting started"><tt>Start()</tt></a> <a href="#Getting started"><tt>Start()</tt></a>
<!--X1.1.31--></td></tr></table>
function later. function later.
Constructing a plugin object shall not have any side effects or produce any output, Constructing a plugin object shall not have any side effects or produce any output,
since VDR, for instance, has to create the plugin objects in order to get their since VDR, for instance, has to create the plugin objects in order to get their
@ -460,26 +445,20 @@ thread of its own), or wants to make use of <a href="#Internationalization">inte
it needs to implement one of the functions it needs to implement one of the functions
<p><table><tr><td bgcolor=#F0F0F0><pre><br> <p><table><tr><td bgcolor=#F0F0F0><pre><br>
<!--X1.1.31--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%><pre>
virtual bool Initialize(void); virtual bool Initialize(void);
<!--X1.1.31--></pre></td></tr></table>
virtual bool Start(void); virtual bool Start(void);
</pre></td></tr></table><p> </pre></td></tr></table><p>
which are called once for each plugin at program startup. which are called once for each plugin at program startup.
<!--X1.1.31--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
<!--X1.1.32--><table width=100%><tr><td bgcolor=#FF0000>&nbsp;</td><td width=100%>
The difference between these two functions is that <tt>Initialize()</tt> is The difference between these two functions is that <tt>Initialize()</tt> is
called early at program startup, while <tt>Start()</tt> is called after the primary called early at program startup, while <tt>Start()</tt> is called after the primary
device and user interface has been set up, but before the main program loop is entered. device and user interface has been set up, but before the main program loop is entered.
<!--X1.1.32--></td></tr></table>
Inside the <tt>Start()</tt> function of any plugin it is guaranteed that the <tt>Initialize()</tt> Inside the <tt>Start()</tt> function of any plugin it is guaranteed that the <tt>Initialize()</tt>
functions of all plugins have already been called. For many plugins it probably functions of all plugins have already been called. For many plugins it probably
doesn't matter which of these functions they implement, but it may be of importance doesn't matter which of these functions they implement, but it may be of importance
for, e.g., plugins that implement devices. Such plugins should create their cDevice for, e.g., plugins that implement devices. Such plugins should create their cDevice
derived objects in <tt>Initialize()</tt>, so that other plugins can use them in their derived objects in <tt>Initialize()</tt>, so that other plugins can use them in their
<tt>Start()</tt> functions. <tt>Start()</tt> functions.
<!--X1.1.31--></td></tr></table>
<p> <p>
Inside this function the plugin must set up everything necessary to perform Inside this function the plugin must set up everything necessary to perform
its task. This may, for instance, be a thread that collects data from the DVB its task. This may, for instance, be a thread that collects data from the DVB
@ -529,7 +508,6 @@ in the call to VDR.
If the user selects the main menu entry of a plugin, VDR calls the function If the user selects the main menu entry of a plugin, VDR calls the function
<!--X1.1.17--><table width=100%><tr><td bgcolor=#0000AA>&nbsp;</td><td width=100%>
<p><table><tr><td bgcolor=#F0F0F0><pre><br> <p><table><tr><td bgcolor=#F0F0F0><pre><br>
virtual cOsdObject *MainMenuAction(void); virtual cOsdObject *MainMenuAction(void);
</pre></td></tr></table><p> </pre></td></tr></table><p>
@ -550,7 +528,6 @@ which can do one of three things:
<li>Perform a specific action and return <tt>NULL</tt>. In that case the main menu <li>Perform a specific action and return <tt>NULL</tt>. In that case the main menu
will be closed after calling <tt>MainMenuAction()</tt>. will be closed after calling <tt>MainMenuAction()</tt>.
</ul> </ul>
<!--X1.1.17--></td></tr></table>
<b> <b>
It is very important that a call to <tt>MainMenuAction()</tt> returns as soon It is very important that a call to <tt>MainMenuAction()</tt> returns as soon
as possible! As long as the program stays inside this function, no other user as possible! As long as the program stays inside this function, no other user
@ -802,6 +779,7 @@ const tI18nPhrase Phrases[] = {
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO "",// TODO
"",// TODO
}, },
{ NULL } { NULL }
}; };
@ -1200,9 +1178,7 @@ a <tt>cDevice</tt>:
<p><table><tr><td bgcolor=#F0F0F0><pre><br> <p><table><tr><td bgcolor=#F0F0F0><pre><br>
cMyReceiver *Receiver = new cMyReceiver(123); cMyReceiver *Receiver = new cMyReceiver(123);
<!--X1.1.31--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
cDevice::ActualDevice()-&gt;AttachReceiver(Receiver); cDevice::ActualDevice()-&gt;AttachReceiver(Receiver);
<!--X1.1.31--></td></tr></table>
</pre></td></tr></table><p> </pre></td></tr></table><p>
Noteh the use of <tt>cDevice::ActualDevice()</tt> here, which makes sure that Noteh the use of <tt>cDevice::ActualDevice()</tt> here, which makes sure that
@ -1372,7 +1348,6 @@ needed.
<p> <p>
<b>Initializing new devices</b> <b>Initializing new devices</b>
<p> <p>
<!--X1.1.31--><table width=100%><tr><td bgcolor=#AA0000>&nbsp;</td><td width=100%>
A derived cDevice class shall implement a static function A derived cDevice class shall implement a static function
in which it determines whether the necessary hardware to run this sort of in which it determines whether the necessary hardware to run this sort of
device is actually present in this machine (or whatever other prerequisites device is actually present in this machine (or whatever other prerequisites
@ -1384,7 +1359,6 @@ A plugin that adds devices to a VDR instance shall call this
function from its <a href="#Getting started"><tt>Initialize()</tt></a> function function from its <a href="#Getting started"><tt>Initialize()</tt></a> function
to make sure other plugins that may need to have access to all available devices to make sure other plugins that may need to have access to all available devices
will see them in their <a href="#Getting started"><tt>Start()</tt></a> function. will see them in their <a href="#Getting started"><tt>Start()</tt></a> function.
<!--X1.1.31--></td></tr></table>
<p> <p>
Nothing needs to be done to shut down the devices. VDR will automatically Nothing needs to be done to shut down the devices. VDR will automatically
shut down (delete) all devices when the program terminates. It is therefore shut down (delete) all devices when the program terminates. It is therefore
@ -1500,7 +1474,6 @@ the incoming data (by calling your <tt>Action()</tt> function).
In case you need to do any other setup steps, like opening a file or initializing In case you need to do any other setup steps, like opening a file or initializing
member variables, you should do so before calling <tt>Start()</tt>. member variables, you should do so before calling <tt>Start()</tt>.
<p> <p>
<!--X1.1.27--><table width=100%><tr><td bgcolor=#00AA00>&nbsp;</td><td width=100%>
If your remote control for some reason can't work (maybe because it was unable to If your remote control for some reason can't work (maybe because it was unable to
open some file handle it requires) it can implement the virtual function open some file handle it requires) it can implement the virtual function
@ -1510,7 +1483,6 @@ virtual bool Ready(void);
and have it return <i>false</i>. In that case VDR will not try to learn keys from and have it return <i>false</i>. In that case VDR will not try to learn keys from
that remote control. that remote control.
<!--X1.1.27--></td></tr></table>
VDR will handle everything necessary to learn the key mappings of your remote VDR will handle everything necessary to learn the key mappings of your remote
control. In order to do so, it will first call the virtual function <tt>Initialize()</tt>, control. In order to do so, it will first call the virtual function <tt>Initialize()</tt>,
in which you should take all necessary steps to make sure your remote control in which you should take all necessary steps to make sure your remote control

4
ci.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: ci.c 1.14 2003/04/20 09:52:45 kls Exp $ * $Id: ci.c 1.15 2003/05/25 11:45:11 kls Exp $
*/ */
/* XXX TODO /* XXX TODO
@ -1287,6 +1287,7 @@ void cCiCaPmt::AddCaDescriptor(int Length, uint8_t *Data)
cCiHandler::cCiHandler(int Fd, int NumSlots) cCiHandler::cCiHandler(int Fd, int NumSlots)
{ {
fd = Fd;
numSlots = NumSlots; numSlots = NumSlots;
newCaSupport = false; newCaSupport = false;
hasUserIO = false; hasUserIO = false;
@ -1301,6 +1302,7 @@ cCiHandler::~cCiHandler()
for (int i = 0; i < MAX_CI_SESSION; i++) for (int i = 0; i < MAX_CI_SESSION; i++)
delete sessions[i]; delete sessions[i];
delete tpl; delete tpl;
close(fd);
} }
cCiHandler *cCiHandler::CreateCiHandler(const char *FileName) cCiHandler *cCiHandler::CreateCiHandler(const char *FileName)

3
ci.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: ci.h 1.7 2003/04/20 09:21:23 kls Exp $ * $Id: ci.h 1.8 2003/05/25 11:44:47 kls Exp $
*/ */
#ifndef __CI_H #ifndef __CI_H
@ -79,6 +79,7 @@ class cCiTransportConnection;
class cCiHandler { class cCiHandler {
private: private:
cMutex mutex; cMutex mutex;
int fd;
int numSlots; int numSlots;
bool newCaSupport; bool newCaSupport;
bool hasUserIO; bool hasUserIO;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: config.h 1.159 2003/05/16 12:27:58 kls Exp $ * $Id: config.h 1.160 2003/05/19 15:27:37 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -19,8 +19,8 @@
#include "device.h" #include "device.h"
#include "tools.h" #include "tools.h"
#define VDRVERSION "1.1.32" #define VDRVERSION "1.1.33"
#define VDRVERSNUM 10132 // Version * 10000 + Major * 100 + Minor #define VDRVERSNUM 10133 // Version * 10000 + Major * 100 + Minor
#define MAXPRIORITY 99 #define MAXPRIORITY 99
#define MAXLIFETIME 99 #define MAXLIFETIME 99

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: cutter.c 1.3 2003/04/26 15:11:17 kls Exp $ * $Id: cutter.c 1.4 2003/05/24 11:59:33 kls Exp $
*/ */
#include "cutter.h" #include "cutter.h"
@ -77,6 +77,7 @@ void cCuttingThread::Action(void)
toMarks.Add(0); toMarks.Add(0);
toMarks.Save(); toMarks.Save();
uchar buffer[MAXFRAMESIZE]; uchar buffer[MAXFRAMESIZE];
bool LastMark = false;
bool cutIn = true; bool cutIn = true;
while (active) { while (active) {
uchar FileNumber; uchar FileNumber;
@ -116,7 +117,7 @@ void cCuttingThread::Action(void)
// Write one frame: // Write one frame:
if (PictureType == I_FRAME) { // every file shall start with an I_FRAME if (PictureType == I_FRAME) { // every file shall start with an I_FRAME
if (!Mark) // edited version shall end before next I-frame if (LastMark) // edited version shall end before next I-frame
break; break;
if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) { if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) {
toFile = toFileName->NextFile(); toFile = toFileName->NextFile();
@ -167,9 +168,8 @@ void cCuttingThread::Action(void)
FileSize = 0; FileSize = 0;
} }
} }
// the 'else' case (i.e. 'final end mark reached') is handled above else
// in 'Write one frame', so that the edited version will end right LastMark = true;
// before the next I-frame.
} }
} }
} }

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: device.c 1.43 2003/05/16 13:26:43 kls Exp $ * $Id: device.c 1.44 2003/05/25 10:57:59 kls Exp $
*/ */
#include "device.h" #include "device.h"
@ -23,7 +23,7 @@
// --- cDevice --------------------------------------------------------------- // --- cDevice ---------------------------------------------------------------
// The default priority for non-primary devices: // The default priority for non-primary devices:
#define DEFAULTPRIORITY -2 #define DEFAULTPRIORITY -1
int cDevice::numDevices = 0; int cDevice::numDevices = 0;
int cDevice::useDevice = 0; int cDevice::useDevice = 0;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: dvbdevice.c 1.59 2003/05/03 14:03:20 kls Exp $ * $Id: dvbdevice.c 1.60 2003/05/24 13:23:51 kls Exp $
*/ */
#include "dvbdevice.h" #include "dvbdevice.h"
@ -27,6 +27,7 @@ extern "C" {
#include "channels.h" #include "channels.h"
#include "diseqc.h" #include "diseqc.h"
#include "dvbosd.h" #include "dvbosd.h"
#include "eitscan.h"
#include "player.h" #include "player.h"
#include "receiver.h" #include "receiver.h"
#include "status.h" #include "status.h"
@ -658,6 +659,11 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
StartTransferMode = false; StartTransferMode = false;
#endif #endif
if (EITScanner.Active()) {
StartTransferMode = false;
TurnOnLivePIDs = false;
}
// Stop SI filtering: // Stop SI filtering:
if (siProcessor) { if (siProcessor) {

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: dvbplayer.c 1.20 2003/04/27 09:55:53 kls Exp $ * $Id: dvbplayer.c 1.22 2003/05/24 09:04:26 kls Exp $
*/ */
#include "dvbplayer.h" #include "dvbplayer.h"
@ -114,6 +114,7 @@ void cNonBlockingFileReader::Clear(void)
{ {
cMutexLock MutexLock(&mutex); cMutexLock MutexLock(&mutex);
f = -1; f = -1;
free(buffer);
buffer = NULL; buffer = NULL;
wanted = length = 0; wanted = length = 0;
hasData = false; hasData = false;
@ -477,8 +478,8 @@ void cDvbPlayer::Action(void)
} }
int r = nonBlockingFileReader->Read(replayFile, b, Length); int r = nonBlockingFileReader->Read(replayFile, b, Length);
if (r > 0) { if (r > 0) {
if (AudioTrack >= 0) if (AudioTrack == 0)
StripAudioPackets(b, r, AudioTrack); StripAudioPackets(b, r);
readFrame = new cFrame(b, -r, ftUnknown, readIndex); // hands over b to the ringBuffer readFrame = new cFrame(b, -r, ftUnknown, readIndex); // hands over b to the ringBuffer
b = NULL; b = NULL;
} }
@ -514,10 +515,14 @@ void cDvbPlayer::Action(void)
if (!p) { if (!p) {
p = playFrame->Data(); p = playFrame->Data();
pc = playFrame->Count(); pc = playFrame->Count();
if (p) {
if (firstPacket) { if (firstPacket) {
cRemux::SetBrokenLink(p, pc); cRemux::SetBrokenLink(p, pc);
firstPacket = false; firstPacket = false;
} }
if (AudioTrack > 0)
StripAudioPackets(p, pc, AudioTrack);
}
} }
if (p) { if (p) {
int w = PlayVideo(p, pc); int w = PlayVideo(p, pc);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: eitscan.c 1.12 2003/03/16 13:29:55 kls Exp $ * $Id: eitscan.c 1.13 2003/05/24 13:34:59 kls Exp $
*/ */
#include "eitscan.h" #include "eitscan.h"
@ -12,6 +12,8 @@
#include "channels.h" #include "channels.h"
#include "dvbdevice.h" #include "dvbdevice.h"
cEITScanner EITScanner;
cEITScanner::cEITScanner(void) cEITScanner::cEITScanner(void)
{ {
lastScan = lastActivity = time(NULL); lastScan = lastActivity = time(NULL);
@ -61,8 +63,9 @@ void cEITScanner::Process(void)
if (Channel) { if (Channel) {
lastChannel[Device->DeviceNumber()] = Channel->Number(); lastChannel[Device->DeviceNumber()] = Channel->Number();
if (Channel->Sid() && Device->ProvidesChannel(Channel) && !TransponderScanned(Channel)) { if (Channel->Sid() && Device->ProvidesChannel(Channel) && !TransponderScanned(Channel)) {
if (Device == cDevice::PrimaryDevice() && !currentChannel) if (Device == cDevice::PrimaryDevice() && !currentChannel) {
currentChannel = Device->CurrentChannel(); currentChannel = Device->CurrentChannel();
}
Device->SwitchChannel(Channel, false); Device->SwitchChannel(Channel, false);
break; break;
} }

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: eitscan.h 1.2 2003/03/16 13:20:40 kls Exp $ * $Id: eitscan.h 1.3 2003/05/24 13:21:36 kls Exp $
*/ */
#ifndef __EITSCAN_H #ifndef __EITSCAN_H
@ -31,4 +31,6 @@ public:
void Process(void); void Process(void);
}; };
extern cEITScanner EITScanner;
#endif //__EITSCAN_H #endif //__EITSCAN_H

534
i18n.c

File diff suppressed because it is too large Load Diff

60
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.c 1.245 2003/05/16 12:40:12 kls Exp $ * $Id: menu.c 1.249 2003/05/25 14:06:17 kls Exp $
*/ */
#include "menu.h" #include "menu.h"
@ -834,6 +834,7 @@ private:
cTimer *timer; cTimer *timer;
cTimer data; cTimer data;
int channel; int channel;
bool deleteIfCancelled;
cMenuEditDateItem *firstday; cMenuEditDateItem *firstday;
void SetFirstDayItem(void); void SetFirstDayItem(void);
public: public:
@ -847,6 +848,7 @@ cMenuEditTimer::cMenuEditTimer(int Index, bool New)
{ {
firstday = NULL; firstday = NULL;
timer = Timers.Get(Index); timer = Timers.Get(Index);
deleteIfCancelled = New;
if (timer) { if (timer) {
data = *timer; data = *timer;
if (New) if (New)
@ -867,6 +869,12 @@ cMenuEditTimer::cMenuEditTimer(int Index, bool New)
cMenuEditTimer::~cMenuEditTimer() cMenuEditTimer::~cMenuEditTimer()
{ {
if (timer && deleteIfCancelled) {
int Index = timer->Index();
Timers.Del(timer);
Timers.Save();
isyslog("timer %d deleted", Index + 1);
}
Timers.DecBeingEdited(); Timers.DecBeingEdited();
} }
@ -907,6 +915,7 @@ eOSState cMenuEditTimer::ProcessKey(eKeys Key)
Timers.Save(); Timers.Save();
isyslog("timer %d modified (%s)", timer->Index() + 1, timer->active ? "active" : "inactive"); isyslog("timer %d modified (%s)", timer->Index() + 1, timer->active ? "active" : "inactive");
} }
deleteIfCancelled = false;
} }
return osBack; return osBack;
case kRed: case kRed:
@ -1044,8 +1053,15 @@ eOSState cMenuTimers::Delete(void)
// Check if this timer is active: // Check if this timer is active:
cTimer *ti = CurrentTimer(); cTimer *ti = CurrentTimer();
if (ti) { if (ti) {
if (!ti->Recording()) {
if (Interface->Confirm(tr("Delete timer?"))) { if (Interface->Confirm(tr("Delete timer?"))) {
if (ti->Recording()) {
if (Interface->Confirm(tr("Timer still recording - really delete?"))) {
ti->Skip();
cRecordControls::Process(time(NULL));
}
else
return osContinue;
}
int Index = ti->Index(); int Index = ti->Index();
Timers.Del(ti); Timers.Del(ti);
cOsdMenu::Del(Current()); cOsdMenu::Del(Current());
@ -1054,9 +1070,6 @@ eOSState cMenuTimers::Delete(void)
isyslog("timer %d deleted", Index + 1); isyslog("timer %d deleted", Index + 1);
} }
} }
else
Interface->Error(tr("Timer is recording!"));
}
return osContinue; return osContinue;
} }
@ -1081,6 +1094,8 @@ eOSState cMenuTimers::Summary(void)
eOSState cMenuTimers::ProcessKey(eKeys Key) eOSState cMenuTimers::ProcessKey(eKeys Key)
{ {
cTimer *ti = HasSubMenu() ? CurrentTimer() : NULL;
int TimerNumber = ti ? ti->Index() : -1;
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if (state == osUnknown) { if (state == osUnknown) {
@ -1097,6 +1112,11 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
default: break; default: break;
} }
} }
if (TimerNumber >= 0 && !HasSubMenu() && !Timers.Get(TimerNumber)) {
// a newly created timer wasn't confirmed with Ok
cOsdMenu::Del(Current());
Display();
}
return state; return state;
} }
@ -1263,7 +1283,7 @@ eOSState cMenuWhatsOn::Record(void)
delete timer; delete timer;
timer = t; timer = t;
} }
return AddSubMenu(new cMenuEditTimer(timer->Index(), true)); return AddSubMenu(new cMenuEditTimer(timer->Index(), !t));
} }
return osContinue; return osContinue;
} }
@ -1397,7 +1417,7 @@ eOSState cMenuSchedule::Record(void)
delete timer; delete timer;
timer = t; timer = t;
} }
return AddSubMenu(new cMenuEditTimer(timer->Index(), true)); return AddSubMenu(new cMenuEditTimer(timer->Index(), !t));
} }
return osContinue; return osContinue;
} }
@ -2938,6 +2958,23 @@ cRecordControl::cRecordControl(cDevice *Device, cTimer *Timer, bool Pause)
} }
cRecording Recording(timer, Title, Subtitle, Summary); cRecording Recording(timer, Title, Subtitle, Summary);
fileName = strdup(Recording.FileName()); fileName = strdup(Recording.FileName());
// crude attempt to avoid duplicate recordings:
if (cRecordControls::GetRecordControl(fileName)) {
isyslog("already recording: '%s'", fileName);
if (Timer) {
timer->SetPending(false);
timer->SetRecording(false);
timer->OnOff();
}
else {
Timers.Del(timer);
Timers.Save();
}
timer = NULL;
return;
}
cRecordingUserCommand::InvokeCommand(RUC_BEFORERECORDING, fileName); cRecordingUserCommand::InvokeCommand(RUC_BEFORERECORDING, fileName);
const cChannel *ch = timer->Channel(); const cChannel *ch = timer->Channel();
recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apid1(), ch->Apid2(), ch->Dpid1(), ch->Dpid2()); recorder = new cRecorder(fileName, ch->Ca(), timer->Priority(), ch->Vpid(), ch->Apid1(), ch->Apid2(), ch->Dpid1(), ch->Dpid2());
@ -3240,7 +3277,7 @@ void cReplayControl::ClearLastReplayed(const char *FileName)
} }
} }
void cReplayControl::Show(int Seconds) void cReplayControl::ShowTimed(int Seconds)
{ {
if (modeOnly) if (modeOnly)
Hide(); Hide();
@ -3250,6 +3287,11 @@ void cReplayControl::Show(int Seconds)
} }
} }
void cReplayControl::Show(void)
{
ShowTimed();
}
void cReplayControl::Hide(void) void cReplayControl::Hide(void)
{ {
if (visible) { if (visible) {
@ -3447,7 +3489,7 @@ void cReplayControl::MarkToggle(void)
marks.Del(m); marks.Del(m);
else { else {
marks.Add(Current); marks.Add(Current);
Show(2); ShowTimed(2);
} }
marks.Save(); marks.Save();
} }

7
menu.h
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: menu.h 1.55 2003/05/11 13:43:58 kls Exp $ * $Id: menu.h 1.56 2003/05/24 16:35:52 kls Exp $
*/ */
#ifndef __MENU_H #ifndef __MENU_H
@ -50,7 +50,7 @@ class cDisplayVolume : public cOsdObject {
private: private:
int timeout; int timeout;
static cDisplayVolume *displayVolume; static cDisplayVolume *displayVolume;
void Show(void); virtual void Show(void);
cDisplayVolume(void); cDisplayVolume(void);
public: public:
virtual ~cDisplayVolume(); virtual ~cDisplayVolume();
@ -154,7 +154,7 @@ private:
void TimeSearchDisplay(void); void TimeSearchDisplay(void);
void TimeSearchProcess(eKeys Key); void TimeSearchProcess(eKeys Key);
void TimeSearch(void); void TimeSearch(void);
void Show(int Seconds = 0); void ShowTimed(int Seconds = 0);
static char *fileName; static char *fileName;
static char *title; static char *title;
void DisplayAtBottom(const char *s = NULL); void DisplayAtBottom(const char *s = NULL);
@ -169,6 +169,7 @@ public:
cReplayControl(void); cReplayControl(void);
virtual ~cReplayControl(); virtual ~cReplayControl();
virtual eOSState ProcessKey(eKeys Key); virtual eOSState ProcessKey(eKeys Key);
virtual void Show(void);
virtual void Hide(void); virtual void Hide(void);
bool Visible(void) { return visible; } bool Visible(void) { return visible; }
static void SetRecording(const char *FileName, const char *Title); static void SetRecording(const char *FileName, const char *Title);

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: recording.c 1.78 2003/05/18 15:17:45 kls Exp $ * $Id: recording.c 1.79 2003/05/24 11:22:34 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@ -169,6 +169,11 @@ int cResumeFile::Read(void)
{ {
int resume = -1; int resume = -1;
if (fileName) { if (fileName) {
struct stat st;
if (stat(fileName, &st) == 0) {
if ((st.st_mode & S_IWUSR) == 0) // no write access, assume no resume
return -1;
}
int f = open(fileName, O_RDONLY); int f = open(fileName, O_RDONLY);
if (f >= 0) { if (f >= 0) {
if (safe_read(f, &resume, sizeof(resume)) != sizeof(resume)) { if (safe_read(f, &resume, sizeof(resume)) != sizeof(resume)) {

18
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/people/kls/vdr * The project's page is at http://www.cadsoft.de/people/kls/vdr
* *
* $Id: vdr.c 1.155 2003/05/16 12:11:45 kls Exp $ * $Id: vdr.c 1.159 2003/05/24 15:17:38 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -323,6 +323,7 @@ int main(int argc, char *argv[])
stdin = freopen(Terminal, "r", stdin); stdin = freopen(Terminal, "r", stdin);
stdout = freopen(Terminal, "w", stdout); stdout = freopen(Terminal, "w", stdout);
stderr = freopen(Terminal, "w", stderr); stderr = freopen(Terminal, "w", stderr);
HasStdin = true;
} }
isyslog("VDR version %s started", VDRVERSION); isyslog("VDR version %s started", VDRVERSION);
@ -429,8 +430,6 @@ int main(int argc, char *argv[])
else else
cDevice::PrimaryDevice()->SetVolume(Setup.CurrentVolume, true); cDevice::PrimaryDevice()->SetVolume(Setup.CurrentVolume, true);
cEITScanner EITScanner;
cSIProcessor::Read(); cSIProcessor::Read();
// Signal handlers: // Signal handlers:
@ -454,6 +453,7 @@ int main(int argc, char *argv[])
cOsdObject *Menu = NULL; cOsdObject *Menu = NULL;
cOsdObject *Temp = NULL; cOsdObject *Temp = NULL;
int LastChannel = -1; int LastChannel = -1;
int LastTimerChannel = -1;
int PreviousChannel = cDevice::CurrentChannel(); int PreviousChannel = cDevice::CurrentChannel();
time_t LastActivity = 0; time_t LastActivity = 0;
int MaxLatencyTime = 0; int MaxLatencyTime = 0;
@ -469,11 +469,15 @@ int main(int argc, char *argv[])
// Attach launched player control: // Attach launched player control:
cControl::Attach(); cControl::Attach();
// Make sure we have a visible programme in case device usage has changed: // Make sure we have a visible programme in case device usage has changed:
if (cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) { if (!EITScanner.Active() && cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) {
static time_t lastTime = 0; static time_t lastTime = 0;
if (time(NULL) - lastTime > MINCHANNELWAIT) { if (time(NULL) - lastTime > MINCHANNELWAIT) {
if (!Channels.SwitchTo(cDevice::CurrentChannel())) if (!Channels.SwitchTo(cDevice::CurrentChannel()) // try to switch to the original channel...
&& !(LastTimerChannel > 0 && Channels.SwitchTo(LastTimerChannel)) // ...or the one used by the last timer...
&& !cDevice::SwitchChannel(1) // ...or the next higher available one...
&& !cDevice::SwitchChannel(-1)) // ...or the next lower available one
lastTime = time(NULL); // don't do this too often lastTime = time(NULL); // don't do this too often
LastTimerChannel = -1;
} }
} }
// Restart the Watchdog timer: // Restart the Watchdog timer:
@ -500,6 +504,8 @@ int main(int argc, char *argv[])
if (Timer) { if (Timer) {
if (!cRecordControls::Start(Timer)) if (!cRecordControls::Start(Timer))
Timer->SetPending(true); Timer->SetPending(true);
else
LastTimerChannel = Timer->Channel()->Number();
} }
} }
// CAM control: // CAM control:
@ -563,7 +569,7 @@ int main(int argc, char *argv[])
} }
else else
cDevice::PrimaryDevice()->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA); cDevice::PrimaryDevice()->SetVolume(NORMALKEY(key) == kVolDn ? -VOLUMEDELTA : VOLUMEDELTA);
if (!Interface->IsOpen()) if (!Menu && !Interface->IsOpen())
Menu = Temp = cDisplayVolume::Create(); Menu = Temp = cDisplayVolume::Create();
cDisplayVolume::Process(key); cDisplayVolume::Process(key);
key = kNone; // nobody else needs to see these keys key = kNone; // nobody else needs to see these keys