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

Side by Side Diff: media/remoting/remote_renderer_impl.cc

Issue 2541803003: media: remove unused functions: Renderer::HasAudio()/HasVideo() (Closed)
Patch Set: cast Created 4 years 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/remoting/remote_renderer_impl.h ('k') | media/renderers/renderer_impl.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/remoting/remote_renderer_impl.h" 5 #include "media/remoting/remote_renderer_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // No BelongsToCurrentThread() checking because this can be called from other 211 // No BelongsToCurrentThread() checking because this can be called from other
212 // threads. 212 // threads.
213 // TODO(erickung): Interpolate current media time using local system time. 213 // TODO(erickung): Interpolate current media time using local system time.
214 // Current receiver is to update |current_media_time_| every 250ms. But it 214 // Current receiver is to update |current_media_time_| every 250ms. But it
215 // needs to lower the update frequency in order to reduce network usage. Hence 215 // needs to lower the update frequency in order to reduce network usage. Hence
216 // the interpolation is needed after receiver implementation is changed. 216 // the interpolation is needed after receiver implementation is changed.
217 base::AutoLock auto_lock(time_lock_); 217 base::AutoLock auto_lock(time_lock_);
218 return current_media_time_; 218 return current_media_time_;
219 } 219 }
220 220
221 bool RemoteRendererImpl::HasAudio() {
222 DCHECK(media_task_runner_->BelongsToCurrentThread());
223 return audio_demuxer_stream_adapter_ ? true : false;
224 }
225
226 bool RemoteRendererImpl::HasVideo() {
227 DCHECK(media_task_runner_->BelongsToCurrentThread());
228 return video_demuxer_stream_adapter_ ? true : false;
229 }
230
231 // static 221 // static
232 void RemoteRendererImpl::OnDataPipeCreatedOnMainThread( 222 void RemoteRendererImpl::OnDataPipeCreatedOnMainThread(
233 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner, 223 scoped_refptr<base::SingleThreadTaskRunner> media_task_runner,
234 base::WeakPtr<RemoteRendererImpl> self, 224 base::WeakPtr<RemoteRendererImpl> self,
235 mojom::RemotingDataStreamSenderPtrInfo audio, 225 mojom::RemotingDataStreamSenderPtrInfo audio,
236 mojom::RemotingDataStreamSenderPtrInfo video, 226 mojom::RemotingDataStreamSenderPtrInfo video,
237 mojo::ScopedDataPipeProducerHandle audio_handle, 227 mojo::ScopedDataPipeProducerHandle audio_handle,
238 mojo::ScopedDataPipeProducerHandle video_handle) { 228 mojo::ScopedDataPipeProducerHandle video_handle) {
239 media_task_runner->PostTask( 229 media_task_runner->PostTask(
240 FROM_HERE, 230 FROM_HERE,
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 568
579 void RemoteRendererImpl::UpdateInterstitial() { 569 void RemoteRendererImpl::UpdateInterstitial() {
580 DCHECK(main_task_runner_->BelongsToCurrentThread()); 570 DCHECK(main_task_runner_->BelongsToCurrentThread());
581 571
582 interstitial_ui_.ShowInterstitial( 572 interstitial_ui_.ShowInterstitial(
583 remoting_renderer_controller_->remoting_source()->state() == 573 remoting_renderer_controller_->remoting_source()->state() ==
584 RemotingSessionState::SESSION_STARTED); 574 RemotingSessionState::SESSION_STARTED);
585 } 575 }
586 576
587 } // namespace media 577 } // namespace media
OLDNEW
« no previous file with comments | « media/remoting/remote_renderer_impl.h ('k') | media/renderers/renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698