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

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

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Minor improvements Created 4 years, 6 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 27 matching lines...) Expand all
38 mojo::InterfaceRequest<mojom::Renderer> request); 38 mojo::InterfaceRequest<mojom::Renderer> request);
39 ~MojoRendererService() final; 39 ~MojoRendererService() final;
40 40
41 // mojom::Renderer implementation. 41 // mojom::Renderer implementation.
42 void Initialize(mojom::RendererClientPtr client, 42 void Initialize(mojom::RendererClientPtr client,
43 mojom::DemuxerStreamPtr audio, 43 mojom::DemuxerStreamPtr audio,
44 mojom::DemuxerStreamPtr video, 44 mojom::DemuxerStreamPtr video,
45 const mojo::Callback<void(bool)>& callback) final; 45 const mojo::Callback<void(bool)>& callback) final;
46 void Flush(const mojo::Closure& callback) final; 46 void Flush(const mojo::Closure& callback) final;
47 void StartPlayingFrom(int64_t time_delta_usec) final; 47 void StartPlayingFrom(int64_t time_delta_usec) final;
48 void RestartStreamPlayback(bool video_stream, int64_t time_delta_usec) final;
48 void SetPlaybackRate(double playback_rate) final; 49 void SetPlaybackRate(double playback_rate) final;
49 void SetVolume(float volume) final; 50 void SetVolume(float volume) final;
50 void SetCdm(int32_t cdm_id, const mojo::Callback<void(bool)>& callback) final; 51 void SetCdm(int32_t cdm_id, const mojo::Callback<void(bool)>& callback) final;
51 52
52 private: 53 private:
53 enum State { 54 enum State {
54 STATE_UNINITIALIZED, 55 STATE_UNINITIALIZED,
55 STATE_INITIALIZING, 56 STATE_INITIALIZING,
56 STATE_FLUSHING, 57 STATE_FLUSHING,
57 STATE_PLAYING, 58 STATE_PLAYING,
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 115
115 base::WeakPtr<MojoRendererService> weak_this_; 116 base::WeakPtr<MojoRendererService> weak_this_;
116 base::WeakPtrFactory<MojoRendererService> weak_factory_; 117 base::WeakPtrFactory<MojoRendererService> weak_factory_;
117 118
118 DISALLOW_COPY_AND_ASSIGN(MojoRendererService); 119 DISALLOW_COPY_AND_ASSIGN(MojoRendererService);
119 }; 120 };
120 121
121 } // namespace media 122 } // namespace media
122 123
123 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_ 124 #endif // MEDIA_MOJO_SERVICES_MOJO_RENDERER_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698