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

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

Issue 308043006: [Cast] Clean-up: Merge RtpReceiver+AudioReceiver+VideoReceiver-->FrameReceiver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed hclam's comments. Created 6 years, 6 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 | « media/cast/test/end2end_unittest.cc ('k') | media/cast/video_receiver/video_decoder.h » ('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 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const base::TimeTicks& playout_time, 107 const base::TimeTicks& playout_time,
108 bool is_continuous) { 108 bool is_continuous) {
109 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 109 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
110 if (video_frame) 110 if (video_frame)
111 OnVideoFrame(video_frame, playout_time, is_continuous); 111 OnVideoFrame(video_frame, playout_time, is_continuous);
112 PullNextVideoFrame(); 112 PullNextVideoFrame();
113 } 113 }
114 114
115 void InProcessReceiver::PullNextAudioFrame() { 115 void InProcessReceiver::PullNextAudioFrame() {
116 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 116 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
117 cast_receiver_->frame_receiver()->GetRawAudioFrame( 117 cast_receiver_->RequestDecodedAudioFrame(
118 base::Bind(&InProcessReceiver::GotAudioFrame, 118 base::Bind(&InProcessReceiver::GotAudioFrame,
119 weak_factory_.GetWeakPtr())); 119 weak_factory_.GetWeakPtr()));
120 } 120 }
121 121
122 void InProcessReceiver::PullNextVideoFrame() { 122 void InProcessReceiver::PullNextVideoFrame() {
123 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN)); 123 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::MAIN));
124 cast_receiver_->frame_receiver()->GetRawVideoFrame(base::Bind( 124 cast_receiver_->RequestDecodedVideoFrame(base::Bind(
125 &InProcessReceiver::GotVideoFrame, weak_factory_.GetWeakPtr())); 125 &InProcessReceiver::GotVideoFrame, weak_factory_.GetWeakPtr()));
126 } 126 }
127 127
128 } // namespace cast 128 } // namespace cast
129 } // namespace media 129 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/test/end2end_unittest.cc ('k') | media/cast/video_receiver/video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698