mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2025-04-01 23:34:54 +03:00
Compare commits
3 Commits
2f11505b8b
...
471f5a595d
Author | SHA1 | Date | |
---|---|---|---|
|
471f5a595d | ||
|
1cd925a0bb | ||
|
31ea054174 |
@ -240,7 +240,7 @@ impl Ffmpeg {
|
||||
.to_string();
|
||||
let mut ffmpeg_command = FfmpegCommand::new();
|
||||
ffmpeg_command.format("dshow")
|
||||
.input(format!("audio={}", &self.audio_input_id))
|
||||
.input(format!("audio={}", &self.audio_output_id))
|
||||
.format("ogg");
|
||||
// Remove metadate
|
||||
ffmpeg_command.args(["-map_metadata", "-1"]);
|
||||
@ -579,7 +579,9 @@ impl Ffmpeg {
|
||||
.to_string();
|
||||
let mut ffmpeg_command = FfmpegCommand::new();
|
||||
ffmpeg_command.format("dshow")
|
||||
.input(format!("audio={}", &self.audio_input_id))
|
||||
.input(format!("audio=\"{}\"", &self.audio_input_id.active_text()
|
||||
.ok_or_else(|| anyhow!("Failed to get audio input source."))?)
|
||||
)
|
||||
.format("ogg");
|
||||
// Disable bitrate if value is zero
|
||||
if self.audio_record_bitrate.value() as u16 > 0 {
|
||||
@ -612,7 +614,7 @@ impl Ffmpeg {
|
||||
.ok_or_else(|| anyhow!("Not exiting the input audio recording process successfully."))?
|
||||
.borrow_mut()
|
||||
.quit()?;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@ -626,7 +628,7 @@ impl Ffmpeg {
|
||||
.to_string();
|
||||
let mut ffmpeg_command = FfmpegCommand::new();
|
||||
ffmpeg_command.format("dshow")
|
||||
.input(format!("audio={}", &self.audio_input_id))
|
||||
.input(format!("audio=\"{}\"", &self.audio_output_id))
|
||||
.format("ogg");
|
||||
// Remove metadate
|
||||
ffmpeg_command.args(["-map_metadata", "-1"]);
|
||||
|
@ -210,6 +210,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
|
||||
let audio_output_source: String = audio_output_source().unwrap_or_else(|_| String::new());
|
||||
|
||||
#[cfg(any(target_os = "freebsd", target_os = "linux"))]
|
||||
audio_source_combobox.append(Some("default"), &get_bundle("audio-input", None));
|
||||
for (id, audio_source) in sources_descriptions.iter().enumerate() {
|
||||
audio_source_combobox.append(Some(id.to_string().as_str()), audio_source);
|
||||
@ -985,6 +986,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
let _video_switch = video_switch.clone();
|
||||
let mut _ffmpeg_record_interface = ffmpeg_record_interface.clone();
|
||||
stop_button.connect_clicked(move |_| {
|
||||
let mut show_play = true;
|
||||
_record_time_label.set_visible(false);
|
||||
stop_timer(_record_time_label.clone());
|
||||
if _audio_input_switch.is_active() {
|
||||
@ -1000,6 +1002,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
}
|
||||
enable_input_widgets(input_widgets.clone());
|
||||
record_button.show();
|
||||
show_play = false;
|
||||
_stop_button.hide();
|
||||
let text_buffer = TextBuffer::new(None);
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
@ -1021,6 +1024,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
}
|
||||
enable_input_widgets(input_widgets.clone());
|
||||
record_button.show();
|
||||
show_play = false;
|
||||
_stop_button.hide();
|
||||
let text_buffer = TextBuffer::new(None);
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
@ -1042,6 +1046,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
}
|
||||
enable_input_widgets(input_widgets.clone());
|
||||
record_button.show();
|
||||
show_play = false;
|
||||
_stop_button.hide();
|
||||
let text_buffer = TextBuffer::new(None);
|
||||
text_buffer.set_text(&format!("{}", error));
|
||||
@ -1057,7 +1062,9 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag
|
||||
enable_input_widgets(input_widgets.clone());
|
||||
record_button.show();
|
||||
_stop_button.hide();
|
||||
_play_button.show();
|
||||
if show_play {
|
||||
_play_button.show();
|
||||
}
|
||||
});
|
||||
|
||||
// Delay window button
|
||||
|
Loading…
Reference in New Issue
Block a user