-
Notifications
You must be signed in to change notification settings - Fork 0
Filter
Represents a filter in OBS. Inherits from Source.
(method) Filter:addToSource(source: Source)
-> success: booleanAdd the Filter to a Source.
@param source — The Source to add the Filter to.
@return success — Whether the Filter was added successfully.
(method) Filter:isAddedToSource(source: Source)
-> is_added: booleanCheck if the Filter is added to a Source.
@param source — The Source to check if the Filter is added to.
@return is_added — Whether the Filter is added to the Source.
(method) Filter:removeFromSource(source: Source)
-> success: booleanRemove this Filter from a Source.
@param source — The Source to remove the Filter from.
@return success — Whether the Filter was removed successfully, false otherwise.
(method) Source:addFilter(filter: Filter, max: any)
-> success: booleanAdd a filter to the source.
@param filter — The filter to add.
@return success — True if the filter was added successfully, false otherwise.
(method) Source:createOBSSource()
-> source: userdata|nil
2. release: booleanCreates an OBS source for this Source. Only use this if you know what you're doing.
WARNING: Make sure to release the source after use in case release is true.
@return source — The OBS source, or nil if it couldn't be created.
@return release — Whether to release the OBS source after use.
(method) Source:destroy()
-> success: booleanDestroy the source, removing it from OBS.
@return success — True if the source was destroyed successfully, false if it already was destroyed or if the source doesn't exist.
(method) Source:exists()
-> exists: booleanCheck if the source still exists in OBS.
@return exists — True if the source exists, false otherwise.
(method) Source:getDimensions(cache?: boolean)
-> width: number
2. height: numberGet the width and height of the source.
@param cache — Optional. Whether to use the cached width and height or fetch it from OBS.
@return width — The width of the source.
@return height — The height of the source.
(method) Source:getHeight(cache?: boolean)
-> height: numberGet the height of the source.
@param cache — Optional. Whether to use the cached height or fetch it from OBS.
@return height — The height of the source.
(method) Source:getName(cache?: boolean)
-> name: booleanGet the name of the Source.
@param cache — Optional. Whether to use the cached name or fetch it from OBS.
@return name — The name of the Source.
(method) Source:getOBSSource(make?: boolean)
-> source: userdata|nil
2. release: booleanGet this Source's OBS source. Only use this if you know what you're doing.
WARNING: Make sure to release the source after use in case release is true.
@param make — Optional. Whether to create a new source if it doesn't exist. Defaults to false.
@return source — The OBS source, or nil if it doesn't exist.
@return release — Whether to release the OBS source after use.
(method) Source:getProperties()
-> properties: table?Get all the properties of the Source.
@return properties — The properties of the Source if found, nil otherwise.
(method) Source:getProperty(name: string)
-> value: anyGet a property of the Source.
@param name — The name of the property.
@return value — The value of the property if found, nil otherwise.
(method) Source:getSourceID()
-> ID: stringGet the ID of the source.
@return ID — The ID of the source, or an empty string if the source doesn't exist.
(method) Source:getType()
-> type: SourceTypeGet the type of the source.
@return type — The type of the source
(method) Source:getWidth(cache?: boolean)
-> width: numberGet the width of the source.
@param cache — Optional. Whether to use the cached width or fetch it from OBS.
@return width — The width of the source.
(method) Source:hasFilter(filter: Filter)
-> has_filter: booleanCheck if the source has a filter.
@return has_filter — True if the source has the filter, false otherwise.
(method) Source:isScene()
-> is_scene: booleanCheck if the source is a scene.
@return is_scene — Ture if the source is a scene, false otherwise.
(method) Source:removeFilter(filter: Filter)
-> success: booleanRemove a filter from the source.
@param filter — The filter to remove.
@return success — True if the filter was removed successfully, false otherwise.
(method) Source:setName(name: string)
-> success: booleanSet the name of the Source. If there already is an OBS source with the same name, the name will be changed to something else.
@return success — True if the name was changed successfully, false if changed to something else or if the source doesn't exist.
(method) Source:setProperties(properties: table)
-> success: booleanSet all properties of the Source.
@param properties — The properties to set.
@return success — True if the properties were set successfully, false otherwise.
(method) Source:setProperty(name: string, value: any)
-> success: booleanSet a property of the Source.
@param name — The name of the property.
@param value — The value of the property.
@return success — True if the property was set successfully, false otherwise.
(method) Source:useSource(callback: function)
-> success: booleanUse the source in a callback to fetch the source only once, optimizing performance.
@param callback — The callback to use the source in.
@return success — True if the source was used successfully, false otherwise.