Skip to content

Commit

Permalink
fix: increase PLAY_CALLBACK_STEP to prevent dbus flood
Browse files Browse the repository at this point in the history
  • Loading branch information
Rirusha committed Jul 2, 2024
1 parent 74db83a commit e3fd50c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/player/player.vala
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public class Cassette.Client.Player.Player : Object {

public Mode mode { get; private set; }

const double PLAY_CALLBACK_STEP = 0.1;
const double PLAY_CALLBACK_STEP = 1.0;

string play_id { get; set; default = ""; }

Expand Down Expand Up @@ -271,6 +271,8 @@ public class Cassette.Client.Player.Player : Object {
void reset_play () {
play_id = Uuid.string_random ();
total_played_seconds = 0.0;

update_can_go ();
}

void init (string[]? args) {
Expand All @@ -282,6 +284,7 @@ public class Cassette.Client.Player.Player : Object {
ms = 0;
}

update_can_go ();
playbin.seek_simple (Gst.Format.TIME, Gst.SeekFlags.FLUSH | Gst.SeekFlags.KEY_UNIT, ms * Gst.MSECOND);
}

Expand Down

0 comments on commit e3fd50c

Please sign in to comment.