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

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

Issue 2048033003: Refactoring: CastTransport InitializeAudio/InitializeVideo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/sender/video_sender.h" 5 #include "media/cast/sender/video_sender.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <cmath> 9 #include <cmath>
10 #include <cstring> 10 #include <cstring>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 base::Bind(status_change_cb, STATUS_UNSUPPORTED_CODEC)); 132 base::Bind(status_change_cb, STATUS_UNSUPPORTED_CODEC));
133 } 133 }
134 134
135 media::cast::CastTransportRtpConfig transport_config; 135 media::cast::CastTransportRtpConfig transport_config;
136 transport_config.ssrc = video_config.ssrc; 136 transport_config.ssrc = video_config.ssrc;
137 transport_config.feedback_ssrc = video_config.receiver_ssrc; 137 transport_config.feedback_ssrc = video_config.receiver_ssrc;
138 transport_config.rtp_payload_type = video_config.rtp_payload_type; 138 transport_config.rtp_payload_type = video_config.rtp_payload_type;
139 transport_config.aes_key = video_config.aes_key; 139 transport_config.aes_key = video_config.aes_key;
140 transport_config.aes_iv_mask = video_config.aes_iv_mask; 140 transport_config.aes_iv_mask = video_config.aes_iv_mask;
141 141
142 transport_sender->InitializeVideo( 142 transport_sender->InitializeStream(
143 transport_config, base::WrapUnique(new FrameSender::RtcpClient( 143 transport_config, base::WrapUnique(new FrameSender::RtcpClient(
144 weak_factory_.GetWeakPtr()))); 144 weak_factory_.GetWeakPtr())));
145 } 145 }
146 146
147 VideoSender::~VideoSender() { 147 VideoSender::~VideoSender() {
148 } 148 }
149 149
150 void VideoSender::InsertRawVideoFrame( 150 void VideoSender::InsertRawVideoFrame(
151 const scoped_refptr<media::VideoFrame>& video_frame, 151 const scoped_refptr<media::VideoFrame>& video_frame,
152 const base::TimeTicks& reference_time) { 152 const base::TimeTicks& reference_time) {
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 media::VideoFrameMetadata::RESOURCE_UTILIZATION, 351 media::VideoFrameMetadata::RESOURCE_UTILIZATION,
352 encoded_frame->dependency == EncodedFrame::KEY ? 352 encoded_frame->dependency == EncodedFrame::KEY ?
353 std::min(1.0, attenuated_utilization) : attenuated_utilization); 353 std::min(1.0, attenuated_utilization) : attenuated_utilization);
354 } 354 }
355 355
356 SendEncodedFrame(encoder_bitrate, std::move(encoded_frame)); 356 SendEncodedFrame(encoder_bitrate, std::move(encoded_frame));
357 } 357 }
358 358
359 } // namespace cast 359 } // namespace cast
360 } // namespace media 360 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698