summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY4
-rw-r--r--ci.c14
-rw-r--r--device.c6
-rw-r--r--receiver.h4
-rw-r--r--recorder.c4
-rw-r--r--recorder.h4
-rw-r--r--transfer.c4
-rw-r--r--transfer.h4
8 files changed, 23 insertions, 21 deletions
diff --git a/HISTORY b/HISTORY
index cae45f3b..bacc5604 100644
--- a/HISTORY
+++ b/HISTORY
@@ -8596,7 +8596,7 @@ Video Disk Recorder Revision History
- Bumped all version numbers to 2.2.0.
- Official release.
-2015-09-01: Version 2.3.1
+2015-09-05: Version 2.3.1
- The new function cOsd::MaxPixmapSize() can be called to determine the maximum size
a cPixmap may have on the current OSD. The 'osddemo' example has been modified
@@ -8782,3 +8782,5 @@ Video Disk Recorder Revision History
connections to trigger fetching remote timers.
- You can now set DumpSVDRPDataTransfer in svdrp.c to true to have all SVDRP
communication printed to the console for debugging.
+- Added a missing 'const' to cReceiver::Receive(), to protect the given Data from
+ being modified.
diff --git a/ci.c b/ci.c
index da572f02..f86f668e 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 4.1 2015/07/18 09:57:42 kls Exp $
+ * $Id: ci.c 4.2 2015/09/05 11:45:19 kls Exp $
*/
#include "ci.h"
@@ -125,8 +125,8 @@ protected:
public:
cCaPidReceiver(void);
virtual ~cCaPidReceiver() { Detach(); }
- virtual void Receive(uchar *Data, int Length);
- bool HasCaPids(void) { return NumPids() - emmPids.Size() - 1 > 0; }
+ virtual void Receive(const uchar *Data, int Length);
+ bool HasCaPids(void) const { return NumPids() - emmPids.Size() - 1 > 0; }
void Reset(void) { DelEmmPids(); catVersion = -1; }
};
@@ -160,10 +160,10 @@ void cCaPidReceiver::Activate(bool On)
catVersion = -1; // can be done independent of 'On'
}
-void cCaPidReceiver::Receive(uchar *Data, int Length)
+void cCaPidReceiver::Receive(const uchar *Data, int Length)
{
if (TsPid(Data) == CATPID) {
- uchar *p = NULL;
+ const uchar *p = NULL;
if (TsPayloadStart(Data)) {
if (Data[5] == SI::TableIdCAT) {
length = (int(Data[6] & 0x03) << 8) | Data[7]; // section length
@@ -251,7 +251,7 @@ private:
time_t lastScrambledTime;
int numTsPackets;
protected:
- virtual void Receive(uchar *Data, int Length);
+ virtual void Receive(const uchar *Data, int Length);
public:
cCaActivationReceiver(const cChannel *Channel, cCamSlot *CamSlot);
virtual ~cCaActivationReceiver();
@@ -270,7 +270,7 @@ cCaActivationReceiver::~cCaActivationReceiver()
Detach();
}
-void cCaActivationReceiver::Receive(uchar *Data, int Length)
+void cCaActivationReceiver::Receive(const uchar *Data, int Length)
{
if (numTsPackets++ % TS_PACKET_FACTOR == 0) {
time_t Now = time(NULL);
diff --git a/device.c b/device.c
index 6ae9d5ac..174281f4 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 4.1 2015/08/29 12:41:08 kls Exp $
+ * $Id: device.c 4.2 2015/09/05 11:42:17 kls Exp $
*/
#include "device.h"
@@ -24,7 +24,7 @@
class cLiveSubtitle : public cReceiver {
protected:
- virtual void Receive(uchar *Data, int Length);
+ virtual void Receive(const uchar *Data, int Length);
public:
cLiveSubtitle(int SPid);
virtual ~cLiveSubtitle();
@@ -40,7 +40,7 @@ cLiveSubtitle::~cLiveSubtitle()
cReceiver::Detach();
}
-void cLiveSubtitle::Receive(uchar *Data, int Length)
+void cLiveSubtitle::Receive(const uchar *Data, int Length)
{
if (cDevice::PrimaryDevice())
cDevice::PrimaryDevice()->PlayTs(Data, Length);
diff --git a/receiver.h b/receiver.h
index b3548258..09da8cda 100644
--- a/receiver.h
+++ b/receiver.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: receiver.h 3.3 2015/01/12 14:03:22 kls Exp $
+ * $Id: receiver.h 4.1 2015/09/05 11:42:47 kls Exp $
*/
#ifndef __RECEIVER_H
@@ -31,7 +31,7 @@ protected:
///< (On == true) and right after it gets detached from (On == false) a cDevice. It can be used
///< to do things like starting/stopping a thread.
///< It is guaranteed that Receive() will not be called before Activate(true).
- virtual void Receive(uchar *Data, int Length) = 0;
+ virtual void Receive(const uchar *Data, int Length) = 0;
///< This function is called from the cDevice we are attached to, and
///< delivers one TS packet from the set of PIDs the cReceiver has requested.
///< The data packet must be accepted immediately, and the call must return
diff --git a/recorder.c b/recorder.c
index 429c9375..5915fe11 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 4.1 2015/08/03 10:23:35 kls Exp $
+ * $Id: recorder.c 4.2 2015/09/05 11:43:51 kls Exp $
*/
#include "recorder.h"
@@ -106,7 +106,7 @@ void cRecorder::Activate(bool On)
Cancel(3);
}
-void cRecorder::Receive(uchar *Data, int Length)
+void cRecorder::Receive(const uchar *Data, int Length)
{
if (Running()) {
int p = ringBuffer->Put(Data, Length);
diff --git a/recorder.h b/recorder.h
index 4e7848a6..2fc7ef18 100644
--- a/recorder.h
+++ b/recorder.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recorder.h 3.1 2015/01/15 14:27:02 kls Exp $
+ * $Id: recorder.h 4.1 2015/09/05 11:46:23 kls Exp $
*/
#ifndef __RECORDER_H
@@ -35,7 +35,7 @@ protected:
///< member of the cReceiver class) from your own destructor in order
///< to properly get a call to Activate(false) when your object is
///< destroyed.
- virtual void Receive(uchar *Data, int Length);
+ virtual void Receive(const uchar *Data, int Length);
virtual void Action(void);
public:
cRecorder(const char *FileName, const cChannel *Channel, int Priority);
diff --git a/transfer.c b/transfer.c
index eb07e829..d0e7ed46 100644
--- a/transfer.c
+++ b/transfer.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: transfer.c 3.1 2013/08/22 12:33:02 kls Exp $
+ * $Id: transfer.c 4.1 2015/09/05 11:43:58 kls Exp $
*/
#include "transfer.h"
@@ -38,7 +38,7 @@ void cTransfer::Activate(bool On)
#define MAXRETRIES 20 // max. number of retries for a single TS packet
#define RETRYWAIT 5 // time (in ms) between two retries
-void cTransfer::Receive(uchar *Data, int Length)
+void cTransfer::Receive(const uchar *Data, int Length)
{
if (cPlayer::IsAttached()) {
// Transfer Mode means "live tv", so there's no point in doing any additional
diff --git a/transfer.h b/transfer.h
index 47a3398e..21d9dd86 100644
--- a/transfer.h
+++ b/transfer.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: transfer.h 2.4 2013/03/01 09:49:46 kls Exp $
+ * $Id: transfer.h 4.1 2015/09/05 11:43:08 kls Exp $
*/
#ifndef __TRANSFER_H
@@ -19,7 +19,7 @@ private:
cPatPmtGenerator patPmtGenerator;
protected:
virtual void Activate(bool On);
- virtual void Receive(uchar *Data, int Length);
+ virtual void Receive(const uchar *Data, int Length);
public:
cTransfer(const cChannel *Channel);
virtual ~cTransfer();