OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |