2015-09-24 16:47:53 -07:00
|
|
|
/*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Copyright 2015 The WebRTC project authors. All Rights Reserved.
|
2015-09-24 16:47:53 -07:00
|
|
|
*
|
2016-02-10 07:54:43 -08:00
|
|
|
* Use of this source code is governed by a BSD-style license
|
|
|
|
|
* that can be found in the LICENSE file in the root of the source
|
|
|
|
|
* tree. An additional intellectual property rights grant can be found
|
|
|
|
|
* in the file PATENTS. All contributing project authors may
|
|
|
|
|
* be found in the AUTHORS file in the root of the source tree.
|
2015-09-24 16:47:53 -07:00
|
|
|
*/
|
|
|
|
|
|
2016-02-10 10:53:12 +01:00
|
|
|
#include "webrtc/api/rtpsender.h"
|
2015-09-24 16:47:53 -07:00
|
|
|
|
2016-02-10 10:53:12 +01:00
|
|
|
#include "webrtc/api/localaudiosource.h"
|
2016-03-20 09:38:40 -07:00
|
|
|
#include "webrtc/api/mediastreaminterface.h"
|
2015-11-25 11:26:01 -08:00
|
|
|
#include "webrtc/base/helpers.h"
|
2016-04-11 11:45:14 +02:00
|
|
|
#include "webrtc/base/trace_event.h"
|
2015-09-28 16:53:55 -07:00
|
|
|
|
|
|
|
|
namespace webrtc {
|
|
|
|
|
|
|
|
|
|
LocalAudioSinkAdapter::LocalAudioSinkAdapter() : sink_(nullptr) {}
|
|
|
|
|
|
|
|
|
|
LocalAudioSinkAdapter::~LocalAudioSinkAdapter() {
|
|
|
|
|
rtc::CritScope lock(&lock_);
|
|
|
|
|
if (sink_)
|
|
|
|
|
sink_->OnClose();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LocalAudioSinkAdapter::OnData(const void* audio_data,
|
|
|
|
|
int bits_per_sample,
|
|
|
|
|
int sample_rate,
|
Convert channel counts to size_t.
IIRC, this was originally requested by ajm during review of the other size_t conversions I did over the past year, and I agreed it made sense, but wanted to do it separately since those changes were already gargantuan.
BUG=chromium:81439
TEST=none
R=henrik.lundin@webrtc.org, henrika@webrtc.org, kjellander@webrtc.org, minyue@webrtc.org, perkj@webrtc.org, solenberg@webrtc.org, stefan@webrtc.org, tina.legrand@webrtc.org
Review URL: https://codereview.webrtc.org/1316523002 .
Cr-Commit-Position: refs/heads/master@{#11229}
2016-01-12 16:26:35 -08:00
|
|
|
size_t number_of_channels,
|
2015-09-28 16:53:55 -07:00
|
|
|
size_t number_of_frames) {
|
|
|
|
|
rtc::CritScope lock(&lock_);
|
|
|
|
|
if (sink_) {
|
|
|
|
|
sink_->OnData(audio_data, bits_per_sample, sample_rate, number_of_channels,
|
|
|
|
|
number_of_frames);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-08 12:37:39 -08:00
|
|
|
void LocalAudioSinkAdapter::SetSink(cricket::AudioSource::Sink* sink) {
|
2015-09-28 16:53:55 -07:00
|
|
|
rtc::CritScope lock(&lock_);
|
|
|
|
|
ASSERT(!sink || !sink_);
|
|
|
|
|
sink_ = sink;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AudioRtpSender::AudioRtpSender(AudioTrackInterface* track,
|
2015-11-25 11:26:01 -08:00
|
|
|
const std::string& stream_id,
|
|
|
|
|
AudioProviderInterface* provider,
|
|
|
|
|
StatsCollector* stats)
|
2015-09-28 16:53:55 -07:00
|
|
|
: id_(track->id()),
|
2015-11-25 11:26:01 -08:00
|
|
|
stream_id_(stream_id),
|
2015-11-20 11:43:22 -08:00
|
|
|
provider_(provider),
|
2015-11-25 11:26:01 -08:00
|
|
|
stats_(stats),
|
|
|
|
|
track_(track),
|
2015-09-28 16:53:55 -07:00
|
|
|
cached_track_enabled_(track->enabled()),
|
|
|
|
|
sink_adapter_(new LocalAudioSinkAdapter()) {
|
2015-11-25 11:26:01 -08:00
|
|
|
RTC_DCHECK(provider != nullptr);
|
2015-09-28 16:53:55 -07:00
|
|
|
track_->RegisterObserver(this);
|
|
|
|
|
track_->AddSink(sink_adapter_.get());
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-14 15:35:42 -08:00
|
|
|
AudioRtpSender::AudioRtpSender(AudioTrackInterface* track,
|
|
|
|
|
AudioProviderInterface* provider,
|
|
|
|
|
StatsCollector* stats)
|
|
|
|
|
: id_(track->id()),
|
|
|
|
|
stream_id_(rtc::CreateRandomUuid()),
|
|
|
|
|
provider_(provider),
|
|
|
|
|
stats_(stats),
|
|
|
|
|
track_(track),
|
|
|
|
|
cached_track_enabled_(track->enabled()),
|
|
|
|
|
sink_adapter_(new LocalAudioSinkAdapter()) {
|
|
|
|
|
RTC_DCHECK(provider != nullptr);
|
|
|
|
|
track_->RegisterObserver(this);
|
|
|
|
|
track_->AddSink(sink_adapter_.get());
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-25 11:26:01 -08:00
|
|
|
AudioRtpSender::AudioRtpSender(AudioProviderInterface* provider,
|
|
|
|
|
StatsCollector* stats)
|
|
|
|
|
: id_(rtc::CreateRandomUuid()),
|
|
|
|
|
stream_id_(rtc::CreateRandomUuid()),
|
|
|
|
|
provider_(provider),
|
|
|
|
|
stats_(stats),
|
|
|
|
|
sink_adapter_(new LocalAudioSinkAdapter()) {}
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
AudioRtpSender::~AudioRtpSender() {
|
|
|
|
|
Stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AudioRtpSender::OnChanged() {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "AudioRtpSender::OnChanged");
|
2015-11-25 11:26:01 -08:00
|
|
|
RTC_DCHECK(!stopped_);
|
2015-09-28 16:53:55 -07:00
|
|
|
if (cached_track_enabled_ != track_->enabled()) {
|
|
|
|
|
cached_track_enabled_ = track_->enabled();
|
2015-11-25 11:26:01 -08:00
|
|
|
if (can_send_track()) {
|
|
|
|
|
SetAudioSend();
|
|
|
|
|
}
|
2015-09-28 16:53:55 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool AudioRtpSender::SetTrack(MediaStreamTrackInterface* track) {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "AudioRtpSender::SetTrack");
|
2015-11-25 11:26:01 -08:00
|
|
|
if (stopped_) {
|
|
|
|
|
LOG(LS_ERROR) << "SetTrack can't be called on a stopped RtpSender.";
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (track && track->kind() != MediaStreamTrackInterface::kAudioKind) {
|
2015-09-28 16:53:55 -07:00
|
|
|
LOG(LS_ERROR) << "SetTrack called on audio RtpSender with " << track->kind()
|
|
|
|
|
<< " track.";
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
AudioTrackInterface* audio_track = static_cast<AudioTrackInterface*>(track);
|
|
|
|
|
|
|
|
|
|
// Detach from old track.
|
2015-11-25 11:26:01 -08:00
|
|
|
if (track_) {
|
|
|
|
|
track_->RemoveSink(sink_adapter_.get());
|
|
|
|
|
track_->UnregisterObserver(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (can_send_track() && stats_) {
|
|
|
|
|
stats_->RemoveLocalAudioTrack(track_.get(), ssrc_);
|
|
|
|
|
}
|
2015-09-28 16:53:55 -07:00
|
|
|
|
|
|
|
|
// Attach to new track.
|
2015-11-25 11:26:01 -08:00
|
|
|
bool prev_can_send_track = can_send_track();
|
2015-09-28 16:53:55 -07:00
|
|
|
track_ = audio_track;
|
2015-11-25 11:26:01 -08:00
|
|
|
if (track_) {
|
|
|
|
|
cached_track_enabled_ = track_->enabled();
|
|
|
|
|
track_->RegisterObserver(this);
|
|
|
|
|
track_->AddSink(sink_adapter_.get());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update audio provider.
|
|
|
|
|
if (can_send_track()) {
|
|
|
|
|
SetAudioSend();
|
|
|
|
|
if (stats_) {
|
|
|
|
|
stats_->AddLocalAudioTrack(track_.get(), ssrc_);
|
|
|
|
|
}
|
|
|
|
|
} else if (prev_can_send_track) {
|
|
|
|
|
cricket::AudioOptions options;
|
|
|
|
|
provider_->SetAudioSend(ssrc_, false, options, nullptr);
|
|
|
|
|
}
|
2015-09-28 16:53:55 -07:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-25 11:26:01 -08:00
|
|
|
void AudioRtpSender::SetSsrc(uint32_t ssrc) {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "AudioRtpSender::SetSsrc");
|
2015-11-25 11:26:01 -08:00
|
|
|
if (stopped_ || ssrc == ssrc_) {
|
2015-10-26 14:11:17 -07:00
|
|
|
return;
|
|
|
|
|
}
|
2015-11-25 11:26:01 -08:00
|
|
|
// If we are already sending with a particular SSRC, stop sending.
|
|
|
|
|
if (can_send_track()) {
|
|
|
|
|
cricket::AudioOptions options;
|
|
|
|
|
provider_->SetAudioSend(ssrc_, false, options, nullptr);
|
|
|
|
|
if (stats_) {
|
|
|
|
|
stats_->RemoveLocalAudioTrack(track_.get(), ssrc_);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ssrc_ = ssrc;
|
|
|
|
|
if (can_send_track()) {
|
|
|
|
|
SetAudioSend();
|
|
|
|
|
if (stats_) {
|
|
|
|
|
stats_->AddLocalAudioTrack(track_.get(), ssrc_);
|
|
|
|
|
}
|
|
|
|
|
}
|
2015-11-20 09:49:59 -08:00
|
|
|
}
|
|
|
|
|
|
2015-11-25 11:26:01 -08:00
|
|
|
void AudioRtpSender::Stop() {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "AudioRtpSender::Stop");
|
2015-11-25 11:26:01 -08:00
|
|
|
// TODO(deadbeef): Need to do more here to fully stop sending packets.
|
|
|
|
|
if (stopped_) {
|
2015-11-20 11:43:22 -08:00
|
|
|
return;
|
|
|
|
|
}
|
2015-11-25 11:26:01 -08:00
|
|
|
if (track_) {
|
|
|
|
|
track_->RemoveSink(sink_adapter_.get());
|
|
|
|
|
track_->UnregisterObserver(this);
|
|
|
|
|
}
|
|
|
|
|
if (can_send_track()) {
|
|
|
|
|
cricket::AudioOptions options;
|
|
|
|
|
provider_->SetAudioSend(ssrc_, false, options, nullptr);
|
|
|
|
|
if (stats_) {
|
|
|
|
|
stats_->RemoveLocalAudioTrack(track_.get(), ssrc_);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
stopped_ = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void AudioRtpSender::SetAudioSend() {
|
|
|
|
|
RTC_DCHECK(!stopped_ && can_send_track());
|
2015-09-28 16:53:55 -07:00
|
|
|
cricket::AudioOptions options;
|
2016-01-21 16:12:17 +01:00
|
|
|
#if !defined(WEBRTC_CHROMIUM_BUILD)
|
|
|
|
|
// TODO(tommi): Remove this hack when we move CreateAudioSource out of
|
|
|
|
|
// PeerConnection. This is a bit of a strange way to apply local audio
|
|
|
|
|
// options since it is also applied to all streams/channels, local or remote.
|
2015-12-15 04:27:11 -08:00
|
|
|
if (track_->enabled() && track_->GetSource() &&
|
|
|
|
|
!track_->GetSource()->remote()) {
|
2015-09-28 16:53:55 -07:00
|
|
|
// TODO(xians): Remove this static_cast since we should be able to connect
|
2015-11-25 11:26:01 -08:00
|
|
|
// a remote audio track to a peer connection.
|
2015-09-28 16:53:55 -07:00
|
|
|
options = static_cast<LocalAudioSource*>(track_->GetSource())->options();
|
|
|
|
|
}
|
2016-01-21 16:12:17 +01:00
|
|
|
#endif
|
2015-09-28 16:53:55 -07:00
|
|
|
|
2016-03-08 12:37:39 -08:00
|
|
|
cricket::AudioSource* source = sink_adapter_.get();
|
|
|
|
|
ASSERT(source != nullptr);
|
|
|
|
|
provider_->SetAudioSend(ssrc_, track_->enabled(), options, source);
|
2015-09-28 16:53:55 -07:00
|
|
|
}
|
|
|
|
|
|
2016-03-16 19:07:43 -07:00
|
|
|
RtpParameters AudioRtpSender::GetParameters() const {
|
|
|
|
|
return provider_->GetAudioRtpParameters(ssrc_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool AudioRtpSender::SetParameters(const RtpParameters& parameters) {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "AudioRtpSender::SetParameters");
|
2016-03-16 19:07:43 -07:00
|
|
|
return provider_->SetAudioRtpParameters(ssrc_, parameters);
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
VideoRtpSender::VideoRtpSender(VideoTrackInterface* track,
|
2015-11-25 11:26:01 -08:00
|
|
|
const std::string& stream_id,
|
2015-09-28 16:53:55 -07:00
|
|
|
VideoProviderInterface* provider)
|
|
|
|
|
: id_(track->id()),
|
2015-11-25 11:26:01 -08:00
|
|
|
stream_id_(stream_id),
|
2015-11-20 11:43:22 -08:00
|
|
|
provider_(provider),
|
2015-11-25 11:26:01 -08:00
|
|
|
track_(track),
|
2015-09-28 16:53:55 -07:00
|
|
|
cached_track_enabled_(track->enabled()) {
|
2015-11-25 11:26:01 -08:00
|
|
|
RTC_DCHECK(provider != nullptr);
|
2015-09-28 16:53:55 -07:00
|
|
|
track_->RegisterObserver(this);
|
|
|
|
|
}
|
|
|
|
|
|
2016-01-14 15:35:42 -08:00
|
|
|
VideoRtpSender::VideoRtpSender(VideoTrackInterface* track,
|
|
|
|
|
VideoProviderInterface* provider)
|
|
|
|
|
: id_(track->id()),
|
|
|
|
|
stream_id_(rtc::CreateRandomUuid()),
|
|
|
|
|
provider_(provider),
|
|
|
|
|
track_(track),
|
|
|
|
|
cached_track_enabled_(track->enabled()) {
|
|
|
|
|
RTC_DCHECK(provider != nullptr);
|
|
|
|
|
track_->RegisterObserver(this);
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-25 11:26:01 -08:00
|
|
|
VideoRtpSender::VideoRtpSender(VideoProviderInterface* provider)
|
|
|
|
|
: id_(rtc::CreateRandomUuid()),
|
|
|
|
|
stream_id_(rtc::CreateRandomUuid()),
|
|
|
|
|
provider_(provider) {}
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
VideoRtpSender::~VideoRtpSender() {
|
|
|
|
|
Stop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void VideoRtpSender::OnChanged() {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "VideoRtpSender::OnChanged");
|
2015-11-25 11:26:01 -08:00
|
|
|
RTC_DCHECK(!stopped_);
|
2015-09-28 16:53:55 -07:00
|
|
|
if (cached_track_enabled_ != track_->enabled()) {
|
|
|
|
|
cached_track_enabled_ = track_->enabled();
|
2015-11-25 11:26:01 -08:00
|
|
|
if (can_send_track()) {
|
|
|
|
|
SetVideoSend();
|
|
|
|
|
}
|
2015-09-28 16:53:55 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VideoRtpSender::SetTrack(MediaStreamTrackInterface* track) {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "VideoRtpSender::SetTrack");
|
2015-11-25 11:26:01 -08:00
|
|
|
if (stopped_) {
|
|
|
|
|
LOG(LS_ERROR) << "SetTrack can't be called on a stopped RtpSender.";
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
if (track && track->kind() != MediaStreamTrackInterface::kVideoKind) {
|
2015-09-28 16:53:55 -07:00
|
|
|
LOG(LS_ERROR) << "SetTrack called on video RtpSender with " << track->kind()
|
|
|
|
|
<< " track.";
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
VideoTrackInterface* video_track = static_cast<VideoTrackInterface*>(track);
|
|
|
|
|
|
|
|
|
|
// Detach from old track.
|
2015-11-25 11:26:01 -08:00
|
|
|
if (track_) {
|
|
|
|
|
track_->UnregisterObserver(this);
|
|
|
|
|
}
|
2015-09-28 16:53:55 -07:00
|
|
|
|
|
|
|
|
// Attach to new track.
|
2015-11-25 11:26:01 -08:00
|
|
|
bool prev_can_send_track = can_send_track();
|
2015-09-28 16:53:55 -07:00
|
|
|
track_ = video_track;
|
2015-11-25 11:26:01 -08:00
|
|
|
if (track_) {
|
|
|
|
|
cached_track_enabled_ = track_->enabled();
|
|
|
|
|
track_->RegisterObserver(this);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update video provider.
|
|
|
|
|
if (can_send_track()) {
|
|
|
|
|
// TODO(deadbeef): If SetTrack is called with a disabled track, and the
|
|
|
|
|
// previous track was enabled, this could cause a frame from the new track
|
2016-04-08 02:23:55 -07:00
|
|
|
// to slip out. Really, what we need is for SetSource and SetVideoSend
|
2015-11-25 11:26:01 -08:00
|
|
|
// to be combined into one atomic operation, all the way down to
|
|
|
|
|
// WebRtcVideoSendStream.
|
2016-04-08 02:23:55 -07:00
|
|
|
|
|
|
|
|
provider_->SetSource(ssrc_, track_);
|
2015-11-25 11:26:01 -08:00
|
|
|
SetVideoSend();
|
|
|
|
|
} else if (prev_can_send_track) {
|
2016-04-08 02:23:55 -07:00
|
|
|
provider_->SetSource(ssrc_, nullptr);
|
2015-11-25 11:26:01 -08:00
|
|
|
provider_->SetVideoSend(ssrc_, false, nullptr);
|
|
|
|
|
}
|
2015-09-28 16:53:55 -07:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2015-11-25 11:26:01 -08:00
|
|
|
void VideoRtpSender::SetSsrc(uint32_t ssrc) {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "VideoRtpSender::SetSsrc");
|
2015-11-25 11:26:01 -08:00
|
|
|
if (stopped_ || ssrc == ssrc_) {
|
2015-10-26 14:11:17 -07:00
|
|
|
return;
|
|
|
|
|
}
|
2015-11-25 11:26:01 -08:00
|
|
|
// If we are already sending with a particular SSRC, stop sending.
|
|
|
|
|
if (can_send_track()) {
|
2016-04-08 02:23:55 -07:00
|
|
|
provider_->SetSource(ssrc_, nullptr);
|
2015-11-25 11:26:01 -08:00
|
|
|
provider_->SetVideoSend(ssrc_, false, nullptr);
|
|
|
|
|
}
|
|
|
|
|
ssrc_ = ssrc;
|
|
|
|
|
if (can_send_track()) {
|
2016-04-08 02:23:55 -07:00
|
|
|
provider_->SetSource(ssrc_, track_);
|
2015-11-25 11:26:01 -08:00
|
|
|
SetVideoSend();
|
|
|
|
|
}
|
2015-11-20 09:49:59 -08:00
|
|
|
}
|
|
|
|
|
|
2015-11-25 11:26:01 -08:00
|
|
|
void VideoRtpSender::Stop() {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "VideoRtpSender::Stop");
|
2015-11-25 11:26:01 -08:00
|
|
|
// TODO(deadbeef): Need to do more here to fully stop sending packets.
|
|
|
|
|
if (stopped_) {
|
2015-11-20 11:43:22 -08:00
|
|
|
return;
|
|
|
|
|
}
|
2015-11-25 11:26:01 -08:00
|
|
|
if (track_) {
|
|
|
|
|
track_->UnregisterObserver(this);
|
|
|
|
|
}
|
|
|
|
|
if (can_send_track()) {
|
2016-04-08 02:23:55 -07:00
|
|
|
provider_->SetSource(ssrc_, nullptr);
|
2015-11-25 11:26:01 -08:00
|
|
|
provider_->SetVideoSend(ssrc_, false, nullptr);
|
|
|
|
|
}
|
|
|
|
|
stopped_ = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void VideoRtpSender::SetVideoSend() {
|
|
|
|
|
RTC_DCHECK(!stopped_ && can_send_track());
|
2016-03-09 02:39:17 +01:00
|
|
|
cricket::VideoOptions options;
|
2016-03-08 01:27:48 +01:00
|
|
|
VideoTrackSourceInterface* source = track_->GetSource();
|
2016-03-09 02:39:17 +01:00
|
|
|
if (source) {
|
|
|
|
|
options.is_screencast = rtc::Optional<bool>(source->is_screencast());
|
2016-03-31 17:23:39 +02:00
|
|
|
options.video_noise_reduction = source->needs_denoising();
|
2015-09-28 16:53:55 -07:00
|
|
|
}
|
2016-03-09 02:39:17 +01:00
|
|
|
provider_->SetVideoSend(ssrc_, track_->enabled(), &options);
|
2015-09-28 16:53:55 -07:00
|
|
|
}
|
|
|
|
|
|
2016-03-16 19:07:43 -07:00
|
|
|
RtpParameters VideoRtpSender::GetParameters() const {
|
|
|
|
|
return provider_->GetVideoRtpParameters(ssrc_);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VideoRtpSender::SetParameters(const RtpParameters& parameters) {
|
2016-04-11 11:45:14 +02:00
|
|
|
TRACE_EVENT0("webrtc", "VideoRtpSender::SetParameters");
|
2016-03-16 19:07:43 -07:00
|
|
|
return provider_->SetVideoRtpParameters(ssrc_, parameters);
|
|
|
|
|
}
|
|
|
|
|
|
2015-09-28 16:53:55 -07:00
|
|
|
} // namespace webrtc
|