[PCLF] Add an API to add extra audio/video RTP header extensions
Bug: None Change-Id: Ieee29419bc13efe1891c2ceda8a919c031cd4a58 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290897 Commit-Queue: Artem Titov <titovartem@webrtc.org> Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39100}
This commit is contained in:
parent
6a9af57a24
commit
bb25641dd9
@ -143,6 +143,13 @@ struct Params {
|
||||
PeerConnectionInterface::RTCOfferAnswerOptions rtc_offer_answer_options;
|
||||
BitrateSettings bitrate_settings;
|
||||
std::vector<VideoCodecConfig> video_codecs;
|
||||
|
||||
// A list of RTP header extensions which will be enforced on all video streams
|
||||
// added to this peer.
|
||||
std::vector<std::string> extra_video_rtp_header_extensions;
|
||||
// A list of RTP header extensions which will be enforced on all audio streams
|
||||
// added to this peer.
|
||||
std::vector<std::string> extra_audio_rtp_header_extensions;
|
||||
};
|
||||
|
||||
// Contains parameters that maybe changed by test writer during the test call.
|
||||
|
||||
@ -119,10 +119,25 @@ PeerConfigurer* PeerConfigurer::SetVideoSubscription(
|
||||
configurable_params_->video_subscription = std::move(subscription);
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurer::SetVideoCodecs(
|
||||
std::vector<VideoCodecConfig> video_codecs) {
|
||||
params_->video_codecs = std::move(video_codecs);
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurer::SetExtraVideoRtpHeaderExtensions(
|
||||
std::vector<std::string> extensions) {
|
||||
params_->extra_video_rtp_header_extensions = std::move(extensions);
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurer::SetAudioConfig(AudioConfig config) {
|
||||
params_->audio_config = std::move(config);
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurer::SetExtraAudioRtpHeaderExtensions(
|
||||
std::vector<std::string> extensions) {
|
||||
params_->extra_audio_rtp_header_extensions = std::move(extensions);
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurer::SetUseUlpFEC(bool value) {
|
||||
params_->use_ulp_fec = value;
|
||||
return this;
|
||||
@ -180,11 +195,6 @@ PeerConfigurer* PeerConfigurer::SetBitrateSettings(
|
||||
params_->bitrate_settings = bitrate_settings;
|
||||
return this;
|
||||
}
|
||||
PeerConfigurer* PeerConfigurer::SetVideoCodecs(
|
||||
std::vector<VideoCodecConfig> video_codecs) {
|
||||
params_->video_codecs = std::move(video_codecs);
|
||||
return this;
|
||||
}
|
||||
|
||||
PeerConfigurer* PeerConfigurer::SetIceTransportFactory(
|
||||
std::unique_ptr<IceTransportFactory> factory) {
|
||||
|
||||
@ -113,16 +113,24 @@ class PeerConfigurer {
|
||||
// include all streams with `VideoSubscription::kSameAsSendStream`
|
||||
// resolution. To this behavior use this method.
|
||||
PeerConfigurer* SetVideoSubscription(VideoSubscription subscription);
|
||||
// Set the list of video codecs used by the peer during the test. These
|
||||
// Sets the list of video codecs used by the peer during the test. These
|
||||
// codecs will be negotiated in SDP during offer/answer exchange. The order
|
||||
// of these codecs during negotiation will be the same as in `video_codecs`.
|
||||
// Codecs have to be available in codecs list provided by peer connection to
|
||||
// be negotiated. If some of specified codecs won't be found, the test will
|
||||
// crash.
|
||||
PeerConfigurer* SetVideoCodecs(std::vector<VideoCodecConfig> video_codecs);
|
||||
// Set the audio stream for the call from this peer. If this method won't
|
||||
// Sets a list of RTP header extensions which will be enforced on all video
|
||||
// streams added to this peer.
|
||||
PeerConfigurer* SetExtraVideoRtpHeaderExtensions(
|
||||
std::vector<std::string> extensions);
|
||||
// Sets the audio stream for the call from this peer. If this method won't
|
||||
// be invoked, this peer will send no audio.
|
||||
PeerConfigurer* SetAudioConfig(AudioConfig config);
|
||||
// Sets a list of RTP header extensions which will be enforced on all audio
|
||||
// streams added to this peer.
|
||||
PeerConfigurer* SetExtraAudioRtpHeaderExtensions(
|
||||
std::vector<std::string> extensions);
|
||||
|
||||
// Set if ULP FEC should be used or not. False by default.
|
||||
PeerConfigurer* SetUseUlpFEC(bool value);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user