OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 ++refCount; | 118 ++refCount; |
119 } | 119 } |
120 | 120 |
121 @Override | 121 @Override |
122 public void release() { | 122 public void release() { |
123 if (--refCount == 0 && releaseCallback != null) { | 123 if (--refCount == 0 && releaseCallback != null) { |
124 releaseCallback.onRelease(); | 124 releaseCallback.onRelease(); |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
| 128 @Override |
| 129 public VideoFrame.Buffer cropAndScale( |
| 130 int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int s
caleHeight) { |
| 131 return VideoFrame.cropAndScaleI420( |
| 132 this, cropX, cropY, cropWidth, cropHeight, scaleWidth, scaleHeight); |
| 133 } |
128 // Callback called when the frame is no longer referenced. | 134 // Callback called when the frame is no longer referenced. |
129 interface ReleaseCallback { | 135 interface ReleaseCallback { |
130 // Called when the frame is no longer referenced. | 136 // Called when the frame is no longer referenced. |
131 void onRelease(); | 137 void onRelease(); |
132 } | 138 } |
133 } | 139 } |
OLD | NEW |