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

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

Issue 74133002: Cast: Removed unnecessary ref counters. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge TOT Created 7 years, 1 month 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
« 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 <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 VLOG(1) << "max_unacked_frames " << static_cast<int>(max_unacked_frames_); 78 VLOG(1) << "max_unacked_frames " << static_cast<int>(max_unacked_frames_);
79 DCHECK_GT(max_unacked_frames_, 0) << "Invalid argument"; 79 DCHECK_GT(max_unacked_frames_, 0) << "Invalid argument";
80 80
81 rtp_video_sender_statistics_.reset( 81 rtp_video_sender_statistics_.reset(
82 new LocalRtpVideoSenderStatistics(rtp_sender_.get())); 82 new LocalRtpVideoSenderStatistics(rtp_sender_.get()));
83 83
84 if (video_config.use_external_encoder) { 84 if (video_config.use_external_encoder) {
85 DCHECK(video_encoder_controller) << "Invalid argument"; 85 DCHECK(video_encoder_controller) << "Invalid argument";
86 video_encoder_controller_ = video_encoder_controller; 86 video_encoder_controller_ = video_encoder_controller;
87 } else { 87 } else {
88 video_encoder_ = new VideoEncoder(cast_environment, video_config, 88 video_encoder_.reset(new VideoEncoder(cast_environment, video_config,
89 max_unacked_frames_); 89 max_unacked_frames_));
90 video_encoder_controller_ = video_encoder_.get(); 90 video_encoder_controller_ = video_encoder_.get();
91 } 91 }
92 92
93 if (video_config.aes_iv_mask.size() == kAesKeySize && 93 if (video_config.aes_iv_mask.size() == kAesKeySize &&
94 video_config.aes_key.size() == kAesKeySize) { 94 video_config.aes_key.size() == kAesKeySize) {
95 iv_mask_ = video_config.aes_iv_mask; 95 iv_mask_ = video_config.aes_iv_mask;
96 crypto::SymmetricKey* key = crypto::SymmetricKey::Import( 96 crypto::SymmetricKey* key = crypto::SymmetricKey::Import(
97 crypto::SymmetricKey::AES, video_config.aes_key); 97 crypto::SymmetricKey::AES, video_config.aes_key);
98 encryptor_.reset(new crypto::Encryptor()); 98 encryptor_.reset(new crypto::Encryptor());
99 encryptor_->Init(key, crypto::Encryptor::CTR, std::string()); 99 encryptor_->Init(key, crypto::Encryptor::CTR, std::string());
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 402 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
403 MissingFramesAndPacketsMap missing_frames_and_packets; 403 MissingFramesAndPacketsMap missing_frames_and_packets;
404 PacketIdSet missing; 404 PacketIdSet missing;
405 missing_frames_and_packets.insert(std::make_pair(resend_frame_id, missing)); 405 missing_frames_and_packets.insert(std::make_pair(resend_frame_id, missing));
406 rtp_sender_->ResendPackets(missing_frames_and_packets); 406 rtp_sender_->ResendPackets(missing_frames_and_packets);
407 last_send_time_ = cast_environment_->Clock()->NowTicks(); 407 last_send_time_ = cast_environment_->Clock()->NowTicks();
408 } 408 }
409 409
410 } // namespace cast 410 } // namespace cast
411 } // namespace media 411 } // 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