Commit 64db4a23 authored by jchuang's avatar jchuang Committed by Commit bot

Revert "WebRtcVideoCapturerAdapter mods for Texture-backed VideoFrames"

This reverts commit 587bef69.

BUG=485323

Review URL: https://codereview.chromium.org/1143763002

Cr-Commit-Position: refs/heads/master@{#330695}
parent 52c66335
......@@ -119,15 +119,6 @@ class WebRtcVideoCapturerAdapter::MediaVideoFrameFactory
DCHECK(input_frame == &captured_frame_);
DCHECK(frame_.get());
const int64_t timestamp_ns = frame_->timestamp().InMicroseconds() *
base::Time::kNanosecondsPerMicrosecond;
if (frame_->format() == media::VideoFrame::NATIVE_TEXTURE) {
return new cricket::WebRtcVideoFrame(
new rtc::RefCountedObject<VideoFrameWrapper>(frame_),
captured_frame_.elapsed_time, timestamp_ns);
}
// Create a centered cropped visible rect that preservers aspect ratio for
// cropped natural size.
gfx::Rect visible_rect = frame_->visible_rect();
......@@ -141,6 +132,9 @@ class WebRtcVideoCapturerAdapter::MediaVideoFrameFactory
frame_, visible_rect, output_size,
base::Bind(&ReleaseOriginalFrame, frame_));
const int64_t timestamp_ns = frame_->timestamp().InMicroseconds() *
base::Time::kNanosecondsPerMicrosecond;
// If no scaling is needed, return a wrapped version of |frame_| directly.
if (video_frame->natural_size() == video_frame->visible_rect().size()) {
return new cricket::WebRtcVideoFrame(
......@@ -263,8 +257,10 @@ void WebRtcVideoCapturerAdapter::OnFrameCaptured(
DCHECK(thread_checker_.CalledOnValidThread());
TRACE_EVENT0("video", "WebRtcVideoCapturerAdapter::OnFrameCaptured");
if (!(media::VideoFrame::I420 == frame->format() ||
media::VideoFrame::YV12 == frame->format() ||
media::VideoFrame::NATIVE_TEXTURE == frame->format())) {
media::VideoFrame::YV12 == frame->format())) {
// Some types of sources support textures as output. Since connecting
// sources and sinks do not check the format, we need to just ignore
// formats that we can not handle.
NOTREACHED();
return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment