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

Side by Side Diff: chromecast/media/cma/ipc_streamer/av_streamer_proxy.cc

Issue 1083883003: Move BindToCurrentLoop from media/base/ to base/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix media/base/callback_holder.h compile Created 5 years, 8 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
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 "chromecast/media/cma/ipc_streamer/av_streamer_proxy.h" 5 #include "chromecast/media/cma/ipc_streamer/av_streamer_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/message_loop/message_loop_proxy.h" 9 #include "base/message_loop/message_loop_proxy.h"
10 #include "chromecast/media/cma/base/coded_frame_provider.h" 10 #include "chromecast/media/cma/base/coded_frame_provider.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 ProcessPendingData(); 75 ProcessPendingData();
76 } 76 }
77 77
78 void AvStreamerProxy::RequestBufferIfNeeded() { 78 void AvStreamerProxy::RequestBufferIfNeeded() {
79 DCHECK(thread_checker_.CalledOnValidThread()); 79 DCHECK(thread_checker_.CalledOnValidThread());
80 80
81 if (!is_running_ || pending_read_ || pending_av_data_) 81 if (!is_running_ || pending_read_ || pending_av_data_)
82 return; 82 return;
83 83
84 // |frame_provider_| is assumed to run on the same message loop. 84 // |frame_provider_| is assumed to run on the same message loop.
85 // Add a BindToCurrentLoop if that's not the case in the future. 85 // Add a base::BindToCurrentLoop if that's not the case in the future.
86 pending_read_ = true; 86 pending_read_ = true;
87 frame_provider_->Read(base::Bind(&AvStreamerProxy::OnNewBuffer, weak_this_)); 87 frame_provider_->Read(base::Bind(&AvStreamerProxy::OnNewBuffer, weak_this_));
88 } 88 }
89 89
90 void AvStreamerProxy::OnNewBuffer( 90 void AvStreamerProxy::OnNewBuffer(
91 const scoped_refptr<DecoderBufferBase>& buffer, 91 const scoped_refptr<DecoderBufferBase>& buffer,
92 const ::media::AudioDecoderConfig& audio_config, 92 const ::media::AudioDecoderConfig& audio_config,
93 const ::media::VideoDecoderConfig& video_config) { 93 const ::media::VideoDecoderConfig& video_config) {
94 DCHECK(thread_checker_.CalledOnValidThread()); 94 DCHECK(thread_checker_.CalledOnValidThread());
95 95
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 dummy_msg->content_size())); 191 dummy_msg->content_size()));
192 if (!msg) 192 if (!msg)
193 return false; 193 return false;
194 194
195 DecoderBufferBaseMarshaller::Write(buffer, msg.get()); 195 DecoderBufferBaseMarshaller::Write(buffer, msg.get());
196 return true; 196 return true;
197 } 197 }
198 198
199 } // namespace media 199 } // namespace media
200 } // namespace chromecast 200 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/cma/filters/demuxer_stream_adapter.cc ('k') | chromecast/media/cma/pipeline/av_pipeline_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698