Add features from obs-websocket v5.3

main
Dominik Nakamura 6 months ago
parent 8fa1dc6d22
commit 4f734bea64
No known key found for this signature in database

@ -10,6 +10,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->
## [Unreleased] - ReleaseDate
### Added
- New features from obs-websocket v5.3.0
- New `set_record_directory` command, that allows to modify the output directory for recordings.
- New `NotReady` status code, that signals the obs-websocket server is not ready yet to accept any commands.
## [0.11.5] - 2023-09-04
### Changed
@ -58,7 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- **BREAKING CHANGE:** Due to the update of `bitflags` the list of derived traits changed.
- Update all dependencies to their lates version, most notably `base64`, `bitflags` and
- Update all dependencies to their latest version, most notably `base64`, `bitflags` and
`tokio-tungstenite`.
- The MSRV is now **1.68**.
@ -76,7 +82,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
for testing out these changes pre-release ❤️. Your ideas and bug reports helped a lot!
- All response and event data structures now implement the recommended common traits, where
possible. In addition, `serde::Serialize` and `serde::Deserialize` is implemented for all of
them. That means, they can now be constructred easier, and used in more places, for example, as a
them. That means, they can now be constructed easier, and used in more places, for example, as a
`HashMap` key.
## [0.9.1] - 2022-02-25

@ -90,4 +90,12 @@ impl<'a> Config<'a> {
.await
.map(|rd| rd.record_directory)
}
/// Sets the current directory that the record output writes files to.
#[doc(alias = "SetRecordDirectory")]
pub async fn set_record_directory(&self, directory: &'a str) -> Result<()> {
self.client
.send_message(Request::SetRecordDirectory { directory })
.await
}
}

@ -34,6 +34,12 @@ pub(crate) enum Request<'a> {
},
#[serde(rename = "GetRecordDirectory")]
RecordDirectory,
#[serde(rename = "SetRecordDirectory")]
SetRecordDirectory {
/// Output directory.
#[serde(rename = "recordDirectory")]
directory: &'a str,
},
}
impl<'a> From<Request<'a>> for super::RequestType<'a> {

@ -194,6 +194,11 @@ pub enum StatusCode {
GenericError = 205,
/// The request batch execution type is not supported.
UnsupportedRequestBatchExecutionType = 206,
/// The server is not ready to handle the request.
///
/// **Note:** This usually occurs during OBS scene collection change or exit. Requests may be
/// tried again after a delay if this code is given.
NotReady = 207,
/// A required request field is missing.
MissingRequestField = 300,

@ -29,7 +29,8 @@ async fn config() -> Result<()> {
.set_stream_service_settings(&settings.r#type, &settings.settings)
.await?;
client.record_directory().await?;
let directory = client.record_directory().await?;
client.set_record_directory(&directory).await?;
Ok(())
}

Loading…
Cancel
Save