![]() |
![]() |
![]() |
librygel-server Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
RygelTranscoderRygelTranscoder — The base Transcoder class. Each implementation derives from it and must implement |
#define RYGEL_TYPE_TRANSCODER RygelDataSource * rygel_transcoder_create_source (RygelTranscoder *self
,RygelMediaItem *item
,RygelDataSource *src
,GError **error
); GUPnPDIDLLiteResource * rygel_transcoder_add_resource (RygelTranscoder *self
,GUPnPDIDLLiteItem *didl_item
,RygelMediaItem *item
,RygelTranscodeManager *manager
,GError **error
); gboolean rygel_transcoder_can_handle (RygelTranscoder *self
,const gchar *target
); guint rygel_transcoder_get_distance (RygelTranscoder *self
,RygelMediaItem *item
); gboolean rygel_transcoder_mime_type_is_a (RygelTranscoder *self
,const gchar *mime_type1
,const gchar *mime_type2
); const gchar * rygel_transcoder_get_mime_type (RygelTranscoder *self
); const gchar * rygel_transcoder_get_dlna_profile (RygelTranscoder *self
); const gchar * rygel_transcoder_get_extension (RygelTranscoder *self
); struct RygelTranscoder; struct RygelTranscoderClass;
Transcoders are obtained from rygel_media_engine_get_transcoders()
and are only expected to support the derived RygelDataSource types provided by the same media engine.
#define RYGEL_TYPE_TRANSCODER (rygel_transcoder_get_type ())
The type for RygelTranscoder.
RygelDataSource * rygel_transcoder_create_source (RygelTranscoder *self
,RygelMediaItem *item
,RygelDataSource *src
,GError **error
);
Creates a transcoding source.
The provided original RygelDataSource will have been implemented by the same media engine that provided the RygelTranscoder, allowing the RygelTranscoder to access specific resources of the underlying multimedia backend used by the media engine.
|
the RygelTranscoder instance |
|
the media item to create the transcoding source for. [in] |
|
the original (non-transcoding) source. [in] |
|
location to store the error occuring, or NULL to ignore |
Returns : |
the new transcoding source |
GUPnPDIDLLiteResource * rygel_transcoder_add_resource (RygelTranscoder *self
,GUPnPDIDLLiteItem *didl_item
,RygelMediaItem *item
,RygelTranscodeManager *manager
,GError **error
);
Derived classes should implement this function to fill a GUPnPDIDLLiteResource, representing the transcoded content, with parameters specific to the transcoder, such as bitrate or resolution. The GUPnPDIDLLiteResource should be instantiated by calling this base class implementation, passing the provided didl_item, item and manager parameters.
|
the RygelTranscoder instance |
|
The DIDLLite item for which to create the resource, by calling the base class implementation. [in] |
|
The media item for which to create the DIDLiteResource, by calling the base class implementation. [in] |
|
The transcoder manager to pass to the base class implemenetation. [in] |
|
location to store the error occuring, or NULL to ignore |
Returns : |
The new resource. |
gboolean rygel_transcoder_can_handle (RygelTranscoder *self
,const gchar *target
);
Returns whether this trancoder can handle the specified DLNA profile. This is determined by the RygelTranscodeManager, which checks the suitability of each RygelTranscoder by calling rygel_transcoder_get_distance()
with each RygelMediaItem, choosing one DLNA profile for each transcoder to handle.
|
the RygelTranscoder instance |
|
A DLNA profile name as obtained from rygel_media_item_get_dlna_profile() . [in]
|
Returns : |
True if the transcoder can handle the specified DLNA profile. |
guint rygel_transcoder_get_distance (RygelTranscoder *self
,RygelMediaItem *item
);
Gets a numeric value that gives an gives an estimate of how hard it would be for this transcoder to trancode item
to the target profile of this transcoder.
|
the RygelTranscoder instance |
|
the media item to calculate the distance for. [in] |
Returns : |
the distance from the item , uint.MIN if providing such a value is impossible or uint.MAX if it doesn't make any sense to use this transcoder for item
|
gboolean rygel_transcoder_mime_type_is_a (RygelTranscoder *self
,const gchar *mime_type1
,const gchar *mime_type2
);
|
the RygelTranscoder instance |
const gchar * rygel_transcoder_get_mime_type (RygelTranscoder *self
);
Get and return the current value of the "mime-type" property.
|
the RygelTranscoder instance to query |
Returns : |
the value of the "mime-type" property |
const gchar * rygel_transcoder_get_dlna_profile (RygelTranscoder *self
);
Get and return the current value of the "dlna-profile" property.
|
the RygelTranscoder instance to query |
Returns : |
the value of the "dlna-profile" property |
const gchar * rygel_transcoder_get_extension (RygelTranscoder *self
);
Get and return the current value of the "extension" property.
|
the RygelTranscoder instance to query |
Returns : |
the value of the "extension" property |
struct RygelTranscoder { GObject parent_instance; RygelTranscoderPrivate * priv; };
The base Transcoder class. Each implementation derives from it and must implement create_source()
and get_distance()
.
Transcoders are obtained from rygel_media_engine_get_transcoders()
and are only expected to support the derived RygelDataSource types provided by the same media engine.
struct RygelTranscoderClass { GObjectClass parent_class; RygelDataSource* (*create_source) (RygelTranscoder* self, RygelMediaItem* item, RygelDataSource* src, GError** error); GUPnPDIDLLiteResource* (*add_resource) (RygelTranscoder* self, GUPnPDIDLLiteItem* didl_item, RygelMediaItem* item, RygelTranscodeManager* manager, GError** error); guint (*get_distance) (RygelTranscoder* self, RygelMediaItem* item); };
The class structure for RYGEL_TYPE_TRANSCODER
. All the fields in this structure are private and should never be accessed directly.