1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

SRS5: Config: Support better env name for prefixed with srs (#3370)

* Actions: Fix github action warnings.

* Forward: Bind the context id of source or stream.

* Config: Support better env names.

PICK a4e7427433

Co-authored-by: pengfei.ma <pengfei.ma@ctechm.com>
Co-authored-by: Haibo Chen <495810242@qq.com>
This commit is contained in:
Winlin 2023-01-11 10:39:05 +08:00 committed by winlin
parent f46231cf3e
commit 498ce72af8
8 changed files with 53 additions and 13 deletions

View file

@ -66,6 +66,9 @@ srs_error_t SrsForwarder::initialize(SrsRequest* r, string ep)
// the ep(endpoint) to forward to
ep_forward = ep;
// Remember the source context id.
source_cid_ = _srs_context->get_id();
return err;
}
@ -164,7 +167,10 @@ srs_error_t SrsForwarder::on_video(SrsSharedPtrMessage* shared_video)
srs_error_t SrsForwarder::cycle()
{
srs_error_t err = srs_success;
srs_trace("Forwarder: Start forward %s of source=[%s] to %s",
req->get_stream_url().c_str(), source_cid_.c_str(), ep_forward.c_str());
while (true) {
// We always check status first.
// @see https://github.com/ossrs/srs/issues/1634#issuecomment-597571561