RygelMediaItem

RygelMediaItem — Represents a media item (Music, Video or Image).

Functions

Properties

gchar * description Read / Write
gchar * dlna-profile Read / Write
gchar * mime-type Read / Write
GUPnPOCMFlags ocm-flags Read
gboolean place-holder Read / Write
gint64 size Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── RygelMediaObject
        ╰── RygelMediaItem
            ├── RygelAudioItem
            ├── RygelImageItem
            ╰── RygelPlaylistItem

Known Derived Interfaces

RygelMediaItem is required by RygelTrackableItem and RygelVisualItem.

Description

These objects correspond to items in the UPnP ContentDirectory's DIDL-Lite XML.

Functions

RYGEL_TYPE_MEDIA_ITEM

#define RYGEL_TYPE_MEDIA_ITEM (rygel_media_item_get_type ())

The type for RygelMediaItem.


rygel_media_item_create_stream_source ()

RygelDataSource *
rygel_media_item_create_stream_source (RygelMediaItem *self,
                                       const gchar *host_ip);

Parameters

self

the RygelMediaItem instance

 

host_ip

 

 

rygel_media_item_is_live_stream ()

gboolean
rygel_media_item_is_live_stream (RygelMediaItem *self);

Parameters

self

the RygelMediaItem instance

 

rygel_media_item_streamable ()

gboolean
rygel_media_item_streamable (RygelMediaItem *self);

Parameters

self

the RygelMediaItem instance

 

rygel_media_item_get_protocol_info ()

GUPnPProtocolInfo *
rygel_media_item_get_protocol_info (RygelMediaItem *self,
                                    const gchar *uri,
                                    const gchar *protocol);

Parameters

self

the RygelMediaItem instance

 

uri

 

 

protocol

 

 

rygel_media_item_add_resources ()

void
rygel_media_item_add_resources (RygelMediaItem *self,
                                GUPnPDIDLLiteItem *didl_item,
                                gboolean allow_internal,
                                GError **error);

Parameters

self

the RygelMediaItem instance

 

didl_item

 

 

allow_internal

 

 

error

location to store the error occuring, or NULL to ignore

 

rygel_media_item_get_mime_type ()

const gchar *
rygel_media_item_get_mime_type (RygelMediaItem *self);

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

Parameters

self

the RygelMediaItem instance to query

 

Returns

the value of the "mime-type" property


rygel_media_item_set_mime_type ()

void
rygel_media_item_set_mime_type (RygelMediaItem *self,
                                const gchar *value);

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

Parameters

self

the RygelMediaItem instance to modify

 

value

the new value of the "mime-type" property

 

rygel_media_item_get_dlna_profile ()

const gchar *
rygel_media_item_get_dlna_profile (RygelMediaItem *self);

Get and return the current value of the "dlna-profile" property.

Parameters

self

the RygelMediaItem instance to query

 

Returns

the value of the "dlna-profile" property


rygel_media_item_set_dlna_profile ()

void
rygel_media_item_set_dlna_profile (RygelMediaItem *self,
                                   const gchar *value);

Set the value of the "dlna-profile" property to value .

Parameters

self

the RygelMediaItem instance to modify

 

value

the new value of the "dlna-profile" property

 

rygel_media_item_get_size ()

gint64
rygel_media_item_get_size (RygelMediaItem *self);

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

Parameters

self

the RygelMediaItem instance to query

 

Returns

the value of the "size" property


rygel_media_item_set_size ()

void
rygel_media_item_set_size (RygelMediaItem *self,
                           gint64 value);

Set the value of the "size" property to value .

Parameters

self

the RygelMediaItem instance to modify

 

value

the new value of the "size" property

 

rygel_media_item_get_place_holder ()

gboolean
rygel_media_item_get_place_holder (RygelMediaItem *self);

Get and return the current value of the "place-holder" property.

Parameters

self

the RygelMediaItem instance to query

 

Returns

the value of the "place-holder" property


rygel_media_item_set_place_holder ()

void
rygel_media_item_set_place_holder (RygelMediaItem *self,
                                   gboolean value);

Set the value of the "place-holder" property to value .

Parameters

self

the RygelMediaItem instance to modify

 

value

the new value of the "place-holder" property

 

rygel_media_item_get_description ()

const gchar *
rygel_media_item_get_description (RygelMediaItem *self);

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

Parameters

self

the RygelMediaItem instance to query

 

Returns

the value of the "description" property


rygel_media_item_set_description ()

void
rygel_media_item_set_description (RygelMediaItem *self,
                                  const gchar *value);

Set the value of the "description" property to value .

Parameters

self

the RygelMediaItem instance to modify

 

value

the new value of the "description" property

 

Types and Values

struct RygelMediaItem

struct RygelMediaItem;

Represents a media item (Music, Video or Image).

These objects correspond to items in the UPnP ContentDirectory's DIDL-Lite XML.


struct RygelMediaItemClass

struct RygelMediaItemClass {
	RygelMediaObjectClass parent_class;
	RygelDataSource* (*create_stream_source) (RygelMediaItem* self, const gchar* host_ip);
	gboolean (*streamable) (RygelMediaItem* self);
	void (*add_proxy_resources) (RygelMediaItem* self, RygelHTTPServer* server, GUPnPDIDLLiteItem* didl_item, GError** error);
	GUPnPProtocolInfo* (*get_protocol_info) (RygelMediaItem* self, const gchar* uri, const gchar* protocol);
	void (*add_resources) (RygelMediaItem* self, GUPnPDIDLLiteItem* didl_item, gboolean allow_internal, GError** error);
};

The class structure for RYGEL_TYPE_MEDIA_ITEM. All the fields in this structure are private and should never be accessed directly.

Members

RygelMediaObjectClass parent_class;

the parent class structure

 

create_stream_source ()

virtual method called by rygel_media_item_create_stream_source()

 

streamable ()

virtual method called by rygel_media_item_streamable()

 

add_proxy_resources ()

   

get_protocol_info ()

virtual method used internally

 

add_resources ()

virtual method used internally

 

Property Details

The “description” property

  “description”              gchar *

description.

Flags: Read / Write

Default value: NULL


The “dlna-profile” property

  “dlna-profile”             gchar *

dlna-profile.

Flags: Read / Write

Default value: NULL


The “mime-type” property

  “mime-type”                gchar *

mime-type.

Flags: Read / Write

Default value: NULL


The “ocm-flags” property

  “ocm-flags”                GUPnPOCMFlags

ocm-flags.

Flags: Read


The “place-holder” property

  “place-holder”             gboolean

place-holder.

Flags: Read / Write

Default value: FALSE


The “size” property

  “size”                     gint64

size.

Flags: Read / Write

Default value: 0