Add conversion from webrtc::SdpVideoFormat to cricket::VideoCodec
We will have to convert from webrtc::SdpVideoFormat to cricket::VideoCodec in a couple of places until cricket::WebRtcVideoEncoderFactory is gone. It will be convenient to have the conversion logic in a common place. Bug: webrtc:7925 Change-Id: Ie5e88599f28aeea647e936300c04f9071daffd53 Reviewed-on: https://webrtc-review.googlesource.com/4840 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20048}
This commit is contained in:
committed by
Commit Bot
parent
d4a790fbea
commit
024d8970a7
@ -153,10 +153,7 @@ class WebRtcEncoderFactoryAdapter : public EncoderFactoryAdapter {
|
||||
std::vector<VideoCodec> codecs;
|
||||
for (const webrtc::SdpVideoFormat& format :
|
||||
encoder_factory_->GetSupportedFormats()) {
|
||||
VideoCodec codec;
|
||||
codec.name = format.name;
|
||||
codec.params = format.parameters;
|
||||
codecs.push_back(codec);
|
||||
codecs.push_back(VideoCodec(format));
|
||||
}
|
||||
return AssignPayloadTypesAndAddAssociatedRtxCodecs(codecs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user