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

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

Issue 712463004: media: Support MojoRendererService in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and Cleaned. Created 6 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
« media/media.gyp ('K') | « media/media.gyp ('k') | no next file » | 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_SERVICE_H_ 5 #ifndef MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_
6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ 6 #define MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/timer/timer.h" 12 #include "base/timer/timer.h"
13 #include "media/base/audio_decoder_config.h" 13 #include "media/base/audio_decoder_config.h"
14 #include "media/base/buffering_state.h" 14 #include "media/base/buffering_state.h"
15 #include "media/base/media_export.h"
15 #include "media/base/pipeline_status.h" 16 #include "media/base/pipeline_status.h"
16 #include "media/mojo/interfaces/media_renderer.mojom.h" 17 #include "media/mojo/interfaces/media_renderer.mojom.h"
17 #include "mojo/public/cpp/bindings/interface_impl.h" 18 #include "mojo/public/cpp/bindings/interface_impl.h"
18 19
19 namespace mojo { 20 namespace mojo {
20 class ApplicationConnection; 21 class ApplicationConnection;
21 } 22 }
22 23
23 namespace media { 24 namespace media {
24 25
25 class AudioRendererSink; 26 class AudioRendererSink;
26 class DemuxerStreamProviderShim; 27 class DemuxerStreamProviderShim;
27 class MojoDemuxerStreamAdapter; 28 class MojoDemuxerStreamAdapter;
28 class Renderer; 29 class Renderer;
29 30
30 // A mojo::MediaRenderer implementation that uses media::AudioRenderer to 31 // A mojo::MediaRenderer implementation that uses media::AudioRenderer to
31 // decode and render audio to a sink obtained from the ApplicationConnection. 32 // decode and render audio to a sink obtained from the ApplicationConnection.
32 class MojoRendererService : public mojo::InterfaceImpl<mojo::MediaRenderer> { 33 class MEDIA_EXPORT MojoRendererService
34 : public mojo::InterfaceImpl<mojo::MediaRenderer> {
33 public: 35 public:
34 MojoRendererService(); 36 MojoRendererService();
35 ~MojoRendererService() override; 37 ~MojoRendererService() override;
36 38
37 // mojo::MediaRenderer implementation. 39 // mojo::MediaRenderer implementation.
38 void Initialize(mojo::DemuxerStreamPtr audio, 40 void Initialize(mojo::DemuxerStreamPtr audio,
39 mojo::DemuxerStreamPtr video, 41 mojo::DemuxerStreamPtr video,
40 const mojo::Closure& callback) override; 42 const mojo::Closure& callback) override;
41 void Flush(const mojo::Closure& callback) override; 43 void Flush(const mojo::Closure& callback) override;
42 void StartPlayingFrom(int64_t time_delta_usec) override; 44 void StartPlayingFrom(int64_t time_delta_usec) override;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 91
90 base::WeakPtr<MojoRendererService> weak_this_; 92 base::WeakPtr<MojoRendererService> weak_this_;
91 base::WeakPtrFactory<MojoRendererService> weak_factory_; 93 base::WeakPtrFactory<MojoRendererService> weak_factory_;
92 94
93 DISALLOW_COPY_AND_ASSIGN(MojoRendererService); 95 DISALLOW_COPY_AND_ASSIGN(MojoRendererService);
94 }; 96 };
95 97
96 } // namespace media 98 } // namespace media
97 99
98 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ 100 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_
OLDNEW
« media/media.gyp ('K') | « media/media.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698