mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
Add Rust_scaleVideoFrameBuffer
This commit is contained in:
parent
0734fdad69
commit
ff4a9d3e8e
2 changed files with 10 additions and 0 deletions
|
@ -91,6 +91,10 @@ RUSTEXPORT void Rust_convertVideoFrameBufferToRgba(
|
|||
RUSTEXPORT const uint8_t *Rust_getVideoFrameBufferAsI420(
|
||||
const webrtc::VideoFrameBuffer* buffer);
|
||||
|
||||
// See VideoFrameBuffer::Scale. Output will be in I420.
|
||||
RUSTEXPORT webrtc::VideoFrameBuffer* Rust_scaleVideoFrameBuffer(
|
||||
webrtc::VideoFrameBuffer* buffer_borrowed_rc, int width, int height);
|
||||
|
||||
// RGBA => I420
|
||||
RUSTEXPORT webrtc::VideoFrameBuffer* Rust_copyAndRotateVideoFrameBuffer(
|
||||
const webrtc::VideoFrameBuffer* buffer_borrowed_rc, webrtc::VideoRotation rotation);
|
||||
|
|
|
@ -201,6 +201,12 @@ RUSTEXPORT const uint8_t *Rust_getVideoFrameBufferAsI420(const VideoFrameBuffer*
|
|||
return dataY;
|
||||
}
|
||||
|
||||
// Returns an owned RC.
|
||||
RUSTEXPORT VideoFrameBuffer* Rust_scaleVideoFrameBuffer(
|
||||
VideoFrameBuffer* buffer_borrowed_rc, int width, int height) {
|
||||
return take_rc(buffer_borrowed_rc->Scale(width, height));
|
||||
}
|
||||
|
||||
// Returns an owned RC.
|
||||
RUSTEXPORT VideoFrameBuffer* Rust_copyAndRotateVideoFrameBuffer(
|
||||
const VideoFrameBuffer* buffer_borrowed_rc, VideoRotation rotation) {
|
||||
|
|
Loading…
Reference in a new issue