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

Side by Side Diff: content/public/browser/media_observer.h

Issue 14600025: Replace AudioSilenceDetector with an AudioPowerMonitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
6 #define CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ 6 #define CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
7 7
8 #include "content/public/browser/media_request_state.h" 8 #include "content/public/browser/media_request_state.h"
9 #include "content/public/common/media_stream_request.h" 9 #include "content/public/common/media_stream_request.h"
10 10
(...skipping 11 matching lines...) Expand all
22 virtual void OnVideoCaptureDevicesChanged( 22 virtual void OnVideoCaptureDevicesChanged(
23 const MediaStreamDevices& devices) = 0; 23 const MediaStreamDevices& devices) = 0;
24 24
25 // Called when a media request changes state. 25 // Called when a media request changes state.
26 virtual void OnMediaRequestStateChanged( 26 virtual void OnMediaRequestStateChanged(
27 int render_process_id, 27 int render_process_id,
28 int render_view_id, 28 int render_view_id,
29 const MediaStreamDevice& device, 29 const MediaStreamDevice& device,
30 MediaRequestState state) = 0; 30 MediaRequestState state) = 0;
31 31
32 // Called when an audio stream transitions into playing audible or silent 32 // Called when an audio stream transitions into a playing or paused state, and
33 // sound, and when the stream is stopped. 33 // also at regular intervals to report the current power level of the audio
34 // signal in dBFS (decibels relative to full-scale) units.
34 virtual void OnAudioStreamPlayingChanged( 35 virtual void OnAudioStreamPlayingChanged(
35 int render_process_id, 36 int render_process_id,
36 int render_view_id, 37 int render_view_id,
37 int stream_id, 38 int stream_id,
38 bool is_playing_and_audible) = 0; 39 bool is_playing,
40 float power_level_dbfs) = 0;
39 41
40 protected: 42 protected:
41 virtual ~MediaObserver() {} 43 virtual ~MediaObserver() {}
42 }; 44 };
43 45
44 } // namespace content 46 } // namespace content
45 47
46 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_ 48 #endif // CONTENT_PUBLIC_BROWSER_MEDIA_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698