summaryrefslogtreecommitdiff
path: root/recorder.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-01-26 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2003-01-26 18:00:00 +0100
commita3942b4d17a3a7e1af82b1950c39db1f9c7ce250 (patch)
tree8b88f1d2db36ab8609c79dc02758652a3d235db3 /recorder.c
parent3e1d34f392792bbcf1bda4884c58ca9cec445d1d (diff)
downloadvdr-patch-lnbsharing-a3942b4d17a3a7e1af82b1950c39db1f9c7ce250.tar.gz
vdr-patch-lnbsharing-a3942b4d17a3a7e1af82b1950c39db1f9c7ce250.tar.bz2
Version 1.1.22vdr-1.1.22
- Added 'Hrvatska radiotelevizija' and 'RTV Slovenija' to ca.conf (thanks to Paul Gohn). - Implemented actual user input for CAM enquiry menus. - Since disk file systems apparently don't honor the O_NONBLOCK flag to read from a file in non-blocking mode the cDvbPlayer now uses a non blocking file reader class to make sure replay remains smooth even under heavy system load. - Increased the maximum possible packet size in remux.c to avoid corrupted streams with broadcasters that send extremely large PES packets (thanks to Teemu Rantanen). - Added TS error checking to remux.c (thanks to Teemu Rantanen). - Modified cRingBufferLinear to avoid excessive memmove() calls in 'Transfer Mode' and during recordings, which dramatically reduces CPU load. Thanks to Teemu Rantanen for pinpointing the problem with the excessive memmove() calls. - Updated 'channels.conf' (thanks to Achim Lange). - Added/improved Swedish language texts (thanks to Jan Ekholm). - Fixed the description of the "Scroll pages" OSD setup parameter ('yes' and 'no' were mixed up). - Fixed handling the LOG_LOCALn parameters in the -l option (thanks to Dimitrios Dimitrakos). - Changed EIT processing to always read a full section. - Fixed handling user defined CFLAGS in libdtv/libvdr/Makefile (thanks to Clemens Kirchgatterer and Robert Schiele). - Fixed skipping unavailable channels in the EPG scanner.
Diffstat (limited to 'recorder.c')
-rw-r--r--recorder.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/recorder.c b/recorder.c
index 426b555..15e8646 100644
--- a/recorder.c
+++ b/recorder.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recorder.c 1.4 2002/12/22 11:33:08 kls Exp $
+ * $Id: recorder.c 1.5 2003/01/25 16:23:36 kls Exp $
*/
#include <stdarg.h>
@@ -41,7 +41,7 @@ cRecorder::cRecorder(const char *FileName, int Ca, int Priority, int VPid, int A
SpinUpDisk(FileName);
- ringBuffer = new cRingBufferLinear(VIDEOBUFSIZE, true);
+ ringBuffer = new cRingBufferLinear(VIDEOBUFSIZE, TS_SIZE * 2, true);
remux = new cRemux(VPid, APid1, APid2, DPid1, DPid2, true);
fileName = new cFileName(FileName, true);
recordFile = fileName->Open();
@@ -110,16 +110,14 @@ void cRecorder::Action(void)
{
dsyslog("recording thread started (pid=%d)", getpid());
- uchar b[MINVIDEODATA];
- int r = 0;
active = true;
while (active) {
- int g = ringBuffer->Get(b + r, sizeof(b) - r);
- if (g > 0)
- r += g;
- if (r > 0) {
+ int r;
+ const uchar *b = ringBuffer->Get(r);
+ if (b) {
int Count = r, Result;
uchar *p = remux->Process(b, Count, Result, &pictureType);
+ ringBuffer->Del(Count);
if (p) {
//XXX+ active??? see old version (Busy)
if (!active && pictureType == I_FRAME) // finish the recording before the next 'I' frame
@@ -136,10 +134,6 @@ void cRecorder::Action(void)
else
break;
}
- if (Count > 0) {
- r -= Count;
- memmove(b, b + Count, r);
- }
}
else
usleep(1); // this keeps the CPU load low