LinuxTV Patchwork UPnP/DLNA media server plugin for the VDR

login
register
mail settings
Submitter Mika Laitio
Date Jan. 5, 2013, 8:26 a.m.
Message ID <50E7E3B2.5090508@pilppa.org>
Download mbox | patch
Permalink /patch/16136/
State New
Headers show

Comments

Mika Laitio - Jan. 5, 2013, 8:26 a.m.
On 01/04/2013 07:48 PM, Brian-Imap wrote:
> Hi,
> this looks to be pretty interesting.
> So where exactly does it fit in between XVDR, VNSI, streamdev, etc.
> 
> I just bought a Samsung smart TV, haven't found a single DLNA
> music server that it could receive music from (sure I've heard about
> updating the headers that are sent from the server), still none of them
> worked with the TV.
> Seems I could watch VDR directly on the TV without any kind of Set-Top
> box inbetween with this plugin.

Samung has some bug's in their handling of upnp messages and therefore a
MediaTomp requires for example a small patch so that samsung tv is able
to show the media listing and play the recordings.

I patched the Mageia's mediatomb-0.12.1-4.mga2.src.rpm version with the
attached patch (found somewhere from the net) and at least Samsung 6305
with newest software works now ok with mediatomb.

Mika

Patch

diff -ruN mediatomb.orig/tombupnp/upnp/src/genlib/net/uri/uri.c mediatomb/tombupnp/upnp/src/genlib/net/uri/uri.c
--- mediatomb.orig/tombupnp/upnp/src/genlib/net/uri/uri.c	2012-06-06 23:01:22.000000000 +0200
+++ mediatomb/tombupnp/upnp/src/genlib/net/uri/uri.c	2012-06-07 08:22:01.000000000 +0200
@@ -1042,7 +1042,8 @@ 
         out->path_type = REL_PATH;
     }
 
-    if( ( ( begin_hostport + 1 ) < max ) && ( in[begin_hostport] == '/' )
+    //parse hostport only if scheme was found
+    if( ( begin_hostport > 0 ) && ( ( begin_hostport + 1 ) < max ) && ( in[begin_hostport] == '/' )
         && ( in[begin_hostport + 1] == '/' ) ) {
         begin_hostport += 2;
 
@@ -1059,6 +1060,12 @@ 
         out->hostport.text.size = 0;
         out->hostport.text.buff = 0;
         begin_path = begin_hostport;
+
+        //remove excessive leading slashes (fix for Samsung Smart TV 2012)
+        while( ( ( begin_path + 1 ) < max ) && ( in[begin_path] == '/' ) && ( in[begin_path + 1] == '/') ) {
+            begin_path++;
+        }
+
     }
 
     begin_fragment =

Privacy Policy