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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 config, | 78 config, |
79 media::BindToCurrentLoop(callback), | 79 media::BindToCurrentLoop(callback), |
80 media::BindToCurrentLoop(error_callback), | 80 media::BindToCurrentLoop(error_callback), |
81 media::BindToCurrentLoop( | 81 media::BindToCurrentLoop( |
82 base::Bind(&CreateVideoEncodeAccelerator)), | 82 base::Bind(&CreateVideoEncodeAccelerator)), |
83 media::BindToCurrentLoop( | 83 media::BindToCurrentLoop( |
84 base::Bind(&CreateVideoEncodeMemory)))); | 84 base::Bind(&CreateVideoEncodeMemory)))); |
85 } | 85 } |
86 | 86 |
87 void CastSession::StartUDP(const net::IPEndPoint& remote_endpoint, | 87 void CastSession::StartUDP(const net::IPEndPoint& remote_endpoint, |
88 scoped_ptr<base::DictionaryValue> options) { | 88 scoped_ptr<base::DictionaryValue> options, |
| 89 const ErrorCallback& error_callback) { |
89 io_message_loop_proxy_->PostTask( | 90 io_message_loop_proxy_->PostTask( |
90 FROM_HERE, | 91 FROM_HERE, |
91 base::Bind( | 92 base::Bind( |
92 &CastSessionDelegate::StartUDP, | 93 &CastSessionDelegate::StartUDP, |
93 base::Unretained(delegate_.get()), | 94 base::Unretained(delegate_.get()), |
94 net::IPEndPoint(), | 95 net::IPEndPoint(), |
95 remote_endpoint, | 96 remote_endpoint, |
96 base::Passed(&options))); | 97 base::Passed(&options), |
| 98 media::BindToCurrentLoop(error_callback))); |
97 } | 99 } |
98 | 100 |
99 void CastSession::ToggleLogging(bool is_audio, bool enable) { | 101 void CastSession::ToggleLogging(bool is_audio, bool enable) { |
100 io_message_loop_proxy_->PostTask( | 102 io_message_loop_proxy_->PostTask( |
101 FROM_HERE, | 103 FROM_HERE, |
102 base::Bind(&CastSessionDelegate::ToggleLogging, | 104 base::Bind(&CastSessionDelegate::ToggleLogging, |
103 base::Unretained(delegate_.get()), | 105 base::Unretained(delegate_.get()), |
104 is_audio, | 106 is_audio, |
105 enable)); | 107 enable)); |
106 } | 108 } |
(...skipping 12 matching lines...) Expand all Loading... |
119 | 121 |
120 void CastSession::GetStatsAndReset(bool is_audio, | 122 void CastSession::GetStatsAndReset(bool is_audio, |
121 const StatsCallback& callback) { | 123 const StatsCallback& callback) { |
122 io_message_loop_proxy_->PostTask( | 124 io_message_loop_proxy_->PostTask( |
123 FROM_HERE, | 125 FROM_HERE, |
124 base::Bind(&CastSessionDelegate::GetStatsAndReset, | 126 base::Bind(&CastSessionDelegate::GetStatsAndReset, |
125 base::Unretained(delegate_.get()), | 127 base::Unretained(delegate_.get()), |
126 is_audio, | 128 is_audio, |
127 media::BindToCurrentLoop(callback))); | 129 media::BindToCurrentLoop(callback))); |
128 } | 130 } |
OLD | NEW |