Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial gtk4 migration #39

Merged
merged 50 commits into from
Nov 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
6f48df3
Initial gtk4 migration
ochibani Sep 24, 2022
3c0ea6e
fix window size by changing main.ui
ochibani Sep 28, 2022
78d3fb6
display home icons in folder chooser
ochibani Sep 29, 2022
84cc6b3
area chooser window redesigned
ochibani Sep 30, 2022
8092950
spell check
ochibani Oct 1, 2022
835e466
remove wayland from ffmpeg-interface
ochibani Oct 14, 2022
3428d6d
Remove buggy video formats
ochibani Oct 14, 2022
56f5598
fix is_file_already_exists & play button
ochibani Oct 16, 2022
d9e7458
use system theme colors
xlmnxp Oct 18, 2022
a6ca6d3
look like fixed the video and audio merge
xlmnxp Oct 18, 2022
828074a
fix Progress dialog
xlmnxp Oct 18, 2022
336e8e4
hide window selection in wayland
ochibani Oct 18, 2022
71edab6
folder chooser parent
ochibani Oct 19, 2022
cec2d85
folder chooser hide
ochibani Oct 19, 2022
d1c4706
fix FileChooserButton
ochibani Oct 20, 2022
257c5b4
remove progress button
ochibani Oct 20, 2022
ad01c74
remove audio only record code
ochibani Oct 24, 2022
a3dbd29
add delay timer
ochibani Nov 1, 2022
f7c72ff
add recording timer
ochibani Nov 2, 2022
cbcb44d
add hours to timer
ochibani Nov 2, 2022
3e37cc9
minor change
ochibani Nov 4, 2022
258cda8
Edit indicator.rs
ochibani Nov 26, 2022
78ec81d
Working X11 version
ochibani Nov 26, 2022
fb32ebe
use 60fps as default
xlmnxp Feb 22, 2023
86303da
Merge branch 'blue-recorder-gtk4' of https://github.com/ochibani/blue…
xlmnxp Feb 22, 2023
c5189de
bug fixes, force select audio or video to record
xlmnxp Feb 22, 2023
a8f025e
use of Childs instead of kill command (Work cross multiple operating …
xlmnxp Feb 22, 2023
d82d71b
Simplify the implementation of Ffmpeg
xlmnxp Feb 23, 2023
b5b10cf
fix video and audio merges and fix audio recording issue
xlmnxp Feb 28, 2023
2ed389d
include tr.po with migration to GTK4
xlmnxp Mar 1, 2023
af982be
auto detect dark mode and change icons
xlmnxp Mar 1, 2023
3695530
improve style of select buttons
xlmnxp Oct 14, 2023
f857ba5
remove overwrite switch and fix message dialog
xlmnxp Oct 14, 2023
329c4a7
add wayland recorder
xlmnxp Oct 14, 2023
29b0a61
little improvements
xlmnxp Oct 15, 2023
aa9213a
little improvements
xlmnxp Oct 15, 2023
5d8f19f
update ui
ochibani Oct 16, 2023
7688528
update ui
ochibani Oct 17, 2023
8b7343c
add auto hide
ochibani Oct 19, 2023
b959262
add wayland record and mouse toggle
xlmnxp Oct 19, 2023
0e95762
refactor of code
xlmnxp Oct 21, 2023
5f847a0
remove progress dialog
xlmnxp Oct 21, 2023
5f079b8
fix borrow_mut
xlmnxp Oct 21, 2023
75df858
enable recording of window or screen
xlmnxp Oct 21, 2023
6c049e4
remove temporary video file when recording video only
xlmnxp Oct 21, 2023
510a1e5
enable recording of window or screen
xlmnxp Oct 21, 2023
5af98f9
remember last decision to record window or screen
xlmnxp Oct 22, 2023
4e4756e
update ui
ochibani Oct 23, 2023
591a671
remove appid from gtk part
xlmnxp Oct 27, 2023
d10fdf7
upgrade snap packaging
xlmnxp Oct 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove temporary video file when recording video only
  • Loading branch information
xlmnxp committed Oct 21, 2023
commit 6c049e4280f9128f17d3ae0491dfa89a3c9b1619
33 changes: 16 additions & 17 deletions src/ffmpeg_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,6 @@ impl Ffmpeg {

if is_video_record {
if !is_wayland() {
let mut move_command = Command::new("mv");
move_command.args([
self.saved_filename.as_ref().unwrap().as_str(),
if is_audio_record {
video_filename.as_str()
} else {
self.saved_filename.as_ref().unwrap()
},
]);
move_command.output().unwrap();
} else {
// convert webm to specified format
Command::new("ffmpeg")
.args([
Expand All @@ -285,8 +274,19 @@ impl Ffmpeg {
])
.output()
.unwrap();
} else {
let mut move_command = Command::new("mv");
move_command.args([
self.saved_filename.as_ref().unwrap().as_str(),
if is_audio_record {
video_filename.as_str()
} else {
self.saved_filename.as_ref().unwrap()
},
]);
move_command.output().unwrap();
}
// if audio record, then merge video with audio
// if audio record, then merge video and audio
if is_audio_record {
Command::new("ffmpeg")
.args([
Expand All @@ -303,14 +303,13 @@ impl Ffmpeg {
self.saved_filename.as_ref().unwrap(),
"-y",
])
.spawn()
.expect("failed to merge video with audio")
.wait()
.unwrap();
.output()
.expect("failed to merge video and audio");

std::fs::remove_file(video_filename).unwrap();
std::fs::remove_file(audio_filename).unwrap();
}

std::fs::remove_file(video_filename).unwrap();
}
// if only audio is recording then convert it to chosen format
else if is_audio_record {
Expand Down