Bug 1654112 - Replace uses of WrappedI420Buffer with WrapI420Buffer. r=ng

Differential Revision: https://phabricator.services.mozilla.com/D130063
This commit is contained in:
Dan Minor 2020-10-30 11:39:15 -04:00
Родитель b84d7b068e
Коммит fa1ccbc63e
4 изменённых файлов: 17 добавлений и 17 удалений

Просмотреть файл

@ -345,12 +345,12 @@ class VideoFrameConverter {
if (utils.GetFormat() == dom::ImageBitmapFormat::YUV420P &&
image->GetData()) {
const layers::PlanarYCbCrData* data = image->GetData();
rtc::scoped_refptr<webrtc::WrappedI420Buffer> video_frame_buffer(
new rtc::RefCountedObject<webrtc::WrappedI420Buffer>(
rtc::scoped_refptr<webrtc::I420BufferInterface> video_frame_buffer =
webrtc::WrapI420Buffer(
aFrame.mImage->GetSize().width, aFrame.mImage->GetSize().height,
data->mYChannel, data->mYStride, data->mCbChannel,
data->mCbCrStride, data->mCrChannel, data->mCbCrStride,
rtc::KeepRefUntilDone(image)));
rtc::KeepRefUntilDone(image));
webrtc::VideoFrame i420_frame(video_frame_buffer,
0, // not setting rtp timestamp

Просмотреть файл

@ -523,7 +523,7 @@ int MediaEngineRemoteVideoSource::DeliverFrame(
rtc::Callback0<void> callback_unused;
rtc::scoped_refptr<webrtc::I420BufferInterface> buffer =
new rtc::RefCountedObject<webrtc::WrappedI420Buffer>(
webrtc::WrapI420Buffer(
aProps.width(), aProps.height(), aBuffer, aProps.yStride(),
aBuffer + aProps.yAllocatedSize(), aProps.uStride(),
aBuffer + aProps.yAllocatedSize() + aProps.uAllocatedSize(),

Просмотреть файл

@ -971,13 +971,13 @@ void WebrtcGmpVideoDecoder::Decoded(GMPVideoi420Frame* aDecodedFrame) {
MutexAutoLock lock(mCallbackMutex);
if (mCallback) {
rtc::scoped_refptr<webrtc::WrappedI420Buffer> video_frame_buffer(
new rtc::RefCountedObject<webrtc::WrappedI420Buffer>(
aDecodedFrame->Width(), aDecodedFrame->Height(), buffer_y,
aDecodedFrame->Stride(kGMPYPlane), buffer_u,
aDecodedFrame->Stride(kGMPUPlane), buffer_v,
aDecodedFrame->Stride(kGMPVPlane),
rtc::Bind(&DeleteBuffer, buffer.release())));
rtc::scoped_refptr<webrtc::I420BufferInterface> video_frame_buffer =
webrtc::WrappedI420Buffer(aDecodedFrame->Width(),
aDecodedFrame->Height(), buffer_y,
aDecodedFrame->Stride(kGMPYPlane), buffer_u,
aDecodedFrame->Stride(kGMPUPlane), buffer_v,
aDecodedFrame->Stride(kGMPVPlane),
rtc::Bind(&DeleteBuffer, buffer.release()));
webrtc::VideoFrame image(video_frame_buffer, 0, 0,
webrtc::kVideoRotation_0);

Просмотреть файл

@ -28,12 +28,12 @@ class ImageBuffer : public webrtc::VideoFrameBuffer {
return nullptr;
}
const layers::PlanarYCbCrData* data = image->GetData();
rtc::scoped_refptr<webrtc::I420BufferInterface> buf(
new rtc::RefCountedObject<webrtc::WrappedI420Buffer>(
data->mPicSize.width, data->mPicSize.height, data->mYChannel,
data->mYStride, data->mCbChannel, data->mCbCrStride,
data->mCrChannel, data->mCbCrStride,
rtc::KeepRefUntilDone(image.get())));
rtc::scoped_refptr<webrtc::I420BufferInterface> buf =
webrtc::WrapI420Buffer(data->mPicSize.width, data->mPicSize.height,
data->mYChannel, data->mYStride,
data->mCbChannel, data->mCbCrStride,
data->mCrChannel, data->mCbCrStride,
rtc::KeepRefUntilDone(image.get()));
return buf;
}