Skip to content

Commit 1b8ab2c

Browse files
committed
feat: tweaking stuff
1 parent 9837afb commit 1b8ab2c

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/gui/ui/elements/video_track.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ constexpr int GRABS_THICKNESS = 1;
77
constexpr int GRABS_LENGTH = 5;
88
constexpr gfx::Color GRABS_COLOR(80, 80, 80);
99
constexpr gfx::Color GRABS_ACTIVE_COLOR(175, 175, 175);
10-
constexpr gfx::Size GRAB_CLICK_EXPANSION(20, 5);
10+
constexpr gfx::Size GRAB_CLICK_EXPANSION(15, 5);
1111

1212
namespace {
1313
std::unordered_map<std::string, std::vector<int16_t>> waveforms;
@@ -180,7 +180,9 @@ bool ui::update_video_track(const Container& container, AnimatedElement& element
180180
if (keys::is_mouse_down()) {
181181
grab.anim.set_goal(1.f);
182182

183-
float mouse_percent = rect.mouse_percent_x();
183+
float mouse_percent =
184+
rect.mouse_percent_x(); // TODO: when you initially click it if you arent exactly at the right spot
185+
// itll shift the grab a little which is annoying
184186

185187
grab.percent_anim.set_goal(mouse_percent);
186188

src/gui/ui/helpers/video.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,12 +152,16 @@ void VideoPlayer::initialize_mpv() {
152152
throw std::runtime_error("MPV context creation failed");
153153
}
154154

155-
// configure mpv
156-
mpv_set_option_string(m_mpv, "vo", "libmpv");
157-
mpv_set_option_string(m_mpv, "hwdec", "auto-safe"); // enable hardware decoding
158-
mpv_set_option_string(m_mpv, "profile", "gpu-hq"); // high quality profile
159-
mpv_set_option_string(m_mpv, "keep-open", "yes");
160-
mpv_set_option_string(m_mpv, "mute", "yes");
155+
// required
156+
mpv_set_option_string(
157+
m_mpv, "vo", "libmpv"
158+
); // note: this is slower than gpu, but cant do anything abt it - https://github.com/mpv-player/mpv/issues/6829
159+
160+
// options
161+
mpv_set_option_string(m_mpv, "hwdec", "yes");
162+
mpv_set_option_string(m_mpv, "profile", "fast");
163+
mpv_set_option_string(m_mpv, "keep-open", "yes"); // dont close when finished
164+
// mpv_set_option_string(m_mpv, "mute", "yes");
161165

162166
int result = mpv_initialize(m_mpv);
163167
if (result < 0) {

0 commit comments

Comments
 (0)