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

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: rebase 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
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 "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "media/base/buffering_state.h" 12 #include "media/base/buffering_state.h"
13 #include "media/base/cdm_context.h" 13 #include "media/base/cdm_context.h"
14 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
15 #include "media/base/pipeline_status.h" 15 #include "media/base/pipeline_status.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 class DemuxerStream;
19 class DemuxerStreamProvider; 20 class DemuxerStreamProvider;
20 class VideoFrame; 21 class VideoFrame;
21 22
22 class MEDIA_EXPORT Renderer { 23 class MEDIA_EXPORT Renderer {
23 public: 24 public:
24 Renderer(); 25 Renderer();
25 26
26 // Stops rendering and fires any pending callbacks. 27 // Stops rendering and fires any pending callbacks.
27 virtual ~Renderer(); 28 virtual ~Renderer();
28 29
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 71
71 // Returns the current media time. 72 // Returns the current media time.
72 virtual base::TimeDelta GetMediaTime() = 0; 73 virtual base::TimeDelta GetMediaTime() = 0;
73 74
74 // Returns whether |this| renders audio. 75 // Returns whether |this| renders audio.
75 virtual bool HasAudio() = 0; 76 virtual bool HasAudio() = 0;
76 77
77 // Returns whether |this| renders video. 78 // Returns whether |this| renders video.
78 virtual bool HasVideo() = 0; 79 virtual bool HasVideo() = 0;
79 80
81 // Notifies renderer that the set of enabled audio streams/tracks has changed.
wolenetz 2016/03/30 00:31:32 |enabledAudioStreams| can be an empty vector, whic
servolk 2016/03/30 01:13:12 Done.
82 virtual void OnEnabledAudioStreamsChanged(
83 const std::vector<const DemuxerStream*>& enabledAudioStreams) {}
84
85 // Notifies renderer that the selected video stream has changed. The input
86 // parameter |selectedVideoStream| can be null, which means video is disabled.
87 virtual void OnSelectedVideoStreamChanged(
88 const DemuxerStream* selectedVideoStream) {}
89
80 private: 90 private:
81 DISALLOW_COPY_AND_ASSIGN(Renderer); 91 DISALLOW_COPY_AND_ASSIGN(Renderer);
82 }; 92 };
83 93
84 } // namespace media 94 } // namespace media
85 95
86 #endif // MEDIA_BASE_RENDERER_H_ 96 #endif // MEDIA_BASE_RENDERER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698