Add payload_name and payload_type to VideoSendStream::Config::Rtp.
Another step of the transition needed to reland cl https://webrtc-review.googlesource.com/62062, and move payload_name and payload_type out of VideoSendStream::Config::EncoderSettings. If the new fields are set, values of the old fields are ignored. Bug: webrtc:8830 Change-Id: I1f0cd56fd6b13b05608b284afc92523707887e25 Reviewed-on: https://webrtc-review.googlesource.com/64101 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22562}
This commit is contained in:
parent
9cfb18c5b3
commit
12d6a49e97
@ -120,6 +120,8 @@ class VideoSendStream {
|
||||
encoder(encoder) {}
|
||||
std::string ToString() const;
|
||||
|
||||
// TODO(nisse): About to be deleted. Unused if the corresponding
|
||||
// fields in the below Rtp struct are set.
|
||||
std::string payload_name;
|
||||
int payload_type = -1;
|
||||
|
||||
@ -159,6 +161,16 @@ class VideoSendStream {
|
||||
// RTP header extensions to use for this send stream.
|
||||
std::vector<RtpExtension> extensions;
|
||||
|
||||
// TODO(nisse): For now, these are fixed, but we'd like to support
|
||||
// changing codec without recreating the VideoSendStream. Then these
|
||||
// fields must be removed, and association between payload type and codec
|
||||
// must move above the per-stream level. Ownership could be with
|
||||
// RtpTransportControllerSend, with a reference from PayloadRouter, where
|
||||
// the latter would be responsible for mapping the codec type of encoded
|
||||
// images to the right payload type.
|
||||
std::string payload_name;
|
||||
int payload_type = -1;
|
||||
|
||||
// See NackConfig for description.
|
||||
NackConfig nack;
|
||||
|
||||
|
||||
@ -731,7 +731,9 @@ VideoSendStreamImpl::VideoSendStreamImpl(
|
||||
transport->keepalive_config())),
|
||||
payload_router_(rtp_rtcp_modules_,
|
||||
config_->rtp.ssrcs,
|
||||
config_->encoder_settings.payload_type,
|
||||
config_->rtp.payload_type != -1
|
||||
? config_->rtp.payload_type
|
||||
: config_->encoder_settings.payload_type,
|
||||
suspended_payload_states),
|
||||
weak_ptr_factory_(this),
|
||||
overhead_bytes_per_packet_(0),
|
||||
@ -828,8 +830,12 @@ VideoSendStreamImpl::VideoSendStreamImpl(
|
||||
rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(stats_proxy_);
|
||||
rtp_rtcp->SetMaxRtpPacketSize(config_->rtp.max_packet_size);
|
||||
rtp_rtcp->RegisterVideoSendPayload(
|
||||
config_->encoder_settings.payload_type,
|
||||
config_->encoder_settings.payload_name.c_str());
|
||||
config_->rtp.payload_type != -1
|
||||
? config_->rtp.payload_type
|
||||
: config_->encoder_settings.payload_type,
|
||||
!config_->rtp.payload_name.empty()
|
||||
? config_->rtp.payload_name.c_str()
|
||||
: config_->encoder_settings.payload_name.c_str());
|
||||
}
|
||||
|
||||
fec_controller_->SetProtectionCallback(this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user