1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

The new function cStatus::ChannelChange() can be implemented by plugins to be informed about changes to the parameters of a channel that may require a retune

This commit is contained in:
Klaus Schmidinger 2014-01-25 10:54:51 +01:00
parent 5ac41bf091
commit fdbf796b6b
5 changed files with 25 additions and 4 deletions

View File

@ -3250,3 +3250,7 @@ Eike Sauer <EikeSauer@t-online.de>
Christian Paulick <cpaulick@xeatre.tv> Christian Paulick <cpaulick@xeatre.tv>
for reporting a problem with frame detection in MPEG-2 streams that have "bottom fields" for reporting a problem with frame detection in MPEG-2 streams that have "bottom fields"
or varying GOP structures or varying GOP structures
Mariusz Bialonczyk <manio@skyboo.net>
for reporting a problem with live streaming of encrypted channels, when there are no
CA descriptors, yet, on initial tuning

View File

@ -8132,7 +8132,7 @@ Video Disk Recorder Revision History
and also to use the correct directory with --edit (the latter reported by Marko and also to use the correct directory with --edit (the latter reported by Marko
Mäkelä). Mäkelä).
2014-01-22: Version 2.1.4 2014-01-25: Version 2.1.4
- Updated 'sources.conf' (thanks to Antti Hartikainen). - Updated 'sources.conf' (thanks to Antti Hartikainen).
- cFont::CreateFont() now returns a dummy font in case there are no fonts installed. - cFont::CreateFont() now returns a dummy font in case there are no fonts installed.
@ -8162,3 +8162,8 @@ Video Disk Recorder Revision History
three variations of "editing" a recording (suggested by Christoph Haubrich). three variations of "editing" a recording (suggested by Christoph Haubrich).
Maintainers of translations for other languages may want to change their *.po files Maintainers of translations for other languages may want to change their *.po files
accordingly. accordingly.
- The new function cStatus::ChannelChange() can be implemented by plugins to be
informed about changes to the parameters of a channel that may require a retune.
This may, for instance, be useful for plugins that implement live streaming, so that
they can react on changes to a channel's PIDs or CA descriptors (problem reported
by Mariusz Bialonczyk).

View File

@ -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: status.c 2.1 2012/03/07 14:17:24 kls Exp $ * $Id: status.c 3.1 2014/01/25 10:47:39 kls Exp $
*/ */
#include "status.h" #include "status.h"
@ -23,6 +23,12 @@ cStatus::~cStatus()
statusMonitors.Del(this, false); statusMonitors.Del(this, false);
} }
void cStatus::MsgChannelChange(const cChannel *Channel)
{
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
sm->ChannelChange(Channel);
}
void cStatus::MsgTimerChange(const cTimer *Timer, eTimerChange Change) void cStatus::MsgTimerChange(const cTimer *Timer, eTimerChange Change)
{ {
for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm)) for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))

View File

@ -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: status.h 2.1 2012/03/07 14:16:57 kls Exp $ * $Id: status.h 3.1 2014/01/25 10:47:39 kls Exp $
*/ */
#ifndef __STATUS_H #ifndef __STATUS_H
@ -24,6 +24,9 @@ private:
static cList<cStatus> statusMonitors; static cList<cStatus> statusMonitors;
protected: protected:
// These functions can be implemented by derived classes to receive status information: // These functions can be implemented by derived classes to receive status information:
virtual void ChannelChange(const cChannel *Channel) {}
// Indicates a change in the parameters of the given Channel that may
// require a retune.
virtual void TimerChange(const cTimer *Timer, eTimerChange Change) {} virtual void TimerChange(const cTimer *Timer, eTimerChange Change) {}
// Indicates a change in the timer settings. // Indicates a change in the timer settings.
// If Change is tcAdd or tcDel, Timer points to the timer that has // If Change is tcAdd or tcDel, Timer points to the timer that has
@ -85,6 +88,7 @@ public:
cStatus(void); cStatus(void);
virtual ~cStatus(); virtual ~cStatus();
// These functions are called whenever the related status information changes: // These functions are called whenever the related status information changes:
static void MsgChannelChange(const cChannel *Channel);
static void MsgTimerChange(const cTimer *Timer, eTimerChange Change); static void MsgTimerChange(const cTimer *Timer, eTimerChange Change);
static void MsgChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView); static void MsgChannelSwitch(const cDevice *Device, int ChannelNumber, bool LiveView);
static void MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On); static void MsgRecording(const cDevice *Device, const char *Name, const char *FileName, bool On);

4
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.tvdr.de * The project's page is at http://www.tvdr.de
* *
* $Id: vdr.c 3.8 2014/01/16 11:25:03 kls Exp $ * $Id: vdr.c 3.9 2014/01/25 10:47:39 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -60,6 +60,7 @@
#include "skinsttng.h" #include "skinsttng.h"
#include "sourceparams.h" #include "sourceparams.h"
#include "sources.h" #include "sources.h"
#include "status.h"
#include "themes.h" #include "themes.h"
#include "timers.h" #include "timers.h"
#include "tools.h" #include "tools.h"
@ -924,6 +925,7 @@ int main(int argc, char *argv[])
} }
} }
} }
cStatus::MsgChannelChange(Channel);
} }
} }
Channels.Unlock(); Channels.Unlock();