mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
In cStreamdevStreamer dropped Activate(bool) and moved its code into Start()
This commit is contained in:
parent
eaf9321c4c
commit
0677f48329
1
HISTORY
1
HISTORY
@ -1,6 +1,7 @@
|
||||
VDR Plugin 'streamdev' Revision History
|
||||
---------------------------------------
|
||||
|
||||
- In cStreamdevStreamer dropped Activate(bool) and moved its code into Start().
|
||||
- Moved cStreamdevFilterStreamer to livefilter.[hc]
|
||||
- Return HTTP/1.1 compliant response headers plus some always useful headers
|
||||
- Return HTTP URL parameters ending with ".dlna.org" as response headers
|
||||
|
@ -1012,7 +1012,6 @@ bool cConnectionVTP::CmdPORT(char *Opts)
|
||||
if(!m_FilterStreamer)
|
||||
m_FilterStreamer = new cStreamdevFilterStreamer;
|
||||
m_FilterStreamer->Start(m_FilterSocket);
|
||||
m_FilterStreamer->Activate(true);
|
||||
|
||||
return Respond(220, "Port command ok, data connection opened");
|
||||
break;
|
||||
|
@ -24,7 +24,6 @@ private:
|
||||
cStreamdevStreamer *m_Streamer;
|
||||
|
||||
protected:
|
||||
virtual void Activate(bool On);
|
||||
virtual void Receive(uchar *Data, int Length);
|
||||
|
||||
public:
|
||||
@ -54,12 +53,6 @@ void cStreamdevLiveReceiver::Receive(uchar *Data, int Length) {
|
||||
m_Streamer->ReportOverflow(Length - p);
|
||||
}
|
||||
|
||||
inline void cStreamdevLiveReceiver::Activate(bool On)
|
||||
{
|
||||
Dprintf("LiveReceiver->Activate(%d)\n", On);
|
||||
m_Streamer->Activate(On);
|
||||
}
|
||||
|
||||
// --- cStreamdevPatFilter ----------------------------------------------------
|
||||
|
||||
class cStreamdevPatFilter : public cFilter {
|
||||
|
@ -126,30 +126,25 @@ cStreamdevStreamer::~cStreamdevStreamer()
|
||||
|
||||
void cStreamdevStreamer::Start(cTBSocket *Socket)
|
||||
{
|
||||
Dprintf("start streamer\n");
|
||||
Dprintf("start writer\n");
|
||||
m_Writer = new cStreamdevWriter(Socket, this);
|
||||
m_Writer->Start();
|
||||
Attach();
|
||||
}
|
||||
|
||||
void cStreamdevStreamer::Activate(bool On)
|
||||
{
|
||||
if (On && !Active()) {
|
||||
Dprintf("activate streamer\n");
|
||||
if (!Active()) {
|
||||
Dprintf("start streamer\n");
|
||||
cThread::Start();
|
||||
}
|
||||
Attach();
|
||||
}
|
||||
|
||||
void cStreamdevStreamer::Stop(void)
|
||||
{
|
||||
Detach();
|
||||
if (Running()) {
|
||||
Dprintf("stopping streamer\n");
|
||||
Dprintf("stop streamer\n");
|
||||
Cancel(3);
|
||||
}
|
||||
if (m_Writer) {
|
||||
Detach();
|
||||
DELETENULL(m_Writer);
|
||||
}
|
||||
Dprintf("stop writer\n");
|
||||
DELETENULL(m_Writer);
|
||||
}
|
||||
|
||||
void cStreamdevStreamer::Action(void)
|
||||
|
@ -85,7 +85,6 @@ public:
|
||||
virtual void Stop(void);
|
||||
bool Abort(void);
|
||||
|
||||
void Activate(bool On);
|
||||
int Receive(uchar *Data, int Length) { return m_RingBuffer->PutTS(Data, Length); }
|
||||
void ReportOverflow(int Bytes) { m_RingBuffer->ReportOverflow(Bytes); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user