remove unused class

This commit is contained in:
Erica Z 2024-10-18 21:54:12 +02:00
parent 749b66417d
commit d43857646d

View file

@ -4,15 +4,6 @@ enum PlaybinState {
PLAYING,
}
private class SourceFuncWrapper {
public SourceFunc inner;
public SourceFuncWrapper () {
this.inner = null;
}
}
class Playbin : GLib.Object {
private Mpv.Handle mpv = new Mpv.Handle ();
@ -22,8 +13,12 @@ class Playbin : GLib.Object {
public int volume {
get { return _volume; }
set {
_volume = value;
assert (mpv.set_property_int64 ("volume", value) >= 0);
var ret = mpv.set_property_int64 ("volume", value);
if (ret >= 0) {
_volume = value;
} else {
warning ("failed to set volume: %s", ret.to_string ());
}
}
}
@ -31,8 +26,12 @@ class Playbin : GLib.Object {
public bool mute {
get { return _mute; }
set {
_mute = value;
assert (mpv.set_property_flag ("mute", value) >= 0);
var ret = mpv.set_property_flag ("mute", value);
if (ret >= 0) {
_mute = value;
} else {
warning ("failed to set mute status: %s", ret.to_string ());
}
}
}
@ -162,7 +161,7 @@ class Playbin : GLib.Object {
// 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\n", ret, ret.to_string());
GLib.debug ("failed to set state to paused (%d): %s", ret, ret.to_string());
}
}
@ -172,7 +171,7 @@ class Playbin : GLib.Object {
GLib.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\n", ret, ret.to_string());
GLib.debug ("failed to set state to playing (%d): %s", ret, ret.to_string());
}
}