summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorJens Georg <jensg@openismus.com>2012-12-01 22:52:38 +0100
committerJens Georg <jensg@openismus.com>2012-12-06 08:08:53 +0100
commite6dd17a6581eb63d5fdcb1edd76b7011a36f9060 (patch)
tree3787d526da6f2a0110b55a5ca4920425a49ec336 /examples
parenta6ae6de0bb95b1feec289673b08bb3e43caa787d (diff)
downloadrygel-e6dd17a6581eb63d5fdcb1edd76b7011a36f9060.tar.gz
renderer: Check player if it can do time-seek
Diffstat (limited to 'examples')
-rw-r--r--examples/renderer-plugins/C/example-player.c12
-rw-r--r--examples/renderer-plugins/vala/example-player-vala.vala2
2 files changed, 14 insertions, 0 deletions
diff --git a/examples/renderer-plugins/C/example-player.c b/examples/renderer-plugins/C/example-player.c
index 25c4cfb9..430fae81 100644
--- a/examples/renderer-plugins/C/example-player.c
+++ b/examples/renderer-plugins/C/example-player.c
@@ -25,6 +25,7 @@ enum {
RYGEL_EXAMPLE_PLAYER_PLAYBACK_STATE,
RYGEL_EXAMPLE_PLAYER_URI,
RYGEL_EXAMPLE_PLAYER_MIME_TYPE,
+ RYGEL_EXAMPLE_PLAYER_CAN_SEEK,
RYGEL_EXAMPLE_PLAYER_METADATA,
RYGEL_EXAMPLE_PLAYER_CONTENT_FEATURES,
RYGEL_EXAMPLE_PLAYER_VOLUME,
@@ -192,6 +193,14 @@ rygel_example_player_class_init (RygelExamplePlayerClass *klass) {
G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
g_object_class_install_property (gobject_class,
+ RYGEL_EXAMPLE_PLAYER_CAN_SEEK,
+ g_param_spec_boolean ("can-seek",
+ "can-seek",
+ "can-seek",
+ FALSE,
+ G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
+
+ g_object_class_install_property (gobject_class,
RYGEL_EXAMPLE_PLAYER_CONTENT_FEATURES,
g_param_spec_string ("content-features",
"content-features",
@@ -434,6 +443,9 @@ _rygel_example_player_get_property (GObject *object, guint property_id, GValue *
case RYGEL_EXAMPLE_PLAYER_POSITION:
g_value_set_int64 (value, rygel_media_player_get_position (base));
break;
+ case RYGEL_EXAMPLE_PLAYER_CAN_SEEK:
+ g_value_set_boolean (value, FALSE);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
diff --git a/examples/renderer-plugins/vala/example-player-vala.vala b/examples/renderer-plugins/vala/example-player-vala.vala
index 04a5a042..a79817b6 100644
--- a/examples/renderer-plugins/vala/example-player-vala.vala
+++ b/examples/renderer-plugins/vala/example-player-vala.vala
@@ -99,6 +99,8 @@ public class Rygel.Example.PlayerVala : GLib.Object, Rygel.MediaPlayer {
}
}
+ public bool can_seek { get { return false; } }
+
private string _content_features = "";
public string? content_features {
owned get {