| 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_delegate.h" | 5 #include "chrome/renderer/media/cast_session_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop/message_loop_proxy.h" | 8 #include "base/message_loop/message_loop_proxy.h" |
| 9 #include "content/public/renderer/p2p_socket_client.h" | 9 #include "content/public/renderer/p2p_socket_client.h" |
| 10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // There's no need to decode so no thread assigned for decoding. | 76 // There's no need to decode so no thread assigned for decoding. |
| 77 // Get default logging: All disabled. | 77 // Get default logging: All disabled. |
| 78 cast_environment_ = new CastEnvironment( | 78 cast_environment_ = new CastEnvironment( |
| 79 &clock_, | 79 &clock_, |
| 80 base::MessageLoopProxy::current(), | 80 base::MessageLoopProxy::current(), |
| 81 audio_encode_thread_.message_loop_proxy(), | 81 audio_encode_thread_.message_loop_proxy(), |
| 82 NULL, | 82 NULL, |
| 83 video_encode_thread_.message_loop_proxy(), | 83 video_encode_thread_.message_loop_proxy(), |
| 84 NULL, | 84 NULL, |
| 85 base::MessageLoopProxy::current(), | 85 base::MessageLoopProxy::current(), |
| 86 media::cast::GetDefaultCastLoggingConfig()); | 86 media::cast::GetDefaultCastSenderLoggingConfig()); |
| 87 | 87 |
| 88 // TODO(hclam): Implement VideoEncoderController to configure hardware | 88 // TODO(hclam): Implement VideoEncoderController to configure hardware |
| 89 // encoder. | 89 // encoder. |
| 90 cast_sender_.reset(CastSender::CreateCastSender( | 90 cast_sender_.reset(CastSender::CreateCastSender( |
| 91 cast_environment_, | 91 cast_environment_, |
| 92 audio_config_, | 92 audio_config_, |
| 93 video_config_, | 93 video_config_, |
| 94 NULL, | 94 NULL, |
| 95 this)); | 95 this)); |
| 96 | 96 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 122 | 122 |
| 123 void CastSessionDelegate::ReceivePacket(const std::vector<char>& packet) { | 123 void CastSessionDelegate::ReceivePacket(const std::vector<char>& packet) { |
| 124 uint8 *packet_copy = new uint8[packet.size()]; | 124 uint8 *packet_copy = new uint8[packet.size()]; |
| 125 memcpy(packet_copy, &packet[0], packet.size()); | 125 memcpy(packet_copy, &packet[0], packet.size()); |
| 126 cast_sender_->packet_receiver()->ReceivedPacket( | 126 cast_sender_->packet_receiver()->ReceivedPacket( |
| 127 packet_copy, | 127 packet_copy, |
| 128 packet.size(), | 128 packet.size(), |
| 129 base::Bind(&media::cast::transport::PacketReceiver::DeletePacket, | 129 base::Bind(&media::cast::transport::PacketReceiver::DeletePacket, |
| 130 packet_copy)); | 130 packet_copy)); |
| 131 } | 131 } |
| OLD | NEW |