Delete method webrtc::VideoFrame::native_handle.
Instead, use the corresponding method on VideoFrameBuffer. In the process, reduce code duplication in frame comparison functions used in the test code. Make FramesEqual use FrameBufsEqual. Make the latter support texture frames. The cl also refactors VideoFrame::CopyFrame to use I420Buffer::Copy. This has possibly undesired side effects of never reusing the frame buffer of the destination frame, and producing a frame buffer which may use different stride than the source frame. BUG=webrtc:5682 Review URL: https://codereview.webrtc.org/1881953002 Cr-Commit-Position: refs/heads/master@{#12373}
This commit is contained in:
@ -315,7 +315,8 @@ int32_t VideoSender::AddVideoFrame(const VideoFrame& videoFrame,
|
||||
return VCM_PARAMETER_ERROR;
|
||||
}
|
||||
VideoFrame converted_frame = videoFrame;
|
||||
if (converted_frame.native_handle() && !_encoder->SupportsNativeHandle()) {
|
||||
if (converted_frame.video_frame_buffer()->native_handle() &&
|
||||
!_encoder->SupportsNativeHandle()) {
|
||||
// This module only supports software encoding.
|
||||
// TODO(pbos): Offload conversion from the encoder thread.
|
||||
converted_frame = converted_frame.ConvertNativeToI420Frame();
|
||||
|
||||
Reference in New Issue
Block a user