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

Unified Diff: media/base/rtc_audio_renderer.h

Issue 11270012: Adding audio support to the new webmediaplyer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased and fixed some comments in rtc_audio_renderer.h Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: media/base/rtc_audio_renderer.h
diff --git a/media/base/rtc_audio_renderer.h b/media/base/rtc_audio_renderer.h
new file mode 100644
index 0000000000000000000000000000000000000000..a013a3971998e72f9c38e1dd48e53fa90cc2a30f
--- /dev/null
+++ b/media/base/rtc_audio_renderer.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_RTC_AUDIO_RENDERER_H_
+#define MEDIA_BASE_RTC_AUDIO_RENDERER_H_
+
+#include "base/memory/ref_counted.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+class MEDIA_EXPORT RtcAudioRenderer
scherkus (not reviewing) 2012/10/25 17:47:39 I don't see any reason why this has to be in ./med
no longer working on chromium 2012/10/26 09:35:29 Good idea, I was also not sure if the location and
+ : public base::RefCountedThreadSafe<RtcAudioRenderer> {
scherkus (not reviewing) 2012/10/25 17:47:39 what necessitates this being refcounted?
no longer working on chromium 2012/10/26 09:35:29 This needs to be ref-counted because it is used by
+ public:
+ // Starts rendering audio.
+ virtual void Play() = 0;
+
+ // Temporarily suspends rendering audio.
+ virtual void Pause() = 0;
+
+ // Stops all operations in preparation for being deleted.
+ virtual void Stop() = 0;
+
+ // Sets the output volume.
+ virtual void SetVolume(float volume) = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<RtcAudioRenderer>;
+
+ RtcAudioRenderer();
+ virtual ~RtcAudioRenderer();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(RtcAudioRenderer);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_AUDIO_RENDERER_H_

Powered by Google App Engine
This is Rietveld 408576698