remove unused class
This commit is contained in:
parent
749b66417d
commit
d43857646d
1 changed files with 14 additions and 15 deletions
|
@ -4,15 +4,6 @@ enum PlaybinState {
|
||||||
PLAYING,
|
PLAYING,
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SourceFuncWrapper {
|
|
||||||
public SourceFunc inner;
|
|
||||||
|
|
||||||
public SourceFuncWrapper () {
|
|
||||||
this.inner = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class Playbin : GLib.Object {
|
class Playbin : GLib.Object {
|
||||||
private Mpv.Handle mpv = new Mpv.Handle ();
|
private Mpv.Handle mpv = new Mpv.Handle ();
|
||||||
|
|
||||||
|
@ -22,8 +13,12 @@ class Playbin : GLib.Object {
|
||||||
public int volume {
|
public int volume {
|
||||||
get { return _volume; }
|
get { return _volume; }
|
||||||
set {
|
set {
|
||||||
|
var ret = mpv.set_property_int64 ("volume", value);
|
||||||
|
if (ret >= 0) {
|
||||||
_volume = value;
|
_volume = value;
|
||||||
assert (mpv.set_property_int64 ("volume", value) >= 0);
|
} else {
|
||||||
|
warning ("failed to set volume: %s", ret.to_string ());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +26,12 @@ class Playbin : GLib.Object {
|
||||||
public bool mute {
|
public bool mute {
|
||||||
get { return _mute; }
|
get { return _mute; }
|
||||||
set {
|
set {
|
||||||
|
var ret = mpv.set_property_flag ("mute", value);
|
||||||
|
if (ret >= 0) {
|
||||||
_mute = value;
|
_mute = value;
|
||||||
assert (mpv.set_property_flag ("mute", value) >= 0);
|
} 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
|
// TODO: abstract away this handling around mpv api a bit for auto debug printing
|
||||||
var ret = this.mpv.set_property_flag("pause", true);
|
var ret = this.mpv.set_property_flag("pause", true);
|
||||||
if (ret != 0) {
|
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");
|
GLib.debug ("setting state to playing");
|
||||||
var ret = this.mpv.set_property_flag("pause", false);
|
var ret = this.mpv.set_property_flag("pause", false);
|
||||||
if (ret != 0) {
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue