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

Side by Side Diff: media/cast/test/utility/in_process_receiver.cc

Issue 654843007: Cast: Increase UDP socket send buffer size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed logging Created 6 years, 2 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
« no previous file with comments | « media/cast/net/udp_transport_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test/utility/in_process_receiver.h" 5 #include "media/cast/test/utility/in_process_receiver.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 void InProcessReceiver::StartOnMainThread() { 75 void InProcessReceiver::StartOnMainThread() {
76 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 76 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
77 77
78 DCHECK(!transport_ && !cast_receiver_); 78 DCHECK(!transport_ && !cast_receiver_);
79 transport_.reset( 79 transport_.reset(
80 new UdpTransport(NULL, 80 new UdpTransport(NULL,
81 cast_environment_->GetTaskRunner(CastEnvironment::MAIN), 81 cast_environment_->GetTaskRunner(CastEnvironment::MAIN),
82 local_end_point_, 82 local_end_point_,
83 remote_end_point_, 83 remote_end_point_,
84 65536,
84 base::Bind(&InProcessReceiver::UpdateCastTransportStatus, 85 base::Bind(&InProcessReceiver::UpdateCastTransportStatus,
85 base::Unretained(this)))); 86 base::Unretained(this))));
86 cast_receiver_ = CastReceiver::Create( 87 cast_receiver_ = CastReceiver::Create(
87 cast_environment_, audio_config_, video_config_, transport_.get()); 88 cast_environment_, audio_config_, video_config_, transport_.get());
88 89
89 // TODO(hubbe): Make the cast receiver do this automatically. 90 // TODO(hubbe): Make the cast receiver do this automatically.
90 transport_->StartReceiving(cast_receiver_->packet_receiver()); 91 transport_->StartReceiving(cast_receiver_->packet_receiver());
91 92
92 PullNextAudioFrame(); 93 PullNextAudioFrame();
93 PullNextVideoFrame(); 94 PullNextVideoFrame();
(...skipping 26 matching lines...) Expand all
120 } 121 }
121 122
122 void InProcessReceiver::PullNextVideoFrame() { 123 void InProcessReceiver::PullNextVideoFrame() {
123 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 124 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
124 cast_receiver_->RequestDecodedVideoFrame(base::Bind( 125 cast_receiver_->RequestDecodedVideoFrame(base::Bind(
125 &InProcessReceiver::GotVideoFrame, weak_factory_.GetWeakPtr())); 126 &InProcessReceiver::GotVideoFrame, weak_factory_.GetWeakPtr()));
126 } 127 }
127 128
128 } // namespace cast 129 } // namespace cast
129 } // namespace media 130 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/udp_transport_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698