Class TakeSourceScreenshot.Builder
- java.lang.Object
-
- nl.harm27.obs.websocket.api.base.BaseBuilder
-
- nl.harm27.obs.websocket.api.requests.sources.TakeSourceScreenshot.Builder
-
- Enclosing class:
- TakeSourceScreenshot
public static class TakeSourceScreenshot.Builder extends BaseBuilder
-
-
Constructor Summary
Constructors Constructor Description Builder(BiConsumer<BaseRequest,Consumer<BaseResponse>> requestConsumer, Consumer<BaseRequest> batchConsumer, Supplier<String> messageIdSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TakeSourceScreenshot.Request
batchMessage()
Batch the message to the OBS Studio instance.Optional<Integer>
getCompressionQuality()
Compression ratio between -1 and 100 to write the image with.Optional<String>
getEmbedPictureFormat()
Format of the Data URI encoded picture.Optional<String>
getFileFormat()
Format to save the image file as (one of the values provided in the `supported-image-export-formats` response field of `GetVersion`).Optional<Integer>
getHeight()
Screenshot height.Optional<String>
getSaveToFilePath()
Full file path (file extension included) where the captured image is to be saved.Optional<String>
getSourceName()
Source name.Optional<Integer>
getWidth()
Screenshot width.void
sendMessage(Consumer<TakeSourceScreenshot.Response> consumer)
Send the message to the OBS Studio instance.void
setCompressionQuality(int compressionQuality)
Compression ratio between -1 and 100 to write the image with.void
setEmbedPictureFormat(String embedPictureFormat)
Format of the Data URI encoded picture.void
setFileFormat(String fileFormat)
Format to save the image file as (one of the values provided in the `supported-image-export-formats` response field of `GetVersion`).void
setHeight(int height)
Screenshot height.void
setSaveToFilePath(String saveToFilePath)
Full file path (file extension included) where the captured image is to be saved.void
setSourceName(String sourceName)
Source name.void
setWidth(int width)
Screenshot width.-
Methods inherited from class nl.harm27.obs.websocket.api.base.BaseBuilder
batchMessage, getNewMessageId, sendMessage
-
-
-
-
Constructor Detail
-
Builder
public Builder(BiConsumer<BaseRequest,Consumer<BaseResponse>> requestConsumer, Consumer<BaseRequest> batchConsumer, Supplier<String> messageIdSupplier)
-
-
Method Detail
-
getSourceName
public Optional<String> getSourceName()
Source name. Note: Since scenes are also sources, you can also provide a scene name. If not provided, the currently active scene is used.
-
setSourceName
public void setSourceName(String sourceName)
Source name. Note: Since scenes are also sources, you can also provide a scene name. If not provided, the currently active scene is used.
-
getEmbedPictureFormat
public Optional<String> getEmbedPictureFormat()
Format of the Data URI encoded picture. Can be "png", "jpg", "jpeg" or "bmp" (or any other value supported by Qt's Image module)
-
setEmbedPictureFormat
public void setEmbedPictureFormat(String embedPictureFormat)
Format of the Data URI encoded picture. Can be "png", "jpg", "jpeg" or "bmp" (or any other value supported by Qt's Image module)
-
getSaveToFilePath
public Optional<String> getSaveToFilePath()
Full file path (file extension included) where the captured image is to be saved. Can be in a format different from `pictureFormat`. Can be a relative path.
-
setSaveToFilePath
public void setSaveToFilePath(String saveToFilePath)
Full file path (file extension included) where the captured image is to be saved. Can be in a format different from `pictureFormat`. Can be a relative path.
-
getFileFormat
public Optional<String> getFileFormat()
Format to save the image file as (one of the values provided in the `supported-image-export-formats` response field of `GetVersion`). If not specified, tries to guess based on file extension.
-
setFileFormat
public void setFileFormat(String fileFormat)
Format to save the image file as (one of the values provided in the `supported-image-export-formats` response field of `GetVersion`). If not specified, tries to guess based on file extension.
-
getCompressionQuality
public Optional<Integer> getCompressionQuality()
Compression ratio between -1 and 100 to write the image with. -1 is automatic, 1 is smallest file/most compression, 100 is largest file/least compression. Varies with image type.
-
setCompressionQuality
public void setCompressionQuality(int compressionQuality)
Compression ratio between -1 and 100 to write the image with. -1 is automatic, 1 is smallest file/most compression, 100 is largest file/least compression. Varies with image type.
-
setWidth
public void setWidth(int width)
Screenshot width. Defaults to the source's base width.
-
getHeight
public Optional<Integer> getHeight()
Screenshot height. Defaults to the source's base height.
-
setHeight
public void setHeight(int height)
Screenshot height. Defaults to the source's base height.
-
sendMessage
public void sendMessage(Consumer<TakeSourceScreenshot.Response> consumer)
Send the message to the OBS Studio instance.
-
batchMessage
public TakeSourceScreenshot.Request batchMessage()
Batch the message to the OBS Studio instance.
-
-