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

Side by Side Diff: media/cast/receiver/cast_receiver_impl.cc

Issue 567853002: Cast: Make pacing controllable by the extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: forgot to fix test files 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/rtp/rtp_packetizer_unittest.cc ('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 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/receiver/cast_receiver_impl.h" 5 #include "media/cast/receiver/cast_receiver_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 13 matching lines...) Expand all
24 return scoped_ptr<CastReceiver>(new CastReceiverImpl( 24 return scoped_ptr<CastReceiver>(new CastReceiverImpl(
25 cast_environment, audio_config, video_config, packet_sender)); 25 cast_environment, audio_config, video_config, packet_sender));
26 } 26 }
27 27
28 CastReceiverImpl::CastReceiverImpl( 28 CastReceiverImpl::CastReceiverImpl(
29 scoped_refptr<CastEnvironment> cast_environment, 29 scoped_refptr<CastEnvironment> cast_environment,
30 const FrameReceiverConfig& audio_config, 30 const FrameReceiverConfig& audio_config,
31 const FrameReceiverConfig& video_config, 31 const FrameReceiverConfig& video_config,
32 PacketSender* const packet_sender) 32 PacketSender* const packet_sender)
33 : cast_environment_(cast_environment), 33 : cast_environment_(cast_environment),
34 pacer_(cast_environment->Clock(), 34 pacer_(kTargetBurstSize,
35 kMaxBurstSize,
36 cast_environment->Clock(),
35 cast_environment->Logging(), 37 cast_environment->Logging(),
36 packet_sender, 38 packet_sender,
37 cast_environment->GetTaskRunner(CastEnvironment::MAIN)), 39 cast_environment->GetTaskRunner(CastEnvironment::MAIN)),
38 audio_receiver_(cast_environment, audio_config, AUDIO_EVENT, &pacer_), 40 audio_receiver_(cast_environment, audio_config, AUDIO_EVENT, &pacer_),
39 video_receiver_(cast_environment, video_config, VIDEO_EVENT, &pacer_), 41 video_receiver_(cast_environment, video_config, VIDEO_EVENT, &pacer_),
40 ssrc_of_audio_sender_(audio_config.incoming_ssrc), 42 ssrc_of_audio_sender_(audio_config.incoming_ssrc),
41 ssrc_of_video_sender_(video_config.incoming_ssrc), 43 ssrc_of_video_sender_(video_config.incoming_ssrc),
42 num_audio_channels_(audio_config.channels), 44 num_audio_channels_(audio_config.channels),
43 audio_sampling_rate_(audio_config.frequency), 45 audio_sampling_rate_(audio_config.frequency),
44 audio_codec_(audio_config.codec), 46 audio_codec_(audio_config.codec),
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 TRACE_EVENT_INSTANT1( 225 TRACE_EVENT_INSTANT1(
224 "cast_perf_test", "FrameDecoded", 226 "cast_perf_test", "FrameDecoded",
225 TRACE_EVENT_SCOPE_THREAD, 227 TRACE_EVENT_SCOPE_THREAD,
226 "rtp_timestamp", rtp_timestamp); 228 "rtp_timestamp", rtp_timestamp);
227 } 229 }
228 callback.Run(video_frame, playout_time, is_continuous); 230 callback.Run(video_frame, playout_time, is_continuous);
229 } 231 }
230 232
231 } // namespace cast 233 } // namespace cast
232 } // namespace media 234 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/rtp/rtp_packetizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698