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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 } | 82 } |
83 | 83 |
84 @Override | 84 @Override |
85 public VideoFrame.I420Buffer toI420() { | 85 public VideoFrame.I420Buffer toI420() { |
86 retain(); | 86 retain(); |
87 return this; | 87 return this; |
88 } | 88 } |
89 | 89 |
90 @Override | 90 @Override |
91 public void retain() { | 91 public void retain() { |
92 nativeAddRef(nativeBuffer); | 92 JniCommon.nativeAddRef(nativeBuffer); |
93 } | 93 } |
94 | 94 |
95 @Override | 95 @Override |
96 public void release() { | 96 public void release() { |
97 nativeRelease(nativeBuffer); | 97 JniCommon.nativeReleaseRef(nativeBuffer); |
98 } | 98 } |
99 | 99 |
100 @Override | 100 @Override |
101 public VideoFrame.Buffer cropAndScale( | 101 public VideoFrame.Buffer cropAndScale( |
102 int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int s
caleHeight) { | 102 int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int s
caleHeight) { |
103 return VideoFrame.cropAndScaleI420( | 103 return VideoFrame.cropAndScaleI420( |
104 this, cropX, cropY, cropWidth, cropHeight, scaleWidth, scaleHeight); | 104 this, cropX, cropY, cropWidth, cropHeight, scaleWidth, scaleHeight); |
105 } | 105 } |
106 | |
107 private static native long nativeAddRef(long nativeBuffer); | |
108 private static native long nativeRelease(long nativeBuffer); | |
109 } | 106 } |
OLD | NEW |