mini style

This commit is contained in:
psykose 2024-10-19 05:09:24 +02:00
parent 8bf0e13ba9
commit 08611f9b6a

View file

@ -172,21 +172,21 @@ class Playbin : GLib.Object {
public void pause () {
assert (this.state != PlaybinState.STOPPED);
this.state = PlaybinState.PAUSED;
GLib.debug ("setting state to paused");
debug ("setting state to paused");
// TODO: abstract away this handling around mpv api a bit for auto debug printing
var ret = this.mpv.set_property_flag("pause", true);
if (ret != 0) {
GLib.debug ("failed to set state to paused (%d): %s", ret, ret.to_string());
debug (@"failed to set state to paused ($(ret)): $(ret.to_string())");
}
}
public void play () {
assert (this.state != PlaybinState.STOPPED);
this.state = PlaybinState.PLAYING;
GLib.debug ("setting state to playing");
debug ("setting state to playing");
var ret = this.mpv.set_property_flag("pause", false);
if (ret != 0) {
GLib.debug ("failed to set state to playing (%d): %s", ret, ret.to_string());
debug (@"failed to set state to playing ($(ret)): $(ret.to_string())");
}
}