Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1642)

Unified Diff: content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc

Issue 1143763002: Revert "WebRtcVideoCapturerAdapter mods for Texture-backed VideoFrames" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
diff --git a/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc b/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
index 14cbf28c5d7103e0f95d32c9bf0b9c7024d3f721..370de9ac29de9129055574a36d9129138e1f2b06 100644
--- a/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
+++ b/content/renderer/media/webrtc/webrtc_video_capturer_adapter.cc
@@ -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();
Justin Chuang 2015/05/18 11:41:21 The NOTREACHED() will be hit when reproducing 4853
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698