mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
- blargh
This commit is contained in:
parent
ad70fe8c64
commit
4cc684e530
@ -91,7 +91,7 @@ bool cStreamdevLiveStreamer::SetPid(int Pid, bool On)
|
||||
if (m_NumPids > 0) {
|
||||
Dprintf("Creating Receiver to respect changed pids\n");
|
||||
m_Receiver = new cStreamdevLiveReceiver(this, m_Channel->Ca(), m_Priority, m_Pids);
|
||||
if (m_Device != NULL) {
|
||||
if (IsRunning() && m_Device != NULL) {
|
||||
Dprintf("Attaching new receiver\n");
|
||||
Attach();
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: streamer.c,v 1.7 2005/02/11 16:44:15 lordjaxom Exp $
|
||||
* $Id: streamer.c,v 1.8 2005/02/11 17:02:22 lordjaxom Exp $
|
||||
*/
|
||||
|
||||
#include <vdr/ringbuffer.h>
|
||||
@ -57,6 +57,7 @@ void cStreamdevWriter::Action(void)
|
||||
cStreamdevStreamer::cStreamdevStreamer(const char *Name):
|
||||
cThread(Name),
|
||||
m_Active(false),
|
||||
m_Running(false),
|
||||
m_Writer(NULL),
|
||||
m_RingBuffer(new cRingBufferLinear(STREAMERBUFSIZE, TS_SIZE * 2, true,
|
||||
"streamdev-streamer")),
|
||||
@ -79,6 +80,7 @@ void cStreamdevStreamer::Start(cTBSocket *Socket)
|
||||
{
|
||||
Dprintf("start streamer\n");
|
||||
m_Writer = new cStreamdevWriter(Socket, this);
|
||||
m_Running = true;
|
||||
Attach();
|
||||
}
|
||||
|
||||
@ -98,7 +100,9 @@ void cStreamdevStreamer::Stop(void)
|
||||
m_Active = false;
|
||||
Cancel(3);
|
||||
}
|
||||
Detach();
|
||||
DELETENULL(m_Writer);
|
||||
m_Running = false;
|
||||
}
|
||||
|
||||
void cStreamdevStreamer::Action(void)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: streamer.h,v 1.5 2005/02/11 16:44:15 lordjaxom Exp $
|
||||
* $Id: streamer.h,v 1.6 2005/02/11 17:02:22 lordjaxom Exp $
|
||||
*/
|
||||
|
||||
#ifndef VDR_STREAMDEV_STREAMER_H
|
||||
@ -36,6 +36,7 @@ public:
|
||||
class cStreamdevStreamer: public cThread {
|
||||
private:
|
||||
bool m_Active;
|
||||
bool m_Running;
|
||||
cStreamdevWriter *m_Writer;
|
||||
cRingBufferLinear *m_RingBuffer;
|
||||
cRingBufferLinear *m_SendBuffer;
|
||||
@ -43,6 +44,8 @@ private:
|
||||
protected:
|
||||
virtual void Action(void);
|
||||
|
||||
bool IsRunning(void) const { return m_Running; }
|
||||
|
||||
public:
|
||||
cStreamdevStreamer(const char *Name);
|
||||
virtual ~cStreamdevStreamer();
|
||||
|
Loading…
Reference in New Issue
Block a user