Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h

Issue 1613643004: Remove mutable from rtc::CriticalSection members. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 * 9 *
10 */ 10 */
11 11
12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_FRAME_BUFFER_POOL_H_ 12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_FRAME_BUFFER_POOL_H_
13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_FRAME_BUFFER_POOL_H_ 13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_FRAME_BUFFER_POOL_H_
14 14
15 #include <vector> 15 #include <vector>
16 16
17 #include "webrtc/base/basictypes.h" 17 #include "webrtc/base/basictypes.h"
18 #include "webrtc/base/buffer.h" 18 #include "webrtc/base/buffer.h"
19 #include "webrtc/base/criticalsection.h" 19 #include "webrtc/base/criticalsection.h"
20 #include "webrtc/base/refcount.h" 20 #include "webrtc/base/refcount.h"
21 #include "webrtc/base/scoped_ref_ptr.h" 21 #include "webrtc/base/scoped_ref_ptr.h"
22 22
23 struct vpx_codec_ctx; 23 struct vpx_codec_ctx;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // finished using one of the pool's frame buffer. Parameters: 96 // finished using one of the pool's frame buffer. Parameters:
97 // |user_priv| Private data passed to libvpx, InitializeVpxUsePool sets it up 97 // |user_priv| Private data passed to libvpx, InitializeVpxUsePool sets it up
98 // to be a pointer to the pool. 98 // to be a pointer to the pool.
99 // |fb| Pointer to the libvpx frame buffer object, its |priv| will be 99 // |fb| Pointer to the libvpx frame buffer object, its |priv| will be
100 // a pointer to one of the pool's Vp9FrameBuffer. 100 // a pointer to one of the pool's Vp9FrameBuffer.
101 static int32_t VpxReleaseFrameBuffer(void* user_priv, 101 static int32_t VpxReleaseFrameBuffer(void* user_priv,
102 vpx_codec_frame_buffer* fb); 102 vpx_codec_frame_buffer* fb);
103 103
104 private: 104 private:
105 // Protects |allocated_buffers_|. 105 // Protects |allocated_buffers_|.
106 mutable rtc::CriticalSection buffers_lock_; 106 rtc::CriticalSection buffers_lock_;
107 // All buffers, in use or ready to be recycled. 107 // All buffers, in use or ready to be recycled.
108 std::vector<rtc::scoped_refptr<Vp9FrameBuffer>> allocated_buffers_ 108 std::vector<rtc::scoped_refptr<Vp9FrameBuffer>> allocated_buffers_
109 GUARDED_BY(buffers_lock_); 109 GUARDED_BY(buffers_lock_);
110 // If more buffers than this are allocated we print warnings, and crash if 110 // If more buffers than this are allocated we print warnings, and crash if
111 // in debug mode. 111 // in debug mode.
112 static const size_t max_num_buffers_ = 10; 112 static const size_t max_num_buffers_ = 10;
113 }; 113 };
114 114
115 } // namespace webrtc 115 } // namespace webrtc
116 116
117 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_FRAME_BUFFER_POOL_H_ 117 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_FRAME_BUFFER_POOL_H_
OLDNEW
« no previous file with comments | « webrtc/modules/bitrate_controller/bitrate_controller_impl.h ('k') | webrtc/modules/video_coding/generic_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698