RygelMediaResource: librygel-server Reference Manual

## RygelMediaResource RygelMediaResource — Represents a media resource (Music, Video, Image, etc). |

## Functions

RygelMediaResource * | rygel_media_resource_dup ()
gchar * | rygel_media_resource_get_name ()
GUPnPDIDLLiteResource * | rygel_media_resource_serialize ()
void | rygel_media_resource_set_protocol_info ()
GUPnPProtocolInfo * | rygel_media_resource_get_protocol_info ()
gboolean | rygel_media_resource_supports_arbitrary_byte_seek ()
gboolean | rygel_media_resource_supports_arbitrary_time_seek ()
gboolean | rygel_media_resource_supports_limited_byte_seek ()
gboolean | rygel_media_resource_supports_limited_time_seek ()
gboolean | rygel_media_resource_supports_limited_cleartext_byte_seek ()
gboolean | rygel_media_resource_supports_full_cleartext_byte_seek ()
gboolean | rygel_media_resource_is_link_protection_enabled ()
gboolean | rygel_media_resource_is_dlna_content ()
gchar * | rygel_media_resource_get_default_transfer_mode ()
gboolean | rygel_media_resource_supports_transfer_mode ()
gboolean | rygel_media_resource_is_streamable ()
gboolean | rygel_media_resource_is_cleartext_range_support_enabled ()
gboolean | rygel_media_resource_supports_playspeed ()
gboolean | rygel_media_resource_is_dlna_protocol_flag_set ()
gboolean | rygel_media_resource_is_dlna_operation_mode_set ()
gchar * | rygel_media_resource_to_string ()
RygelMediaResource * | rygel_media_resource_new ()
RygelMediaResource * | rygel_media_resource_new_from_resource ()
RygelMediaResource * | rygel_media_resource_new_from_didl_lite_resource ()
const gchar * | rygel_media_resource_get_uri ()
void | rygel_media_resource_set_uri ()
const gchar * | rygel_media_resource_get_import_uri ()
void | rygel_media_resource_set_import_uri ()
const gchar * | rygel_media_resource_get_extension ()
void | rygel_media_resource_set_extension ()
gint64 | rygel_media_resource_get_size ()
void | rygel_media_resource_set_size ()
gint64 | rygel_media_resource_get_cleartext_size ()
void | rygel_media_resource_set_cleartext_size ()
glong | rygel_media_resource_get_duration ()
void | rygel_media_resource_set_duration ()
gint | rygel_media_resource_get_bitrate ()
void | rygel_media_resource_set_bitrate ()
gint | rygel_media_resource_get_bits_per_sample ()
void | rygel_media_resource_set_bits_per_sample ()
gint | rygel_media_resource_get_color_depth ()
void | rygel_media_resource_set_color_depth ()
gint | rygel_media_resource_get_width ()
void | rygel_media_resource_set_width ()
gint | rygel_media_resource_get_height ()
void | rygel_media_resource_set_height ()
gint | rygel_media_resource_get_audio_channels ()
void | rygel_media_resource_set_audio_channels ()
gint | rygel_media_resource_get_sample_freq ()
void | rygel_media_resource_set_sample_freq ()
const gchar * | rygel_media_resource_get_protocol ()
void | rygel_media_resource_set_protocol ()
const gchar * | rygel_media_resource_get_mime_type ()
void | rygel_media_resource_set_mime_type ()
const gchar * | rygel_media_resource_get_dlna_profile ()
void | rygel_media_resource_set_dlna_profile ()
const gchar * | rygel_media_resource_get_network ()
void | rygel_media_resource_set_network ()
GUPnPDLNAConversion | rygel_media_resource_get_dlna_conversion ()
void | rygel_media_resource_set_dlna_conversion ()
GUPnPDLNAFlags | rygel_media_resource_get_dlna_flags ()
void | rygel_media_resource_set_dlna_flags ()
GUPnPDLNAOperation | rygel_media_resource_get_dlna_operation ()
void | rygel_media_resource_set_dlna_operation ()

## Properties

gint | audio-channels | Read / Write
gint | bitrate | Read / Write
gint | bits-per-sample | Read / Write
gint64 | cleartext-size | Read / Write
gint | color-depth | Read / Write
GUPnPDLNAConversion | dlna-conversion | Read / Write
GUPnPDLNAFlags | dlna-flags | Read / Write
GUPnPDLNAOperation | dlna-operation | Read / Write
gchar * | dlna-profile | Read / Write
glong | duration | Read / Write
gchar * | extension | Read / Write
gint | height | Read / Write
gchar * | import-uri | Read / Write
gchar * | mime-type | Read / Write
gchar * | network | Read / Write
gchar * | protocol | Read / Write
gint | sample-freq | Read / Write
gint64 | size | Read / Write
gchar * | uri | Read / Write
gint | width | Read / Write

## Types and Values

#define | RYGEL_TYPE_MEDIA_RESOURCE
struct | RygelMediaResource
struct | RygelMediaResourceClass

## Object Hierarchy

        GObject
        ╰── RygelMediaResource

## Description

## Functions

### rygel_media_resource_dup ()

    RygelMediaResource *
    rygel_media_resource_dup (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_get_name ()

    gchar *
    rygel_media_resource_get_name (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_serialize ()

    GUPnPDIDLLiteResource *
    rygel_media_resource_serialize (RygelMediaResource *self,
                                    GUPnPDIDLLiteResource *didl_resource,
                                    GHashTable *replacements);

#### Parameters

self | the RygelMediaResource instance |
didl_resource |  |
replacements |  |

### rygel_media_resource_set_protocol_info ()

    void
    rygel_media_resource_set_protocol_info
                                   (RygelMediaResource *self,
                                    GUPnPProtocolInfo *pi);

#### Parameters

self | the RygelMediaResource instance |
pi |  |

### rygel_media_resource_get_protocol_info ()

    GUPnPProtocolInfo *
    rygel_media_resource_get_protocol_info
                                   (RygelMediaResource *self,
                                    GHashTable *replacements);

#### Parameters

self | the RygelMediaResource instance |
replacements |  |

### rygel_media_resource_supports_arbitrary_byte_seek ()

    gboolean
    rygel_media_resource_supports_arbitrary_byte_seek
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_supports_arbitrary_time_seek ()

    gboolean
    rygel_media_resource_supports_arbitrary_time_seek
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_supports_limited_byte_seek ()

    gboolean
    rygel_media_resource_supports_limited_byte_seek
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_supports_limited_time_seek ()

    gboolean
    rygel_media_resource_supports_limited_time_seek
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_supports_limited_cleartext_byte_seek ()

    gboolean
    rygel_media_resource_supports_limited_cleartext_byte_seek
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_supports_full_cleartext_byte_seek ()

    gboolean
    rygel_media_resource_supports_full_cleartext_byte_seek
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_is_link_protection_enabled ()

    gboolean
    rygel_media_resource_is_link_protection_enabled
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_is_dlna_content ()

    gboolean
    rygel_media_resource_is_dlna_content (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_get_default_transfer_mode ()

    gchar *
    rygel_media_resource_get_default_transfer_mode
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_supports_transfer_mode ()

    gboolean
    rygel_media_resource_supports_transfer_mode
                                   (RygelMediaResource *self,
                                    const gchar *transfer_mode);

#### Parameters

self | the RygelMediaResource instance |
transfer_mode |  |

### rygel_media_resource_is_streamable ()

    gboolean
    rygel_media_resource_is_streamable (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_is_cleartext_range_support_enabled ()

    gboolean
    rygel_media_resource_is_cleartext_range_support_enabled
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_supports_playspeed ()

    gboolean
    rygel_media_resource_supports_playspeed
                                   (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_is_dlna_protocol_flag_set ()

    gboolean
    rygel_media_resource_is_dlna_protocol_flag_set
                                   (RygelMediaResource *self,
                                    glong flags);

#### Parameters

self | the RygelMediaResource instance |
flags |  |

### rygel_media_resource_is_dlna_operation_mode_set ()

    gboolean
    rygel_media_resource_is_dlna_operation_mode_set
                                   (RygelMediaResource *self,
                                    glong flags);

#### Parameters

self | the RygelMediaResource instance |
flags |  |

### rygel_media_resource_to_string ()

    gchar *
    rygel_media_resource_to_string (RygelMediaResource *self);

#### Parameters

self | the RygelMediaResource instance |

### rygel_media_resource_new ()

    RygelMediaResource *
    rygel_media_resource_new (const gchar *name);

#### Parameters

name |  |

### rygel_media_resource_new_from_resource ()

    RygelMediaResource *
    rygel_media_resource_new_from_resource
                                   (const gchar *name,
                                    RygelMediaResource *that);

Copy constructor

#### Parameters

name |  |
that |  |

### rygel_media_resource_new_from_didl_lite_resource ()

    RygelMediaResource *
    rygel_media_resource_new_from_didl_lite_resource
                                   (const gchar *name,
                                    GUPnPDIDLLiteResource *didl_resource);

#### Parameters

name |  |
didl_resource |  |

### rygel_media_resource_get_uri ()

    const gchar *
    rygel_media_resource_get_uri (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "uri" property

### rygel_media_resource_set_uri ()

    void
    rygel_media_resource_set_uri (RygelMediaResource *self,
                                  const gchar *value);

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

#### Parameters

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

### rygel_media_resource_get_import_uri ()

    const gchar *
    rygel_media_resource_get_import_uri (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "import-uri" property

### rygel_media_resource_set_import_uri ()

    void
    rygel_media_resource_set_import_uri (RygelMediaResource *self,
                                         const gchar *value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "import-uri" property |

### rygel_media_resource_get_extension ()

    const gchar *
    rygel_media_resource_get_extension (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "extension" property

### rygel_media_resource_set_extension ()

    void
    rygel_media_resource_set_extension (RygelMediaResource *self,
                                        const gchar *value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "extension" property |

### rygel_media_resource_get_size ()

    gint64
    rygel_media_resource_get_size (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "size" property

### rygel_media_resource_set_size ()

    void
    rygel_media_resource_set_size (RygelMediaResource *self,
                                   gint64 value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "size" property |

### rygel_media_resource_get_cleartext_size ()

    gint64
    rygel_media_resource_get_cleartext_size
                                   (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "cleartext-size" property

### rygel_media_resource_set_cleartext_size ()

    void
    rygel_media_resource_set_cleartext_size
                                   (RygelMediaResource *self,
                                    gint64 value);

Set the value of the "cleartext-size" property to `value` .

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "cleartext-size" property |

### rygel_media_resource_get_duration ()

    glong
    rygel_media_resource_get_duration (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "duration" property

### rygel_media_resource_set_duration ()

    void
    rygel_media_resource_set_duration (RygelMediaResource *self,
                                       glong value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "duration" property |

### rygel_media_resource_get_bitrate ()

    gint
    rygel_media_resource_get_bitrate (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "bitrate" property

### rygel_media_resource_set_bitrate ()

    void
    rygel_media_resource_set_bitrate (RygelMediaResource *self,
                                      gint value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "bitrate" property |

### rygel_media_resource_get_bits_per_sample ()

    gint
    rygel_media_resource_get_bits_per_sample
                                   (RygelMediaResource *self);

Get and return the current value of the "bits-per-sample" property.

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "bits-per-sample" property

### rygel_media_resource_set_bits_per_sample ()

    void
    rygel_media_resource_set_bits_per_sample
                                   (RygelMediaResource *self,
                                    gint value);

Set the value of the "bits-per-sample" property to `value` .

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "bits-per-sample" property |

### rygel_media_resource_get_color_depth ()

    gint
    rygel_media_resource_get_color_depth (RygelMediaResource *self);

Get and return the current value of the "color-depth" property.

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "color-depth" property

### rygel_media_resource_set_color_depth ()

    void
    rygel_media_resource_set_color_depth (RygelMediaResource *self,
                                          gint value);

Set the value of the "color-depth" property to `value` .

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "color-depth" property |

### rygel_media_resource_get_width ()

    gint
    rygel_media_resource_get_width (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "width" property

### rygel_media_resource_set_width ()

    void
    rygel_media_resource_set_width (RygelMediaResource *self,
                                    gint value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "width" property |

### rygel_media_resource_get_height ()

    gint
    rygel_media_resource_get_height (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "height" property

### rygel_media_resource_set_height ()

    void
    rygel_media_resource_set_height (RygelMediaResource *self,
                                     gint value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "height" property |

### rygel_media_resource_get_audio_channels ()

    gint
    rygel_media_resource_get_audio_channels
                                   (RygelMediaResource *self);

Get and return the current value of the "audio-channels" property.

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "audio-channels" property

### rygel_media_resource_set_audio_channels ()

    void
    rygel_media_resource_set_audio_channels
                                   (RygelMediaResource *self,
                                    gint value);

Set the value of the "audio-channels" property to `value` .

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "audio-channels" property |

### rygel_media_resource_get_sample_freq ()

    gint
    rygel_media_resource_get_sample_freq (RygelMediaResource *self);

Get and return the current value of the "sample-freq" property.

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "sample-freq" property

### rygel_media_resource_set_sample_freq ()

    void
    rygel_media_resource_set_sample_freq (RygelMediaResource *self,
                                          gint value);

Set the value of the "sample-freq" property to `value` .

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "sample-freq" property |

### rygel_media_resource_get_protocol ()

    const gchar *
    rygel_media_resource_get_protocol (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "protocol" property

### rygel_media_resource_set_protocol ()

    void
    rygel_media_resource_set_protocol (RygelMediaResource *self,
                                       const gchar *value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "protocol" property |

### rygel_media_resource_get_mime_type ()

    const gchar *
    rygel_media_resource_get_mime_type (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "mime-type" property

### rygel_media_resource_set_mime_type ()

    void
    rygel_media_resource_set_mime_type (RygelMediaResource *self,
                                        const gchar *value);

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

#### Parameters

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

### rygel_media_resource_get_dlna_profile ()

    const gchar *
    rygel_media_resource_get_dlna_profile (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "dlna-profile" property

### rygel_media_resource_set_dlna_profile ()

    void
    rygel_media_resource_set_dlna_profile (RygelMediaResource *self,
                                           const gchar *value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "dlna-profile" property |

### rygel_media_resource_get_network ()

    const gchar *
    rygel_media_resource_get_network (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "network" property

### rygel_media_resource_set_network ()

    void
    rygel_media_resource_set_network (RygelMediaResource *self,
                                      const gchar *value);

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

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "network" property |

### rygel_media_resource_get_dlna_conversion ()

    GUPnPDLNAConversion
    rygel_media_resource_get_dlna_conversion
                                   (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "dlna-conversion" property

### rygel_media_resource_set_dlna_conversion ()

    void
    rygel_media_resource_set_dlna_conversion
                                   (RygelMediaResource *self,
                                    GUPnPDLNAConversion value);

Set the value of the "dlna-conversion" property to `value` .

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "dlna-conversion" property |

### rygel_media_resource_get_dlna_flags ()

    GUPnPDLNAFlags
    rygel_media_resource_get_dlna_flags (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "dlna-flags" property

### rygel_media_resource_set_dlna_flags ()

    void
    rygel_media_resource_set_dlna_flags (RygelMediaResource *self,
                                         GUPnPDLNAFlags value);

Set the value of the "dlna-flags" property to `value` .

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "dlna-flags" property |

### rygel_media_resource_get_dlna_operation ()

    GUPnPDLNAOperation
    rygel_media_resource_get_dlna_operation
                                   (RygelMediaResource *self);

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

#### Parameters

self | the RygelMediaResource instance to query |

#### Returns

the value of the "dlna-operation" property

### rygel_media_resource_set_dlna_operation ()

    void
    rygel_media_resource_set_dlna_operation
                                   (RygelMediaResource *self,
                                    GUPnPDLNAOperation value);

Set the value of the "dlna-operation" property to `value` .

#### Parameters

self | the RygelMediaResource instance to modify |
value | the new value of the "dlna-operation" property |

## Types and Values

### RYGEL_TYPE_MEDIA_RESOURCE

    #define RYGEL_TYPE_MEDIA_RESOURCE (rygel_media_resource_get_type ())

The type for RygelMediaResource.

### struct RygelMediaResource

    struct RygelMediaResource;

Represents a media resource (Music, Video, Image, etc).

### struct RygelMediaResourceClass

    struct RygelMediaResourceClass {
    	GObjectClass parent_class;
    };

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

#### Members

## Property Details

### The `“audio-channels”` property

      “audio-channels”           gint

audio-channels.

Flags: Read / Write

Default value: -1

### The `“bitrate”` property

      “bitrate”                  gint

bitrate.

Flags: Read / Write

Default value: -1

### The `“bits-per-sample”` property

      “bits-per-sample”          gint

bits-per-sample.

Flags: Read / Write

Default value: -1

### The `“cleartext-size”` property

      “cleartext-size”           gint64

cleartext-size.

Flags: Read / Write

Default value: -1

### The `“color-depth”` property

      “color-depth”              gint

color-depth.

Flags: Read / Write

Default value: -1

### The `“dlna-conversion”` property

      “dlna-conversion”          GUPnPDLNAConversion

dlna-conversion.

Flags: Read / Write

### The `“dlna-flags”` property

      “dlna-flags”               GUPnPDLNAFlags

dlna-flags.

Flags: Read / Write

### The `“dlna-operation”` property

      “dlna-operation”           GUPnPDLNAOperation

dlna-operation.

Flags: Read / Write

### The `“dlna-profile”` property

      “dlna-profile”             gchar *

dlna-profile.

Flags: Read / Write

Default value: NULL

### The `“duration”` property

      “duration”                 glong

duration.

Flags: Read / Write

Default value: -1

### The `“extension”` property

      “extension”                gchar *

extension.

Flags: Read / Write

Default value: NULL

### The `“height”` property

      “height”                   gint

height.

Flags: Read / Write

Default value: -1

### The `“import-uri”` property

      “import-uri”               gchar *

import-uri.

Flags: Read / Write

Default value: NULL

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

      “mime-type”                gchar *

mime-type.

Flags: Read / Write

Default value: NULL

### The `“network”` property

      “network”                  gchar *

network.

Flags: Read / Write

Default value: NULL

### The `“protocol”` property

      “protocol”                 gchar *

protocol.

Flags: Read / Write

Default value: NULL

### The `“sample-freq”` property

      “sample-freq”              gint

sample-freq.

Flags: Read / Write

Default value: -1

### The `“size”` property

      “size”                     gint64

size.

Flags: Read / Write

Default value: -1

### The `“uri”` property

      “uri”                      gchar *

uri.

Flags: Read / Write

Default value: NULL

### The `“width”` property

      “width”                    gint

width.

Flags: Read / Write

Default value: -1