mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Added functions to set and retrieve the priority of a cReceiver
This commit is contained in:
parent
67fff7f4fc
commit
6b229d7d5f
@ -2549,6 +2549,7 @@ Frank Schmirler <vdr@schmirler.de>
|
|||||||
for suggestions used in revising priority handling to allow receivers with a priority
|
for suggestions used in revising priority handling to allow receivers with a priority
|
||||||
that is lower than that of live viewing
|
that is lower than that of live viewing
|
||||||
for fixing handling IDLEPRIORITY in cDvbDevice::ProvidesChannel()
|
for fixing handling IDLEPRIORITY in cDvbDevice::ProvidesChannel()
|
||||||
|
for suggesting to add functions to set and retrieve the priority of a cReceiver
|
||||||
|
|
||||||
Jörn Reder <joern@zyn.de>
|
Jörn Reder <joern@zyn.de>
|
||||||
for reporting that a recording may unnecessarily block a device with a CAM, while
|
for reporting that a recording may unnecessarily block a device with a CAM, while
|
||||||
|
2
HISTORY
2
HISTORY
@ -8349,3 +8349,5 @@ Video Disk Recorder Revision History
|
|||||||
- Added the functions IndexOf(), InsertUnique(), AppendUnique() and RemoveElement()
|
- Added the functions IndexOf(), InsertUnique(), AppendUnique() and RemoveElement()
|
||||||
to the cVector class (thanks to Stefan Schallenberg).
|
to the cVector class (thanks to Stefan Schallenberg).
|
||||||
- Fixed a possible out-of-bounds access in cVector::Remove().
|
- Fixed a possible out-of-bounds access in cVector::Remove().
|
||||||
|
- Added functions to set and retrieve the priority of a cReceiver (suggested by
|
||||||
|
Frank Schmirler).
|
||||||
|
@ -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: receiver.c 3.2 2014/02/08 15:57:30 kls Exp $
|
* $Id: receiver.c 3.3 2015/01/12 14:04:31 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "receiver.h"
|
#include "receiver.h"
|
||||||
@ -14,7 +14,7 @@
|
|||||||
cReceiver::cReceiver(const cChannel *Channel, int Priority)
|
cReceiver::cReceiver(const cChannel *Channel, int Priority)
|
||||||
{
|
{
|
||||||
device = NULL;
|
device = NULL;
|
||||||
priority = constrain(Priority, MINPRIORITY, MAXPRIORITY);
|
SetPriority(Priority);
|
||||||
numPids = 0;
|
numPids = 0;
|
||||||
SetPids(Channel);
|
SetPids(Channel);
|
||||||
}
|
}
|
||||||
@ -29,6 +29,11 @@ cReceiver::~cReceiver()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cReceiver::SetPriority(int Priority)
|
||||||
|
{
|
||||||
|
priority = constrain(Priority, MINPRIORITY, MAXPRIORITY);
|
||||||
|
}
|
||||||
|
|
||||||
bool cReceiver::AddPid(int Pid)
|
bool cReceiver::AddPid(int Pid)
|
||||||
{
|
{
|
||||||
if (Pid) {
|
if (Pid) {
|
||||||
|
@ -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: receiver.h 3.2 2015/01/12 10:24:20 kls Exp $
|
* $Id: receiver.h 3.3 2015/01/12 14:03:22 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECEIVER_H
|
#ifndef __RECEIVER_H
|
||||||
@ -49,6 +49,8 @@ public:
|
|||||||
///< that this cReceiver may be detached at any time in favor of a timer recording
|
///< that this cReceiver may be detached at any time in favor of a timer recording
|
||||||
///< or live viewing (without blocking the cDevice it is attached to).
|
///< or live viewing (without blocking the cDevice it is attached to).
|
||||||
virtual ~cReceiver();
|
virtual ~cReceiver();
|
||||||
|
int Priority(void) { return priority; }
|
||||||
|
void SetPriority(int Priority);
|
||||||
bool AddPid(int Pid);
|
bool AddPid(int Pid);
|
||||||
///< Adds the given Pid to the list of PIDs of this receiver.
|
///< Adds the given Pid to the list of PIDs of this receiver.
|
||||||
bool AddPids(const int *Pids);
|
bool AddPids(const int *Pids);
|
||||||
|
Loading…
Reference in New Issue
Block a user