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

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

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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 */
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 void ClearPool(); 81 void ClearPool();
82 82
83 // InitializeVpxUsePool configures libvpx to call this function when it needs 83 // InitializeVpxUsePool configures libvpx to call this function when it needs
84 // a new frame buffer. Parameters: 84 // a new frame buffer. Parameters:
85 // |user_priv| Private data passed to libvpx, InitializeVpxUsePool sets it up 85 // |user_priv| Private data passed to libvpx, InitializeVpxUsePool sets it up
86 // to be a pointer to the pool. 86 // to be a pointer to the pool.
87 // |min_size| Minimum size needed by libvpx (to decompress a frame). 87 // |min_size| Minimum size needed by libvpx (to decompress a frame).
88 // |fb| Pointer to the libvpx frame buffer object, this is updated to 88 // |fb| Pointer to the libvpx frame buffer object, this is updated to
89 // use the pool's buffer. 89 // use the pool's buffer.
90 // Returns 0 on success. Returns < 0 on failure. 90 // Returns 0 on success. Returns < 0 on failure.
91 static int32 VpxGetFrameBuffer(void* user_priv, 91 static int32_t VpxGetFrameBuffer(void* user_priv,
92 size_t min_size, 92 size_t min_size,
93 vpx_codec_frame_buffer* fb); 93 vpx_codec_frame_buffer* fb);
94 94
95 // InitializeVpxUsePool configures libvpx to call this function when it has 95 // InitializeVpxUsePool configures libvpx to call this function when it has
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 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 mutable 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_FRAME_BUFFER_POOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698