[rygel/wip/downgrade-renderer] wip: Downgrade renderer
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/wip/downgrade-renderer] wip: Downgrade renderer
- Date: Wed, 23 Jan 2013 23:28:58 +0000 (UTC)
commit fcc6870d60440270ca3a425328fc34494c5c38c3
Author: Jens Georg <jensg openismus com>
Date: Wed Jan 23 23:39:05 2013 +0100
wip: Downgrade renderer
src/librygel-core/filelist.am | 3 +-
src/librygel-renderer/filelist.am | 3 +-
src/librygel-renderer/rygel-av-transport.vala | 2 +
.../rygel-media-renderer-plugin.vala | 8 ++
src/librygel-renderer/rygel-renderer-v1-hacks.vala | 41 +++++++
src/librygel-server/filelist.am | 2 +-
src/librygel-server/rygel-media-server-plugin.vala | 2 +-
src/librygel-server/rygel-server-v1-hacks.vala | 42 +++++++
src/librygel-server/rygel-v1-hacks.vala | 117 --------------------
9 files changed, 99 insertions(+), 121 deletions(-)
---
diff --git a/src/librygel-core/filelist.am b/src/librygel-core/filelist.am
index a9800fd..a37467e 100644
--- a/src/librygel-core/filelist.am
+++ b/src/librygel-core/filelist.am
@@ -14,7 +14,8 @@ LIBRYGEL_CORE_VAPI_SOURCE_FILES = \
rygel-configuration.vala \
rygel-base-configuration.vala \
rygel-free-desktop-interfaces.vala \
- rygel-state-machine.vala
+ rygel-state-machine.vala \
+ rygel-v1-hacks.vala
LIBRYGEL_CORE_NONVAPI_SOURCE_FILES = \
rygel-icon-info.vala \
diff --git a/src/librygel-renderer/filelist.am b/src/librygel-renderer/filelist.am
index 3f5cb08..07b0641 100644
--- a/src/librygel-renderer/filelist.am
+++ b/src/librygel-renderer/filelist.am
@@ -10,4 +10,5 @@ LIBRYGEL_RENDERER_NONVAPI_SOURCE_FILES = \
rygel-sink-connection-manager.vala \
rygel-time-utils.vala \
rygel-changelog.vala \
- rygel-volume.vala
+ rygel-volume.vala \
+ rygel-renderer-v1-hacks.vala
diff --git a/src/librygel-renderer/rygel-av-transport.vala b/src/librygel-renderer/rygel-av-transport.vala
index 215e65b..ccdd681 100644
--- a/src/librygel-renderer/rygel-av-transport.vala
+++ b/src/librygel-renderer/rygel-av-transport.vala
@@ -30,6 +30,8 @@ internal class Rygel.AVTransport : Service {
public const string UPNP_ID = "urn:upnp-org:serviceId:AVTransport";
public const string UPNP_TYPE =
"urn:schemas-upnp-org:service:AVTransport:2";
+ public const string UPNP_TYPE_V1 =
+ "urn:schemas-upnp-org:service:AVTransport:1";
public const string DESCRIPTION_PATH = "xml/AVTransport2.xml";
public const string LAST_CHANGE_NS =
"urn:schemas-upnp-org:metadata-1-0/AVT/";
diff --git a/src/librygel-renderer/rygel-media-renderer-plugin.vala b/src/librygel-renderer/rygel-media-renderer-plugin.vala
index aa93852..2e0ef76 100644
--- a/src/librygel-renderer/rygel-media-renderer-plugin.vala
+++ b/src/librygel-renderer/rygel-media-renderer-plugin.vala
@@ -92,6 +92,14 @@ public class Rygel.MediaRendererPlugin : Rygel.Plugin {
return this.controller;
}
+ public override void apply_hacks (RootDevice device,
+ string description_path)
+ throws Error {
+ var v1_hacks = new RendererV1Hacks ();
+ v1_hacks.apply_on_device (device, description_path);
+ }
+
+
public string get_protocol_info () {
var player = this.get_player ();
if (player == null) {
diff --git a/src/librygel-renderer/rygel-renderer-v1-hacks.vala b/src/librygel-renderer/rygel-renderer-v1-hacks.vala
new file mode 100644
index 0000000..3ab046d
--- /dev/null
+++ b/src/librygel-renderer/rygel-renderer-v1-hacks.vala
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011 Nokia Corporation.
+ * Copyright (C) 2012 Jens Georg.
+ *
+ * Author: Jens Georg <jensg openismus com>
+ * Jens Georg <mail jensge org>
+ *
+ * This file is part of Rygel.
+ *
+ * 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 Soup;
+using GUPnP;
+
+/**
+ * Various devices that need a downgrade to MediaServer:1 and
+ * ContentDirectory:1 because they ignore that higher versions are
+ * required to be backwards-compatible.
+ */
+internal class Rygel.RendererV1Hacks : Rygel.V1Hacks {
+ private const string DMR = "urn:schemas-upnp-org:device:MediaRenderer";
+
+ public RendererV1Hacks () {
+ Object (device_type : DMR,
+ service_type : AVTransport.UPNP_TYPE,
+ service_type_v1 : AVTransport.UPNP_TYPE_V1);
+ }
+}
diff --git a/src/librygel-server/filelist.am b/src/librygel-server/filelist.am
index e961efd..d160a36 100644
--- a/src/librygel-server/filelist.am
+++ b/src/librygel-server/filelist.am
@@ -70,7 +70,7 @@ LIBRYGEL_SERVER_NONVAPI_SOURCE_FILES = \
rygel-source-connection-manager.vala \
rygel-subtitle-manager.vala \
rygel-thumbnailer.vala \
- rygel-v1-hacks.vala \
+ rygel-server-v1-hacks.vala \
rygel-wmp-hacks.vala \
rygel-xbmc-hacks.vala \
rygel-xbox-hacks.vala \
diff --git a/src/librygel-server/rygel-media-server-plugin.vala b/src/librygel-server/rygel-media-server-plugin.vala
index 7ae451c..a71b42c 100644
--- a/src/librygel-server/rygel-media-server-plugin.vala
+++ b/src/librygel-server/rygel-media-server-plugin.vala
@@ -98,7 +98,7 @@ public abstract class Rygel.MediaServerPlugin : Rygel.Plugin {
string description_path)
throws Error {
// Apply V1 downgrades
- var v1_hacks = new V1Hacks ();
+ var v1_hacks = new ServerV1Hacks ();
v1_hacks.apply_on_device (device, description_path);
// Apply XBox hacks on top of that
diff --git a/src/librygel-server/rygel-server-v1-hacks.vala b/src/librygel-server/rygel-server-v1-hacks.vala
new file mode 100644
index 0000000..477a550
--- /dev/null
+++ b/src/librygel-server/rygel-server-v1-hacks.vala
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 Nokia Corporation.
+ * Copyright (C) 2012 Jens Georg.
+ *
+ * Author: Jens Georg <jensg openismus com>
+ * Jens Georg <mail jensge org>
+ *
+ * This file is part of Rygel.
+ *
+ * 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 Soup;
+using GUPnP;
+
+/**
+ * Various devices that need a downgrade to MediaServer:1 and
+ * ContentDirectory:1 because they ignore that higher versions are
+ * required to be backwards-compatible.
+ */
+internal class Rygel.ServerV1Hacks : Rygel.V1Hacks {
+ private const string DMS = "urn:schemas-upnp-org:device:MediaServer";
+
+ public ServerV1Hacks () {
+ Object (device_type : DMS,
+ service_type : ContentDirectory.UPNP_TYPE,
+ service_type_v1 : ContentDirectory.UPNP_TYPE_V1);
+
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]