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

Unified Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1594973006: New rtc::VideoSinkInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Workaround to not break chrome. Created 4 years, 11 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 | « talk/media/webrtc/webrtcvideoengine2.h ('k') | talk/session/media/channelmanager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/webrtc/webrtcvideoengine2.cc
diff --git a/talk/media/webrtc/webrtcvideoengine2.cc b/talk/media/webrtc/webrtcvideoengine2.cc
index 6fbaf1b40124dc1bd1f5a344785d0427bdfa4013..df50656a2baf1b90aa51c7f11d5da234d9833848 100644
--- a/talk/media/webrtc/webrtcvideoengine2.cc
+++ b/talk/media/webrtc/webrtcvideoengine2.cc
@@ -1185,7 +1185,7 @@ bool WebRtcVideoChannel2::SetRenderer(uint32_t ssrc, VideoRenderer* renderer) {
return false;
}
- it->second->SetRenderer(renderer);
+ it->second->SetSink(renderer);
return true;
}
@@ -2231,7 +2231,7 @@ WebRtcVideoChannel2::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream(
config_(config),
external_decoder_factory_(external_decoder_factory),
disable_prerenderer_smoothing_(disable_prerenderer_smoothing),
- renderer_(NULL),
+ sink_(NULL),
last_width_(-1),
last_height_(-1),
first_frame_timestamp_(-1),
@@ -2424,7 +2424,7 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::ClearDecoders(
void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RenderFrame(
const webrtc::VideoFrame& frame,
int time_to_render_ms) {
- rtc::CritScope crit(&renderer_lock_);
+ rtc::CritScope crit(&sink_lock_);
if (first_frame_timestamp_ < 0)
first_frame_timestamp_ = frame.timestamp();
@@ -2436,8 +2436,8 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RenderFrame(
if (frame.ntp_time_ms() > 0)
estimated_remote_start_ntp_time_ms_ = frame.ntp_time_ms() - elapsed_time_ms;
- if (renderer_ == NULL) {
- LOG(LS_WARNING) << "VideoReceiveStream not connected to a VideoRenderer.";
+ if (sink_ == NULL) {
+ LOG(LS_WARNING) << "VideoReceiveStream not connected to a VideoSink.";
return;
}
@@ -2447,7 +2447,7 @@ void WebRtcVideoChannel2::WebRtcVideoReceiveStream::RenderFrame(
const WebRtcVideoFrame render_frame(
frame.video_frame_buffer(),
frame.render_time_ms() * rtc::kNumNanosecsPerMillisec, frame.rotation());
- renderer_->RenderFrame(&render_frame);
+ sink_->OnFrame(render_frame);
}
bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsTextureSupported() const {
@@ -2463,10 +2463,10 @@ bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsDefaultStream() const {
return default_stream_;
}
-void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetRenderer(
- cricket::VideoRenderer* renderer) {
- rtc::CritScope crit(&renderer_lock_);
- renderer_ = renderer;
+void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetSink(
+ rtc::VideoSinkInterface<cricket::VideoFrame>* sink) {
+ rtc::CritScope crit(&sink_lock_);
+ sink_ = sink;
}
std::string
@@ -2500,7 +2500,7 @@ WebRtcVideoChannel2::WebRtcVideoReceiveStream::GetVideoReceiverInfo() {
info.framerate_output = stats.render_frame_rate;
{
- rtc::CritScope frame_cs(&renderer_lock_);
+ rtc::CritScope frame_cs(&sink_lock_);
info.frame_width = last_width_;
info.frame_height = last_height_;
info.capture_start_ntp_time_ms = estimated_remote_start_ntp_time_ms_;
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.h ('k') | talk/session/media/channelmanager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698