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

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

Issue 1894073002: Revert of Allow muting/unmuting audio through media track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-sb-tracks6
Patch Set: Rebased 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
10 #include "base/callback.h" 8 #include "base/callback.h"
11 #include "base/macros.h" 9 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
13 #include "base/time/time.h" 11 #include "base/time/time.h"
14 #include "media/base/buffering_state.h" 12 #include "media/base/buffering_state.h"
15 #include "media/base/cdm_context.h" 13 #include "media/base/cdm_context.h"
16 #include "media/base/media_export.h" 14 #include "media/base/media_export.h"
17 #include "media/base/pipeline_status.h" 15 #include "media/base/pipeline_status.h"
18 16
19 namespace media { 17 namespace media {
20 18
21 class DemuxerStream;
22 class DemuxerStreamProvider; 19 class DemuxerStreamProvider;
23 class VideoFrame; 20 class VideoFrame;
24 21
25 class MEDIA_EXPORT Renderer { 22 class MEDIA_EXPORT Renderer {
26 public: 23 public:
27 Renderer(); 24 Renderer();
28 25
29 // Stops rendering and fires any pending callbacks. 26 // Stops rendering and fires any pending callbacks.
30 virtual ~Renderer(); 27 virtual ~Renderer();
31 28
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 70
74 // Returns the current media time. 71 // Returns the current media time.
75 virtual base::TimeDelta GetMediaTime() = 0; 72 virtual base::TimeDelta GetMediaTime() = 0;
76 73
77 // Returns whether |this| renders audio. 74 // Returns whether |this| renders audio.
78 virtual bool HasAudio() = 0; 75 virtual bool HasAudio() = 0;
79 76
80 // Returns whether |this| renders video. 77 // Returns whether |this| renders video.
81 virtual bool HasVideo() = 0; 78 virtual bool HasVideo() = 0;
82 79
83 // TODO(servolk,wolenetz): Enable media track handling in mojo, then make sure
84 // OnEnabledAudioStreamsChanged and OnSelectedVideoStreamChanged are
85 // implemented by all media renderers and make them pure virtual here.
86 // crbug.com/604083
87
88 // Notifies renderer that the set of enabled audio streams/tracks has changed.
89 // The input parameter |enabledAudioStreams| might be empty, which means that
90 // all audio tracks should be disabled/muted.
91 virtual void OnEnabledAudioStreamsChanged(
92 const std::vector<const DemuxerStream*>& enabledAudioStreams) {}
93
94 // Notifies renderer that the selected video stream has changed. The input
95 // parameter |selectedVideoStream| can be null, which means video is disabled.
96 virtual void OnSelectedVideoStreamChanged(
97 const DemuxerStream* selectedVideoStream) {}
98
99 private: 80 private:
100 DISALLOW_COPY_AND_ASSIGN(Renderer); 81 DISALLOW_COPY_AND_ASSIGN(Renderer);
101 }; 82 };
102 83
103 } // namespace media 84 } // namespace media
104 85
105 #endif // MEDIA_BASE_RENDERER_H_ 86 #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