| OLD | NEW |
| 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 "chrome/renderer/media/cast_session.h" | 5 #include "chrome/renderer/media/cast_session.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "chrome/renderer/media/cast_session_delegate.h" | 8 #include "chrome/renderer/media/cast_session_delegate.h" |
| 9 #include "content/public/renderer/render_thread.h" | 9 #include "content/public/renderer/render_thread.h" |
| 10 #include "content/public/renderer/video_encode_accelerator.h" | 10 #include "content/public/renderer/video_encode_accelerator.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 base::Unretained(delegate_.get()), | 81 base::Unretained(delegate_.get()), |
| 82 config, | 82 config, |
| 83 media::BindToCurrentLoop(callback), | 83 media::BindToCurrentLoop(callback), |
| 84 media::BindToCurrentLoop(error_callback), | 84 media::BindToCurrentLoop(error_callback), |
| 85 media::BindToCurrentLoop( | 85 media::BindToCurrentLoop( |
| 86 base::Bind(&CreateVideoEncodeAccelerator)), | 86 base::Bind(&CreateVideoEncodeAccelerator)), |
| 87 media::BindToCurrentLoop( | 87 media::BindToCurrentLoop( |
| 88 base::Bind(&CreateVideoEncodeMemory)))); | 88 base::Bind(&CreateVideoEncodeMemory)))); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void CastSession::StartUDP(const net::IPEndPoint& remote_endpoint) { | 91 void CastSession::StartUDP(const net::IPEndPoint& remote_endpoint, |
| 92 const std::string& options) { |
| 92 io_message_loop_proxy_->PostTask( | 93 io_message_loop_proxy_->PostTask( |
| 93 FROM_HERE, | 94 FROM_HERE, |
| 94 base::Bind( | 95 base::Bind( |
| 95 &CastSessionDelegate::StartUDP, | 96 &CastSessionDelegate::StartUDP, |
| 96 base::Unretained(delegate_.get()), | 97 base::Unretained(delegate_.get()), |
| 97 remote_endpoint)); | 98 remote_endpoint, |
| 99 options)); |
| 98 } | 100 } |
| 99 | 101 |
| 100 void CastSession::ToggleLogging(bool is_audio, bool enable) { | 102 void CastSession::ToggleLogging(bool is_audio, bool enable) { |
| 101 io_message_loop_proxy_->PostTask( | 103 io_message_loop_proxy_->PostTask( |
| 102 FROM_HERE, | 104 FROM_HERE, |
| 103 base::Bind(&CastSessionDelegate::ToggleLogging, | 105 base::Bind(&CastSessionDelegate::ToggleLogging, |
| 104 base::Unretained(delegate_.get()), | 106 base::Unretained(delegate_.get()), |
| 105 is_audio, | 107 is_audio, |
| 106 enable)); | 108 enable)); |
| 107 } | 109 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 120 | 122 |
| 121 void CastSession::GetStatsAndReset(bool is_audio, | 123 void CastSession::GetStatsAndReset(bool is_audio, |
| 122 const StatsCallback& callback) { | 124 const StatsCallback& callback) { |
| 123 io_message_loop_proxy_->PostTask( | 125 io_message_loop_proxy_->PostTask( |
| 124 FROM_HERE, | 126 FROM_HERE, |
| 125 base::Bind(&CastSessionDelegate::GetStatsAndReset, | 127 base::Bind(&CastSessionDelegate::GetStatsAndReset, |
| 126 base::Unretained(delegate_.get()), | 128 base::Unretained(delegate_.get()), |
| 127 is_audio, | 129 is_audio, |
| 128 media::BindToCurrentLoop(callback))); | 130 media::BindToCurrentLoop(callback))); |
| 129 } | 131 } |
| OLD | NEW |