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

Side by Side Diff: media/base/renderer.h

Issue 1812543003: Allow muting/unmuting audio through media track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-sb-tracks6
Patch Set: CR feedback Created 4 years, 8 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/base/pipeline_impl.cc ('k') | media/blink/webmediaplayer_impl.h » ('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_BASE_RENDERER_H_ 5 #ifndef MEDIA_BASE_RENDERER_H_
6 #define MEDIA_BASE_RENDERER_H_ 6 #define MEDIA_BASE_RENDERER_H_
7 7
8 #include <vector>
9
8 #include "base/callback.h" 10 #include "base/callback.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h" 13 #include "base/time/time.h"
12 #include "media/base/buffering_state.h" 14 #include "media/base/buffering_state.h"
13 #include "media/base/cdm_context.h" 15 #include "media/base/cdm_context.h"
14 #include "media/base/media_export.h" 16 #include "media/base/media_export.h"
15 #include "media/base/pipeline_status.h" 17 #include "media/base/pipeline_status.h"
16 18
17 namespace media { 19 namespace media {
18 20
21 class DemuxerStream;
19 class DemuxerStreamProvider; 22 class DemuxerStreamProvider;
20 class VideoFrame; 23 class VideoFrame;
21 24
22 class MEDIA_EXPORT Renderer { 25 class MEDIA_EXPORT Renderer {
23 public: 26 public:
24 Renderer(); 27 Renderer();
25 28
26 // Stops rendering and fires any pending callbacks. 29 // Stops rendering and fires any pending callbacks.
27 virtual ~Renderer(); 30 virtual ~Renderer();
28 31
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 73
71 // Returns the current media time. 74 // Returns the current media time.
72 virtual base::TimeDelta GetMediaTime() = 0; 75 virtual base::TimeDelta GetMediaTime() = 0;
73 76
74 // Returns whether |this| renders audio. 77 // Returns whether |this| renders audio.
75 virtual bool HasAudio() = 0; 78 virtual bool HasAudio() = 0;
76 79
77 // Returns whether |this| renders video. 80 // Returns whether |this| renders video.
78 virtual bool HasVideo() = 0; 81 virtual bool HasVideo() = 0;
79 82
83 // Notifies renderer that the set of enabled audio streams/tracks has changed.
84 // The input parameter |enabledAudioStreams| might be empty, which means that
85 // all audio tracks should be disabled/muted.
86 virtual void OnEnabledAudioStreamsChanged(
87 const std::vector<const DemuxerStream*>& enabledAudioStreams) {}
wolenetz 2016/04/15 23:52:17 Is there a bug tracking getting mojo and any other
88
89 // Notifies renderer that the selected video stream has changed. The input
90 // parameter |selectedVideoStream| can be null, which means video is disabled.
91 virtual void OnSelectedVideoStreamChanged(
92 const DemuxerStream* selectedVideoStream) {}
93
80 private: 94 private:
81 DISALLOW_COPY_AND_ASSIGN(Renderer); 95 DISALLOW_COPY_AND_ASSIGN(Renderer);
82 }; 96 };
83 97
84 } // namespace media 98 } // namespace media
85 99
86 #endif // MEDIA_BASE_RENDERER_H_ 100 #endif // MEDIA_BASE_RENDERER_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698