Delete class StringRtpHeaderExtension, replaced with std::string
Bug: webrtc:10440 Change-Id: I52f865496f9838ac0981a6cd13f24b5b681b6616 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128609 Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27265}
This commit is contained in:
@ -726,24 +726,6 @@ size_t ColorSpaceExtension::WriteLuminance(uint8_t* data,
|
||||
return 2; // Return number of bytes written.
|
||||
}
|
||||
|
||||
bool BaseRtpStringExtension::Parse(rtc::ArrayView<const uint8_t> data,
|
||||
StringRtpHeaderExtension* str) {
|
||||
if (data.empty() || data[0] == 0) // Valid string extension can't be empty.
|
||||
return false;
|
||||
str->Set(data);
|
||||
RTC_DCHECK(!str->empty());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseRtpStringExtension::Write(rtc::ArrayView<uint8_t> data,
|
||||
const StringRtpHeaderExtension& str) {
|
||||
RTC_DCHECK_EQ(data.size(), str.size());
|
||||
RTC_DCHECK_GE(str.size(), 1);
|
||||
RTC_DCHECK_LE(str.size(), StringRtpHeaderExtension::kMaxSize);
|
||||
memcpy(data.data(), str.data(), str.size());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool BaseRtpStringExtension::Parse(rtc::ArrayView<const uint8_t> data,
|
||||
std::string* str) {
|
||||
if (data.empty() || data[0] == 0) // Valid string extension can't be empty.
|
||||
@ -758,7 +740,7 @@ bool BaseRtpStringExtension::Parse(rtc::ArrayView<const uint8_t> data,
|
||||
|
||||
bool BaseRtpStringExtension::Write(rtc::ArrayView<uint8_t> data,
|
||||
const std::string& str) {
|
||||
if (str.size() > StringRtpHeaderExtension::kMaxSize) {
|
||||
if (str.size() > kMaxValueSizeBytes) {
|
||||
return false;
|
||||
}
|
||||
RTC_DCHECK_EQ(data.size(), str.size());
|
||||
|
||||
Reference in New Issue
Block a user