Reland "Remove dead code from ModuleRtpRtcpImpl2"

This reverts commit f8311a1aa2887a2f01751424b948a1c20088e773.

Reason for revert: Relanding with a different approach

Original change's description:
> Revert "Remove dead code from ModuleRtpRtcpImpl2"
> 
> This reverts commit 8d4d671e9be98a090921006cc988cc1fc4fe1947.
> 
> Reason for revert: Breaks wasm builds.
> 
> 
> 
> Original change's description:
> > Remove dead code from ModuleRtpRtcpImpl2
> > 
> > Bug: webrtc:11581
> > Change-Id: I70e1df2724801c1bc7fb5cfb52cb6d1d44920b0d
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176570
> > Commit-Queue: Tommi <tommi@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31467}
> 
> TBR=tommi@webrtc.org,sprang@webrtc.org
> 
> Change-Id: I790374f7fa93147824e6fa2779a0bbaf5987924f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:11581
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176746
> Reviewed-by: Tommi <tommi@webrtc.org>
> Commit-Queue: Tommi <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31468}

TBR=tommi@webrtc.org,sprang@webrtc.org

# Not skipping CQ checks because this is a reland.

Bug: webrtc:11581
Change-Id: I6086548f1c3527ee96ebd1c97be7a5be2a9a5429
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176748
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31475}
This commit is contained in:
Tomas Gunnarsson
2020-06-09 12:09:06 +02:00
committed by Commit Bot
parent 6434864c3f
commit dffa944e07
3 changed files with 9 additions and 63 deletions

View File

@ -9,10 +9,6 @@
*/
#include "rtc_base/synchronization/sequence_checker.h"
#include <cinttypes>
#include <cstdint>
#include <type_traits>
#if defined(WEBRTC_MAC)
#include <dispatch/dispatch.h>
#endif
@ -31,18 +27,6 @@ const void* GetSystemQueueRef() {
#endif
}
template <class T,
typename std::enable_if<std::is_pointer<T>::value>::type* = nullptr>
uintptr_t CastToUintPtr(T t) {
return reinterpret_cast<uintptr_t>(t);
}
template <class T,
typename std::enable_if<!std::is_pointer<T>::value>::type* = nullptr>
uintptr_t CastToUintPtr(T t) {
return static_cast<uintptr_t>(t);
}
} // namespace
std::string ExpectationToString(const webrtc::SequenceChecker* checker) {
@ -97,25 +81,20 @@ std::string SequenceCheckerImpl::ExpectationToString() const {
if (!attached_)
return "Checker currently not attached.";
// NOTE: The format of thie string built here is meant to compliment the one
// we have inside of FatalLog() (checks.cc).
// The format of the string is meant to compliment the one we have inside of
// FatalLog() (checks.cc). Example:
//
// Example:
//
// Expectations vs Actual:
// # Exp: TQ: 0000000000000000 SysQ: 00007fff69541330 Thread: 0000000113aafdc0
// # Act: TQ: 00007fcde7a22210 SysQ: 00007fcde78553c0 Thread: 0000700005ddc000
// # Expected: TQ: 0x0 SysQ: 0x7fff69541330 Thread: 0x11dcf6dc0
// # Actual: TQ: 0x7fa8f0604190 SysQ: 0x7fa8f0604a30 Thread: 0x700006f1a000
// TaskQueue doesn't match
rtc::StringBuilder message;
message.AppendFormat(
"Expectations vs Actual:\n# Exp: "
"TQ: %016" PRIxPTR " SysQ: %016" PRIxPTR " Thread: %016" PRIxPTR
"\n# Act: "
"TQ: %016" PRIxPTR " SysQ: %016" PRIxPTR " Thread: %016" PRIxPTR "\n",
CastToUintPtr(valid_queue_), CastToUintPtr(valid_system_queue_),
CastToUintPtr(valid_thread_), CastToUintPtr(current_queue),
CastToUintPtr(current_system_queue), CastToUintPtr(current_thread));
"# Expected: TQ: %p SysQ: %p Thread: %p\n"
"# Actual: TQ: %p SysQ: %p Thread: %p\n",
valid_queue_, valid_system_queue_,
reinterpret_cast<const void*>(valid_thread_), current_queue,
current_system_queue, reinterpret_cast<const void*>(current_thread));
if ((valid_queue_ || current_queue) && valid_queue_ != current_queue) {
message << "TaskQueue doesn't match\n";