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

Unified Diff: content/renderer/media/rtc_peer_connection_handler.h

Issue 11369171: Add chromium support for MediaStreamAudioDestinationNode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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: content/renderer/media/rtc_peer_connection_handler.h
===================================================================
--- content/renderer/media/rtc_peer_connection_handler.h (revision 166546)
+++ content/renderer/media/rtc_peer_connection_handler.h (working copy)
@@ -9,7 +9,9 @@
#include "base/compiler_specific.h"
#include "content/common/content_export.h"
#include "content/renderer/media/peer_connection_handler_base.h"
+#include "content/renderer/media/webaudio_capturer_source.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebRTCPeerConnectionHandler.h"
+#include "third_party/WebKit/Source/Platform/chromium/public/WebVector.h"
namespace WebKit {
class WebFrame;
@@ -20,7 +22,8 @@
// RTCPeerConnectionHandler is a delegate for the RTC PeerConnection API
// messages going between WebKit and native PeerConnection in libjingle. It's
// owned by WebKit.
-// WebKit call all of these methods on the main render thread.
+// WebKit call all of these methods on the main render thread
+// except for consumeAudio().
// Callbacks to the webrtc::PeerConnectionObserver implementation also occur on
// the main render thread.
class CONTENT_EXPORT RTCPeerConnectionHandler
@@ -76,6 +79,9 @@
// We will be deleted by WebKit after stop has been returned.
virtual void stop() OVERRIDE;
+ virtual void consumeAudio(const WebKit::WebVector<const float*>&,
tommi (sloooow) - chröme 2012/11/12 09:46:18 missing param name (I know webkit is different)
+ size_t number_of_frames) OVERRIDE;
+
// webrtc::PeerConnectionObserver implementation
virtual void OnError() OVERRIDE;
virtual void OnStateChange(StateType state_changed) OVERRIDE;
@@ -95,6 +101,12 @@
WebKit::WebFrame* frame_;
+ // Handles audio from MediaStreamAudioDestinationNode.
+ scoped_refptr<WebAudioCapturerSource> webaudio_capturer_source_;
+
+ // Synchronizes uses of |webaudio_capturer_source_|.
+ base::Lock audio_lock_;
+
DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler);
};

Powered by Google App Engine
This is Rietveld 408576698