mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 20:01:56 +00:00
RTC: Save parent cid for publish stream
This commit is contained in:
parent
34d119f7b4
commit
cf428b8db4
2 changed files with 5 additions and 3 deletions
|
@ -804,10 +804,11 @@ uint32_t SrsRtcPlayStream::get_video_publish_ssrc(uint32_t play_ssrc)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SrsRtcPublishStream::SrsRtcPublishStream(SrsRtcConnection* session)
|
SrsRtcPublishStream::SrsRtcPublishStream(SrsRtcConnection* session, SrsContextId parent_cid)
|
||||||
{
|
{
|
||||||
timer_ = new SrsHourGlass(this, 200 * SRS_UTIME_MILLISECONDS);
|
timer_ = new SrsHourGlass(this, 200 * SRS_UTIME_MILLISECONDS);
|
||||||
|
|
||||||
|
parent_cid_ = parent_cid;
|
||||||
is_started = false;
|
is_started = false;
|
||||||
session_ = session;
|
session_ = session;
|
||||||
request_keyframe_ = false;
|
request_keyframe_ = false;
|
||||||
|
@ -3111,7 +3112,7 @@ srs_error_t SrsRtcConnection::create_publisher(SrsRequest* req, SrsRtcStreamDesc
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
SrsRtcPublishStream* publisher = new SrsRtcPublishStream(this);
|
SrsRtcPublishStream* publisher = new SrsRtcPublishStream(this, _srs_context->get_id());
|
||||||
if ((err = publisher->initialize(req, stream_desc)) != srs_success) {
|
if ((err = publisher->initialize(req, stream_desc)) != srs_success) {
|
||||||
srs_freep(publisher);
|
srs_freep(publisher);
|
||||||
return srs_error_wrap(err, "rtc publisher init");
|
return srs_error_wrap(err, "rtc publisher init");
|
||||||
|
|
|
@ -273,6 +273,7 @@ private:
|
||||||
class SrsRtcPublishStream : virtual public ISrsHourGlass, virtual public ISrsRtpPacketDecodeHandler, virtual public ISrsRtcPublishStream
|
class SrsRtcPublishStream : virtual public ISrsHourGlass, virtual public ISrsRtpPacketDecodeHandler, virtual public ISrsRtcPublishStream
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
SrsContextId parent_cid_;
|
||||||
SrsHourGlass* timer_;
|
SrsHourGlass* timer_;
|
||||||
uint64_t nn_audio_frames;
|
uint64_t nn_audio_frames;
|
||||||
private:
|
private:
|
||||||
|
@ -298,7 +299,7 @@ private:
|
||||||
SrsRtpExtensionTypes extension_types_;
|
SrsRtpExtensionTypes extension_types_;
|
||||||
bool is_started;
|
bool is_started;
|
||||||
public:
|
public:
|
||||||
SrsRtcPublishStream(SrsRtcConnection* session);
|
SrsRtcPublishStream(SrsRtcConnection* session, SrsContextId parent_cid);
|
||||||
virtual ~SrsRtcPublishStream();
|
virtual ~SrsRtcPublishStream();
|
||||||
public:
|
public:
|
||||||
srs_error_t initialize(SrsRequest* req, SrsRtcStreamDescription* stream_desc);
|
srs_error_t initialize(SrsRequest* req, SrsRtcStreamDescription* stream_desc);
|
||||||
|
|
Loading…
Reference in a new issue