rework streaming, add e2 streaming api

Origin commit data
------------------
Branch: ni/coolstream
Commit: e7f97cd4f9
Author: TangoCash <eric@loxat.de>
Date: 2022-09-06 (Tue, 06 Sep 2022)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
TangoCash
2022-09-06 18:05:30 +02:00
committed by vanhofen
parent 5e1857bba6
commit 8df3ca2377
6 changed files with 111 additions and 46 deletions

View File

@@ -54,13 +54,14 @@ class CStreamInstance : public OpenThreads::Thread
t_channel_id channel_id;
stream_pids_t pids;
stream_fds_t fds;
bool send_raw;
virtual bool Send(ssize_t r, unsigned char * _buf = NULL);
virtual void Close();
virtual void run();
friend class CStreamManager;
public:
CStreamInstance(int clientfd, t_channel_id chid, stream_pids_t &pids);
CStreamInstance(int clientfd, t_channel_id chid, stream_pids_t &pids, bool send_raw);
virtual ~CStreamInstance();
virtual bool Open();
virtual bool Start();
@@ -120,7 +121,7 @@ class CStreamManager : public OpenThreads::Thread
streammap_t streams;
bool Listen();
bool Parse(int fd, stream_pids_t &pids, t_channel_id &chid, CFrontend * &frontend);
bool Parse(int fd, stream_pids_t &pids, t_channel_id &chid, CFrontend * &frontend, bool &send_raw);
void AddPids(int fd, CZapitChannel * channel, stream_pids_t &pids);
void CheckStandby(bool enter);
CFrontend * FindFrontend(CZapitChannel * channel);