| OLD | NEW |
| 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/mojo/services/mojo_renderer_service.h" | 5 #include "media/mojo/services/mojo_renderer_service.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "media/base/audio_decoder.h" | 10 #include "media/base/audio_decoder.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 public: | 40 public: |
| 41 DemuxerStreamProviderShim(scoped_ptr<MojoDemuxerStreamAdapter> stream) | 41 DemuxerStreamProviderShim(scoped_ptr<MojoDemuxerStreamAdapter> stream) |
| 42 : stream_(stream.Pass()) {} | 42 : stream_(stream.Pass()) {} |
| 43 | 43 |
| 44 ~DemuxerStreamProviderShim() override {} | 44 ~DemuxerStreamProviderShim() override {} |
| 45 | 45 |
| 46 DemuxerStream* GetStream(DemuxerStream::Type type) override { | 46 DemuxerStream* GetStream(DemuxerStream::Type type) override { |
| 47 return type != stream_->type() ? nullptr : stream_.get(); | 47 return type != stream_->type() ? nullptr : stream_.get(); |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 Liveness GetLiveness() const override { | |
| 51 return DemuxerStreamProvider::LIVENESS_UNKNOWN; | |
| 52 } | |
| 53 | |
| 54 private: | 50 private: |
| 55 scoped_ptr<MojoDemuxerStreamAdapter> stream_; | 51 scoped_ptr<MojoDemuxerStreamAdapter> stream_; |
| 56 | 52 |
| 57 DISALLOW_COPY_AND_ASSIGN(DemuxerStreamProviderShim); | 53 DISALLOW_COPY_AND_ASSIGN(DemuxerStreamProviderShim); |
| 58 }; | 54 }; |
| 59 | 55 |
| 60 class MojoRendererApplication | 56 class MojoRendererApplication |
| 61 : public mojo::ApplicationDelegate, | 57 : public mojo::ApplicationDelegate, |
| 62 public mojo::InterfaceFactory<mojo::MediaRenderer> { | 58 public mojo::InterfaceFactory<mojo::MediaRenderer> { |
| 63 public: | 59 public: |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 state_ = STATE_ERROR; | 214 state_ = STATE_ERROR; |
| 219 client()->OnError(); | 215 client()->OnError(); |
| 220 } | 216 } |
| 221 | 217 |
| 222 } // namespace media | 218 } // namespace media |
| 223 | 219 |
| 224 MojoResult MojoMain(MojoHandle shell_handle) { | 220 MojoResult MojoMain(MojoHandle shell_handle) { |
| 225 mojo::ApplicationRunnerChromium runner(new media::MojoRendererApplication); | 221 mojo::ApplicationRunnerChromium runner(new media::MojoRendererApplication); |
| 226 return runner.Run(shell_handle); | 222 return runner.Run(shell_handle); |
| 227 } | 223 } |
| OLD | NEW |