mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
fix #57, use lock(acquire/release publish) to avoid duplicated publishing. 0.9.188.
This commit is contained in:
parent
6dd065bcc3
commit
ade2376da0
6 changed files with 109 additions and 33 deletions
|
@ -369,6 +369,13 @@ public:
|
|||
virtual int on_video(SrsMessage* video);
|
||||
virtual int on_aggregate(SrsMessage* msg);
|
||||
/**
|
||||
* the pre-publish is we are very sure we are
|
||||
* trying to publish stream, please lock the resource,
|
||||
* and we use release_publish() to release the resource.
|
||||
*/
|
||||
virtual int acquire_publish();
|
||||
virtual void release_publish();
|
||||
/**
|
||||
* publish stream event notify.
|
||||
* @param _req the request from client, the source will deep copy it,
|
||||
* for when reload the request of client maybe invalid.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue