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

Side by Side Diff: chrome/renderer/media/cast_session_delegate.cc

Issue 126843003: Revert of Cast:Adding cast_transport_config and cleaning up (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/media/cast_rtp_stream.cc ('k') | media/cast/audio_receiver/audio_decoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // thread hopping for incoming video frames and outgoing network packets. 73 // thread hopping for incoming video frames and outgoing network packets.
74 // There's no need to decode so no thread assigned for decoding. 74 // There's no need to decode so no thread assigned for decoding.
75 // Get default logging: All disabled. 75 // Get default logging: All disabled.
76 cast_environment_ = new CastEnvironment( 76 cast_environment_ = new CastEnvironment(
77 &clock_, 77 &clock_,
78 base::MessageLoopProxy::current(), 78 base::MessageLoopProxy::current(),
79 audio_encode_thread_.message_loop_proxy(), 79 audio_encode_thread_.message_loop_proxy(),
80 NULL, 80 NULL,
81 video_encode_thread_.message_loop_proxy(), 81 video_encode_thread_.message_loop_proxy(),
82 NULL, 82 NULL,
83 base::MessageLoopProxy::current(),
84 media::cast::GetDefaultCastLoggingConfig()); 83 media::cast::GetDefaultCastLoggingConfig());
85 84
86 // TODO(hclam): Implement VideoEncoderController to configure hardware 85 // TODO(hclam): Implement VideoEncoderController to configure hardware
87 // encoder. 86 // encoder.
88 cast_sender_.reset(CastSender::CreateCastSender( 87 cast_sender_.reset(CastSender::CreateCastSender(
89 cast_environment_, 88 cast_environment_,
90 audio_config_, 89 audio_config_,
91 video_config_, 90 video_config_,
92 NULL, 91 NULL,
93 this)); 92 this));
(...skipping 21 matching lines...) Expand all
115 } 114 }
116 return true; 115 return true;
117 } 116 }
118 117
119 void CastSessionDelegate::ReceivePacket(const std::vector<char>& packet) { 118 void CastSessionDelegate::ReceivePacket(const std::vector<char>& packet) {
120 uint8 *packet_copy = new uint8[packet.size()]; 119 uint8 *packet_copy = new uint8[packet.size()];
121 memcpy(packet_copy, &packet[0], packet.size()); 120 memcpy(packet_copy, &packet[0], packet.size());
122 cast_sender_->packet_receiver()->ReceivedPacket( 121 cast_sender_->packet_receiver()->ReceivedPacket(
123 packet_copy, 122 packet_copy,
124 packet.size(), 123 packet.size(),
125 base::Bind(&media::cast::transport::PacketReceiver::DeletePacket, 124 base::Bind(&media::cast::PacketReceiver::DeletePacket, packet_copy));
126 packet_copy));
127 } 125 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_rtp_stream.cc ('k') | media/cast/audio_receiver/audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698