## RygelMediaPlayer

RygelMediaPlayer — This interface maps UPnP AVTransport:2 methods to the plugin's specific implementation.

## Functions

gboolean | rygel_media_player_seek ()
gboolean | rygel_media_player_seek_bytes ()
gchar ** | rygel_media_player_get_protocols ()
gchar ** | rygel_media_player_get_mime_types ()
gdouble | rygel_media_player_play_speed_to_double ()
gchar * | rygel_media_player_get_playback_state ()
void | rygel_media_player_set_playback_state ()
gchar ** | rygel_media_player_get_allowed_playback_speeds ()
gchar * | rygel_media_player_get_playback_speed ()
void | rygel_media_player_set_playback_speed ()
gchar * | rygel_media_player_get_uri ()
void | rygel_media_player_set_uri ()
gdouble | rygel_media_player_get_volume ()
void | rygel_media_player_set_volume ()
gint64 | rygel_media_player_get_duration ()
gint64 | rygel_media_player_get_size ()
gchar * | rygel_media_player_get_metadata ()
void | rygel_media_player_set_metadata ()
gchar * | rygel_media_player_get_mime_type ()
void | rygel_media_player_set_mime_type ()
gboolean | rygel_media_player_get_can_seek ()
gboolean | rygel_media_player_get_can_seek_bytes ()
gchar * | rygel_media_player_get_content_features ()
void | rygel_media_player_set_content_features ()
gchar * | rygel_media_player_get_duration_as_str ()
gint64 | rygel_media_player_get_position ()
gint64 | rygel_media_player_get_byte_position ()
gchar * | rygel_media_player_get_position_as_str ()
gchar * | rygel_media_player_get_protocol_info ()

## Properties

GStrv | allowed-playback-speeds | Read
gint64 | byte-position | Read
gboolean | can-seek | Read
gboolean | can-seek-bytes | Read
gchar * | content-features | Read / Write
gint64 | duration | Read
gchar * | metadata | Read / Write
gchar * | mime-type | Read / Write
gchar * | playback-speed | Read / Write
gchar * | playback-state | Read / Write
gint64 | position | Read
gint64 | size | Read
gchar * | uri | Read / Write
gdouble | volume | Read / Write

## Types and Values

| RygelMediaPlayer
struct | RygelMediaPlayerIface

## Object Hierarchy

        GInterface
        ╰── RygelMediaPlayer

## Prerequisites

RygelMediaPlayer requires GObject.

## Description

This interface is useful only when implementing Rygel renderer plugins. Instances of this interface are retrieved from `rygel_media_renderer_plugin_get_player()`.

## Functions

### rygel_media_player_seek ()

    gboolean
    rygel_media_player_seek (RygelMediaPlayer *self,
                             gint64 time);

Seek to a point in the current media that is this many microseconds after the start.

#### Parameters

self | the RygelMediaPlayer instance |
time |  |

### rygel_media_player_seek_bytes ()

    gboolean
    rygel_media_player_seek_bytes (RygelMediaPlayer *self,
                                   gint64 bytes);

Seek to a byte position in the current media.

#### Parameters

self | the RygelMediaPlayer instance |
bytes |  |

### rygel_media_player_get_protocols ()

    gchar **
    rygel_media_player_get_protocols (RygelMediaPlayer *self,
                                      int *result_length1);

Return the protocols supported by this renderer, such as "http-get" and "rtsp".

#### Parameters

self | the RygelMediaPlayer instance |

#### Returns

.

[array length=result_length1]

### rygel_media_player_get_mime_types ()

    gchar **
    rygel_media_player_get_mime_types (RygelMediaPlayer *self,
                                       int *result_length1);

#### Parameters

self | the RygelMediaPlayer instance |

#### Returns

.

[array length=result_length1]

### rygel_media_player_play_speed_to_double ()

    gdouble
    rygel_media_player_play_speed_to_double
                                   (RygelMediaPlayer *self,
                                    const gchar *speed);

Transform a fractional playspeed (e.g. "-1/4") to double. Input values are expected to be valid rational numbers.

#### Parameters

self | the RygelMediaPlayer instance |
speed |  |

### rygel_media_player_get_playback_state ()

    gchar *
    rygel_media_player_get_playback_state (RygelMediaPlayer *self);

Get and return the current value of the "playback-state" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "playback-state" property

### rygel_media_player_set_playback_state ()

    void
    rygel_media_player_set_playback_state (RygelMediaPlayer *self,
                                           const gchar *value);

Set the value of the "playback-state" property to `value` .

#### Parameters

self | the RygelMediaPlayer instance to modify |
value | the new value of the "playback-state" property |

### rygel_media_player_get_allowed_playback_speeds ()

    gchar **
    rygel_media_player_get_allowed_playback_speeds
                                   (RygelMediaPlayer *self,
                                    int *result_length1);

Get and return the current value of the "allowed-playback-speeds" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "allowed-playback-speeds" property

### rygel_media_player_get_playback_speed ()

    gchar *
    rygel_media_player_get_playback_speed (RygelMediaPlayer *self);

Get and return the current value of the "playback-speed" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "playback-speed" property

### rygel_media_player_set_playback_speed ()

    void
    rygel_media_player_set_playback_speed (RygelMediaPlayer *self,
                                           const gchar *value);

Set the value of the "playback-speed" property to `value` .

#### Parameters

self | the RygelMediaPlayer instance to modify |
value | the new value of the "playback-speed" property |

### rygel_media_player_get_uri ()

    gchar *
    rygel_media_player_get_uri (RygelMediaPlayer *self);

Get and return the current value of the "uri" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "uri" property

### rygel_media_player_set_uri ()

    void
    rygel_media_player_set_uri (RygelMediaPlayer *self,
                                const gchar *value);

Set the value of the "uri" property to `value` .

#### Parameters

self | the RygelMediaPlayer instance to modify |
value | the new value of the "uri" property |

### rygel_media_player_get_volume ()

    gdouble
    rygel_media_player_get_volume (RygelMediaPlayer *self);

Get and return the current value of the "volume" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "volume" property

### rygel_media_player_set_volume ()

    void
    rygel_media_player_set_volume (RygelMediaPlayer *self,
                                   gdouble value);

Set the value of the "volume" property to `value` .

#### Parameters

self | the RygelMediaPlayer instance to modify |
value | the new value of the "volume" property |

### rygel_media_player_get_duration ()

    gint64
    rygel_media_player_get_duration (RygelMediaPlayer *self);

Get and return the current value of the "duration" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "duration" property

### rygel_media_player_get_size ()

    gint64
    rygel_media_player_get_size (RygelMediaPlayer *self);

Get and return the current value of the "size" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "size" property

### rygel_media_player_get_metadata ()

    gchar *
    rygel_media_player_get_metadata (RygelMediaPlayer *self);

Get and return the current value of the "metadata" property.

A DIDLLite document describing the current media URI or null. The document is either the one received from a UPnP control point or one generated by the implementing class.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "metadata" property

### rygel_media_player_set_metadata ()

    void
    rygel_media_player_set_metadata (RygelMediaPlayer *self,
                                     const gchar *value);

Set the value of the "metadata" property to `value` .

A DIDLLite document describing the current media URI or null. The document is either the one received from a UPnP control point or one generated by the implementing class.

#### Parameters

self | the RygelMediaPlayer instance to modify |
value | the new value of the "metadata" property |

### rygel_media_player_get_mime_type ()

    gchar *
    rygel_media_player_get_mime_type (RygelMediaPlayer *self);

Get and return the current value of the "mime-type" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "mime-type" property

### rygel_media_player_set_mime_type ()

    void
    rygel_media_player_set_mime_type (RygelMediaPlayer *self,
                                      const gchar *value);

Set the value of the "mime-type" property to `value` .

#### Parameters

self | the RygelMediaPlayer instance to modify |
value | the new value of the "mime-type" property |

### rygel_media_player_get_can_seek ()

    gboolean
    rygel_media_player_get_can_seek (RygelMediaPlayer *self);

Get and return the current value of the "can-seek" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "can-seek" property

### rygel_media_player_get_can_seek_bytes ()

    gboolean
    rygel_media_player_get_can_seek_bytes (RygelMediaPlayer *self);

Get and return the current value of the "can-seek-bytes" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "can-seek-bytes" property

### rygel_media_player_get_content_features ()

    gchar *
    rygel_media_player_get_content_features
                                   (RygelMediaPlayer *self);

Get and return the current value of the "content-features" property.

The contents of the contentFeatures.dlna.org HTTP header, containing the 4th field of the protocol info for the current media URI. Or null if the header does not exist or the media does not have DLNA information attached.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "content-features" property

### rygel_media_player_set_content_features ()

    void
    rygel_media_player_set_content_features
                                   (RygelMediaPlayer *self,
                                    const gchar *value);

Set the value of the "content-features" property to `value` .

The contents of the contentFeatures.dlna.org HTTP header, containing the 4th field of the protocol info for the current media URI. Or null if the header does not exist or the media does not have DLNA information attached.

#### Parameters

self | the RygelMediaPlayer instance to modify |
value | the new value of the "content-features" property |

### rygel_media_player_get_duration_as_str ()

    gchar *
    rygel_media_player_get_duration_as_str
                                   (RygelMediaPlayer *self);

Get and return the current value of the "duration-as-str" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "duration-as-str" property

### rygel_media_player_get_position ()

    gint64
    rygel_media_player_get_position (RygelMediaPlayer *self);

Get and return the current value of the "position" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "position" property

### rygel_media_player_get_byte_position ()

    gint64
    rygel_media_player_get_byte_position (RygelMediaPlayer *self);

Get and return the current value of the "byte-position" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "byte-position" property

### rygel_media_player_get_position_as_str ()

    gchar *
    rygel_media_player_get_position_as_str
                                   (RygelMediaPlayer *self);

Get and return the current value of the "position-as-str" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "position-as-str" property

### rygel_media_player_get_protocol_info ()

    gchar *
    rygel_media_player_get_protocol_info (RygelMediaPlayer *self);

Get and return the current value of the "protocol-info" property.

#### Parameters

self | the RygelMediaPlayer instance to query |

#### Returns

the value of the "protocol-info" property

## Types and Values

### RygelMediaPlayer

    typedef struct _RygelMediaPlayer RygelMediaPlayer;

This interface maps UPnP AVTransport:2 methods to the plugin's specific implementation.

This interface is useful only when implementing Rygel renderer plugins. Instances of this interface are retrieved from `rygel_media_renderer_plugin_get_player()`.

### struct RygelMediaPlayerIface

    struct RygelMediaPlayerIface {
    	GTypeInterface parent_iface;
    	gboolean (*seek) (RygelMediaPlayer* self, gint64 time);
    	gboolean (*seek_bytes) (RygelMediaPlayer* self, gint64 bytes);
    	gchar** (*get_protocols) (RygelMediaPlayer* self, int* result_length1);
    	gchar** (*get_mime_types) (RygelMediaPlayer* self, int* result_length1);
    	gchar* (*get_playback_state) (RygelMediaPlayer* self);
    	void (*set_playback_state) (RygelMediaPlayer* self, const gchar* value);
    	gchar** (*get_allowed_playback_speeds) (RygelMediaPlayer* self, int* result_length1);
    	gchar* (*get_playback_speed) (RygelMediaPlayer* self);
    	void (*set_playback_speed) (RygelMediaPlayer* self, const gchar* value);
    	gchar* (*get_uri) (RygelMediaPlayer* self);
    	void (*set_uri) (RygelMediaPlayer* self, const gchar* value);
    	gdouble (*get_volume) (RygelMediaPlayer* self);
    	void (*set_volume) (RygelMediaPlayer* self, gdouble value);
    	gint64 (*get_duration) (RygelMediaPlayer* self);
    	gint64 (*get_size) (RygelMediaPlayer* self);
    	gchar* (*get_metadata) (RygelMediaPlayer* self);
    	void (*set_metadata) (RygelMediaPlayer* self, const gchar* value);
    	gchar* (*get_mime_type) (RygelMediaPlayer* self);
    	void (*set_mime_type) (RygelMediaPlayer* self, const gchar* value);
    	gboolean (*get_can_seek) (RygelMediaPlayer* self);
    	gboolean (*get_can_seek_bytes) (RygelMediaPlayer* self);
    	gchar* (*get_content_features) (RygelMediaPlayer* self);
    	void (*set_content_features) (RygelMediaPlayer* self, const gchar* value);
    	gint64 (*get_position) (RygelMediaPlayer* self);
    	gint64 (*get_byte_position) (RygelMediaPlayer* self);
    };

Interface for creating RygelMediaPlayer implementations.

#### Members

GTypeInterface `parent_iface`; | the parent interface structure |
`seek` () | virtual method called by `rygel_media_player_seek()` |
`seek_bytes` () | virtual method called by `rygel_media_player_seek_bytes()` |
`get_protocols` () | virtual method called by `rygel_media_player_get_protocols()` |
`get_mime_types` () | virtual method called by `rygel_media_player_get_mime_types()` |
`get_playback_state` () | getter method for the abstract property "playback-state" |
`set_playback_state` () | setter method for the abstract property "playback-state" |
`get_allowed_playback_speeds` () | getter method for the abstract property "allowed-playback-speeds" |
`get_playback_speed` () | getter method for the abstract property "playback-speed" |
`set_playback_speed` () | setter method for the abstract property "playback-speed" |
`get_uri` () | getter method for the abstract property "uri" |
`set_uri` () | setter method for the abstract property "uri" |
`get_volume` () | getter method for the abstract property "volume" |
`set_volume` () | setter method for the abstract property "volume" |
`get_duration` () | getter method for the abstract property "duration" |
`get_size` () | getter method for the abstract property "size" |
`get_metadata` () | getter method for the abstract property "metadata" |
`set_metadata` () | setter method for the abstract property "metadata" |
`get_mime_type` () | getter method for the abstract property "mime-type" |
`set_mime_type` () | setter method for the abstract property "mime-type" |
`get_can_seek` () | getter method for the abstract property "can-seek" |
`get_can_seek_bytes` () | getter method for the abstract property "can-seek-bytes" |
`get_content_features` () | getter method for the abstract property "content-features" |
`set_content_features` () | setter method for the abstract property "content-features" |
`get_position` () | getter method for the abstract property "position" |
`get_byte_position` () | getter method for the abstract property "byte-position" |

## Property Details

### The `“allowed-playback-speeds”` property

      “allowed-playback-speeds”  GStrv

allowed-playback-speeds.

Flags: Read

### The `“byte-position”` property

      “byte-position”            gint64

byte-position.

Flags: Read

Default value: 0

### The `“can-seek”` property

      “can-seek”                 gboolean

can-seek.

Flags: Read

Default value: FALSE

### The `“can-seek-bytes”` property

      “can-seek-bytes”           gboolean

can-seek-bytes.

Flags: Read

Default value: FALSE

### The `“content-features”` property

      “content-features”         gchar *

The contents of the contentFeatures.dlna.org HTTP header, containing the 4th field of the protocol info for the current media URI. Or null if the header does not exist or the media does not have DLNA information attached.

Flags: Read / Write

Default value: NULL

### The `“duration”` property

      “duration”                 gint64

duration.

Flags: Read

Default value: 0

### The `“metadata”` property

      “metadata”                 gchar *

A DIDLLite document describing the current media URI or null. The document is either the one received from a UPnP control point or one generated by the implementing class.

Flags: Read / Write

Default value: NULL

### The `“mime-type”` property

      “mime-type”                gchar *

mime-type.

Flags: Read / Write

Default value: NULL

### The `“playback-speed”` property

      “playback-speed”           gchar *

playback-speed.

Flags: Read / Write

Default value: NULL

### The `“playback-state”` property

      “playback-state”           gchar *

playback-state.

Flags: Read / Write

Default value: NULL

### The `“position”` property

      “position”                 gint64

position.

Flags: Read

Default value: 0

### The `“size”` property

      “size”                     gint64

size.

Flags: Read

Default value: 0

### The `“uri”` property

      “uri”                      gchar *

uri.

Flags: Read / Write

Default value: NULL

### The `“volume”` property

      “volume”                   gdouble

volume.

Flags: Read / Write

Default value: 0