mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added a SleepMs() in cRecorder::Action() to avoid a busy loop
This commit is contained in:
parent
3a5c65e594
commit
4016a630be
@ -1622,3 +1622,6 @@ Petri Hintukainen <Petri.Hintukainen@hut.fi>
|
|||||||
|
|
||||||
Marcel Schaeben <mts280@gmx.de>
|
Marcel Schaeben <mts280@gmx.de>
|
||||||
for his "Easy Input" patch
|
for his "Easy Input" patch
|
||||||
|
|
||||||
|
Ingo Schneider <mail@ingo-schneider.de>
|
||||||
|
for adding a SleepMs() in cRecorder::Action() to avoid a busy loop
|
||||||
|
2
HISTORY
2
HISTORY
@ -4131,3 +4131,5 @@ Video Disk Recorder Revision History
|
|||||||
- Adapted c(Dvb)Device::ProvidesCa() to the dynamic CA handling.
|
- Adapted c(Dvb)Device::ProvidesCa() to the dynamic CA handling.
|
||||||
- Added a mutex to synchronize cDevice::PlayPesPacket() and SetCurrentAudioTrack()
|
- Added a mutex to synchronize cDevice::PlayPesPacket() and SetCurrentAudioTrack()
|
||||||
(thanks to Reinhard Nissl).
|
(thanks to Reinhard Nissl).
|
||||||
|
- Added a SleepMs() in cRecorder::Action() to avoid a busy loop (thanks to Ingo
|
||||||
|
Schneider).
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
* 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: recorder.c 1.16 2005/10/31 12:35:29 kls Exp $
|
* $Id: recorder.c 1.17 2006/01/08 11:01:25 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "recorder.h"
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "recorder.h"
|
|
||||||
|
|
||||||
#define RECORDERBUFSIZE MEGABYTE(5)
|
#define RECORDERBUFSIZE MEGABYTE(5)
|
||||||
|
|
||||||
@ -171,6 +171,8 @@ void cRecorder::Action(void)
|
|||||||
int Count = remux->Put(b, r);
|
int Count = remux->Put(b, r);
|
||||||
if (Count)
|
if (Count)
|
||||||
ringBuffer->Del(Count);
|
ringBuffer->Del(Count);
|
||||||
|
else
|
||||||
|
cCondWait::SleepMs(100); // avoid busy loop when resultBuffer is full in cRemux::Put()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user