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

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

Issue 955253002: Add metadata to media::VideoFrame and plumb it through IPC/MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tommi's nits addressed Created 5 years, 10 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
Index: content/renderer/media/webrtc/media_stream_remote_video_source.cc
diff --git a/content/renderer/media/webrtc/media_stream_remote_video_source.cc b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
index b75272126ec13263c5201ba0f5db6324b75a01d2..786ed84fa39d43c3ec0fb6b6231270b73d8b73e7 100644
--- a/content/renderer/media/webrtc/media_stream_remote_video_source.cc
+++ b/content/renderer/media/webrtc/media_stream_remote_video_source.cc
@@ -40,8 +40,9 @@ class MediaStreamRemoteVideoSource::RemoteVideoSourceDelegate
void SetSize(int width, int height) override;
void RenderFrame(const cricket::VideoFrame* frame) override;
- void DoRenderFrameOnIOThread(scoped_refptr<media::VideoFrame> video_frame,
- const media::VideoCaptureFormat& format);
+ void DoRenderFrameOnIOThread(
+ const scoped_refptr<media::VideoFrame>& video_frame);
+
private:
// Bound to the render thread.
base::ThreadChecker thread_checker_;
@@ -103,30 +104,19 @@ RemoteVideoSourceDelegate::RenderFrame(
frame->GetVPlane(), frame->GetVPitch(), uv_rows, video_frame.get());
}
- media::VideoPixelFormat pixel_format =
- (video_frame->format() == media::VideoFrame::YV12) ?
- media::PIXEL_FORMAT_YV12 : media::PIXEL_FORMAT_TEXTURE;
-
- media::VideoCaptureFormat format(
- gfx::Size(video_frame->natural_size().width(),
- video_frame->natural_size().height()),
- MediaStreamVideoSource::kUnknownFrameRate,
- pixel_format);
-
io_message_loop_->PostTask(
FROM_HERE,
base::Bind(&RemoteVideoSourceDelegate::DoRenderFrameOnIOThread,
- this, video_frame, format));
+ this, video_frame));
}
void MediaStreamRemoteVideoSource::
RemoteVideoSourceDelegate::DoRenderFrameOnIOThread(
- scoped_refptr<media::VideoFrame> video_frame,
- const media::VideoCaptureFormat& format) {
+ const scoped_refptr<media::VideoFrame>& video_frame) {
DCHECK(io_message_loop_->BelongsToCurrentThread());
TRACE_EVENT0("webrtc", "RemoteVideoSourceDelegate::DoRenderFrameOnIOThread");
// TODO(hclam): Give the estimated capture time.
- frame_callback_.Run(video_frame, format, base::TimeTicks());
+ frame_callback_.Run(video_frame, base::TimeTicks());
}
MediaStreamRemoteVideoSource::MediaStreamRemoteVideoSource(
« no previous file with comments | « content/renderer/media/video_track_adapter.cc ('k') | content/renderer/media/webrtc/video_destination_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698