protected string sink_protocol_info;
protected string connection_ids;
- private TranscodeManager? get_transcode_manager () {
- var root_device = (Rygel.RootDevice) this.root_device;
-
- // Find the ContentDirectory service attached to this root device.
- foreach (var service in root_device.services) {
- if (service.get_type().is_a (typeof (Rygel.ContentDirectory))) {
- var content_directory = (Rygel.ContentDirectory) service;
- return (TranscodeManager) content_directory.http_server;
- }
- }
- return null;
- }
-
protected string source_protocol_info {
owned get {
- string protocol_info = "http-get:*:*:*";
+ var protocol_info = "http-get:*:*:*";
TranscodeManager tm = get_transcode_manager ();
if (tm != null) {
- protocol_info += tm.get_transcoder_protocol_info ();
+ protocol_info += tm.get_protocol_info ();
}
+
return protocol_info;
}
}
action.return ();
}
+
+ private TranscodeManager? get_transcode_manager () {
+ TranscodeManager manager = null;
+
+ var root_device = (Rygel.RootDevice) this.root_device;
+
+ // Find the ContentDirectory service attached to this root device.
+ foreach (var service in root_device.services) {
+ if (service.get_type().is_a (typeof (Rygel.ContentDirectory))) {
+ var content_directory = (Rygel.ContentDirectory) service;
+ manager = (TranscodeManager) content_directory.http_server;
+ }
+ }
+
+ return manager;
+ }
}
return transcoder;
}
- public string get_transcoder_protocol_info () {
+ public string get_protocol_info () {
string protocol_info = "";
foreach (var transcoder in this.transcoders) {
- protocol_info += ",http-get:*:%s:DLNA.ORG_PN=%s".printf (
- transcoder.mime_type, transcoder.dlna_profile);
+ protocol_info += ",http-get:*:" + transcoder.mime_type +
+ ":DLNA.ORG_PN=" + transcoder.dlna_profile;
}
+
return protocol_info;
}
}