mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added a note about the meaning of PERCENTAGEDELTA in cRingBuffer::UpdatePercentage()
This commit is contained in:
parent
877d4851e8
commit
d41461ad40
@ -1075,6 +1075,7 @@ Rolf Ahrenberg <rahrenbe@cc.hut.fi>
|
||||
for adding cap_sys_nice to the capabilities that are not dropped
|
||||
for adding cThread::SetIOPriority() and using it in cRemoveDeletedRecordingsThread
|
||||
for suggesting to introduce cDevice::GetOsdSize()
|
||||
for adding a note about the meaning of PERCENTAGEDELTA in cRingBuffer::UpdatePercentage()
|
||||
|
||||
Ralf Klueber <ralf.klueber@vodafone.com>
|
||||
for reporting a bug in cutting a recording if there is only a single editing mark
|
||||
|
2
HISTORY
2
HISTORY
@ -6101,3 +6101,5 @@ Video Disk Recorder Revision History
|
||||
- Removed unused 'synced' member from cTsToPes (reported by Christoph Haubrich).
|
||||
- Added a note to cTsToPes about all TS packets having to belong to the same PID
|
||||
(suggested by Christoph Haubrich).
|
||||
- Added a note about the meaning of PERCENTAGEDELTA in cRingBuffer::UpdatePercentage()
|
||||
(thanks to Rolf Ahrenberg).
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Parts of this file were inspired by the 'ringbuffy.c' from the
|
||||
* LinuxDVB driver (see linuxtv.org).
|
||||
*
|
||||
* $Id: ringbuffer.c 2.1 2009/03/01 11:20:34 kls Exp $
|
||||
* $Id: ringbuffer.c 2.2 2009/05/17 10:05:17 kls Exp $
|
||||
*/
|
||||
|
||||
#include "ringbuffer.h"
|
||||
@ -43,7 +43,7 @@ void cRingBuffer::UpdatePercentage(int Fill)
|
||||
{
|
||||
if (Fill > maxFill)
|
||||
maxFill = Fill;
|
||||
int percent = Fill * 100 / (Size() - 1) / PERCENTAGEDELTA * PERCENTAGEDELTA;
|
||||
int percent = Fill * 100 / (Size() - 1) / PERCENTAGEDELTA * PERCENTAGEDELTA; // clamp down to nearest quantum
|
||||
if (percent != lastPercent) {
|
||||
if (percent >= PERCENTAGETHRESHOLD && percent > lastPercent || percent < PERCENTAGETHRESHOLD && lastPercent >= PERCENTAGETHRESHOLD) {
|
||||
dsyslog("buffer usage: %d%% (tid=%d)", percent, getThreadTid);
|
||||
|
Loading…
Reference in New Issue
Block a user