mirror of
https://github.com/onyx-and-iris/obsws-python.git
synced 2026-04-20 15:03:31 +00:00
Compare commits
6 Commits
4d9dfa9d11
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| f70583d7ca | |||
| 3bce50701e | |||
| 8e8062d5c8 | |||
| 6f64e884d8 | |||
| 90abc4f9ee | |||
| f564f53c69 |
@@ -171,7 +171,9 @@ logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
Install [hatch][hatch-install] and then:
|
||||
|
||||
`hatch test`
|
||||
```
|
||||
hatch test
|
||||
```
|
||||
|
||||
### Official Documentation
|
||||
|
||||
|
||||
@@ -1100,6 +1100,14 @@ class ReqClient:
|
||||
payload = {"position": pos, "release": release}
|
||||
self.send("SetTBarPosition", payload)
|
||||
|
||||
def get_source_filter_kind_list(self):
|
||||
"""
|
||||
Gets an array of all available source filter kinds.
|
||||
|
||||
|
||||
"""
|
||||
return self.send("GetSourceFilterKindList")
|
||||
|
||||
def get_source_filter_list(self, name):
|
||||
"""
|
||||
Gets a list of all of a source's filters.
|
||||
@@ -1311,6 +1319,23 @@ class ReqClient:
|
||||
}
|
||||
return self.send("GetSceneItemId", payload)
|
||||
|
||||
def get_scene_item_source(self, scene_name, scene_item_id):
|
||||
"""
|
||||
Gets the source associated with a scene item.
|
||||
|
||||
:param scene_item_id: Numeric ID of the scene item (>= 0)
|
||||
:type scene_item_id: int
|
||||
:param scene_name: Name of the scene the item is in.
|
||||
:type scene_name: str
|
||||
|
||||
|
||||
"""
|
||||
payload = {
|
||||
"sceneItemId": scene_item_id,
|
||||
"sceneName": scene_name,
|
||||
}
|
||||
return self.send("GetSceneItemSource", payload)
|
||||
|
||||
def create_scene_item(self, scene_name, source_name, enabled=None):
|
||||
"""
|
||||
Creates a new scene item using a source.
|
||||
@@ -1784,7 +1809,7 @@ class ReqClient:
|
||||
|
||||
|
||||
"""
|
||||
self.send("ToggleRecord")
|
||||
return self.send("ToggleRecord")
|
||||
|
||||
def start_record(self):
|
||||
"""
|
||||
@@ -1826,6 +1851,28 @@ class ReqClient:
|
||||
"""
|
||||
self.send("ResumeRecord")
|
||||
|
||||
def split_record_file(self):
|
||||
"""
|
||||
Splits the current file being recorded into a new file.
|
||||
|
||||
|
||||
"""
|
||||
self.send("SplitRecordFile")
|
||||
|
||||
def create_record_chapter(self, chapter_name=None):
|
||||
"""
|
||||
Adds a new chapter marker to the file currently being recorded.
|
||||
|
||||
Note: As of OBS 30.2.0, the only file format supporting this feature is Hybrid MP4.
|
||||
|
||||
:param chapter_name: Name of the new chapter
|
||||
:type chapter_name: str
|
||||
|
||||
|
||||
"""
|
||||
payload = {"chapterName": chapter_name}
|
||||
self.send("CreateRecordChapter", payload)
|
||||
|
||||
def get_media_input_status(self, name):
|
||||
"""
|
||||
Gets the status of a media input.
|
||||
|
||||
@@ -1 +1 @@
|
||||
version = "1.7.1"
|
||||
version = "1.8.0"
|
||||
|
||||
@@ -13,35 +13,8 @@ class TestRequests:
|
||||
|
||||
def test_get_hot_key_list(self):
|
||||
resp = req_cl.get_hot_key_list()
|
||||
obsbasic_hotkey_list = [
|
||||
"OBSBasic.SelectScene",
|
||||
"OBSBasic.QuickTransition.1",
|
||||
"OBSBasic.QuickTransition.2",
|
||||
"OBSBasic.QuickTransition.3",
|
||||
"OBSBasic.StartStreaming",
|
||||
"OBSBasic.StopStreaming",
|
||||
"OBSBasic.ForceStopStreaming",
|
||||
"OBSBasic.StartRecording",
|
||||
"OBSBasic.StopRecording",
|
||||
"OBSBasic.PauseRecording",
|
||||
"OBSBasic.UnpauseRecording",
|
||||
"OBSBasic.SplitFile",
|
||||
"OBSBasic.StartReplayBuffer",
|
||||
"OBSBasic.StopReplayBuffer",
|
||||
"OBSBasic.StartVirtualCam",
|
||||
"OBSBasic.StopVirtualCam",
|
||||
"OBSBasic.EnablePreview",
|
||||
"OBSBasic.DisablePreview",
|
||||
"OBSBasic.EnablePreviewProgram",
|
||||
"OBSBasic.DisablePreviewProgram",
|
||||
"OBSBasic.ShowContextBar",
|
||||
"OBSBasic.HideContextBar",
|
||||
"OBSBasic.Transition",
|
||||
"OBSBasic.ResetStats",
|
||||
"OBSBasic.Screenshot",
|
||||
"OBSBasic.SelectedSourceScreenshot",
|
||||
]
|
||||
assert all(x in resp.hotkeys for x in obsbasic_hotkey_list)
|
||||
assert resp.hotkeys
|
||||
assert any(x.startswith("OBSBasic.") for x in resp.hotkeys)
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"name,data",
|
||||
|
||||
Reference in New Issue
Block a user