Bug 1876843 - Vendor libwebrtc from fa4d7c92b7

Upstream commit: https://webrtc.googlesource.com/src/+/fa4d7c92b770e2375b14b4c53edf262534415ab8
    libstdc++: replace deprecated std::is_pod<T>

    std::is_pod is deprecated since C++20. Replace with std::trivial and
    std::is_standard_layout. Avoids a lot of warnings.

    Bug: chromium:957519
    Change-Id: Idb4bde7401c14c0896a84c357ec668b9916f613e
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325484
    Reviewed-by: Philip Eliasson <[email protected]>
    Reviewed-by: Danil Chapovalov <[email protected]>
    Commit-Queue: Philip Eliasson <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#41117}
This commit is contained in:
Jan-Ivar Bruaroey committed 2024-02-09 16:54:37 -05:00
1 parent 37c5a02a5b
commit 1308202187
4 files changed
+18 -5

No files matched your search

+3
View File
@@ -27075,3 +27075,6 @@ d3414d9688
# MOZ_LIBWEBRTC_SRC=/Users/jan-ivar/moz/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
be23ea4bb9
# MOZ_LIBWEBRTC_SRC=/Users/jan-ivar/moz/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
fa4d7c92b7
+2
View File
@@ -18074,3 +18074,5 @@ libwebrtc updated from /Users/jan-ivar/moz/elm/.moz-fast-forward/moz-libwebrtc c
libwebrtc updated from /Users/jan-ivar/moz/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-02-09T21:52:22.840516.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/jan-ivar/moz/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /Users/jan-ivar/moz/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-02-09T21:53:24.281023.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/jan-ivar/moz/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /Users/jan-ivar/moz/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-02-09T21:54:29.104315.
@@ -50,7 +50,9 @@ struct CodecSpecificInfoVP8 {
size_t updatedBuffers[kBuffersCount];
size_t updatedBuffersCount;
};
static_assert(std::is_pod<CodecSpecificInfoVP8>::value, "");
static_assert(std::is_trivial_v<CodecSpecificInfoVP8> &&
std::is_standard_layout_v<CodecSpecificInfoVP8>,
"");
// Hack alert - the code assumes that thisstruct is memset when constructed.
struct CodecSpecificInfoVP9 {
@@ -79,7 +81,9 @@ struct CodecSpecificInfoVP9 {
uint8_t num_ref_pics;
uint8_t p_diff[kMaxVp9RefPics];
};
static_assert(std::is_pod<CodecSpecificInfoVP9>::value, "");
static_assert(std::is_trivial_v<CodecSpecificInfoVP9> &&
std::is_standard_layout_v<CodecSpecificInfoVP9>,
"");
// Hack alert - the code assumes that thisstruct is memset when constructed.
struct CodecSpecificInfoH264 {
@@ -88,14 +92,18 @@ struct CodecSpecificInfoH264 {
bool base_layer_sync;
bool idr_frame;
};
static_assert(std::is_pod<CodecSpecificInfoH264>::value, "");
static_assert(std::is_trivial_v<CodecSpecificInfoH264> &&
std::is_standard_layout_v<CodecSpecificInfoH264>,
"");
union CodecSpecificInfoUnion {
CodecSpecificInfoVP8 VP8;
CodecSpecificInfoVP9 VP9;
CodecSpecificInfoH264 H264;
};
static_assert(std::is_pod<CodecSpecificInfoUnion>::value, "");
static_assert(std::is_trivial_v<CodecSpecificInfoUnion> &&
std::is_standard_layout_v<CodecSpecificInfoUnion>,
"");
// Note: if any pointers are added to this struct or its sub-structs, it
// must be fitted with a copy-constructor. This is because it is copied
@@ -23,7 +23,7 @@ class DataReader {
template <typename T>
void CopyTo(T* object) {
static_assert(std::is_pod<T>(), "");
static_assert(std::is_trivial_v<T> && std::is_standard_layout_v<T>, "");
uint8_t* destination = reinterpret_cast<uint8_t*>(object);
size_t object_size = sizeof(T);
size_t num_bytes = std::min(size_ - offset_, object_size);