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

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

Issue 1419673014: Remove frame time scheduing in IncomingVideoStream (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove unnecessary if Created 5 years 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 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 1218
1219 // Set up A/V sync group based on sync label. 1219 // Set up A/V sync group based on sync label.
1220 config.sync_group = sp.sync_label; 1220 config.sync_group = sp.sync_label;
1221 1221
1222 config.rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false; 1222 config.rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false;
1223 config.rtp.transport_cc = 1223 config.rtp.transport_cc =
1224 send_codec_ ? HasTransportCc(send_codec_->codec) : false; 1224 send_codec_ ? HasTransportCc(send_codec_->codec) : false;
1225 1225
1226 receive_streams_[ssrc] = new WebRtcVideoReceiveStream( 1226 receive_streams_[ssrc] = new WebRtcVideoReceiveStream(
1227 call_, sp, config, external_decoder_factory_, default_stream, 1227 call_, sp, config, external_decoder_factory_, default_stream,
1228 recv_codecs_); 1228 recv_codecs_, options_.disable_prerenderer_smoothing.value_or(false));
1229 1229
1230 return true; 1230 return true;
1231 } 1231 }
1232 1232
1233 void WebRtcVideoChannel2::ConfigureReceiverRtp( 1233 void WebRtcVideoChannel2::ConfigureReceiverRtp(
1234 webrtc::VideoReceiveStream::Config* config, 1234 webrtc::VideoReceiveStream::Config* config,
1235 const StreamParams& sp) const { 1235 const StreamParams& sp) const {
1236 uint32_t ssrc = sp.first_ssrc(); 1236 uint32_t ssrc = sp.first_ssrc();
1237 1237
1238 config->rtp.remote_ssrc = ssrc; 1238 config->rtp.remote_ssrc = ssrc;
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 stream_->Start(); 2328 stream_->Start();
2329 } 2329 }
2330 } 2330 }
2331 2331
2332 WebRtcVideoChannel2::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream( 2332 WebRtcVideoChannel2::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream(
2333 webrtc::Call* call, 2333 webrtc::Call* call,
2334 const StreamParams& sp, 2334 const StreamParams& sp,
2335 const webrtc::VideoReceiveStream::Config& config, 2335 const webrtc::VideoReceiveStream::Config& config,
2336 WebRtcVideoDecoderFactory* external_decoder_factory, 2336 WebRtcVideoDecoderFactory* external_decoder_factory,
2337 bool default_stream, 2337 bool default_stream,
2338 const std::vector<VideoCodecSettings>& recv_codecs) 2338 const std::vector<VideoCodecSettings>& recv_codecs,
2339 bool disable_prerenderer_smoothing)
2339 : call_(call), 2340 : call_(call),
2340 ssrcs_(sp.ssrcs), 2341 ssrcs_(sp.ssrcs),
2341 ssrc_groups_(sp.ssrc_groups), 2342 ssrc_groups_(sp.ssrc_groups),
2342 stream_(NULL), 2343 stream_(NULL),
2343 default_stream_(default_stream), 2344 default_stream_(default_stream),
2344 config_(config), 2345 config_(config),
2345 external_decoder_factory_(external_decoder_factory), 2346 external_decoder_factory_(external_decoder_factory),
2347 disable_prerenderer_smoothing_(disable_prerenderer_smoothing),
2346 renderer_(NULL), 2348 renderer_(NULL),
2347 last_width_(-1), 2349 last_width_(-1),
2348 last_height_(-1), 2350 last_height_(-1),
2349 first_frame_timestamp_(-1), 2351 first_frame_timestamp_(-1),
2350 estimated_remote_start_ntp_time_ms_(0) { 2352 estimated_remote_start_ntp_time_ms_(0) {
2351 config_.renderer = this; 2353 config_.renderer = this;
2352 // SetRecvCodecs will also reset (start) the VideoReceiveStream. 2354 // SetRecvCodecs will also reset (start) the VideoReceiveStream.
2353 LOG(LS_INFO) << "SetRecvCodecs (recv) because we are creating the receive " 2355 LOG(LS_INFO) << "SetRecvCodecs (recv) because we are creating the receive "
2354 "stream for the first time: " 2356 "stream for the first time: "
2355 << CodecSettingsVectorToString(recv_codecs); 2357 << CodecSettingsVectorToString(recv_codecs);
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2551 const WebRtcVideoFrame render_frame( 2553 const WebRtcVideoFrame render_frame(
2552 frame.video_frame_buffer(), 2554 frame.video_frame_buffer(),
2553 frame.render_time_ms() * rtc::kNumNanosecsPerMillisec, frame.rotation()); 2555 frame.render_time_ms() * rtc::kNumNanosecsPerMillisec, frame.rotation());
2554 renderer_->RenderFrame(&render_frame); 2556 renderer_->RenderFrame(&render_frame);
2555 } 2557 }
2556 2558
2557 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsTextureSupported() const { 2559 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsTextureSupported() const {
2558 return true; 2560 return true;
2559 } 2561 }
2560 2562
2563 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::SmoothsRenderedFrames()
2564 const {
2565 return disable_prerenderer_smoothing_;
2566 }
2567
2561 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsDefaultStream() const { 2568 bool WebRtcVideoChannel2::WebRtcVideoReceiveStream::IsDefaultStream() const {
2562 return default_stream_; 2569 return default_stream_;
2563 } 2570 }
2564 2571
2565 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetRenderer( 2572 void WebRtcVideoChannel2::WebRtcVideoReceiveStream::SetRenderer(
2566 cricket::VideoRenderer* renderer) { 2573 cricket::VideoRenderer* renderer) {
2567 rtc::CritScope crit(&renderer_lock_); 2574 rtc::CritScope crit(&renderer_lock_);
2568 renderer_ = renderer; 2575 renderer_ = renderer;
2569 if (renderer_ != NULL && last_width_ != -1) { 2576 if (renderer_ != NULL && last_width_ != -1) {
2570 SetSize(last_width_, last_height_); 2577 SetSize(last_width_, last_height_);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2749 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2756 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2750 } 2757 }
2751 } 2758 }
2752 2759
2753 return video_codecs; 2760 return video_codecs;
2754 } 2761 }
2755 2762
2756 } // namespace cricket 2763 } // namespace cricket
2757 2764
2758 #endif // HAVE_WEBRTC_VIDEO 2765 #endif // HAVE_WEBRTC_VIDEO
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.h ('k') | webrtc/common_video/include/incoming_video_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698