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

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

Issue 532373003: [Cast] RTT clean-up to the max! (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove RTT accessors in FrameSender (not needed post-refactor). Created 6 years, 3 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
« no previous file with comments | « media/cast/net/rtcp/rtcp_unittest.cc ('k') | media/cast/sender/frame_sender.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/audio_sender.h" 5 #include "media/cast/sender/audio_sender.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "media/cast/cast_defines.h" 10 #include "media/cast/cast_defines.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // TODO(miu): AudioSender needs to be like VideoSender in providing an upper 64 // TODO(miu): AudioSender needs to be like VideoSender in providing an upper
65 // limit on the number of in-flight frames. 65 // limit on the number of in-flight frames.
66 transport_config.stored_frames = max_unacked_frames_; 66 transport_config.stored_frames = max_unacked_frames_;
67 transport_config.aes_key = audio_config.aes_key; 67 transport_config.aes_key = audio_config.aes_key;
68 transport_config.aes_iv_mask = audio_config.aes_iv_mask; 68 transport_config.aes_iv_mask = audio_config.aes_iv_mask;
69 69
70 transport_sender->InitializeAudio( 70 transport_sender->InitializeAudio(
71 transport_config, 71 transport_config,
72 base::Bind(&AudioSender::OnReceivedCastFeedback, 72 base::Bind(&AudioSender::OnReceivedCastFeedback,
73 weak_factory_.GetWeakPtr()), 73 weak_factory_.GetWeakPtr()),
74 base::Bind(&AudioSender::OnReceivedRtt, weak_factory_.GetWeakPtr())); 74 base::Bind(&AudioSender::OnMeasuredRoundTripTime,
75 weak_factory_.GetWeakPtr()));
75 } 76 }
76 77
77 AudioSender::~AudioSender() {} 78 AudioSender::~AudioSender() {}
78 79
79 void AudioSender::InsertAudio(scoped_ptr<AudioBus> audio_bus, 80 void AudioSender::InsertAudio(scoped_ptr<AudioBus> audio_bus,
80 const base::TimeTicks& recorded_time) { 81 const base::TimeTicks& recorded_time) {
81 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 82 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
82 if (cast_initialization_status_ != STATUS_AUDIO_INITIALIZED) { 83 if (cast_initialization_status_ != STATUS_AUDIO_INITIALIZED) {
83 NOTREACHED(); 84 NOTREACHED();
84 return; 85 return;
(...skipping 13 matching lines...) Expand all
98 frames_in_encoder_ += new_frames_sent - old_frames_sent; 99 frames_in_encoder_ += new_frames_sent - old_frames_sent;
99 100
100 audio_encoder_->InsertAudio(audio_bus.Pass(), recorded_time); 101 audio_encoder_->InsertAudio(audio_bus.Pass(), recorded_time);
101 } 102 }
102 103
103 void AudioSender::OnAck(uint32 frame_id) { 104 void AudioSender::OnAck(uint32 frame_id) {
104 } 105 }
105 106
106 } // namespace cast 107 } // namespace cast
107 } // namespace media 108 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtcp/rtcp_unittest.cc ('k') | media/cast/sender/frame_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698