mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
Implemented VDR 2.1.4 cStatus::ChannelChange(...)
This commit is contained in:
parent
83262870d5
commit
bdee8c1923
@ -670,6 +670,19 @@ bool cStreamdevLiveStreamer::ProvidesChannel(const cChannel *Channel, int Priori
|
|||||||
return device;
|
return device;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cStreamdevLiveStreamer::ChannelChange(const cChannel *Channel)
|
||||||
|
{
|
||||||
|
if (Running() && m_Device && m_Device->ProvidesTransponder(Channel) && ISTRANSPONDER(m_Channel->Transponder(), Channel->Transponder())) {
|
||||||
|
Detach();
|
||||||
|
if (m_Device->SwitchChannel(m_Channel, false)) {
|
||||||
|
Attach();
|
||||||
|
dsyslog("streamdev: channel %d (%s) changed", Channel->Number(), Channel->Name());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
isyslog("streamdev: failed to re-tune after channel %d (%s) changed", Channel->Number(), Channel->Name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cStreamdevLiveStreamer::MainThreadHook()
|
void cStreamdevLiveStreamer::MainThreadHook()
|
||||||
{
|
{
|
||||||
if (!m_SwitchLive && Running() && m_Device && !m_Device->IsTunedToTransponder(m_Channel) && !IsReceiving()) {
|
if (!m_SwitchLive && Running() && m_Device && !m_Device->IsTunedToTransponder(m_Channel) && !IsReceiving()) {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define VDR_STREAMDEV_LIVESTREAMER_H
|
#define VDR_STREAMDEV_LIVESTREAMER_H
|
||||||
|
|
||||||
#include <vdr/config.h>
|
#include <vdr/config.h>
|
||||||
|
#include <vdr/status.h>
|
||||||
#include <vdr/receiver.h>
|
#include <vdr/receiver.h>
|
||||||
|
|
||||||
#include "server/streamer.h"
|
#include "server/streamer.h"
|
||||||
@ -18,7 +19,11 @@ class cStreamdevLiveReceiver;
|
|||||||
|
|
||||||
// --- cStreamdevLiveStreamer -------------------------------------------------
|
// --- cStreamdevLiveStreamer -------------------------------------------------
|
||||||
|
|
||||||
class cStreamdevLiveStreamer: public cStreamdevStreamer, public cMainThreadHookSubscriber {
|
class cStreamdevLiveStreamer: public cStreamdevStreamer, public cMainThreadHookSubscriber
|
||||||
|
#if VDRVERSNUM >= 20104
|
||||||
|
, public cStatus
|
||||||
|
#endif
|
||||||
|
{
|
||||||
private:
|
private:
|
||||||
int m_Priority;
|
int m_Priority;
|
||||||
int m_Pids[MAXRECEIVEPIDS + 1];
|
int m_Pids[MAXRECEIVEPIDS + 1];
|
||||||
@ -51,6 +56,8 @@ protected:
|
|||||||
virtual int Put(const uchar *Data, int Count);
|
virtual int Put(const uchar *Data, int Count);
|
||||||
virtual void Action(void);
|
virtual void Action(void);
|
||||||
|
|
||||||
|
virtual void ChannelChange(const cChannel *Channel);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cStreamdevLiveStreamer(const cServerConnection *Connection, const cChannel *Channel, int Priority, eStreamType StreamType, const int* Apid = NULL, const int* Dpid = NULL);
|
cStreamdevLiveStreamer(const cServerConnection *Connection, const cChannel *Channel, int Priority, eStreamType StreamType, const int* Apid = NULL, const int* Dpid = NULL);
|
||||||
virtual ~cStreamdevLiveStreamer();
|
virtual ~cStreamdevLiveStreamer();
|
||||||
|
Loading…
Reference in New Issue
Block a user