New upstream version 19.0.3+dfsg1
This commit is contained in:
parent
3708b8e092
commit
1f1bbb3518
534 changed files with 13862 additions and 2459 deletions
37
UI/frontend-plugins/frontend-tools/captions-mssapi.hpp
Normal file
37
UI/frontend-plugins/frontend-tools/captions-mssapi.hpp
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#pragma once
|
||||
|
||||
#include "captions-handler.hpp"
|
||||
#include "captions-mssapi-stream.hpp"
|
||||
#include <util/windows/HRError.hpp>
|
||||
#include <util/windows/ComPtr.hpp>
|
||||
#include <util/windows/WinHandle.hpp>
|
||||
#include <util/windows/CoTaskMemPtr.hpp>
|
||||
#include <util/threading.h>
|
||||
#include <util/platform.h>
|
||||
#include <sphelper.h>
|
||||
|
||||
#include <obs.hpp>
|
||||
|
||||
#include <thread>
|
||||
|
||||
class mssapi_captions : public captions_handler {
|
||||
friend class CaptionStream;
|
||||
|
||||
ComPtr<CaptionStream> audio;
|
||||
ComPtr<ISpObjectToken> token;
|
||||
ComPtr<ISpRecoGrammar> grammar;
|
||||
ComPtr<ISpRecognizer> recognizer;
|
||||
ComPtr<ISpRecoContext> context;
|
||||
|
||||
HANDLE notify;
|
||||
WinHandle stop;
|
||||
std::thread t;
|
||||
bool started = false;
|
||||
|
||||
void main_thread();
|
||||
|
||||
public:
|
||||
mssapi_captions(captions_cb callback, const std::string &lang);
|
||||
virtual ~mssapi_captions();
|
||||
virtual void pcm_data(const void *data, size_t frames) override;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue