| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/composite_filter.h" | 5 #include "media/base/composite_filter.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
| 12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 13 | 13 |
| 14 namespace media { | 14 namespace media { |
| 15 | 15 |
| 16 class CompositeFilter::FilterHostImpl : public FilterHost { | 16 class CompositeFilter::FilterHostImpl : public FilterHost { |
| 17 public: | 17 public: |
| 18 FilterHostImpl(CompositeFilter* parent, FilterHost* host); | 18 FilterHostImpl(CompositeFilter* parent, FilterHost* host); |
| 19 | 19 |
| 20 FilterHost* host(); | 20 FilterHost* host(); |
| 21 | 21 |
| 22 // media::FilterHost methods. | 22 // media::FilterHost methods. |
| 23 virtual void SetError(PipelineStatus error) OVERRIDE; | 23 virtual void SetError(PipelineStatus error) OVERRIDE; |
| 24 virtual base::TimeDelta GetTime() const OVERRIDE; | 24 virtual base::TimeDelta GetTime() const OVERRIDE; |
| 25 virtual base::TimeDelta GetDuration() const OVERRIDE; | 25 virtual base::TimeDelta GetDuration() const OVERRIDE; |
| 26 virtual void SetNaturalVideoSize(const gfx::Size& size) OVERRIDE; | 26 virtual void SetNaturalVideoSize(const gfx::Size& size) OVERRIDE; |
| 27 virtual void NotifyEnded() OVERRIDE; | 27 virtual void NotifyEnded() OVERRIDE; |
| 28 virtual void DisableAudioRenderer() OVERRIDE; | |
| 29 | 28 |
| 30 private: | 29 private: |
| 31 CompositeFilter* parent_; | 30 CompositeFilter* parent_; |
| 32 FilterHost* host_; | 31 FilterHost* host_; |
| 33 | 32 |
| 34 DISALLOW_COPY_AND_ASSIGN(FilterHostImpl); | 33 DISALLOW_COPY_AND_ASSIGN(FilterHostImpl); |
| 35 }; | 34 }; |
| 36 | 35 |
| 37 CompositeFilter::CompositeFilter( | 36 CompositeFilter::CompositeFilter( |
| 38 const scoped_refptr<base::MessageLoopProxy>& message_loop) | 37 const scoped_refptr<base::MessageLoopProxy>& message_loop) |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 | 461 |
| 463 void CompositeFilter::FilterHostImpl::SetNaturalVideoSize( | 462 void CompositeFilter::FilterHostImpl::SetNaturalVideoSize( |
| 464 const gfx::Size& size) { | 463 const gfx::Size& size) { |
| 465 host_->SetNaturalVideoSize(size); | 464 host_->SetNaturalVideoSize(size); |
| 466 } | 465 } |
| 467 | 466 |
| 468 void CompositeFilter::FilterHostImpl::NotifyEnded() { | 467 void CompositeFilter::FilterHostImpl::NotifyEnded() { |
| 469 host_->NotifyEnded(); | 468 host_->NotifyEnded(); |
| 470 } | 469 } |
| 471 | 470 |
| 472 void CompositeFilter::FilterHostImpl::DisableAudioRenderer() { | |
| 473 host_->DisableAudioRenderer(); | |
| 474 } | |
| 475 | |
| 476 } // namespace media | 471 } // namespace media |
| OLD | NEW |