adding a basic setup for connecting OBS

This commit is contained in:
Chris Cochrun 2023-10-30 06:34:12 -05:00
parent 511c34ee41
commit c6c3ed5d42
5 changed files with 324 additions and 10 deletions

View file

@ -56,6 +56,8 @@ mod service_item_model {
video_start_time: f32,
#[qproperty]
video_end_time: f32,
#[qproperty]
obs_scene: QString,
}
impl Default for ServiceItm {
@ -75,6 +77,7 @@ mod service_item_model {
looping: false,
video_start_time: 0.0,
video_end_time: 0.0,
obs_scene: QString::default(),
}
}
}
@ -147,6 +150,8 @@ mod service_item_model {
use tar::{Archive, Builder};
use tracing::{debug, debug_span, error, info, instrument};
use zstd::{Decoder, Encoder};
use crate::obs::Obs;
impl qobject::ServiceItemMod {
#[qinvokable]
pub fn clear(mut self: Pin<&mut Self>) {
@ -602,6 +607,7 @@ mod service_item_model {
// We use this signal generated by our signals enum to tell QML that
// the active service_item has changed which is used to reposition views.
self.as_mut().emit_active_changed();
Obs::set_scene(service_item.obs_scene.to_string());
true
} else {
false