Top |
RygelDataSourceRygelDataSource — Interface for all data streams provided by a RygelMediaEngine. |
When Rygel receives a HTTP request to stream a given file, it creates a RygelDataSource object for this new file and instructs the RygelDataSource to begin streaming. The RygelDataSource object will duly pass this request on to the underlying media framework, which will in turn pass streamed bytes back to the RygelDataSource object. The RygelDataSource passes these bytes to Rygel which adds them to the response it sends to the original HTTP request received from the client.
The data source is responsible for providing response header information describing the content being produced and a streamable byte-stream via its data_available signal. End-of-stream is signalled by the done signal, while errors are signalled by the error signal.
Implementations should fulfil at least these requirements:
It should support at least the file:// URI scheme.
It should be able to stream any kind of binary data, regardless of the format.
RygelDataSource instances are provided by rygel_media_engine_create_data_source()
which will return a derived RygelDataSource that uses a specific IO backend and/or multimedia backend to stream the multimedia data at the URI.
The derived RygelDataSource may provide additional API for use by the derived media engine. For instance, rygel_media_engine_get_transcoders()
may return derived RygelTranscoder instances, and these may use that additional API in their create_source()
implementations, for instance to access resources or data structures of the specific multimedia backend.
typedef struct _RygelDataSource RygelDataSource;
Interface for all data streams provided by a RygelMediaEngine.
When Rygel receives a HTTP request to stream a given file, it creates a RygelDataSource object for this new file and instructs the RygelDataSource to begin streaming. The RygelDataSource object will duly pass this request on to the underlying media framework, which will in turn pass streamed bytes back to the RygelDataSource object. The RygelDataSource passes these bytes to Rygel which adds them to the response it sends to the original HTTP request received from the client.
The data source is responsible for providing response header information describing the content being produced and a streamable byte-stream via its data_available signal. End-of-stream is signalled by the done signal, while errors are signalled by the error signal.
Implementations should fulfil at least these requirements:
It should support at least the file:// URI scheme.
It should be able to stream any kind of binary data, regardless of the format.
RygelDataSource instances are provided by rygel_media_engine_create_data_source()
which will return a derived RygelDataSource that uses a specific IO backend and/or multimedia backend to stream the multimedia data at the URI.
The derived RygelDataSource may provide additional API for use by the derived media engine. For instance, rygel_media_engine_get_transcoders()
may return derived RygelTranscoder instances, and these may use that additional API in their create_source()
implementations, for instance to access resources or data structures of the specific multimedia backend.
struct RygelDataSourceIface { GTypeInterface parent_iface; GeeList* (*preroll) (RygelDataSource* self, RygelHTTPSeekRequest* seek, RygelPlaySpeedRequest* playspeed, GError** error); void (*start) (RygelDataSource* self, GError** error); void (*freeze) (RygelDataSource* self); void (*thaw) (RygelDataSource* self); void (*stop) (RygelDataSource* self); };
Interface for creating RygelDataSource implementations.