mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 17:13:11 +03:00
Compare commits
No commits in common. "0c31d21d95a0e537770fb28c8f90a05f55a7569d" and "180e0d71df4a2efacf2bf4cc6c2f0d0f98ce90dd" have entirely different histories.
0c31d21d95
...
180e0d71df
@ -14,17 +14,11 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="GtkAdjustment" id="adjustment_frames">
|
<object class="GtkAdjustment" id="adjustment_frames">
|
||||||
<property name="lower">0</property>
|
<property name="lower">0</property>
|
||||||
<property name="upper">1000</property>
|
<property name="upper">240</property>
|
||||||
<property name="step-increment">1</property>
|
<property name="step-increment">1</property>
|
||||||
<property name="page-increment">10</property>
|
<property name="page-increment">10</property>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkAdjustment" id="adjustment_bitrate_video">
|
<object class="GtkAdjustment" id="adjustment_bitrate">
|
||||||
<property name="lower">0</property>
|
|
||||||
<property name="upper">50000</property>
|
|
||||||
<property name="step-increment">1</property>
|
|
||||||
<property name="page-increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="adjustment_bitrate_audio">
|
|
||||||
<property name="lower">0</property>
|
<property name="lower">0</property>
|
||||||
<property name="upper">50000</property>
|
<property name="upper">50000</property>
|
||||||
<property name="step-increment">1</property>
|
<property name="step-increment">1</property>
|
||||||
@ -403,16 +397,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkSeparator" id="hideswitch_separator">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="opacity">0.0</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkCheckButton" id="speakerswitch">
|
<object class="GtkCheckButton" id="speakerswitch">
|
||||||
<property name="label" translatable="yes">checkbutton</property>
|
<property name="label" translatable="yes">checkbutton</property>
|
||||||
@ -482,6 +466,16 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparator" id="delay_separator">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="opacity">0.0</property>
|
||||||
|
<layout>
|
||||||
|
<property name="column">1</property>
|
||||||
|
<property name="row">2</property>
|
||||||
|
</layout>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="video_bitrate_label">
|
<object class="GtkLabel" id="video_bitrate_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@ -500,7 +494,7 @@
|
|||||||
<property name="max-width-chars">2</property>
|
<property name="max-width-chars">2</property>
|
||||||
<property name="width-chars">2</property>
|
<property name="width-chars">2</property>
|
||||||
<property name="text">number</property>
|
<property name="text">number</property>
|
||||||
<property name="adjustment">adjustment_bitrate_video</property>
|
<property name="adjustment">adjustment_bitrate</property>
|
||||||
<property name="climb-rate">1</property>
|
<property name="climb-rate">1</property>
|
||||||
<property name="has-tooltip">True</property>
|
<property name="has-tooltip">True</property>
|
||||||
<layout>
|
<layout>
|
||||||
@ -509,33 +503,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="audio_bitrate_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can-focus">True</property>
|
|
||||||
<property name="label" translatable="yes">label</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">0</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="audio_bitrate">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can-focus">True</property>
|
|
||||||
<property name="max-width-chars">2</property>
|
|
||||||
<property name="width-chars">2</property>
|
|
||||||
<property name="text">number</property>
|
|
||||||
<property name="adjustment">adjustment_bitrate_audio</property>
|
|
||||||
<property name="climb-rate">1</property>
|
|
||||||
<property name="has-tooltip">True</property>
|
|
||||||
<layout>
|
|
||||||
<property name="column">1</property>
|
|
||||||
<property name="row">3</property>
|
|
||||||
</layout>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@ -10,7 +10,6 @@ address-alessandro-toia = Alessandro Toia <gort818@gmail.com>
|
|||||||
address-alex-benishek = Alex Benishek
|
address-alex-benishek = Alex Benishek
|
||||||
address-amerey = Amerey https://github.com/Amereyeu
|
address-amerey = Amerey https://github.com/Amereyeu
|
||||||
address-chibani = O.Chibani <11yzyv86j@relay.firefox.com>
|
address-chibani = O.Chibani <11yzyv86j@relay.firefox.com>
|
||||||
address-hamir-mahal = Hamir Mahal https://github.com/hamirmahal
|
|
||||||
address-hanny-sabbagh = M.Hanny Sabbagh <mhsabbagh@outlook.com>
|
address-hanny-sabbagh = M.Hanny Sabbagh <mhsabbagh@outlook.com>
|
||||||
address-gmou3 = gmou3 https://github.com/gmou3
|
address-gmou3 = gmou3 https://github.com/gmou3
|
||||||
address-larry-wei = Larry Wei https://github.com/larryw3i
|
address-larry-wei = Larry Wei https://github.com/larryw3i
|
||||||
@ -36,9 +35,6 @@ apply = طبق
|
|||||||
# Area select button
|
# Area select button
|
||||||
area-chooser = محدد المنطقة
|
area-chooser = محدد المنطقة
|
||||||
|
|
||||||
# Audio bitrate label
|
|
||||||
audio-bitrate = B/Audio:
|
|
||||||
|
|
||||||
# Audio source input
|
# Audio source input
|
||||||
audio-input = مصدر الصوت الافتراضي
|
audio-input = مصدر الصوت الافتراضي
|
||||||
|
|
||||||
@ -142,7 +138,6 @@ website = الموقع
|
|||||||
# Tooltip
|
# Tooltip
|
||||||
about-tooltip = ما يُستَحسَنُ أن تعلمه عن المسجل الأزرق
|
about-tooltip = ما يُستَحسَنُ أن تعلمه عن المسجل الأزرق
|
||||||
area-tooltip = يحدد المنطقة المُراد تسجيلها
|
area-tooltip = يحدد المنطقة المُراد تسجيلها
|
||||||
audio-bitrate-tooltip = Set audio bitrate in KB/s
|
|
||||||
audio-source-tooltip = لاختيار مدخل الصوت
|
audio-source-tooltip = لاختيار مدخل الصوت
|
||||||
audio-tooltip = Mic audio recording
|
audio-tooltip = Mic audio recording
|
||||||
delay-tooltip = مُهلة قبل بدء التسجيل
|
delay-tooltip = مُهلة قبل بدء التسجيل
|
||||||
|
@ -10,7 +10,6 @@ address-alessandro-toia = Alessandro Toia <gort818@gmail.com>
|
|||||||
address-alex-benishek = Alex Benishek
|
address-alex-benishek = Alex Benishek
|
||||||
address-amerey = Amerey https://github.com/Amereyeu
|
address-amerey = Amerey https://github.com/Amereyeu
|
||||||
address-chibani = O.Chibani <11yzyv86j@relay.firefox.com>
|
address-chibani = O.Chibani <11yzyv86j@relay.firefox.com>
|
||||||
address-hamir-mahal = Hamir Mahal https://github.com/hamirmahal
|
|
||||||
address-hanny-sabbagh = M.Hanny Sabbagh <mhsabbagh@outlook.com>
|
address-hanny-sabbagh = M.Hanny Sabbagh <mhsabbagh@outlook.com>
|
||||||
address-gmou3 = gmou3 https://github.com/gmou3
|
address-gmou3 = gmou3 https://github.com/gmou3
|
||||||
address-larry-wei = Larry Wei https://github.com/larryw3i
|
address-larry-wei = Larry Wei https://github.com/larryw3i
|
||||||
@ -36,9 +35,6 @@ apply = طبق
|
|||||||
# Area select button
|
# Area select button
|
||||||
area-chooser = محدد المنطقة
|
area-chooser = محدد المنطقة
|
||||||
|
|
||||||
# Audio bitrate label
|
|
||||||
audio-bitrate = B/Audio:
|
|
||||||
|
|
||||||
# Audio source input
|
# Audio source input
|
||||||
audio-input = مصدر الصوت الافتراضي
|
audio-input = مصدر الصوت الافتراضي
|
||||||
|
|
||||||
@ -142,7 +138,6 @@ website = الموقع
|
|||||||
# Tooltip
|
# Tooltip
|
||||||
about-tooltip = ما يُستَحسَنُ أن تعلمه عن المسجل الأزرق
|
about-tooltip = ما يُستَحسَنُ أن تعلمه عن المسجل الأزرق
|
||||||
area-tooltip = يحدد المنطقة المُراد تسجيلها
|
area-tooltip = يحدد المنطقة المُراد تسجيلها
|
||||||
audio-bitrate-tooltip = Set audio bitrate in KB/s
|
|
||||||
audio-source-tooltip = لاختيار مدخل الصوت
|
audio-source-tooltip = لاختيار مدخل الصوت
|
||||||
audio-tooltip = Mic audio recording
|
audio-tooltip = Mic audio recording
|
||||||
delay-tooltip = مُهلة قبل بدء التسجيل
|
delay-tooltip = مُهلة قبل بدء التسجيل
|
||||||
|
@ -10,7 +10,6 @@ address-alessandro-toia = Alessandro Toia <gort818@gmail.com>
|
|||||||
address-alex-benishek = Alex Benishek
|
address-alex-benishek = Alex Benishek
|
||||||
address-amerey = Amerey https://github.com/Amereyeu
|
address-amerey = Amerey https://github.com/Amereyeu
|
||||||
address-chibani = O.Chibani <11yzyv86j@relay.firefox.com>
|
address-chibani = O.Chibani <11yzyv86j@relay.firefox.com>
|
||||||
address-hamir-mahal = Hamir Mahal https://github.com/hamirmahal
|
|
||||||
address-hanny-sabbagh = M.Hanny Sabbagh <mhsabbagh@outlook.com>
|
address-hanny-sabbagh = M.Hanny Sabbagh <mhsabbagh@outlook.com>
|
||||||
address-gmou3 = gmou3 https://github.com/gmou3
|
address-gmou3 = gmou3 https://github.com/gmou3
|
||||||
address-larry-wei = Larry Wei https://github.com/larryw3i
|
address-larry-wei = Larry Wei https://github.com/larryw3i
|
||||||
@ -36,9 +35,6 @@ apply = Apply
|
|||||||
# Area select button
|
# Area select button
|
||||||
area-chooser = Area Chooser
|
area-chooser = Area Chooser
|
||||||
|
|
||||||
# Audio bitrate label
|
|
||||||
audio-bitrate = B/Audio:
|
|
||||||
|
|
||||||
# Audio source input
|
# Audio source input
|
||||||
audio-input = Default Input Source
|
audio-input = Default Input Source
|
||||||
|
|
||||||
@ -138,14 +134,13 @@ website = Website
|
|||||||
# Tooltip
|
# Tooltip
|
||||||
about-tooltip = Information about Blue Recorder
|
about-tooltip = Information about Blue Recorder
|
||||||
area-tooltip = Select area to record
|
area-tooltip = Select area to record
|
||||||
audio-bitrate-tooltip = Set audio bitrate in KB/s
|
|
||||||
audio-source-tooltip = Select audio source
|
audio-source-tooltip = Select audio source
|
||||||
audio-tooltip = Mic audio recording
|
audio-tooltip = Mic audio recording
|
||||||
delay-tooltip = Delay time before starting record
|
delay-tooltip = Delay time before starting record
|
||||||
folder-tooltip = Select storage location
|
folder-tooltip = Select storage location
|
||||||
follow-mouse-tooltip = Make the grabbed area follow the mouse
|
follow-mouse-tooltip = Make the grabbed area follow the mouse
|
||||||
format-tooltip = Select file format
|
format-tooltip = Select file format
|
||||||
frames-tooltip = Set frames rate
|
frames-tooltip = Frames rate
|
||||||
hide-tooltip = Hide window when start recording
|
hide-tooltip = Hide window when start recording
|
||||||
mouse-tooltip = Mouse appears in video recording
|
mouse-tooltip = Mouse appears in video recording
|
||||||
video-bitrate-tooltip = Set video bitrate in KB/s
|
video-bitrate-tooltip = Set video bitrate in KB/s
|
||||||
|
@ -10,7 +10,6 @@ address-alessandro-toia = Alessandro Toia <gort818@gmail.com>
|
|||||||
address-alex-benishek = Alex Benishek
|
address-alex-benishek = Alex Benishek
|
||||||
address-amerey = Amerey https://github.com/Amereyeu
|
address-amerey = Amerey https://github.com/Amereyeu
|
||||||
address-chibani = O.Chibani <11yzyv86j@relay.firefox.com>
|
address-chibani = O.Chibani <11yzyv86j@relay.firefox.com>
|
||||||
address-hamir-mahal = Hamir Mahal https://github.com/hamirmahal
|
|
||||||
address-hanny-sabbagh = M.Hanny Sabbagh <mhsabbagh@outlook.com>
|
address-hanny-sabbagh = M.Hanny Sabbagh <mhsabbagh@outlook.com>
|
||||||
address-gmou3 = gmou3 https://github.com/gmou3
|
address-gmou3 = gmou3 https://github.com/gmou3
|
||||||
address-larry-wei = Larry Wei https://github.com/larryw3i
|
address-larry-wei = Larry Wei https://github.com/larryw3i
|
||||||
@ -36,9 +35,6 @@ apply = Apply
|
|||||||
# Area select button
|
# Area select button
|
||||||
area-chooser = Area Chooser
|
area-chooser = Area Chooser
|
||||||
|
|
||||||
# Audio bitrate label
|
|
||||||
audio-bitrate = B/Audio:
|
|
||||||
|
|
||||||
# Audio source input
|
# Audio source input
|
||||||
audio-input = Default Input Source
|
audio-input = Default Input Source
|
||||||
|
|
||||||
@ -138,14 +134,13 @@ website = Website
|
|||||||
# Tooltip
|
# Tooltip
|
||||||
about-tooltip = Information about Blue Recorder
|
about-tooltip = Information about Blue Recorder
|
||||||
area-tooltip = Select area to record
|
area-tooltip = Select area to record
|
||||||
audio-bitrate-tooltip = Set audio bitrate in KB/s
|
|
||||||
audio-source-tooltip = Select audio source
|
audio-source-tooltip = Select audio source
|
||||||
audio-tooltip = Mic audio recording
|
audio-tooltip = Mic audio recording
|
||||||
delay-tooltip = Delay time before starting record
|
delay-tooltip = Delay time before starting record
|
||||||
folder-tooltip = Select storage location
|
folder-tooltip = Select storage location
|
||||||
follow-mouse-tooltip = Make the grabbed area follow the mouse
|
follow-mouse-tooltip = Make the grabbed area follow the mouse
|
||||||
format-tooltip = Select file format
|
format-tooltip = Select file format
|
||||||
frames-tooltip = Set frames rate
|
frames-tooltip = Frames rate
|
||||||
hide-tooltip = Hide window when start recording
|
hide-tooltip = Hide window when start recording
|
||||||
mouse-tooltip = Mouse appears in video recording
|
mouse-tooltip = Mouse appears in video recording
|
||||||
video-bitrate-tooltip = Set video bitrate in KB/s
|
video-bitrate-tooltip = Set video bitrate in KB/s
|
||||||
|
@ -60,7 +60,6 @@ fn default() {
|
|||||||
set("default", "hidecheck", "0");
|
set("default", "hidecheck", "0");
|
||||||
set("default", "speakercheck", "0");
|
set("default", "speakercheck", "0");
|
||||||
set("default", "mode", "screen");
|
set("default", "mode", "screen");
|
||||||
set("default", "audiobitrate", "0");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn merge_previous_version() -> Option<PathBuf> {
|
fn merge_previous_version() -> Option<PathBuf> {
|
||||||
|
@ -41,7 +41,6 @@ pub struct Ffmpeg {
|
|||||||
pub temp_video_filename: String,
|
pub temp_video_filename: String,
|
||||||
pub bundle: String,
|
pub bundle: String,
|
||||||
pub video_record_bitrate: SpinButton,
|
pub video_record_bitrate: SpinButton,
|
||||||
pub audio_record_bitrate: SpinButton,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Ffmpeg {
|
impl Ffmpeg {
|
||||||
@ -160,11 +159,6 @@ impl Ffmpeg {
|
|||||||
// start recording and return the process id
|
// start recording and return the process id
|
||||||
self.video_process = Some(Rc::new(RefCell::new(ffmpeg_command.spawn().unwrap())));
|
self.video_process = Some(Rc::new(RefCell::new(ffmpeg_command.spawn().unwrap())));
|
||||||
} else if self.record_video.is_active() && !is_wayland() && self.filename.2.active_id().unwrap().as_str() == "gif" {
|
} else if self.record_video.is_active() && !is_wayland() && self.filename.2.active_id().unwrap().as_str() == "gif" {
|
||||||
let tempfile = tempfile::Builder::new().suffix(".mp4")
|
|
||||||
.tempfile().expect("cannot create temp file")
|
|
||||||
.keep().expect("cannot keep temp file");
|
|
||||||
self.temp_video_filename = tempfile.0.file_name().expect("cannot get file name")
|
|
||||||
.to_str().unwrap().to_string();
|
|
||||||
let mode = config_management::get("default", "mode");
|
let mode = config_management::get("default", "mode");
|
||||||
let format = "x11grab";
|
let format = "x11grab";
|
||||||
let display = format!("{}+{},{}",
|
let display = format!("{}+{},{}",
|
||||||
@ -213,8 +207,14 @@ impl Ffmpeg {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let video_filename = format!(
|
||||||
|
"{}.temp.without.audio.{}",
|
||||||
|
self.saved_filename.as_ref().unwrap(),
|
||||||
|
self.filename.2.active_id().unwrap()
|
||||||
|
).replace("gif", "mp4");
|
||||||
|
|
||||||
// Output
|
// Output
|
||||||
ffmpeg_command.arg(self.temp_video_filename.clone())
|
ffmpeg_command.arg(video_filename.as_str())
|
||||||
.overwrite();
|
.overwrite();
|
||||||
|
|
||||||
// sleep for delay
|
// sleep for delay
|
||||||
@ -277,6 +277,8 @@ impl Ffmpeg {
|
|||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
.quit()
|
.quit()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
println!("video killed");
|
||||||
} else if is_wayland() {
|
} else if is_wayland() {
|
||||||
self.main_context.block_on(self.record_wayland.stop());
|
self.main_context.block_on(self.record_wayland.stop());
|
||||||
}
|
}
|
||||||
@ -288,13 +290,19 @@ impl Ffmpeg {
|
|||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
.quit()
|
.quit()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
println!("audio killed");
|
||||||
}
|
}
|
||||||
|
|
||||||
let video_filename = {
|
let video_filename = {
|
||||||
if is_wayland() {
|
if is_wayland() {
|
||||||
self.temp_video_filename.clone()
|
self.temp_video_filename.clone()
|
||||||
} else if !is_wayland() && self.filename.2.active_id().unwrap().as_str() == "gif" {
|
} else if !is_wayland() && self.filename.2.active_id().unwrap().as_str() == "gif" {
|
||||||
self.temp_video_filename.clone()
|
format!(
|
||||||
|
"{}.temp.without.audio.{}",
|
||||||
|
self.saved_filename.as_ref().unwrap(),
|
||||||
|
self.filename.2.active_id().unwrap()
|
||||||
|
).replace("gif", "mp4")
|
||||||
} else {
|
} else {
|
||||||
format!(
|
format!(
|
||||||
"{}.temp.without.audio.{}",
|
"{}.temp.without.audio.{}",
|
||||||
@ -332,15 +340,24 @@ impl Ffmpeg {
|
|||||||
} else if !is_wayland() && self.filename.2.active_id().unwrap().as_str() == "gif" {
|
} else if !is_wayland() && self.filename.2.active_id().unwrap().as_str() == "gif" {
|
||||||
let fps = 100/self.record_frames.value_as_int();
|
let fps = 100/self.record_frames.value_as_int();
|
||||||
let scale = self.height.unwrap();
|
let scale = self.height.unwrap();
|
||||||
let mut ffmpeg_command = FfmpegCommand::new();
|
Command::new("ffmpeg").arg("-i")
|
||||||
ffmpeg_command.input(format!("file:{}", video_filename.as_str()))
|
.arg(format!("file:{}", video_filename.as_str()))
|
||||||
|
.arg("-filter_complex")
|
||||||
|
.arg(format!("fps={},scale={}:-1:flags=lanczos,[0]split[s0][s1]; [s0]palettegen[p]; [s1][p]paletteuse",
|
||||||
|
fps,scale))
|
||||||
|
.args(["-loop", "0"])
|
||||||
|
.arg(self.saved_filename.as_ref().unwrap())
|
||||||
|
.status()
|
||||||
|
.unwrap();
|
||||||
|
//let mut ffmpeg_command = FfmpegCommand::new();
|
||||||
|
/*ffmpeg_command.input(format!("file:{}", video_filename.as_str()))
|
||||||
.filter_complex(
|
.filter_complex(
|
||||||
format!("fps={},scale={}:-1:flags=lanczos,[0]split[s0][s1]; [s0]palettegen[p]; [s1][p]paletteuse",
|
format!("fps={},scale={}:-1:flags=lanczos,[0]split[s0][s1]; [s0]palettegen[p]; [s1][p]paletteuse",
|
||||||
fps,scale)
|
fps,scale)
|
||||||
)
|
)
|
||||||
.args(["-loop", "0"])
|
.args(["-loop", "0"])
|
||||||
.output(self.saved_filename.as_ref().unwrap())
|
.output(self.saved_filename.as_ref().unwrap())
|
||||||
.overwrite().spawn().unwrap().wait().expect("failed to convert video to gif");
|
.overwrite().spawn().unwrap().wait().expect("failed to convert video to gif");*/
|
||||||
if is_audio_record {
|
if is_audio_record {
|
||||||
std::fs::remove_file(audio_filename.clone()).unwrap();
|
std::fs::remove_file(audio_filename.clone()).unwrap();
|
||||||
}
|
}
|
||||||
|
24
src/main.rs
24
src/main.rs
@ -89,8 +89,6 @@ pub fn build_ui(application: &Application) {
|
|||||||
let area_set_button: Button = builder.object("area_set_button").unwrap();
|
let area_set_button: Button = builder.object("area_set_button").unwrap();
|
||||||
let about_button: Button = builder.object("aboutbutton").unwrap();
|
let about_button: Button = builder.object("aboutbutton").unwrap();
|
||||||
let about_dialog: AboutDialog = builder.object("about_dialog").unwrap();
|
let about_dialog: AboutDialog = builder.object("about_dialog").unwrap();
|
||||||
let audio_bitrate_label: Label = builder.object("audio_bitrate_label").unwrap();
|
|
||||||
let audio_bitrate_spin: SpinButton = builder.object("audio_bitrate").unwrap();
|
|
||||||
let audio_source_combobox: ComboBoxText = builder.object("audiosource").unwrap();
|
let audio_source_combobox: ComboBoxText = builder.object("audiosource").unwrap();
|
||||||
let audio_source_label: Label = builder.object("audio_source_label").unwrap();
|
let audio_source_label: Label = builder.object("audio_source_label").unwrap();
|
||||||
let audio_switch: CheckButton = builder.object("audioswitch").unwrap();
|
let audio_switch: CheckButton = builder.object("audioswitch").unwrap();
|
||||||
@ -399,8 +397,6 @@ pub fn build_ui(application: &Application) {
|
|||||||
.value().unwrap(), None, &mut vec![]).to_string()));
|
.value().unwrap(), None, &mut vec![]).to_string()));
|
||||||
video_bitrate_spin.set_tooltip_text(Some(&bundle.format_pattern(bundle.get_message("video-bitrate-tooltip").unwrap()
|
video_bitrate_spin.set_tooltip_text(Some(&bundle.format_pattern(bundle.get_message("video-bitrate-tooltip").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string()));
|
.value().unwrap(), None, &mut vec![]).to_string()));
|
||||||
audio_bitrate_spin.set_tooltip_text(Some(&bundle.format_pattern(bundle.get_message("audio-bitrate-tooltip").unwrap()
|
|
||||||
.value().unwrap(), None, &mut vec![]).to_string()));
|
|
||||||
frames_spin.set_value(
|
frames_spin.set_value(
|
||||||
config_management::get("default",
|
config_management::get("default",
|
||||||
&format!
|
&format!
|
||||||
@ -422,11 +418,6 @@ pub fn build_ui(application: &Application) {
|
|||||||
.parse::<f64>()
|
.parse::<f64>()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
);
|
);
|
||||||
audio_bitrate_spin.set_value(
|
|
||||||
config_management::get("default", "audiobitrate")
|
|
||||||
.parse::<f64>()
|
|
||||||
.unwrap(),
|
|
||||||
);
|
|
||||||
|
|
||||||
let _format_chooser_combobox = format_chooser_combobox.clone();
|
let _format_chooser_combobox = format_chooser_combobox.clone();
|
||||||
let _frames_spin = frames_spin.clone();
|
let _frames_spin = frames_spin.clone();
|
||||||
@ -482,12 +473,6 @@ pub fn build_ui(application: &Application) {
|
|||||||
&_format_chooser_combobox.active().unwrap().to_string()),
|
&_format_chooser_combobox.active().unwrap().to_string()),
|
||||||
_video_bitrate_spin.value().to_string().as_str());
|
_video_bitrate_spin.value().to_string().as_str());
|
||||||
});
|
});
|
||||||
let _audio_bitrate_spin = audio_bitrate_spin.to_owned();
|
|
||||||
audio_bitrate_spin.connect_value_changed(move |_| {
|
|
||||||
config_management::set("default",
|
|
||||||
"audio_bitrate",
|
|
||||||
_audio_bitrate_spin.value().to_string().as_str());
|
|
||||||
});
|
|
||||||
|
|
||||||
// Labels
|
// Labels
|
||||||
command_label.set_label(&bundle.format_pattern(bundle.get_message("run-command").unwrap()
|
command_label.set_label(&bundle.format_pattern(bundle.get_message("run-command").unwrap()
|
||||||
@ -498,8 +483,6 @@ pub fn build_ui(application: &Application) {
|
|||||||
.value().unwrap(), None, &mut vec![]).to_string());
|
.value().unwrap(), None, &mut vec![]).to_string());
|
||||||
video_bitrate_label.set_label(&bundle.format_pattern(bundle.get_message("video-bitrate").unwrap()
|
video_bitrate_label.set_label(&bundle.format_pattern(bundle.get_message("video-bitrate").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string());
|
.value().unwrap(), None, &mut vec![]).to_string());
|
||||||
audio_bitrate_label.set_label(&bundle.format_pattern(bundle.get_message("audio-bitrate").unwrap()
|
|
||||||
.value().unwrap(), None, &mut vec![]).to_string());
|
|
||||||
audio_source_label.set_label(&bundle.format_pattern(bundle.get_message("audio-source").unwrap()
|
audio_source_label.set_label(&bundle.format_pattern(bundle.get_message("audio-source").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string());
|
.value().unwrap(), None, &mut vec![]).to_string());
|
||||||
|
|
||||||
@ -645,7 +628,6 @@ pub fn build_ui(application: &Application) {
|
|||||||
temp_video_filename: String::new(),
|
temp_video_filename: String::new(),
|
||||||
bundle: bundle_msg,
|
bundle: bundle_msg,
|
||||||
video_record_bitrate: video_bitrate_spin,
|
video_record_bitrate: video_bitrate_spin,
|
||||||
audio_record_bitrate: audio_bitrate_spin,
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// Record Button
|
// Record Button
|
||||||
@ -749,7 +731,7 @@ pub fn build_ui(application: &Application) {
|
|||||||
about_dialog.set_transient_for(Some(&main_window));
|
about_dialog.set_transient_for(Some(&main_window));
|
||||||
about_dialog.set_program_name(Some(&bundle.format_pattern(bundle.get_message("blue-recorder").unwrap()
|
about_dialog.set_program_name(Some(&bundle.format_pattern(bundle.get_message("blue-recorder").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string()));
|
.value().unwrap(), None, &mut vec![]).to_string()));
|
||||||
about_dialog.set_version(Some("0.3.0"));
|
about_dialog.set_version(Some("0.2.0"));
|
||||||
about_dialog.set_copyright(Some(&bundle.format_pattern(bundle.get_message("copy-right").unwrap()
|
about_dialog.set_copyright(Some(&bundle.format_pattern(bundle.get_message("copy-right").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string()));
|
.value().unwrap(), None, &mut vec![]).to_string()));
|
||||||
about_dialog.set_wrap_license(true);
|
about_dialog.set_wrap_license(true);
|
||||||
@ -767,15 +749,13 @@ pub fn build_ui(application: &Application) {
|
|||||||
.value().unwrap(), None, &mut vec![]).to_string(),
|
.value().unwrap(), None, &mut vec![]).to_string(),
|
||||||
&bundle.format_pattern(bundle.get_message("address-chibani").unwrap()
|
&bundle.format_pattern(bundle.get_message("address-chibani").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string(),
|
.value().unwrap(), None, &mut vec![]).to_string(),
|
||||||
&bundle.format_pattern(bundle.get_message("address-hamir-mahal").unwrap()
|
|
||||||
.value().unwrap(), None, &mut vec![]).to_string(),
|
|
||||||
&bundle.format_pattern(bundle.get_message("address-hanny-sabbagh").unwrap()
|
&bundle.format_pattern(bundle.get_message("address-hanny-sabbagh").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string(),
|
.value().unwrap(), None, &mut vec![]).to_string(),
|
||||||
&bundle.format_pattern(bundle.get_message("address-salem-yaslem").unwrap()
|
&bundle.format_pattern(bundle.get_message("address-salem-yaslem").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string(),
|
.value().unwrap(), None, &mut vec![]).to_string(),
|
||||||
&bundle.format_pattern(bundle.get_message("address-suliman-altassan").unwrap()
|
&bundle.format_pattern(bundle.get_message("address-suliman-altassan").unwrap()
|
||||||
.value().unwrap(), None, &mut vec![]).to_string(),
|
.value().unwrap(), None, &mut vec![]).to_string(),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
// Patreon suppoters
|
// Patreon suppoters
|
||||||
about_dialog.add_credit_section(
|
about_dialog.add_credit_section(
|
||||||
|
Loading…
Reference in New Issue
Block a user