mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
API changes of VDR 1.5.0 (#219)
Modified Files: server/connection.c server/livestreamer.c server/livestreamer.h
This commit is contained in:
parent
970bf59cc2
commit
335660b62c
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: connection.c,v 1.7 2006/09/14 10:38:22 schmirl Exp $
|
* $Id: connection.c,v 1.8 2007/01/15 12:00:19 schmirl Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "server/connection.h"
|
#include "server/connection.h"
|
||||||
@ -132,7 +132,11 @@ cDevice *cServerConnection::GetDevice(const cChannel *Channel, int Priority)
|
|||||||
Dprintf(" * GetDevice(const cChannel*, int)\n");
|
Dprintf(" * GetDevice(const cChannel*, int)\n");
|
||||||
Dprintf(" * -------------------------------\n");
|
Dprintf(" * -------------------------------\n");
|
||||||
|
|
||||||
|
#if VDRVERSNUM < 10500
|
||||||
device = cDevice::GetDevice(Channel, Priority);
|
device = cDevice::GetDevice(Channel, Priority);
|
||||||
|
#else
|
||||||
|
device = cDevice::GetDevice(Channel, Priority, false);
|
||||||
|
#endif
|
||||||
|
|
||||||
Dprintf(" * Found following device: %p (%d)\n", device,
|
Dprintf(" * Found following device: %p (%d)\n", device,
|
||||||
device ? device->CardIndex() + 1 : 0);
|
device ? device->CardIndex() + 1 : 0);
|
||||||
@ -150,7 +154,11 @@ cDevice *cServerConnection::GetDevice(const cChannel *Channel, int Priority)
|
|||||||
const cChannel *current = Channels.GetByNumber(cDevice::CurrentChannel());
|
const cChannel *current = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
isyslog("streamdev-server: Detaching current receiver");
|
isyslog("streamdev-server: Detaching current receiver");
|
||||||
Detach();
|
Detach();
|
||||||
|
#if VDRVERSNUM < 10500
|
||||||
device = cDevice::GetDevice(Channel, Priority);
|
device = cDevice::GetDevice(Channel, Priority);
|
||||||
|
#else
|
||||||
|
device = cDevice::GetDevice(Channel, Priority, false);
|
||||||
|
#endif
|
||||||
Attach();
|
Attach();
|
||||||
Dprintf(" * Found following device: %p (%d)\n", device,
|
Dprintf(" * Found following device: %p (%d)\n", device,
|
||||||
device ? device->CardIndex() + 1 : 0);
|
device ? device->CardIndex() + 1 : 0);
|
||||||
|
@ -8,9 +8,15 @@
|
|||||||
|
|
||||||
// --- cStreamdevLiveReceiver -------------------------------------------------
|
// --- cStreamdevLiveReceiver -------------------------------------------------
|
||||||
|
|
||||||
|
#if VDRVERSNUM < 10500
|
||||||
cStreamdevLiveReceiver::cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, int Ca,
|
cStreamdevLiveReceiver::cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, int Ca,
|
||||||
int Priority, const int *Pids):
|
int Priority, const int *Pids):
|
||||||
cReceiver(Ca, Priority, 0, Pids),
|
cReceiver(Ca, Priority, 0, Pids),
|
||||||
|
#else
|
||||||
|
cStreamdevLiveReceiver::cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, tChannelID ChannelID,
|
||||||
|
int Priority, const int *Pids):
|
||||||
|
cReceiver(ChannelID, Priority, 0, Pids),
|
||||||
|
#endif
|
||||||
m_Streamer(Streamer)
|
m_Streamer(Streamer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -90,7 +96,11 @@ bool cStreamdevLiveStreamer::SetPid(int Pid, bool On)
|
|||||||
DELETENULL(m_Receiver);
|
DELETENULL(m_Receiver);
|
||||||
if (m_NumPids > 0) {
|
if (m_NumPids > 0) {
|
||||||
Dprintf("Creating Receiver to respect changed pids\n");
|
Dprintf("Creating Receiver to respect changed pids\n");
|
||||||
|
#if VDRVERSNUM < 10500
|
||||||
m_Receiver = new cStreamdevLiveReceiver(this, m_Channel->Ca(), m_Priority, m_Pids);
|
m_Receiver = new cStreamdevLiveReceiver(this, m_Channel->Ca(), m_Priority, m_Pids);
|
||||||
|
#else
|
||||||
|
m_Receiver = new cStreamdevLiveReceiver(this, m_Channel->GetChannelID(), m_Priority, m_Pids);
|
||||||
|
#endif
|
||||||
if (IsRunning() && m_Device != NULL) {
|
if (IsRunning() && m_Device != NULL) {
|
||||||
Dprintf("Attaching new receiver\n");
|
Dprintf("Attaching new receiver\n");
|
||||||
Attach();
|
Attach();
|
||||||
|
@ -26,7 +26,11 @@ protected:
|
|||||||
virtual void Receive(uchar *Data, int Length);
|
virtual void Receive(uchar *Data, int Length);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
#if VDRVERSNUM < 10500
|
||||||
cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, int Ca, int Priority, const int *Pids);
|
cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, int Ca, int Priority, const int *Pids);
|
||||||
|
#else
|
||||||
|
cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, tChannelID ChannelID, int Priority, const int *Pids);
|
||||||
|
#endif
|
||||||
virtual ~cStreamdevLiveReceiver();
|
virtual ~cStreamdevLiveReceiver();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user