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

Unified Diff: Source/modules/speech/SpeechRecognition.cpp

Issue 448163003: Support for providing media stream audio track to speech recognition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename methods and remove clearAudioTrack from inner layers Created 6 years, 4 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
« no previous file with comments | « Source/modules/speech/SpeechRecognition.h ('k') | Source/modules/speech/SpeechRecognition.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/speech/SpeechRecognition.cpp
diff --git a/Source/modules/speech/SpeechRecognition.cpp b/Source/modules/speech/SpeechRecognition.cpp
index a598db638a48d539d0cff0c859230301cf86d8f3..7eaa9a5c2c10497fd2a4296c73e1410c4c65516e 100644
--- a/Source/modules/speech/SpeechRecognition.cpp
+++ b/Source/modules/speech/SpeechRecognition.cpp
@@ -53,6 +53,7 @@ void SpeechRecognition::start(ExceptionState& exceptionState)
}
m_finalResults.clear();
+ m_controller->attach(this, m_audioTrack);
m_controller->start(this, m_grammars.get(), m_lang, m_continuous, m_interimResults, m_maxAlternatives);
no longer working on chromium 2014/08/15 10:22:56 I am wondering if we should just pass the m_audioT
burnik 2014/08/15 11:29:41 I've gone through that approach as well, and in or
m_started = true;
}
@@ -168,6 +169,7 @@ bool SpeechRecognition::hasPendingActivity() const
SpeechRecognition::SpeechRecognition(ExecutionContext* context)
: ActiveDOMObject(context)
, m_grammars(SpeechGrammarList::create()) // FIXME: The spec is not clear on the default value for the grammars attribute.
+ , m_audioTrack(nullptr)
, m_continuous(false)
, m_interimResults(false)
, m_maxAlternatives(1)
@@ -195,6 +197,7 @@ SpeechRecognition::~SpeechRecognition()
void SpeechRecognition::trace(Visitor* visitor)
{
visitor->trace(m_grammars);
+ visitor->trace(m_audioTrack);
#if ENABLE(OILPAN)
visitor->trace(m_controller);
#endif
« no previous file with comments | « Source/modules/speech/SpeechRecognition.h ('k') | Source/modules/speech/SpeechRecognition.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698