Commit 0e7d0745 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Use WTF::Deque in renderer/platform/peerconnection

... instead of std::circular_deque.

This is a follow up of haraken's remark in [1]. It affects the
following classes:

- RTCVideoEncoder::Impl
- RTCVideoDecoderAdapter

[1] https://crrev.com/c/1775002/2/third_party/blink/renderer/platform/peerconnection/rtc_video_encoder.cc#246

BUG=952716, 787254
R=guidou@chromium.org

Change-Id: I1a90f1e016da250dd76663ed999887e52a71f487
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775864
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Auto-Submit: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691649}
parent cef17a4a
...@@ -7,7 +7,6 @@ include_rules = [ ...@@ -7,7 +7,6 @@ include_rules = [
"+third_party/blink/renderer/platform/webrtc", "+third_party/blink/renderer/platform/webrtc",
# Dependencies. # Dependencies.
"+base/containers/circular_deque.h",
"+base/threading/thread_restrictions.h", "+base/threading/thread_restrictions.h",
"+media/base", "+media/base",
"+media/video/gpu_video_accelerator_factories.h", "+media/video/gpu_video_accelerator_factories.h",
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include <memory> #include <memory>
#include "base/callback_forward.h" #include "base/callback_forward.h"
#include "base/containers/circular_deque.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/scoped_refptr.h" #include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
...@@ -19,6 +18,7 @@ ...@@ -19,6 +18,7 @@
#include "media/base/video_decoder.h" #include "media/base/video_decoder.h"
#include "media/base/video_decoder_config.h" #include "media/base/video_decoder_config.h"
#include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/deque.h"
#include "third_party/webrtc/api/video_codecs/sdp_video_format.h" #include "third_party/webrtc/api/video_codecs/sdp_video_format.h"
#include "third_party/webrtc/modules/video_coding/include/video_codec_interface.h" #include "third_party/webrtc/modules/video_coding/include/video_codec_interface.h"
#include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size.h"
...@@ -122,10 +122,10 @@ class PLATFORM_EXPORT RTCVideoDecoderAdapter : public webrtc::VideoDecoder { ...@@ -122,10 +122,10 @@ class PLATFORM_EXPORT RTCVideoDecoderAdapter : public webrtc::VideoDecoder {
bool has_error_ = false; bool has_error_ = false;
webrtc::DecodedImageCallback* decode_complete_callback_ = nullptr; webrtc::DecodedImageCallback* decode_complete_callback_ = nullptr;
// Requests that have not been submitted to the decoder yet. // Requests that have not been submitted to the decoder yet.
base::circular_deque<scoped_refptr<media::DecoderBuffer>> pending_buffers_; WTF::Deque<scoped_refptr<media::DecoderBuffer>> pending_buffers_;
// Record of timestamps that have been sent to be decoded. Removing a // Record of timestamps that have been sent to be decoded. Removing a
// timestamp will cause the frame to be dropped when it is output. // timestamp will cause the frame to be dropped when it is output.
base::circular_deque<base::TimeDelta> decode_timestamps_; WTF::Deque<base::TimeDelta> decode_timestamps_;
// Thread management. // Thread management.
SEQUENCE_CHECKER(worker_sequence_checker_); SEQUENCE_CHECKER(worker_sequence_checker_);
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <vector> #include <vector>
#include "base/bind.h" #include "base/bind.h"
#include "base/containers/circular_deque.h"
#include "base/location.h" #include "base/location.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/unsafe_shared_memory_region.h" #include "base/memory/unsafe_shared_memory_region.h"
...@@ -34,6 +33,7 @@ ...@@ -34,6 +33,7 @@
#include "mojo/public/cpp/base/shared_memory_utils.h" #include "mojo/public/cpp/base/shared_memory_utils.h"
#include "third_party/blink/public/platform/modules/peerconnection/web_rtc_video_encoder_factory.h" #include "third_party/blink/public/platform/modules/peerconnection/web_rtc_video_encoder_factory.h"
#include "third_party/blink/public/platform/modules/webrtc/webrtc_video_frame_adapter.h" #include "third_party/blink/public/platform/modules/webrtc/webrtc_video_frame_adapter.h"
#include "third_party/blink/renderer/platform/wtf/deque.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" #include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/libyuv/include/libyuv.h" #include "third_party/libyuv/include/libyuv.h"
#include "third_party/webrtc/modules/video_coding/codecs/h264/include/h264.h" #include "third_party/webrtc/modules/video_coding/codecs/h264/include/h264.h"
...@@ -243,7 +243,7 @@ class RTCVideoEncoder::Impl ...@@ -243,7 +243,7 @@ class RTCVideoEncoder::Impl
// Used to match the encoded frame timestamp with WebRTC's given RTP // Used to match the encoded frame timestamp with WebRTC's given RTP
// timestamp. // timestamp.
base::circular_deque<RTCTimestamps> pending_timestamps_; WTF::Deque<RTCTimestamps> pending_timestamps_;
// Indicates that timestamp match failed and we should no longer attempt // Indicates that timestamp match failed and we should no longer attempt
// matching. // matching.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment