Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ////// dbus-service
- [DBus (name = "org.mpris.MediaPlayer2.Player")]
- public class MprisPlayer : GLib.Object {
- ....
- public int64 position {
- get {
- ///// запрашивает единожды и потом возвращает одно и тоже значение. Почему?
- return player.position / Constants.MILI_INV;
- }
- }
- ....
- }
- ///////
- public class Player : GLib.Object {
- public int64 position {
- set {
- playbin.seek_simple (fmt, Gst.SeekFlags.FLUSH, value);
- }
- get {
- int64 d = 0;
- playbin.query_position (fmt, out d);
- return d;
- }
- }
- }
- //////// dbus-client
- [DBus (name="org.mpris.MediaPlayer2.Player")]
- public interface PlayerIface : MprisIface {
- public abstract int64 position { get; }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement