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

Side by Side Diff: media/cast/video_sender/video_sender.cc

Issue 340903003: [Cast] Halt AudioSender transmission when too many frames are in-flight. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « media/cast/video_sender/video_sender.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/video_sender/video_sender.h" 5 #include "media/cast/video_sender/video_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 create_video_encode_mem_cb)); 71 create_video_encode_mem_cb));
72 } else { 72 } else {
73 video_encoder_.reset(new VideoEncoderImpl( 73 video_encoder_.reset(new VideoEncoderImpl(
74 cast_environment, video_config, max_unacked_frames_)); 74 cast_environment, video_config, max_unacked_frames_));
75 } 75 }
76 cast_initialization_status_ = STATUS_VIDEO_INITIALIZED; 76 cast_initialization_status_ = STATUS_VIDEO_INITIALIZED;
77 77
78 media::cast::transport::CastTransportVideoConfig transport_config; 78 media::cast::transport::CastTransportVideoConfig transport_config;
79 transport_config.codec = video_config.codec; 79 transport_config.codec = video_config.codec;
80 transport_config.rtp.config = video_config.rtp_config; 80 transport_config.rtp.config = video_config.rtp_config;
81 transport_config.rtp.max_outstanding_frames = max_unacked_frames_ + 1; 81 transport_config.rtp.max_outstanding_frames = max_unacked_frames_;
82 transport_sender_->InitializeVideo(transport_config); 82 transport_sender_->InitializeVideo(transport_config);
83 83
84 rtcp_.SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize); 84 rtcp_.SetCastReceiverEventHistorySize(kReceiverRtcpEventHistorySize);
85 85
86 memset(frame_id_to_rtp_timestamp_, 0, sizeof(frame_id_to_rtp_timestamp_)); 86 memset(frame_id_to_rtp_timestamp_, 0, sizeof(frame_id_to_rtp_timestamp_));
87 } 87 }
88 88
89 VideoSender::~VideoSender() { 89 VideoSender::~VideoSender() {
90 } 90 }
91 91
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 last_send_time_ = cast_environment_->Clock()->NowTicks(); 383 last_send_time_ = cast_environment_->Clock()->NowTicks();
384 384
385 // Sending this extra packet is to kick-start the session. There is 385 // Sending this extra packet is to kick-start the session. There is
386 // no need to optimize re-transmission for this case. 386 // no need to optimize re-transmission for this case.
387 transport_sender_->ResendPackets(false, missing_frames_and_packets, 387 transport_sender_->ResendPackets(false, missing_frames_and_packets,
388 false); 388 false);
389 } 389 }
390 390
391 } // namespace cast 391 } // namespace cast
392 } // namespace media 392 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/video_sender/video_sender.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698