mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
based on server_livefilter-streamer-type.patch by Petri Hintukainen
- Use cStreamer (base class) instead of cLiveStreamer (no need to know streamer type) * works with cLiveStreamer and cLiveFilterStreamer * avoid circular dependency - visibility of cStreamdevLiveReceiver: Moved from livestreamer.h -> .c Modified Files: server/livefilter.c server/livefilter.h server/livestreamer.c server/livestreamer.h
This commit is contained in:
parent
6dd3cc412e
commit
0553fce43c
@ -1,20 +1,24 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: livefilter.c,v 1.2 2005/02/08 13:59:16 lordjaxom Exp $
|
* $Id: livefilter.c,v 1.3 2007/04/23 15:44:55 schmirl Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "server/livefilter.h"
|
#include "server/livefilter.h"
|
||||||
#include "server/livestreamer.h"
|
#include "server/streamer.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#ifndef TS_SIZE
|
||||||
|
# define TS_SIZE 188
|
||||||
|
#endif
|
||||||
|
#ifndef TS_SYNC_BYTE
|
||||||
|
# define TS_SYNC_BYTE 0x47
|
||||||
|
#endif
|
||||||
|
|
||||||
#if VDRVERSNUM >= 10300
|
#if VDRVERSNUM >= 10300
|
||||||
|
|
||||||
cStreamdevLiveFilter::cStreamdevLiveFilter(cStreamdevLiveStreamer *Streamer) {
|
cStreamdevLiveFilter::cStreamdevLiveFilter(cStreamdevStreamer *Streamer) {
|
||||||
m_Streamer = Streamer;
|
m_Streamer = Streamer;
|
||||||
}
|
}
|
||||||
|
|
||||||
cStreamdevLiveFilter::~cStreamdevLiveFilter() {
|
|
||||||
}
|
|
||||||
|
|
||||||
void cStreamdevLiveFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
|
void cStreamdevLiveFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
|
||||||
{
|
{
|
||||||
uchar buffer[TS_SIZE];
|
uchar buffer[TS_SIZE];
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: livefilter.h,v 1.2 2005/11/07 19:28:41 lordjaxom Exp $
|
* $Id: livefilter.h,v 1.3 2007/04/23 15:44:55 schmirl Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef VDR_STREAMEV_LIVEFILTER_H
|
#ifndef VDR_STREAMEV_LIVEFILTER_H
|
||||||
@ -11,20 +11,17 @@
|
|||||||
|
|
||||||
#include <vdr/filter.h>
|
#include <vdr/filter.h>
|
||||||
|
|
||||||
class cStreamdevLiveStreamer;
|
class cStreamdevStreamer;
|
||||||
|
|
||||||
class cStreamdevLiveFilter: public cFilter {
|
class cStreamdevLiveFilter: public cFilter {
|
||||||
friend class cStreamdevLiveStreamer;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cStreamdevLiveStreamer *m_Streamer;
|
cStreamdevStreamer *m_Streamer;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
|
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
cStreamdevLiveFilter(cStreamdevLiveStreamer *Streamer);
|
cStreamdevLiveFilter(cStreamdevStreamer *Streamer);
|
||||||
virtual ~cStreamdevLiveFilter();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# endif // VDRVERSNUM >= 10300
|
# endif // VDRVERSNUM >= 10300
|
||||||
|
@ -8,12 +8,31 @@
|
|||||||
|
|
||||||
// --- cStreamdevLiveReceiver -------------------------------------------------
|
// --- cStreamdevLiveReceiver -------------------------------------------------
|
||||||
|
|
||||||
|
class cStreamdevLiveReceiver: public cReceiver {
|
||||||
|
friend class cStreamdevStreamer;
|
||||||
|
|
||||||
|
private:
|
||||||
|
cStreamdevStreamer *m_Streamer;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void Activate(bool On);
|
||||||
|
virtual void Receive(uchar *Data, int Length);
|
||||||
|
|
||||||
|
public:
|
||||||
#if VDRVERSNUM < 10500
|
#if VDRVERSNUM < 10500
|
||||||
cStreamdevLiveReceiver::cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, int Ca,
|
cStreamdevLiveReceiver(cStreamdevStreamer *Streamer, int Ca, int Priority, const int *Pids);
|
||||||
|
#else
|
||||||
|
cStreamdevLiveReceiver(cStreamdevStreamer *Streamer, tChannelID ChannelID, int Priority, const int *Pids);
|
||||||
|
#endif
|
||||||
|
virtual ~cStreamdevLiveReceiver();
|
||||||
|
};
|
||||||
|
|
||||||
|
#if VDRVERSNUM < 10500
|
||||||
|
cStreamdevLiveReceiver::cStreamdevLiveReceiver(cStreamdevStreamer *Streamer, int Ca,
|
||||||
int Priority, const int *Pids):
|
int Priority, const int *Pids):
|
||||||
cReceiver(Ca, Priority, 0, Pids),
|
cReceiver(Ca, Priority, 0, Pids),
|
||||||
#else
|
#else
|
||||||
cStreamdevLiveReceiver::cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, tChannelID ChannelID,
|
cStreamdevLiveReceiver::cStreamdevLiveReceiver(cStreamdevStreamer *Streamer, tChannelID ChannelID,
|
||||||
int Priority, const int *Pids):
|
int Priority, const int *Pids):
|
||||||
cReceiver(ChannelID, Priority, 0, Pids),
|
cReceiver(ChannelID, Priority, 0, Pids),
|
||||||
#endif
|
#endif
|
||||||
@ -33,6 +52,13 @@ void cStreamdevLiveReceiver::Receive(uchar *Data, int Length) {
|
|||||||
m_Streamer->ReportOverflow(Length - p);
|
m_Streamer->ReportOverflow(Length - p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void cStreamdevLiveReceiver::Activate(bool On)
|
||||||
|
{
|
||||||
|
Dprintf("LiveReceiver->Activate(%d)\n", On);
|
||||||
|
m_Streamer->Activate(On);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// --- cStreamdevLiveStreamer -------------------------------------------------
|
// --- cStreamdevLiveStreamer -------------------------------------------------
|
||||||
|
|
||||||
cStreamdevLiveStreamer::cStreamdevLiveStreamer(int Priority):
|
cStreamdevLiveStreamer::cStreamdevLiveStreamer(int Priority):
|
||||||
|
@ -12,27 +12,7 @@ class cTS2PSRemux;
|
|||||||
class cTS2ESRemux;
|
class cTS2ESRemux;
|
||||||
class cExternRemux;
|
class cExternRemux;
|
||||||
class cRemux;
|
class cRemux;
|
||||||
|
class cStreamdevLiveReceiver;
|
||||||
// --- cStreamdevLiveReceiver -------------------------------------------------
|
|
||||||
|
|
||||||
class cStreamdevLiveReceiver: public cReceiver {
|
|
||||||
friend class cStreamdevLiveStreamer;
|
|
||||||
|
|
||||||
private:
|
|
||||||
cStreamdevLiveStreamer *m_Streamer;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void Activate(bool On);
|
|
||||||
virtual void Receive(uchar *Data, int Length);
|
|
||||||
|
|
||||||
public:
|
|
||||||
#if VDRVERSNUM < 10500
|
|
||||||
cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, int Ca, int Priority, const int *Pids);
|
|
||||||
#else
|
|
||||||
cStreamdevLiveReceiver(cStreamdevLiveStreamer *Streamer, tChannelID ChannelID, int Priority, const int *Pids);
|
|
||||||
#endif
|
|
||||||
virtual ~cStreamdevLiveReceiver();
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- cStreamdevLiveStreamer -------------------------------------------------
|
// --- cStreamdevLiveStreamer -------------------------------------------------
|
||||||
|
|
||||||
@ -70,12 +50,4 @@ public:
|
|||||||
virtual std::string Report(void);
|
virtual std::string Report(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- cStreamdevLiveReceiver reverse inlines ---------------------------------
|
|
||||||
|
|
||||||
inline void cStreamdevLiveReceiver::Activate(bool On)
|
|
||||||
{
|
|
||||||
Dprintf("LiveReceiver->Activate(%d)\n", On);
|
|
||||||
m_Streamer->Activate(On);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // VDR_STREAMDEV_LIVESTREAMER_H
|
#endif // VDR_STREAMDEV_LIVESTREAMER_H
|
||||||
|
Loading…
Reference in New Issue
Block a user