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

Unified Diff: content/public/browser/speech_recognition_event_listener.h

Issue 549373003: Binding media stream audio track to speech recognition [browser] Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move thread to recognizer_impl. Use PostDelayedTask. Created 6 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: content/public/browser/speech_recognition_event_listener.h
diff --git a/content/public/browser/speech_recognition_event_listener.h b/content/public/browser/speech_recognition_event_listener.h
index 8c16f9099cf56eea5563507eeff08d9a69b2d2be..64013e996a39a0539fa617888395eb4722c6f525 100644
--- a/content/public/browser/speech_recognition_event_listener.h
+++ b/content/public/browser/speech_recognition_event_listener.h
@@ -6,9 +6,15 @@
#define CONTENT_PUBLIC_BROWSER_SPEECH_RECOGNITION_EVENT_LISTENER_H_
#include "base/basictypes.h"
+#include "base/memory/shared_memory.h"
+#include "base/sync_socket.h"
#include "content/common/content_export.h"
#include "content/public/common/speech_recognition_result.h"
+namespace media {
+class AudioParameters;
+}
+
namespace content {
struct SpeechRecognitionError;
@@ -58,6 +64,14 @@ class CONTENT_EXPORT SpeechRecognitionEventListener {
virtual void OnAudioLevelsChange(int session_id,
float volume, float noise_volume) = 0;
+ // TODO(burnik): Update comment.
+ // Invoked when using an audio track to signal back to the browser.
+ virtual void OnAudioReceiverReady(
+ int session_id,
+ const media::AudioParameters& params,
+ const base::SharedMemoryHandle memory,
+ const base::SyncSocket::TransitDescriptor socket) = 0;
+
// This is guaranteed to be the last event raised in the recognition
// process and the |SpeechRecognizer| object can be freed if necessary.
virtual void OnRecognitionEnd(int session_id) = 0;

Powered by Google App Engine
This is Rietveld 408576698