提交 1369b9f5 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Fix `consumerClosed` for those non compatible client Consumers

上级 4ec9e512
# TODO in mediasoup v2 (server-side) # TODO in mediasoup v2 (server-side)
* If a Producer is closed, those Peers non having a compatible Consumer (due to codecs) won't receive any notification. This is because the "close" event comes from the worker Consumer (which just exists upon succesful `enableConsumer`).
- So it seems that we should create the Consumer in C++ always, being disabled at the beginning.
* When a video Consumer is paused and later resumed, it requests a Full Frame to the Producer. The sending browser does receive the PLI and (obviously) sends a full frame. The problem is that the `RtpStreamSend` of the Consumer ignores that full frame due to "bad sequence number": * When a video Consumer is paused and later resumed, it requests a Full Frame to the Producer. The sending browser does receive the PLI and (obviously) sends a full frame. The problem is that the `RtpStreamSend` of the Consumer ignores that full frame due to "bad sequence number":
``` ```
...@@ -43,3 +40,5 @@ In fact, if the `RtpStreamSend` does not return false, the video automatically w ...@@ -43,3 +40,5 @@ In fact, if the `RtpStreamSend` does not return false, the video automatically w
* Implement `mandatoryCodecPayloadTypes`. * Implement `mandatoryCodecPayloadTypes`.
* Check H246 parameters. * Check H246 parameters.
* JS: Remove tons of useless debugs (for example in `Peer._createProducer()`).
...@@ -175,7 +175,7 @@ class Consumer extends EnhancedEventEmitter ...@@ -175,7 +175,7 @@ class Consumer extends EnhancedEventEmitter
// Remove notification subscriptions. // Remove notification subscriptions.
this._channel.removeAllListeners(this._internal.consumerId); this._channel.removeAllListeners(this._internal.consumerId);
if (this.enabled && notifyChannel) if (notifyChannel)
{ {
// Send Channel request. // Send Channel request.
this._channel.request('consumer.close', this._internal) this._channel.request('consumer.close', this._internal)
...@@ -202,28 +202,19 @@ class Consumer extends EnhancedEventEmitter ...@@ -202,28 +202,19 @@ class Consumer extends EnhancedEventEmitter
if (this._closed) if (this._closed)
return Promise.reject(new errors.InvalidStateError('Consumer closed')); return Promise.reject(new errors.InvalidStateError('Consumer closed'));
if (this.enabled) return this._channel.request('consumer.dump', this._internal)
{ .then((data) =>
return this._channel.request('consumer.dump', this._internal) {
.then((data) => logger.debug('"consumer.dump" request succeeded');
{
logger.debug('"consumer.dump" request succeeded');
return data;
})
.catch((error) =>
{
logger.error('"consumer.dump" request failed: %s', String(error));
throw error; return data;
}); })
} .catch((error) =>
else {
{ logger.error('"consumer.dump" request failed: %s', String(error));
// TODO: What?
return Promise.resolve({}); throw error;
} });
} }
toJson() toJson()
...@@ -242,8 +233,9 @@ class Consumer extends EnhancedEventEmitter ...@@ -242,8 +233,9 @@ class Consumer extends EnhancedEventEmitter
* Enable the Consumer for sending media. * Enable the Consumer for sending media.
* *
* @param {Transport} transport * @param {Transport} transport
* @param {Boolean} remotelyPaused
*/ */
enable(transport) enable(transport, remotelyPaused)
{ {
logger.debug('enable()'); logger.debug('enable()');
...@@ -252,6 +244,9 @@ class Consumer extends EnhancedEventEmitter ...@@ -252,6 +244,9 @@ class Consumer extends EnhancedEventEmitter
else if (this.enabled) else if (this.enabled)
return Promise.reject(new errors.InvalidStateError('Consumer already enabled')); return Promise.reject(new errors.InvalidStateError('Consumer already enabled'));
if (remotelyPaused)
this.remotePause();
const internal = Object.assign({}, this._internal, const internal = Object.assign({}, this._internal,
{ {
transportId : transport.id transportId : transport.id
...@@ -259,33 +254,28 @@ class Consumer extends EnhancedEventEmitter ...@@ -259,33 +254,28 @@ class Consumer extends EnhancedEventEmitter
const data = Object.assign({}, this._data, { transport }); const data = Object.assign({}, this._data, { transport });
return this._channel.request('router.createConsumer', internal, return this._channel.request('consumer.enable', internal,
{ {
kind : this.kind, rtpParameters : this.rtpParameters
rtpParameters : this.rtpParameters,
paused : this.locallyPaused || this.remotelyPaused
}) })
.then(() => .then(() =>
{ {
logger.debug('"router.createConsumer" request succeeded'); logger.debug('"consumer.enable" request succeeded');
this._internal = internal; this._internal = internal;
this._data = data; this._data = data;
// On closure, the worker Transport closes all its Consumers and the client
// side gets consumer.on('unhandled').
transport.on('@close', () => transport.on('@close', () =>
{ {
this._internal.transportId = undefined; this._internal.transportId = undefined;
this._data.transport = undefined; this._data.transport = undefined;
this._sourcePaused = false;
}); });
return; return;
}) })
.catch((error) => .catch((error) =>
{ {
logger.error('"router.createConsumer" request failed: %s', String(error)); logger.error('"consumer.enable" request failed: %s', String(error));
throw error; throw error;
}); });
...@@ -328,18 +318,15 @@ class Consumer extends EnhancedEventEmitter ...@@ -328,18 +318,15 @@ class Consumer extends EnhancedEventEmitter
} }
// Send Channel request. // Send Channel request.
if (this.enabled) this._channel.request('consumer.pause', this._internal)
{ .then(() =>
this._channel.request('consumer.pause', this._internal) {
.then(() => logger.debug('"consumer.pause" request succeeded');
{ })
logger.debug('"consumer.pause" request succeeded'); .catch((error) =>
}) {
.catch((error) => logger.error('"consumer.pause" request failed: %s', String(error));
{ });
logger.error('"consumer.pause" request failed: %s', String(error));
});
}
this.safeEmit('pause', 'local', appData); this.safeEmit('pause', 'local', appData);
...@@ -365,18 +352,15 @@ class Consumer extends EnhancedEventEmitter ...@@ -365,18 +352,15 @@ class Consumer extends EnhancedEventEmitter
this._remotelyPaused = true; this._remotelyPaused = true;
// Send Channel request. // Send Channel request.
if (this.enabled) this._channel.request('consumer.pause', this._internal)
{ .then(() =>
this._channel.request('consumer.pause', this._internal) {
.then(() => logger.debug('"consumer.pause" request succeeded');
{ })
logger.debug('"consumer.pause" request succeeded'); .catch((error) =>
}) {
.catch((error) => logger.error('"consumer.pause" request failed: %s', String(error));
{ });
logger.error('"consumer.pause" request failed: %s', String(error));
});
}
this.safeEmit('pause', 'remote', appData); this.safeEmit('pause', 'remote', appData);
} }
...@@ -417,7 +401,7 @@ class Consumer extends EnhancedEventEmitter ...@@ -417,7 +401,7 @@ class Consumer extends EnhancedEventEmitter
this.emit('@notify', 'consumerResumed', data); this.emit('@notify', 'consumerResumed', data);
} }
if (this.enabled && !this._remotelyPaused) if (!this._remotelyPaused)
{ {
// Send Channel request. // Send Channel request.
this._channel.request('consumer.resume', this._internal) this._channel.request('consumer.resume', this._internal)
...@@ -454,7 +438,7 @@ class Consumer extends EnhancedEventEmitter ...@@ -454,7 +438,7 @@ class Consumer extends EnhancedEventEmitter
this._remotelyPaused = false; this._remotelyPaused = false;
if (this.enabled && !this._locallyPaused) if (!this._locallyPaused)
{ {
// Send Channel request. // Send Channel request.
this._channel.request('consumer.resume', this._internal) this._channel.request('consumer.resume', this._internal)
......
...@@ -394,7 +394,7 @@ class Peer extends EnhancedEventEmitter ...@@ -394,7 +394,7 @@ class Peer extends EnhancedEventEmitter
case 'enableConsumer': case 'enableConsumer':
{ {
const { id, transportId } = request; const { id, transportId, paused } = request;
const consumer = this._consumers.get(id); const consumer = this._consumers.get(id);
const transport = this._transports.get(transportId); const transport = this._transports.get(transportId);
...@@ -403,7 +403,7 @@ class Peer extends EnhancedEventEmitter ...@@ -403,7 +403,7 @@ class Peer extends EnhancedEventEmitter
else if (!transport) else if (!transport)
return Promise.reject(new TypeError('Transport not found')); return Promise.reject(new TypeError('Transport not found'));
return consumer.enable(transport) return consumer.enable(transport, paused)
.then(() => .then(() =>
{ {
return { return {
...@@ -628,6 +628,21 @@ class Peer extends EnhancedEventEmitter ...@@ -628,6 +628,21 @@ class Peer extends EnhancedEventEmitter
this._sendNotification('newConsumer', consumer.toJson()); this._sendNotification('newConsumer', consumer.toJson());
this.safeEmit('newconsumer', consumer); this.safeEmit('newconsumer', consumer);
this._channel.request('router.createConsumer', internal,
{
kind : consumer.kind
})
.then(() =>
{
logger.debug('"router.createConsumer" request succeeded');
})
.catch((error) =>
{
logger.error('"router.createConsumer" request failed: %s', String(error));
throw error;
});
} }
_sendNotification(method, data) _sendNotification(method, data)
......
...@@ -39,6 +39,7 @@ namespace Channel ...@@ -39,6 +39,7 @@ namespace Channel
PRODUCER_SET_RTP_OBJECT_EVENT, PRODUCER_SET_RTP_OBJECT_EVENT,
CONSUMER_CLOSE, CONSUMER_CLOSE,
CONSUMER_DUMP, CONSUMER_DUMP,
CONSUMER_ENABLE,
CONSUMER_PAUSE, CONSUMER_PAUSE,
CONSUMER_RESUME CONSUMER_RESUME
}; };
......
...@@ -26,9 +26,6 @@ namespace RTC ...@@ -26,9 +26,6 @@ namespace RTC
Channel::Notifier* notifier, Channel::Notifier* notifier,
uint32_t consumerId, uint32_t consumerId,
RTC::Media::Kind kind, RTC::Media::Kind kind,
RTC::Transport* transport,
RTC::RtpParameters& rtpParameters,
bool paused,
uint32_t sourceProducerId); uint32_t sourceProducerId);
private: private:
...@@ -40,6 +37,9 @@ namespace RTC ...@@ -40,6 +37,9 @@ namespace RTC
void HandleRequest(Channel::Request* request); void HandleRequest(Channel::Request* request);
void AddListener(RTC::ConsumerListener* listener); void AddListener(RTC::ConsumerListener* listener);
void RemoveListener(RTC::ConsumerListener* listener); void RemoveListener(RTC::ConsumerListener* listener);
void Enable(RTC::Transport* transport, RTC::RtpParameters& rtpParameters);
void Disable();
bool IsEnabled() const;
const RTC::RtpParameters& GetParameters() const; const RTC::RtpParameters& GetParameters() const;
bool IsPaused() const; bool IsPaused() const;
void SetSourcePaused(); void SetSourcePaused();
...@@ -94,6 +94,11 @@ namespace RTC ...@@ -94,6 +94,11 @@ namespace RTC
this->listeners.erase(listener); this->listeners.erase(listener);
} }
inline bool Consumer::IsEnabled() const
{
return this->transport != nullptr;
}
inline const RTC::RtpParameters& Consumer::GetParameters() const inline const RTC::RtpParameters& Consumer::GetParameters() const
{ {
return this->rtpParameters; return this->rtpParameters;
......
...@@ -34,6 +34,7 @@ namespace Channel ...@@ -34,6 +34,7 @@ namespace Channel
{ "producer.setRtpObjectEvent", Request::MethodId::PRODUCER_SET_RTP_OBJECT_EVENT }, { "producer.setRtpObjectEvent", Request::MethodId::PRODUCER_SET_RTP_OBJECT_EVENT },
{ "consumer.close", Request::MethodId::CONSUMER_CLOSE }, { "consumer.close", Request::MethodId::CONSUMER_CLOSE },
{ "consumer.dump", Request::MethodId::CONSUMER_DUMP }, { "consumer.dump", Request::MethodId::CONSUMER_DUMP },
{ "consumer.enable", Request::MethodId::CONSUMER_ENABLE },
{ "consumer.pause", Request::MethodId::CONSUMER_PAUSE }, { "consumer.pause", Request::MethodId::CONSUMER_PAUSE },
{ "consumer.resume", Request::MethodId::CONSUMER_RESUME } { "consumer.resume", Request::MethodId::CONSUMER_RESUME }
}; };
......
...@@ -21,20 +21,14 @@ namespace RTC ...@@ -21,20 +21,14 @@ namespace RTC
Channel::Notifier* notifier, Channel::Notifier* notifier,
uint32_t consumerId, uint32_t consumerId,
RTC::Media::Kind kind, RTC::Media::Kind kind,
RTC::Transport* transport,
RTC::RtpParameters& rtpParameters,
bool paused,
uint32_t sourceProducerId) uint32_t sourceProducerId)
: consumerId(consumerId), kind(kind), sourceProducerId(sourceProducerId), notifier(notifier), : consumerId(consumerId),
transport(transport), rtpParameters(rtpParameters), paused(paused) kind(kind),
sourceProducerId(sourceProducerId),
notifier(notifier)
{ {
MS_TRACE(); MS_TRACE();
FillSupportedCodecPayloadTypes();
// Create RtpStreamSend instance.
CreateRtpStream(this->rtpParameters.encodings[0]);
// Set the RTCP report generation interval. // Set the RTCP report generation interval.
if (this->kind == RTC::Media::Kind::AUDIO) if (this->kind == RTC::Media::Kind::AUDIO)
this->maxRtcpInterval = RTC::RTCP::MaxAudioIntervalMs; this->maxRtcpInterval = RTC::RTCP::MaxAudioIntervalMs;
...@@ -46,7 +40,8 @@ namespace RTC ...@@ -46,7 +40,8 @@ namespace RTC
{ {
MS_TRACE(); MS_TRACE();
delete this->rtpStream; if (this->rtpStream)
delete this->rtpStream;
} }
void Consumer::Destroy() void Consumer::Destroy()
...@@ -72,9 +67,7 @@ namespace RTC ...@@ -72,9 +67,7 @@ namespace RTC
static const Json::StaticString JsonStringSourceProducerId{ "sourceProducerId" }; static const Json::StaticString JsonStringSourceProducerId{ "sourceProducerId" };
static const Json::StaticString JsonStringRtpParameters{ "rtpParameters" }; static const Json::StaticString JsonStringRtpParameters{ "rtpParameters" };
static const Json::StaticString JsonStringRtpStream{ "rtpStream" }; static const Json::StaticString JsonStringRtpStream{ "rtpStream" };
static const Json::StaticString JsonStringSupportedCodecPayloadTypes{ static const Json::StaticString JsonStringEnabled{ "enabled" };
"supportedCodecPayloadTypes"
};
static const Json::StaticString JsonStringPaused{ "paused" }; static const Json::StaticString JsonStringPaused{ "paused" };
static const Json::StaticString JsonStringSourcePaused{ "sourcePaused" }; static const Json::StaticString JsonStringSourcePaused{ "sourcePaused" };
...@@ -86,16 +79,11 @@ namespace RTC ...@@ -86,16 +79,11 @@ namespace RTC
json[JsonStringSourceProducerId] = Json::UInt{ this->sourceProducerId }; json[JsonStringSourceProducerId] = Json::UInt{ this->sourceProducerId };
json[JsonStringRtpParameters] = this->rtpParameters.ToJson(); if (this->transport)
json[JsonStringRtpParameters] = this->rtpParameters.ToJson();
json[JsonStringRtpStream] = this->rtpStream->ToJson();
json[JsonStringSupportedCodecPayloadTypes] = Json::arrayValue; if (this->rtpStream)
json[JsonStringRtpStream] = this->rtpStream->ToJson();
for (auto payloadType : this->supportedCodecPayloadTypes)
{
json[JsonStringSupportedCodecPayloadTypes].append(Json::UInt{ payloadType });
}
json[JsonStringPaused] = this->paused; json[JsonStringPaused] = this->paused;
...@@ -136,7 +124,7 @@ namespace RTC ...@@ -136,7 +124,7 @@ namespace RTC
request->Accept(); request->Accept();
if (wasPaused && !IsPaused()) if (IsEnabled() && wasPaused && !IsPaused())
{ {
for (auto& listener : this->listeners) for (auto& listener : this->listeners)
{ {
...@@ -156,6 +144,43 @@ namespace RTC ...@@ -156,6 +144,43 @@ namespace RTC
} }
} }
void Consumer::Enable(RTC::Transport* transport, RTC::RtpParameters& rtpParameters)
{
MS_TRACE();
if (IsEnabled())
Disable();
this->transport = transport;
this->rtpParameters = rtpParameters;
FillSupportedCodecPayloadTypes();
// Create RtpStreamSend instance.
CreateRtpStream(this->rtpParameters.encodings[0]);
}
void Consumer::Disable()
{
MS_TRACE();
this->transport = nullptr;
this->supportedCodecPayloadTypes.clear();
if (this->rtpStream)
{
delete this->rtpStream;
this->rtpStream = nullptr;
}
// TODO: Probably reset all this stuff:
// uint64_t lastRtcpSentTime{ 0 };
// uint16_t maxRtcpInterval{ 0 };
// RTC::RtpDataCounter transmittedCounter;
// RTC::RtpDataCounter retransmittedCounter;
}
void Consumer::SendRtpPacket(RTC::RtpPacket* packet) void Consumer::SendRtpPacket(RTC::RtpPacket* packet)
{ {
MS_TRACE(); MS_TRACE();
......
...@@ -293,6 +293,9 @@ namespace RTC ...@@ -293,6 +293,9 @@ namespace RTC
// NOTE: This may throw. // NOTE: This may throw.
kind = RTC::Media::GetKind(kindStr); kind = RTC::Media::GetKind(kindStr);
if (kind == RTC::Media::Kind::ALL)
MS_THROW_ERROR("invalid empty kind");
// NOTE: This may throw. // NOTE: This may throw.
rtpParameters = RTC::RtpParameters(request->data[JsonStringRtpParameters]); rtpParameters = RTC::RtpParameters(request->data[JsonStringRtpParameters]);
} }
...@@ -303,9 +306,6 @@ namespace RTC ...@@ -303,9 +306,6 @@ namespace RTC
return; return;
} }
if (kind == RTC::Media::Kind::ALL)
MS_THROW_ERROR("invalid empty kind");
RTC::Producer::RtpMapping rtpMapping; RTC::Producer::RtpMapping rtpMapping;
try try
...@@ -387,11 +387,8 @@ namespace RTC ...@@ -387,11 +387,8 @@ namespace RTC
case Channel::Request::MethodId::ROUTER_CREATE_CONSUMER: case Channel::Request::MethodId::ROUTER_CREATE_CONSUMER:
{ {
static const Json::StaticString JsonStringKind{ "kind" }; static const Json::StaticString JsonStringKind{ "kind" };
static const Json::StaticString JsonStringRtpParameters{ "rtpParameters" };
static const Json::StaticString JsonStringPaused{ "paused" };
RTC::Consumer* consumer; RTC::Consumer* consumer;
RTC::Transport* transport;
RTC::Producer* producer; RTC::Producer* producer;
uint32_t consumerId; uint32_t consumerId;
...@@ -413,24 +410,6 @@ namespace RTC ...@@ -413,24 +410,6 @@ namespace RTC
return; return;
} }
try
{
transport = GetTransportFromRequest(request);
}
catch (const MediaSoupError& error)
{
request->Reject(error.what());
return;
}
if (transport == nullptr)
{
request->Reject("Transport does not exist");
return;
}
try try
{ {
producer = GetProducerFromRequest(request); producer = GetProducerFromRequest(request);
...@@ -455,24 +434,19 @@ namespace RTC ...@@ -455,24 +434,19 @@ namespace RTC
return; return;
} }
else if (!request->data[JsonStringRtpParameters].isObject())
{
request->Reject("missing data.rtpParameters");
return;
}
RTC::Media::Kind kind; RTC::Media::Kind kind;
std::string kindStr = request->data[JsonStringKind].asString(); std::string kindStr = request->data[JsonStringKind].asString();
RTC::RtpParameters rtpParameters;
try try
{ {
// NOTE: This may throw. // NOTE: This may throw.
kind = RTC::Media::GetKind(kindStr); kind = RTC::Media::GetKind(kindStr);
// NOTE: This may throw. if (kind == RTC::Media::Kind::ALL)
rtpParameters = RTC::RtpParameters(request->data[JsonStringRtpParameters]); MS_THROW_ERROR("invalid empty kind");
else if (kind != producer->kind)
MS_THROW_ERROR("not matching kind");
} }
catch (const MediaSoupError& error) catch (const MediaSoupError& error)
{ {
...@@ -481,18 +455,8 @@ namespace RTC ...@@ -481,18 +455,8 @@ namespace RTC
return; return;
} }
if (kind == RTC::Media::Kind::ALL)
MS_THROW_ERROR("invalid empty kind");
else if (kind != producer->kind)
MS_THROW_ERROR("not matching kind");
bool paused = false;
if (request->data[JsonStringPaused].isBool())
paused = request->data[JsonStringPaused].asBool();
consumer = new RTC::Consumer( consumer = new RTC::Consumer(
this->notifier, consumerId, kind, transport, rtpParameters, paused, producer->producerId); this->notifier, consumerId, kind, producer->producerId);
// If the Producer is paused tell it to the new Consumer. // If the Producer is paused tell it to the new Consumer.
if (producer->IsPaused()) if (producer->IsPaused())
...@@ -501,9 +465,6 @@ namespace RTC ...@@ -501,9 +465,6 @@ namespace RTC
// Add us as listener. // Add us as listener.
consumer->AddListener(this); consumer->AddListener(this);
// Tell the Transport to handle the new Consumer.
transport->HandleConsumer(consumer);
// Insert into the maps. // Insert into the maps.
this->consumers[consumerId] = consumer; this->consumers[consumerId] = consumer;
this->mapProducerConsumers[producer].insert(consumer); this->mapProducerConsumers[producer].insert(consumer);
...@@ -694,6 +655,80 @@ namespace RTC ...@@ -694,6 +655,80 @@ namespace RTC
} }
case Channel::Request::MethodId::CONSUMER_DUMP: case Channel::Request::MethodId::CONSUMER_DUMP:
case Channel::Request::MethodId::CONSUMER_ENABLE:
{
static const Json::StaticString JsonStringRtpParameters{ "rtpParameters" };
RTC::Consumer* consumer;
RTC::Transport* transport;
try
{
consumer = GetConsumerFromRequest(request);
}
catch (const MediaSoupError& error)
{
request->Reject(error.what());
return;
}
if (consumer == nullptr)
{
request->Reject("Consumer does not exist");
return;
}
try
{
transport = GetTransportFromRequest(request);
}
catch (const MediaSoupError& error)
{
request->Reject(error.what());
return;
}
if (transport == nullptr)
{
request->Reject("Transport does not exist");
return;
}
if (!request->data[JsonStringRtpParameters].isObject())
{
request->Reject("missing data.rtpParameters");
return;
}
RTC::RtpParameters rtpParameters;
try
{
// NOTE: This may throw.
rtpParameters = RTC::RtpParameters(request->data[JsonStringRtpParameters]);
}
catch (const MediaSoupError& error)
{
request->Reject(error.what());
return;
}
consumer->Enable(transport, rtpParameters);
// Tell the Transport to handle the new Consumer.
transport->HandleConsumer(consumer);
request->Accept();
break;
}
case Channel::Request::MethodId::CONSUMER_PAUSE: case Channel::Request::MethodId::CONSUMER_PAUSE:
case Channel::Request::MethodId::CONSUMER_RESUME: case Channel::Request::MethodId::CONSUMER_RESUME:
{ {
...@@ -892,7 +927,8 @@ namespace RTC ...@@ -892,7 +927,8 @@ namespace RTC
// from which it was received. // from which it was received.
for (auto& consumer : consumers) for (auto& consumer : consumers)
{ {
consumer->SendRtpPacket(packet); if (consumer->IsEnabled())
consumer->SendRtpPacket(packet);
} }
// Update audio levels. // Update audio levels.
......
...@@ -248,13 +248,13 @@ namespace RTC ...@@ -248,13 +248,13 @@ namespace RTC
producer->Destroy(); producer->Destroy();
} }
// Close all the handled Consumers. // Disable all the handled Consumers.
for (auto it = this->consumers.begin(); it != this->consumers.end();) for (auto& consumer : this->consumers)
{ {
auto* consumer = *it; consumer->Disable();
it = this->consumers.erase(it); // Add us as listener.
consumer->Destroy(); consumer->RemoveListener(this);
} }
// TODO: yes? May be since we allow Transport being closed from on DtlsTransport // TODO: yes? May be since we allow Transport being closed from on DtlsTransport
......
...@@ -255,6 +255,7 @@ void Worker::OnChannelRequest(Channel::UnixStreamSocket* /*channel*/, Channel::R ...@@ -255,6 +255,7 @@ void Worker::OnChannelRequest(Channel::UnixStreamSocket* /*channel*/, Channel::R
case Channel::Request::MethodId::PRODUCER_SET_RTP_OBJECT_EVENT: case Channel::Request::MethodId::PRODUCER_SET_RTP_OBJECT_EVENT:
case Channel::Request::MethodId::CONSUMER_CLOSE: case Channel::Request::MethodId::CONSUMER_CLOSE:
case Channel::Request::MethodId::CONSUMER_DUMP: case Channel::Request::MethodId::CONSUMER_DUMP:
case Channel::Request::MethodId::CONSUMER_ENABLE:
case Channel::Request::MethodId::CONSUMER_PAUSE: case Channel::Request::MethodId::CONSUMER_PAUSE:
case Channel::Request::MethodId::CONSUMER_RESUME: case Channel::Request::MethodId::CONSUMER_RESUME:
{ {
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论