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

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: 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
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 if (transport_) { 80 if (transport_) {
81 if (options->HasKey("DSCP")) { 81 if (options->HasKey("DSCP")) {
82 // The default DSCP value for cast is AF41. Which gives it a higher 82 // The default DSCP value for cast is AF41. Which gives it a higher
83 // priority over other traffic. 83 // priority over other traffic.
84 transport_->SetDscp(net::DSCP_AF41); 84 transport_->SetDscp(net::DSCP_AF41);
85 } 85 }
86 transport_->StartReceiving( 86 transport_->StartReceiving(
87 base::Bind(&CastTransportSenderImpl::OnReceivedPacket, 87 base::Bind(&CastTransportSenderImpl::OnReceivedPacket,
88 weak_factory_.GetWeakPtr())); 88 weak_factory_.GetWeakPtr()));
89 int wifi_options;
90 if (options->HasKey("DISABLE_WIFI_SCAN")) {
Alpha Left Google 2014/09/15 20:12:29 Note that the pacer options are using lowercase na
hubbe 2014/09/15 23:11:49 Done.
91 wifi_options |= net::WIFI_OPTIONS_DISABLE_SCAN;
92 }
93 if (options->HasKey("MEDIA_STREAMING_MODE")) {
94 wifi_options |= net::WIFI_OPTIONS_MEDIA_STREAMING_MODE;
95 }
96 if (wifi_options) {
97 wifi_options_autoreset_ = net::SetWifiOptions(wifi_options);
98 }
89 } 99 }
90 } 100 }
91 101
92 CastTransportSenderImpl::~CastTransportSenderImpl() { 102 CastTransportSenderImpl::~CastTransportSenderImpl() {
93 if (event_subscriber_.get()) 103 if (event_subscriber_.get())
94 logging_.RemoveRawEventSubscriber(event_subscriber_.get()); 104 logging_.RemoveRawEventSubscriber(event_subscriber_.get());
95 } 105 }
96 106
97 void CastTransportSenderImpl::InitializeAudio( 107 void CastTransportSenderImpl::InitializeAudio(
98 const CastTransportRtpConfig& config, 108 const CastTransportRtpConfig& config,
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // 2. Specifies a deduplication window. For video this would be the most 373 // 2. Specifies a deduplication window. For video this would be the most
364 // recent RTT. For audio there is no deduplication. 374 // recent RTT. For audio there is no deduplication.
365 ResendPackets(ssrc, 375 ResendPackets(ssrc,
366 cast_message.missing_frames_and_packets, 376 cast_message.missing_frames_and_packets,
367 true, 377 true,
368 dedup_info); 378 dedup_info);
369 } 379 }
370 380
371 } // namespace cast 381 } // namespace cast
372 } // namespace media 382 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698