mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add tools
This commit is contained in:
parent
de95bf74b1
commit
3515af9dff
4 changed files with 36 additions and 6 deletions
|
@ -364,12 +364,23 @@ SrsSource::SrsSource(std::string _stream_url)
|
|||
|
||||
SrsSource::~SrsSource()
|
||||
{
|
||||
std::vector<SrsConsumer*>::iterator it;
|
||||
for (it = consumers.begin(); it != consumers.end(); ++it) {
|
||||
SrsConsumer* consumer = *it;
|
||||
srs_freep(consumer);
|
||||
if (true) {
|
||||
std::vector<SrsConsumer*>::iterator it;
|
||||
for (it = consumers.begin(); it != consumers.end(); ++it) {
|
||||
SrsConsumer* consumer = *it;
|
||||
srs_freep(consumer);
|
||||
}
|
||||
consumers.clear();
|
||||
}
|
||||
|
||||
if (true) {
|
||||
std::vector<SrsForwarder*>::iterator it;
|
||||
for (it = forwarders.begin(); it != forwarders.end(); ++it) {
|
||||
SrsForwarder* forwarder = *it;
|
||||
srs_freep(forwarder);
|
||||
}
|
||||
forwarders.clear();
|
||||
}
|
||||
consumers.clear();
|
||||
|
||||
srs_freep(cache_metadata);
|
||||
srs_freep(cache_sh_video);
|
||||
|
|
|
@ -166,14 +166,16 @@ public:
|
|||
static SrsSource* find(std::string stream_url);
|
||||
private:
|
||||
std::string stream_url;
|
||||
// to delivery stream to clients.
|
||||
std::vector<SrsConsumer*> consumers;
|
||||
private:
|
||||
// hls handler.
|
||||
#ifdef SRS_HLS
|
||||
SrsHls* hls;
|
||||
#endif
|
||||
// gop cache for client fast startup.
|
||||
SrsGopCache* gop_cache;
|
||||
// to forward stream to other servers
|
||||
std::vector<SrsForwarder*> forwarders;
|
||||
private:
|
||||
/**
|
||||
* the sample rate of audio in metadata.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue