mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
requests(streaming): conditional compilation of SendCaptions
This commit is contained in:
parent
190f5ebfc4
commit
fd1c4abad7
@ -103,7 +103,9 @@ QHash<QString, HandlerResponse(*)(WSRequestHandler*)> WSRequestHandler::messageM
|
|||||||
{ "SetStreamSettings", WSRequestHandler::HandleSetStreamSettings },
|
{ "SetStreamSettings", WSRequestHandler::HandleSetStreamSettings },
|
||||||
{ "GetStreamSettings", WSRequestHandler::HandleGetStreamSettings },
|
{ "GetStreamSettings", WSRequestHandler::HandleGetStreamSettings },
|
||||||
{ "SaveStreamSettings", WSRequestHandler::HandleSaveStreamSettings },
|
{ "SaveStreamSettings", WSRequestHandler::HandleSaveStreamSettings },
|
||||||
|
#if BUILD_CAPTIONS
|
||||||
{ "SendCaptions", WSRequestHandler::HandleSendCaptions },
|
{ "SendCaptions", WSRequestHandler::HandleSendCaptions },
|
||||||
|
#endif
|
||||||
|
|
||||||
{ "GetStudioModeStatus", WSRequestHandler::HandleGetStudioModeStatus },
|
{ "GetStudioModeStatus", WSRequestHandler::HandleGetStudioModeStatus },
|
||||||
{ "GetPreviewScene", WSRequestHandler::HandleGetPreviewScene },
|
{ "GetPreviewScene", WSRequestHandler::HandleGetPreviewScene },
|
||||||
|
@ -128,7 +128,9 @@ class WSRequestHandler : public QObject {
|
|||||||
static HandlerResponse HandleSetStreamSettings(WSRequestHandler* req);
|
static HandlerResponse HandleSetStreamSettings(WSRequestHandler* req);
|
||||||
static HandlerResponse HandleGetStreamSettings(WSRequestHandler* req);
|
static HandlerResponse HandleGetStreamSettings(WSRequestHandler* req);
|
||||||
static HandlerResponse HandleSaveStreamSettings(WSRequestHandler* req);
|
static HandlerResponse HandleSaveStreamSettings(WSRequestHandler* req);
|
||||||
|
#if BUILD_CAPTIONS
|
||||||
static HandlerResponse HandleSendCaptions(WSRequestHandler * req);
|
static HandlerResponse HandleSendCaptions(WSRequestHandler * req);
|
||||||
|
#endif
|
||||||
|
|
||||||
static HandlerResponse HandleSetTransitionDuration(WSRequestHandler* req);
|
static HandlerResponse HandleSetTransitionDuration(WSRequestHandler* req);
|
||||||
static HandlerResponse HandleGetTransitionDuration(WSRequestHandler* req);
|
static HandlerResponse HandleGetTransitionDuration(WSRequestHandler* req);
|
||||||
|
@ -290,7 +290,8 @@ HandlerResponse WSRequestHandler::HandleSaveStreamSettings(WSRequestHandler* req
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send the provided text as embedded CEA-608 caption data
|
* Send the provided text as embedded CEA-608 caption data.
|
||||||
|
* As of OBS Studio 23.1, captions are not yet available on Linux.
|
||||||
*
|
*
|
||||||
* @param {String} `text` Captions text
|
* @param {String} `text` Captions text
|
||||||
*
|
*
|
||||||
@ -298,6 +299,7 @@ HandlerResponse WSRequestHandler::HandleSaveStreamSettings(WSRequestHandler* req
|
|||||||
* @name SendCaptions
|
* @name SendCaptions
|
||||||
* @category streaming
|
* @category streaming
|
||||||
*/
|
*/
|
||||||
|
#if BUILD_CAPTIONS
|
||||||
HandlerResponse WSRequestHandler::HandleSendCaptions(WSRequestHandler* req) {
|
HandlerResponse WSRequestHandler::HandleSendCaptions(WSRequestHandler* req) {
|
||||||
if (!req->hasField("text")) {
|
if (!req->hasField("text")) {
|
||||||
return req->SendErrorResponse("missing request parameters");
|
return req->SendErrorResponse("missing request parameters");
|
||||||
@ -311,4 +313,5 @@ HandlerResponse WSRequestHandler::HandleSendCaptions(WSRequestHandler* req) {
|
|||||||
|
|
||||||
return req->SendOKResponse();
|
return req->SendOKResponse();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user