From 5dd37800c9c59673bfbf503bac352f5e6fb08e6b Mon Sep 17 00:00:00 2001 From: Carl Simonson Date: Fri, 1 Jan 2016 21:47:42 -0600 Subject: [PATCH] Add headers even if no profile detected Sometimes a profile can't be detected, but the renderer can make a good guess. For example, if a movie can't be detected, some renderers can show it if they have a range operation sent. This change adds the operation range and conversion headers. I have tested this with a Samsung LN37D550 TV. --- libdleyna/renderer/host-service.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libdleyna/renderer/host-service.c b/libdleyna/renderer/host-service.c index 3392d45..10584b6 100644 --- a/libdleyna/renderer/host-service.c +++ b/libdleyna/renderer/host-service.c @@ -103,6 +103,12 @@ static void prv_compute_mime_and_dlna_header(const gchar *filename, goto on_error; } + operation = GUPNP_DLNA_OPERATION_RANGE; + g_string_append_printf(header, "DLNA.ORG_OP=%.2x;", operation); + + conversion = GUPNP_DLNA_CONVERSION_NONE; + g_string_append_printf(header, "DLNA.ORG_CI=%.2x;", conversion); + profile = gupnp_dlna_profile_guesser_guess_profile_sync(guesser, uri, 5000, @@ -125,12 +131,6 @@ static void prv_compute_mime_and_dlna_header(const gchar *filename, if (profile_name != NULL) g_string_append_printf(header, "DLNA.ORG_PN=%s;", profile_name); - operation = GUPNP_DLNA_OPERATION_RANGE; - g_string_append_printf(header, "DLNA.ORG_OP=%.2x;", operation); - - conversion = GUPNP_DLNA_CONVERSION_NONE; - g_string_append_printf(header, "DLNA.ORG_CI=%.2x;", conversion); - dlna_mime_type = gupnp_dlna_profile_get_mime(profile); if (dlna_mime_type != NULL) { *mime_type = g_strdup(dlna_mime_type);