2 * Copyright (C) 2008 OpenedHand Ltd.
3 * Copyright (C) 2009,2010 Nokia Corporation.
4 * Copyright (C) 2012 Intel Corporation.
6 * Author: Jorn Baayen <jorn@openedhand.com>
7 * Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
8 * <zeeshan.ali@nokia.com>
10 * Rygel is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * Rygel is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 * Interface for mapping AVTransport:2 methods to the specific implementation.
28 * This class is useful only when implementing Rygel plugins.
30 public interface Rygel.MediaPlayer : GLib.Object {
31 public abstract string playback_state { owned get; set; }
32 public abstract string? uri { owned get; set; }
33 public abstract double volume { get; set; }
35 /// Duration of the current media in microseconds
36 public abstract int64 duration { get; }
37 public abstract string? metadata { owned get; set; }
38 public abstract string? mime_type { owned get; set; }
39 public abstract string? content_features { owned get; set; }
40 public string duration_as_str {
42 return TimeUtils.time_to_string (duration);
46 /// Position in the current media in microseconds
47 public abstract int64 position { get; }
48 public string position_as_str {
50 return TimeUtils.time_to_string (position);
54 public abstract bool seek (int64 time);
55 public abstract string[] get_protocols ();
56 public abstract string[] get_mime_types ();