RygelMediaItem

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

Synopsis

#define             RYGEL_TYPE_MEDIA_ITEM
RygelDataSource *   rygel_media_item_create_stream_source
                                                        (RygelMediaItem *self,
                                                         const gchar *host_ip);
gboolean            rygel_media_item_is_live_stream     (RygelMediaItem *self);
gboolean            rygel_media_item_streamable         (RygelMediaItem *self);
void                rygel_media_item_add_uri            (RygelMediaItem *self,
                                                         const gchar *uri);
GUPnPProtocolInfo * rygel_media_item_get_protocol_info  (RygelMediaItem *self,
                                                         const gchar *uri,
                                                         const gchar *protocol);
void                rygel_media_item_add_resources      (RygelMediaItem *self,
                                                         GUPnPDIDLLiteItem *didl_item,
                                                         gboolean allow_internal,
                                                         GError **error);
const gchar *       rygel_media_item_get_date           (RygelMediaItem *self);
void                rygel_media_item_set_date           (RygelMediaItem *self,
                                                         const gchar *value);
const gchar *       rygel_media_item_get_creator        (RygelMediaItem *self);
void                rygel_media_item_set_creator        (RygelMediaItem *self,
                                                         const gchar *value);
const gchar *       rygel_media_item_get_mime_type      (RygelMediaItem *self);
void                rygel_media_item_set_mime_type      (RygelMediaItem *self,
                                                         const gchar *value);
const gchar *       rygel_media_item_get_dlna_profile   (RygelMediaItem *self);
void                rygel_media_item_set_dlna_profile   (RygelMediaItem *self,
                                                         const gchar *value);
gint64              rygel_media_item_get_size           (RygelMediaItem *self);
void                rygel_media_item_set_size           (RygelMediaItem *self,
                                                         gint64 value);
gboolean            rygel_media_item_get_place_holder   (RygelMediaItem *self);
void                rygel_media_item_set_place_holder   (RygelMediaItem *self,
                                                         gboolean value);
const gchar *       rygel_media_item_get_description    (RygelMediaItem *self);
void                rygel_media_item_set_description    (RygelMediaItem *self,
                                                         const gchar *value);
struct              RygelMediaItem;
struct              RygelMediaItemClass;

Object Hierarchy

  GObject
   +----RygelMediaObject
         +----RygelMediaItem
               +----RygelAudioItem
               +----RygelImageItem
               +----RygelPlaylistItem

Known Derived Interfaces

RygelMediaItem is required by RygelTrackableItem and RygelVisualItem.

Properties

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

Description

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

Details

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);

self :

the RygelMediaItem instance

host_ip :

 

rygel_media_item_is_live_stream ()

gboolean            rygel_media_item_is_live_stream     (RygelMediaItem *self);

self :

the RygelMediaItem instance

rygel_media_item_streamable ()

gboolean            rygel_media_item_streamable         (RygelMediaItem *self);

self :

the RygelMediaItem instance

rygel_media_item_add_uri ()

void                rygel_media_item_add_uri            (RygelMediaItem *self,
                                                         const gchar *uri);

self :

the RygelMediaItem instance

uri :

 

rygel_media_item_get_protocol_info ()

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

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);

self :

the RygelMediaItem instance

didl_item :

 

allow_internal :

 

error :

location to store the error occuring, or NULL to ignore

rygel_media_item_get_date ()

const gchar *       rygel_media_item_get_date           (RygelMediaItem *self);

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

self :

the RygelMediaItem instance to query

Returns :

the value of the "date" property

rygel_media_item_set_date ()

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

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

self :

the RygelMediaItem instance to modify

value :

the new value of the "date" property

rygel_media_item_get_creator ()

const gchar *       rygel_media_item_get_creator        (RygelMediaItem *self);

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

self :

the RygelMediaItem instance to query

Returns :

the value of the "creator" property

rygel_media_item_set_creator ()

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

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

self :

the RygelMediaItem instance to modify

value :

the new value of the "creator" property

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

self :

the RygelMediaItem instance to modify

value :

the new value of the "description" property

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_uri) (RygelMediaItem* self, const gchar* uri);
	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.

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_uri ()

virtual method called by rygel_media_item_add_uri()

add_proxy_resources ()

get_protocol_info ()

virtual method used internally

add_resources ()

virtual method used internally

Property Details

The "creator" property

  "creator"                  gchar*                : Read / Write

creator.

Default value: NULL


The "date" property

  "date"                     gchar*                : Read / Write

date.

Default value: NULL


The "description" property

  "description"              gchar*                : Read / Write

description.

Default value: NULL


The "dlna-profile" property

  "dlna-profile"             gchar*                : Read / Write

dlna-profile.

Default value: NULL


The "mime-type" property

  "mime-type"                gchar*                : Read / Write

mime-type.

Default value: NULL


The "ocm-flags" property

  "ocm-flags"                GUPnPOCMFlags         : Read

ocm-flags.


The "place-holder" property

  "place-holder"             gboolean              : Read / Write

place-holder.

Default value: FALSE


The "size" property

  "size"                     gint64                : Read / Write

size.

Default value: 0