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

Side by Side Diff: media/cast/net/cast_transport_sender_impl.cc

Issue 566243005: Cast: Allow extension to control wifi options on windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments addressed Created 6 years, 2 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/net/cast_transport_sender_impl.h" 5 #include "media/cast/net/cast_transport_sender_impl.h"
6 6
7 #include "base/single_thread_task_runner.h" 7 #include "base/single_thread_task_runner.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "media/cast/net/cast_transport_config.h" 9 #include "media/cast/net/cast_transport_config.h"
10 #include "media/cast/net/cast_transport_defines.h" 10 #include "media/cast/net/cast_transport_defines.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 if (transport_) { 100 if (transport_) {
101 if (options->HasKey("DSCP")) { 101 if (options->HasKey("DSCP")) {
102 // The default DSCP value for cast is AF41. Which gives it a higher 102 // The default DSCP value for cast is AF41. Which gives it a higher
103 // priority over other traffic. 103 // priority over other traffic.
104 transport_->SetDscp(net::DSCP_AF41); 104 transport_->SetDscp(net::DSCP_AF41);
105 } 105 }
106 transport_->StartReceiving( 106 transport_->StartReceiving(
107 base::Bind(&CastTransportSenderImpl::OnReceivedPacket, 107 base::Bind(&CastTransportSenderImpl::OnReceivedPacket,
108 weak_factory_.GetWeakPtr())); 108 weak_factory_.GetWeakPtr()));
109 int wifi_options = 0;
110 if (options->HasKey("disable_wifi_scan")) {
111 wifi_options |= net::WIFI_OPTIONS_DISABLE_SCAN;
112 }
113 if (options->HasKey("media_streaming_mode")) {
114 wifi_options |= net::WIFI_OPTIONS_MEDIA_STREAMING_MODE;
115 }
116 if (wifi_options) {
117 wifi_options_autoreset_ = net::SetWifiOptions(wifi_options);
118 }
109 } 119 }
110 } 120 }
111 121
112 CastTransportSenderImpl::~CastTransportSenderImpl() { 122 CastTransportSenderImpl::~CastTransportSenderImpl() {
113 if (event_subscriber_.get()) 123 if (event_subscriber_.get())
114 logging_.RemoveRawEventSubscriber(event_subscriber_.get()); 124 logging_.RemoveRawEventSubscriber(event_subscriber_.get());
115 } 125 }
116 126
117 void CastTransportSenderImpl::InitializeAudio( 127 void CastTransportSenderImpl::InitializeAudio(
118 const CastTransportRtpConfig& config, 128 const CastTransportRtpConfig& config,
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 // 2. Specifies a deduplication window. For video this would be the most 393 // 2. Specifies a deduplication window. For video this would be the most
384 // recent RTT. For audio there is no deduplication. 394 // recent RTT. For audio there is no deduplication.
385 ResendPackets(ssrc, 395 ResendPackets(ssrc,
386 cast_message.missing_frames_and_packets, 396 cast_message.missing_frames_and_packets,
387 true, 397 true,
388 dedup_info); 398 dedup_info);
389 } 399 }
390 400
391 } // namespace cast 401 } // namespace cast
392 } // namespace media 402 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/cast_transport_sender_impl.h ('k') | media/cast/net/cast_transport_sender_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698