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

Side by Side Diff: webrtc/common_video/include/i420_buffer_pool.h

Issue 2517173004: Move VideoFrame and related declarations to webrtc/api/video. (Closed)
Patch Set: Make rotation check clearer. Created 3 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 #ifndef WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ 11 #ifndef WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_
12 #define WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ 12 #define WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_
13 13
14 #include <list> 14 #include <list>
15 #include <limits> 15 #include <limits>
16 16
17 #include "webrtc/api/video/i420_buffer.h"
17 #include "webrtc/base/race_checker.h" 18 #include "webrtc/base/race_checker.h"
18 #include "webrtc/common_video/include/video_frame_buffer.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 21
22 // Simple buffer pool to avoid unnecessary allocations of I420Buffer objects. 22 // Simple buffer pool to avoid unnecessary allocations of I420Buffer objects.
23 // The pool manages the memory of the I420Buffer returned from CreateBuffer. 23 // The pool manages the memory of the I420Buffer returned from CreateBuffer.
24 // When the I420Buffer is destructed, the memory is returned to the pool for use 24 // When the I420Buffer is destructed, the memory is returned to the pool for use
25 // by subsequent calls to CreateBuffer. If the resolution passed to CreateBuffer 25 // by subsequent calls to CreateBuffer. If the resolution passed to CreateBuffer
26 // changes, old buffers will be purged from the pool. 26 // changes, old buffers will be purged from the pool.
27 // Note that CreateBuffer will crash if more than kMaxNumberOfFramesBeforeCrash 27 // Note that CreateBuffer will crash if more than kMaxNumberOfFramesBeforeCrash
28 // are created. This is to prevent memory leaks where frames are not returned. 28 // are created. This is to prevent memory leaks where frames are not returned.
(...skipping 26 matching lines...) Expand all
55 // initial allocation (as shown by FFmpeg's own buffer allocation code). It 55 // initial allocation (as shown by FFmpeg's own buffer allocation code). It
56 // has to do with "Use-of-uninitialized-value" on "Linux_msan_chrome". 56 // has to do with "Use-of-uninitialized-value" on "Linux_msan_chrome".
57 const bool zero_initialize_; 57 const bool zero_initialize_;
58 // Max number of buffers this pool can have pending. 58 // Max number of buffers this pool can have pending.
59 const size_t max_number_of_buffers_; 59 const size_t max_number_of_buffers_;
60 }; 60 };
61 61
62 } // namespace webrtc 62 } // namespace webrtc
63 63
64 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_ 64 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_I420_BUFFER_POOL_H_
OLDNEW
« no previous file with comments | « webrtc/common_video/include/corevideo_frame_buffer.h ('k') | webrtc/common_video/include/video_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698