Rygel.MediaEngine – librygel-server Reference Manual

# MediaEngine

## Object Hierarchy:

## Description:

public abstract class MediaEngine : Object

This is the base class for media engines that contain knowledge about the streaming and transformational capabilites of the media library in use.

Media engines express what representations of a MediaObject they can produce by returning MediaResource objects which will, in turn, be used to express to endpoints representations can be streamed from the MediaServer. These representations may include transformations, time -scaled representations, and/or encrypted representations.

See, for instance, Rygel's built-in "gstreamer" and "simple" media engines, or the external rygel-gst-0-10-media-engine module.

The actual media engine used by Rygel at runtime is specified by the media-engine configuration key. For instance, in rygel.conf: media- engine=librygel-media-engine-gst.so

Media engines should also derive their own #RygelDataSource, returning an instance of it from create_data_source().

See the <link linkend="implementing-media-engines">Implementing Media Engines</link> section.

Namespace: Rygel
Package: librygel-server

## Content:

### Static methods:

- public static void init () throws Error
- public static MediaEngine get_default ()
  Get the singleton instance of the currently used media engine.

### Creation methods:

- public MediaEngine ()

### Methods:

- public abstract unowned List<DLNAProfile> get_dlna_profiles ()
  Get a list of the DLNA profiles that the media engine can stream.
- public abstract async List<MediaResource>? get_resources_for_item (MediaObject item)
  Retrieve engine-provided resources for the given MediaObject
- public abstract DataSource? create_data_source_for_resource (MediaObject item, MediaResource resource) throws Error
  Get a #DataSource for given #MediaResource representation of the #MediaObject.
- public abstract DataSource? create_data_source_for_uri (string uri) throws Error
  Get a #DataSource for the URI.
- public virtual List<string> get_internal_protocol_schemes ()
  Get a list of URI schemes that are internal to the engine.

### Signals:

- public signal void resource_changed (string media_object_uri)
  Signaled when one or more #MediaResources<!-- -->s associated with a MediaObject changes. #get_resources_for_item should be called in response to this signal to retrieve the updated list of MediaResources for the associated MediaObject.

### Inherited Members:

All known members inherited from class GLib.Object

- interface_find_property
- interface_install_property
- interface_list_properties
- @new
- new_valist
- newv
- new_with_properties
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating

- freeze_notify
- @get
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- is_floating
- notify_property
- @ref
- ref_sink
- replace_data
- replace_qdata
- remove_toggle_ref
- remove_weak_pointer
- @set

- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
- notify
- ref_count