Add RtpHeaderExtension to avoid client breakage
This fixes a client breakage by adding back the RtpHeaderExtension temporarily so that it can be fixed in the client before being removed in webrtc. BUG= CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.chromium.win:win_chromium_rel_ng Review-Url: https://codereview.webrtc.org/2024153002 Cr-Commit-Position: refs/heads/master@{#12977}
This commit is contained in:
parent
98cde26c78
commit
a1c548b9b9
@ -716,6 +716,16 @@ class FakeBaseEngine {
|
||||
capabilities_.header_extensions = extensions;
|
||||
}
|
||||
|
||||
void set_rtp_header_extensions(
|
||||
const std::vector<cricket::RtpHeaderExtension>& extensions) {
|
||||
for (const cricket::RtpHeaderExtension& ext : extensions) {
|
||||
RtpExtension webrtc_ext;
|
||||
webrtc_ext.uri = ext.uri;
|
||||
webrtc_ext.id = ext.id;
|
||||
capabilities_.header_extensions.push_back(webrtc_ext);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
// Flag used by optionsmessagehandler_unittest for checking whether any
|
||||
// relevant setting has been updated.
|
||||
@ -861,6 +871,15 @@ class FakeMediaEngine :
|
||||
video_.set_rtp_header_extensions(extensions);
|
||||
}
|
||||
|
||||
void SetAudioRtpHeaderExtensions(
|
||||
const std::vector<cricket::RtpHeaderExtension>& extensions) {
|
||||
voice_.set_rtp_header_extensions(extensions);
|
||||
}
|
||||
void SetVideoRtpHeaderExtensions(
|
||||
const std::vector<cricket::RtpHeaderExtension>& extensions) {
|
||||
video_.set_rtp_header_extensions(extensions);
|
||||
}
|
||||
|
||||
FakeVoiceMediaChannel* GetVoiceChannel(size_t index) {
|
||||
return voice_.GetChannel(index);
|
||||
}
|
||||
|
||||
@ -320,6 +320,24 @@ struct VideoOptions {
|
||||
}
|
||||
};
|
||||
|
||||
// TODO(isheriff): Remove this once client usage is fixed to use RtpExtension.
|
||||
struct RtpHeaderExtension {
|
||||
RtpHeaderExtension() : id(0) {}
|
||||
RtpHeaderExtension(const std::string& uri, int id) : uri(uri), id(id) {}
|
||||
|
||||
std::string ToString() const {
|
||||
std::ostringstream ost;
|
||||
ost << "{";
|
||||
ost << "uri: " << uri;
|
||||
ost << ", id: " << id;
|
||||
ost << "}";
|
||||
return ost.str();
|
||||
}
|
||||
|
||||
std::string uri;
|
||||
int id;
|
||||
};
|
||||
|
||||
class MediaChannel : public sigslot::has_slots<> {
|
||||
public:
|
||||
class NetworkInterface {
|
||||
|
||||
@ -209,6 +209,13 @@ class MediaContentDescription : public ContentDescription {
|
||||
rtp_header_extensions_.push_back(ext);
|
||||
rtp_header_extensions_set_ = true;
|
||||
}
|
||||
void AddRtpHeaderExtension(const cricket::RtpHeaderExtension& ext) {
|
||||
webrtc::RtpExtension webrtc_extension;
|
||||
webrtc_extension.uri = ext.uri;
|
||||
webrtc_extension.id = ext.id;
|
||||
rtp_header_extensions_.push_back(webrtc_extension);
|
||||
rtp_header_extensions_set_ = true;
|
||||
}
|
||||
void ClearRtpHeaderExtensions() {
|
||||
rtp_header_extensions_.clear();
|
||||
rtp_header_extensions_set_ = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user