-I$(top_srcdir)/src/rygel -DDATA_DIR='"$(shareddir)"' \
-include config.h
-librygel_gst_renderer_la_SOURCES = rygel-gst-renderer-connection-manager.vala \
- rygel-gst-renderer-player.vala \
+librygel_gst_renderer_la_SOURCES = rygel-gst-renderer-player.vala \
rygel-gst-renderer-plugin.vala \
rygel-gst-renderer-time.vala
+++ /dev/null
-/*
- * Copyright (C) 2008 OpenedHand Ltd.
- * Copyright (C) 2009 Nokia Corporation.
- *
- * Author: Jorn Baayen <jorn@openedhand.com>
- * Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
- * <zeeshan.ali@nokia.com>
- *
- * Rygel is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Rygel is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-using GUPnP;
-
-public class Rygel.GstRenderer.ConnectionManager : Rygel.ConnectionManager {
- private string[] protocols = { "http-get", "rtsp" };
- private string[] mime_types = { "audio/mpeg",
- "application/ogg",
- "audio/x-vorbis",
- "audio/x-vorbis+ogg",
- "audio/x-ms-wma",
- "audio/x-ms-asf",
- "audio/x-flac",
- "audio/x-mod",
- "audio/x-wav",
- "audio/x-ac3",
- "audio/x-m4a",
- "video/x-theora",
- "video/x-dirac",
- "video/x-wmv",
- "video/x-wma",
- "video/x-msvideo",
- "video/x-3ivx",
- "video/x-3ivx",
- "video/x-matroska",
- "video/mpeg",
- "video/mp4",
- "video/x-ms-asf",
- "video/x-xvid",
- "video/x-ms-wmv",
- "audio/L16;rate=44100;channels=2",
- "audio/L16;rate=44100;channels=1" };
-
- public override void constructed () {
- base.constructed ();
-
- foreach (var protocol in this.protocols) {
- foreach (var mime_type in this.mime_types) {
- if (this.mime_types[0] != mime_type) {
- this.sink_protocol_info += ",";
- }
-
- this.sink_protocol_info += protocol + ":*:" + mime_type + ":*";
- }
- }
- }
-}
using Gst;
public class Rygel.GstRenderer.Player : GLib.Object, Rygel.Player {
+ private const string[] protocols = { "http-get", "rtsp" };
+ private const string[] mime_types = {
+ "audio/mpeg",
+ "application/ogg",
+ "audio/x-vorbis",
+ "audio/x-vorbis+ogg",
+ "audio/x-ms-wma",
+ "audio/x-ms-asf",
+ "audio/x-flac",
+ "audio/x-mod",
+ "audio/x-wav",
+ "audio/x-ac3",
+ "audio/x-m4a",
+ "video/x-theora",
+ "video/x-dirac",
+ "video/x-wmv",
+ "video/x-wma",
+ "video/x-msvideo",
+ "video/x-3ivx",
+ "video/x-3ivx",
+ "video/x-matroska",
+ "video/mpeg",
+ "video/mp4",
+ "video/x-ms-asf",
+ "video/x-xvid",
+ "video/x-ms-wmv",
+ "audio/L16;rate=44100;channels=2",
+ "audio/L16;rate=44100;channels=1" };
private static Player player;
private dynamic Element playbin;
-1);
}
+ public string[] get_protocols () {
+ return protocols;
+ }
+
+ public string[] get_mime_types () {
+ return mime_types;
+ }
+
private bool bus_handler (Gst.Bus bus,
Message message) {
if (message.type == MessageType.EOS) {
public class Rygel.GstRenderer.Plugin : Rygel.MediaRendererPlugin {
public Plugin () {
- base ("GstRenderer",
- _("GStreamer Renderer"),
- typeof (GstRenderer.ConnectionManager));
+ base ("GstRenderer", _("GStreamer Renderer"));
}
public override Rygel.Player? get_player () {
rygel-content-directory.vala \
rygel-connection-manager.vala \
rygel-source-connection-manager.vala \
+ rygel-sink-connection-manager.vala \
rygel-av-transport.vala \
rygel-rendering-control.vala \
rygel-transcode-manager.vala \
public MediaRendererPlugin (string name,
string? title,
- Type connection_manager_type,
string? description = null) {
base (MEDIA_RENDERER_DESC_PATH, name, title, description);
var resource = new ResourceInfo (ConnectionManager.UPNP_ID,
ConnectionManager.UPNP_TYPE,
ConnectionManager.DESCRIPTION_PATH,
- connection_manager_type);
+ typeof (SinkConnectionManager));
this.add_resource (resource);
resource = new ResourceInfo (AVTransport.UPNP_ID,
public abstract string position { owned get; }
public abstract bool seek (string time);
+ public abstract string[] get_protocols ();
+ public abstract string[] get_mime_types ();
}
--- /dev/null
+/*
+ * Copyright (C) 2008 OpenedHand Ltd.
+ * Copyright (C) 2009 Nokia Corporation.
+ *
+ * Author: Jorn Baayen <jorn@openedhand.com>
+ * Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
+ * <zeeshan.ali@nokia.com>
+ *
+ * Rygel is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * Rygel is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+using GUPnP;
+
+public class Rygel.SinkConnectionManager : Rygel.ConnectionManager {
+ private Player player;
+
+ public override void constructed () {
+ base.constructed ();
+
+ var plugin = this.root_device.resource_factory as MediaRendererPlugin;
+ this.player = plugin.get_player ();
+
+ foreach (var protocol in this.player.get_protocols ()) {
+ var mime_types = this.player.get_mime_types ();
+
+ foreach (var mime_type in mime_types) {
+ if (mime_types[0] != mime_type) {
+ this.sink_protocol_info += ",";
+ }
+
+ this.sink_protocol_info += protocol + ":*:" + mime_type + ":*";
+ }
+ }
+ }
+}