In cStreamdevStreamer dropped Activate(bool) and moved its code into Start()

This commit is contained in:
Frank Schmirler 2012-12-04 17:21:36 +01:00
parent eaf9321c4c
commit 0677f48329
5 changed files with 9 additions and 22 deletions

View File

@ -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

View File

@ -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;

View File

@ -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 {

View File

@ -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)

View File

@ -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); }