intial merge request

This commit is contained in:
ochibani 2025-01-09 18:55:42 +02:00
parent 51b8fe7082
commit 6de786bd71
3 changed files with 12 additions and 0 deletions

View File

@ -634,6 +634,7 @@ impl Ffmpeg {
ffmpeg_command.args(["-map_metadata", "-1"]);
ffmpeg_command.arg(&self.temp_output_audio_filename);
ffmpeg_command.overwrite();
ffmpeg_command.print_command();
// Sleep for delay
if !is_video_record(&self.temp_video_filename) && !is_input_audio_record(&self.temp_input_audio_filename) {

View File

@ -11,6 +11,8 @@
<property name="deletable">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="modal">True</property>
<property name="destroy-with-parent">True</property>
<child type="title">
<object class="GtkHeaderBar" id="headerbar2">
<property name="visible">True</property>

View File

@ -18,6 +18,8 @@ use std::cell::RefCell;
use std::ops::Add;
use std::path::Path;
use std::rc::Rc;
use std::sync::mpsc;
use std::thread;
use crate::{area_capture, config_management, fluent::get_bundle};
use crate::timer::{RecordClick, recording_delay, start_timer, stop_timer};
@ -138,6 +140,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
// --- default properties
// Windows
area_chooser_window.set_transient_for(Some(&main_window));
area_chooser_window.set_title(Some(&get_bundle("area-chooser", None))); // Title is hidden
error_dialog.set_transient_for(Some(&main_window));
select_window.set_transient_for(Some(&main_window));
@ -985,7 +988,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
let _stop_button = stop_button.clone();
let _video_switch = video_switch.clone();
let mut _ffmpeg_record_interface = ffmpeg_record_interface.clone();
let (tx, rx) = mpsc::channel::<Result<()>>();
stop_button.connect_clicked(move |_| {
let _tx = tx.clone();
let mut show_play = true;
_record_time_label.set_visible(false);
stop_timer(_record_time_label.clone());
@ -1065,6 +1070,10 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
if show_play {
_play_button.show();
}
let merge_request = _ffmpeg_record_interface.borrow_mut().merge();
thread::spawn(move || {
_tx.send(merge_request).unwrap();
});
});
// Delay window button