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

Side by Side Diff: media/mojo/services/mojo_renderer_impl.h

Issue 591203003: media: Pass DemuxerStreamProvider in Renderer::Initialize(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 6 years, 2 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
« no previous file with comments | « media/filters/renderer_impl_unittest.cc ('k') | media/mojo/services/mojo_renderer_impl.cc » ('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 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "media/base/renderer.h" 10 #include "media/base/renderer.h"
(...skipping 14 matching lines...) Expand all
25 // mojo::MediaRenderer proxies back to the MojoRendererImpl via the 25 // mojo::MediaRenderer proxies back to the MojoRendererImpl via the
26 // mojo::MediaRendererClient interface. 26 // mojo::MediaRendererClient interface.
27 // 27 //
28 // MojoRendererImpl implements media::Renderer for use as either an audio 28 // MojoRendererImpl implements media::Renderer for use as either an audio
29 // or video renderer. 29 // or video renderer.
30 // 30 //
31 // TODO(tim): Only audio is currently supported. http://crbug.com/410451. 31 // TODO(tim): Only audio is currently supported. http://crbug.com/410451.
32 class MojoRendererImpl : public Renderer, public mojo::MediaRendererClient { 32 class MojoRendererImpl : public Renderer, public mojo::MediaRendererClient {
33 public: 33 public:
34 // |task_runner| is the TaskRunner on which all methods are invoked. 34 // |task_runner| is the TaskRunner on which all methods are invoked.
35 // |demuxer_stream_provider| provides encoded streams for decoding and
36 // rendering.
37 // |audio_renderer_provider| is a ServiceProvider from a connected 35 // |audio_renderer_provider| is a ServiceProvider from a connected
38 // Application that is hosting a mojo::MediaRenderer. 36 // Application that is hosting a mojo::MediaRenderer.
39 MojoRendererImpl( 37 MojoRendererImpl(
40 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner, 38 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner,
41 DemuxerStreamProvider* demuxer_stream_provider,
42 mojo::ServiceProvider* audio_renderer_provider); 39 mojo::ServiceProvider* audio_renderer_provider);
43 virtual ~MojoRendererImpl(); 40 virtual ~MojoRendererImpl();
44 41
45 // Renderer implementation. 42 // Renderer implementation.
46 virtual void Initialize(const base::Closure& init_cb, 43 virtual void Initialize(DemuxerStreamProvider* demuxer_stream_provider,
44 const base::Closure& init_cb,
47 const StatisticsCB& statistics_cb, 45 const StatisticsCB& statistics_cb,
48 const base::Closure& ended_cb, 46 const base::Closure& ended_cb,
49 const PipelineStatusCB& error_cb, 47 const PipelineStatusCB& error_cb,
50 const BufferingStateCB& buffering_state_cb) override; 48 const BufferingStateCB& buffering_state_cb) override;
51 virtual void Flush(const base::Closure& flush_cb) override; 49 virtual void Flush(const base::Closure& flush_cb) override;
52 virtual void StartPlayingFrom(base::TimeDelta time) override; 50 virtual void StartPlayingFrom(base::TimeDelta time) override;
53 virtual void SetPlaybackRate(float playback_rate) override; 51 virtual void SetPlaybackRate(float playback_rate) override;
54 virtual void SetVolume(float volume) override; 52 virtual void SetVolume(float volume) override;
55 virtual base::TimeDelta GetMediaTime() override; 53 virtual base::TimeDelta GetMediaTime() override;
56 virtual bool HasAudio() override; 54 virtual bool HasAudio() override;
(...skipping 24 matching lines...) Expand all
81 PipelineStatusCB error_cb_; 79 PipelineStatusCB error_cb_;
82 BufferingStateCB buffering_state_cb_; 80 BufferingStateCB buffering_state_cb_;
83 81
84 base::WeakPtrFactory<MojoRendererImpl> weak_factory_; 82 base::WeakPtrFactory<MojoRendererImpl> weak_factory_;
85 DISALLOW_COPY_AND_ASSIGN(MojoRendererImpl); 83 DISALLOW_COPY_AND_ASSIGN(MojoRendererImpl);
86 }; 84 };
87 85
88 } // namespace media 86 } // namespace media
89 87
90 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_ 88 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_IMPL_H_
OLDNEW
« no previous file with comments | « media/filters/renderer_impl_unittest.cc ('k') | media/mojo/services/mojo_renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698