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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 1818023002: Delete class webrtc::VideoRenderer and its header file. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address pbos' comments. Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1130
1131 webrtc::VideoReceiveStream::Config config(this); 1131 webrtc::VideoReceiveStream::Config config(this);
1132 ConfigureReceiverRtp(&config, sp); 1132 ConfigureReceiverRtp(&config, sp);
1133 1133
1134 // Set up A/V sync group based on sync label. 1134 // Set up A/V sync group based on sync label.
1135 config.sync_group = sp.sync_label; 1135 config.sync_group = sp.sync_label;
1136 1136
1137 config.rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false; 1137 config.rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false;
1138 config.rtp.transport_cc = 1138 config.rtp.transport_cc =
1139 send_codec_ ? HasTransportCc(send_codec_->codec) : false; 1139 send_codec_ ? HasTransportCc(send_codec_->codec) : false;
1140 config.disable_prerenderer_smoothing =
1141 video_config_.disable_prerenderer_smoothing;
1140 1142
1141 receive_streams_[ssrc] = new WebRtcVideoReceiveStream( 1143 receive_streams_[ssrc] = new WebRtcVideoReceiveStream(
1142 call_, sp, config, external_decoder_factory_, default_stream, 1144 call_, sp, config, external_decoder_factory_, default_stream,
1143 recv_codecs_, video_config_.disable_prerenderer_smoothing); 1145 recv_codecs_);
1144 1146
1145 return true; 1147 return true;
1146 } 1148 }
1147 1149
1148 void WebRtcVideoChannel2::ConfigureReceiverRtp( 1150 void WebRtcVideoChannel2::ConfigureReceiverRtp(
1149 webrtc::VideoReceiveStream::Config* config, 1151 webrtc::VideoReceiveStream::Config* config,
1150 const StreamParams& sp) const { 1152 const StreamParams& sp) const {
1151 uint32_t ssrc = sp.first_ssrc(); 1153 uint32_t ssrc = sp.first_ssrc();
1152 1154
1153 config->rtp.remote_ssrc = ssrc; 1155 config->rtp.remote_ssrc = ssrc;
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after
2151 stream_->Start(); 2153 stream_->Start();
2152 } 2154 }
2153 } 2155 }
2154 2156
2155 WebRtcVideoChannel2::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream( 2157 WebRtcVideoChannel2::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream(
2156 webrtc::Call* call, 2158 webrtc::Call* call,
2157 const StreamParams& sp, 2159 const StreamParams& sp,
2158 const webrtc::VideoReceiveStream::Config& config, 2160 const webrtc::VideoReceiveStream::Config& config,
2159 WebRtcVideoDecoderFactory* external_decoder_factory, 2161 WebRtcVideoDecoderFactory* external_decoder_factory,
2160 bool default_stream, 2162 bool default_stream,
2161 const std::vector<VideoCodecSettings>& recv_codecs, 2163 const std::vector<VideoCodecSettings>& recv_codecs)
2162 bool disable_prerenderer_smoothing)
2163 : call_(call), 2164 : call_(call),
2164 ssrcs_(sp.ssrcs), 2165 ssrcs_(sp.ssrcs),
2165 ssrc_groups_(sp.ssrc_groups), 2166 ssrc_groups_(sp.ssrc_groups),
2166 stream_(NULL), 2167 stream_(NULL),
2167 default_stream_(default_stream), 2168 default_stream_(default_stream),
2168 config_(config), 2169 config_(config),
2169 external_decoder_factory_(external_decoder_factory), 2170 external_decoder_factory_(external_decoder_factory),
2170 disable_prerenderer_smoothing_(disable_prerenderer_smoothing),
2171 sink_(NULL), 2171 sink_(NULL),
2172 last_width_(-1), 2172 last_width_(-1),
2173 last_height_(-1), 2173 last_height_(-1),
2174 first_frame_timestamp_(-1), 2174 first_frame_timestamp_(-1),
2175 estimated_remote_start_ntp_time_ms_(0) { 2175 estimated_remote_start_ntp_time_ms_(0) {
2176 config_.renderer = this; 2176 config_.renderer = this;
2177 std::vector<AllocatedDecoder> old_decoders; 2177 std::vector<AllocatedDecoder> old_decoders;
2178 ConfigureCodecs(recv_codecs, &old_decoders); 2178 ConfigureCodecs(recv_codecs, &old_decoders);
2179 RecreateWebRtcStream(); 2179 RecreateWebRtcStream();
2180 RTC_DCHECK(old_decoders.empty()); 2180 RTC_DCHECK(old_decoders.empty());
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
2379 2379
2380 last_width_ = frame.width(); 2380 last_width_ = frame.width();
2381 last_height_ = frame.height(); 2381 last_height_ = frame.height();
2382 2382
2383 const WebRtcVideoFrame render_frame( 2383 const WebRtcVideoFrame render_frame(
2384 frame.video_frame_buffer(), 2384 frame.video_frame_buffer(),
2385 frame.render_time_ms() * rtc::kNumNanosecsPerMillisec, frame.rotation()); 2385 frame.render_time_ms() * rtc::kNumNanosecsPerMillisec, frame.rotation());
2386 sink_->OnFrame(render_frame); 2386 sink_->OnFrame(render_frame);
2387 } 2387 }
2388 2388
2389 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::SmoothsRenderedFrames()
2390 const {
2391 return disable_prerenderer_smoothing_;
2392 }
2393
2394 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsDefaultStream() const { 2389 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsDefaultStream() const {
2395 return default_stream_; 2390 return default_stream_;
2396 } 2391 }
2397 2392
2398 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetSink( 2393 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetSink(
2399 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) { 2394 rtc::VideoSinkInterface<cricket::VideoFrame>* sink) {
2400 rtc::CritScope crit(&sink_lock_); 2395 rtc::CritScope crit(&sink_lock_);
2401 sink_ = sink; 2396 sink_ = sink;
2402 } 2397 }
2403 2398
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
2561 rtx_mapping[video_codecs[i].codec.id] != 2556 rtx_mapping[video_codecs[i].codec.id] !=
2562 fec_settings.red_payload_type) { 2557 fec_settings.red_payload_type) {
2563 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2558 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2564 } 2559 }
2565 } 2560 }
2566 2561
2567 return video_codecs; 2562 return video_codecs;
2568 } 2563 }
2569 2564
2570 } // namespace cricket 2565 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698