[gupnp] patches for gupnp-av
- From: Sven Neumann <s neumann phase-zero de>
- To: gupnp o-hand com
- Subject: [gupnp] patches for gupnp-av
- Date: Thu, 09 Apr 2009 11:06:54 +0200
Hi,
attached are two patches against gupnp-av for review. The goal is to
make the output of GUPnPDIDLLiteWriter to comply better better with the
DLNA spec.
Sven
>From 87d30eb27bb4012f763c24cff7c26899e47077db Mon Sep 17 00:00:00 2001
From: Sven Neumann <s neumann phase-zero de>
Date: Thu, 9 Apr 2009 10:46:31 +0200
Subject: [PATCH] fix issues with fourth field of protocolInfo
---
libgupnp-av/gupnp-didl-lite-writer.c | 28 ++++++++++++++++++++--------
1 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/libgupnp-av/gupnp-didl-lite-writer.c b/libgupnp-av/gupnp-didl-lite-writer.c
index da72012..21721bd 100644
--- a/libgupnp-av/gupnp-didl-lite-writer.c
+++ b/libgupnp-av/gupnp-didl-lite-writer.c
@@ -354,21 +354,33 @@ gupnp_didl_lite_writer_add_res (GUPnPDIDLLiteWriter *writer,
/* Try guessing */
dlna_profile = dlna_guess_profile (res);
- if (dlna_profile == NULL)
+ if (dlna_profile == NULL) {
g_string_append_printf (writer->priv->str, ":*\"");
- else
+ } else {
+ /* omit the CI parameter for non-converted content */
+ if (res->dlna_conversion != GUPNP_DLNA_CONVERSION_NONE) {
+ g_string_append_printf (writer->priv->str,
+ ";DLNA.ORG_CI=%d",
+ res->dlna_conversion);
+ }
+
+ /* the OP parameter is only allowed for the "http-get"
+ * and "rtsp-rtp-udp" protocols
+ */
+ if (strcmp (res->protocol, "http-get") == 0 ||
+ strcmp (res->protocol, "rtsp-rtp-udp") == 0) {
+ g_string_append_printf (writer->priv->str,
+ ";DLNA.ORG_OP=%.2x",
+ res->dlna_operation);
+ }
+
g_string_append_printf (writer->priv->str,
- ":DLNA.ORG_PS=%d"
- ";DLNA.ORG_CI=%d"
- ";DLNA.ORG_OP=%.2x"
";DLNA.ORG_PN=%s"
";DLNA.ORG_FLAGS=%.8x%.24x\"",
- res->dlna_play_speed,
- res->dlna_conversion,
- res->dlna_operation,
dlna_profile,
res->dlna_flags,
0);
+ }
if (res->import_uri) {
g_string_append (writer->priv->str, " importUri=\"");
--
1.5.6.3
>From 393724521a979290af4d72695bc3d7ebe5164953 Mon Sep 17 00:00:00 2001
From: Sven Neumann <s neumann phase-zero de>
Date: Thu, 9 Apr 2009 10:50:51 +0200
Subject: [PATCH] add missing return value in guess_aac_profile()
---
libgupnp-av/gupnp-dlna.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libgupnp-av/gupnp-dlna.c b/libgupnp-av/gupnp-dlna.c
index 224cc68..d4bbb85 100644
--- a/libgupnp-av/gupnp-dlna.c
+++ b/libgupnp-av/gupnp-dlna.c
@@ -213,6 +213,7 @@ guess_aac_profile (GUPnPDIDLLiteResource *resource)
} else if (resource->bitrate <= 57600) {
return "AAC_ISO";
}
+ return NULL;
}
static const char *
--
1.5.6.3
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]