Seite 1 von 1

djmount

Verfasst: Samstag 1. Dezember 2012, 10:16
von flk
Ich habe in den letzten Tagen mit djmount rumgespielt, in der Hoffnung damit die Aufnahmen meiner Receiver (Coolstream Zee, Gm990) sharen zu können. Ich hatte allerdings Probleme mit den m3u files, die wollte keines der Geräte abspielen. Auf der Suche nach einer Lösung habe ich dann geänderten Code von djmount gefunden, mit dem auch Dateien > 2 Gb ohne den Playlist Workaround gefunden werden. Die Spark Box spielt jetzt sämtliche Aufnahmen der Coolstream sowie alle Videos auf meinem Linux Server (ushare) ab. Die Coolsteam stellt sich da an, Aufnahmen von der GM 990 werden erkannt, abgespielt und nach ca. 10 - 15 Sekunden ohne Fehlermeldung einfach beendet ... habe dann mit verschiedenen Versionen von ushare, fuse, libupnp und djmount experimentiert, allerdings ohne Verbesserung. Inzwischen habe ich aber festgestellt, dass die Coolstream sogar Probleme hat, die Aufnahmen der Spark wiederzugeben, wenn die Hdd direkt angeschlossen und der Moviebrowser verwendet wird ... daher gehe ich davon aus, dass das Problem gar nicht direkt mit djmount zu tun hat. Die Coolstream ist halt ne Diva ;)

Ich hab einen Patch von den Änderungen an djmount gemacht, evtl kann das ja ins BS ?

Code: Alles auswählen

diff -urNp djmount-0.71/djmount/file_buffer.c djmount-0.71_patched/djmount/file_buffer.c
--- djmount-0.71/djmount/file_buffer.c	2006-08-27 22:12:20.000000000 +0200
+++ djmount-0.71_patched/djmount/file_buffer.c	2012-11-29 08:55:26.000000000 +0100
@@ -199,7 +199,7 @@ FileBuffer_Read (FileBuffer* file, char*
 		int rc = UpnpOpenHttpGetEx (file->url, &handle,
 					    &contentType, &contentLength,
 					    &httpStatus,
-					    offset, offset + size,
+					    offset, offset + size -1,
 					    HTTP_DEFAULT_TIMEOUT
 					    );
 		if (rc != UPNP_E_SUCCESS) 
diff -urNp djmount-0.71/djmount/file_buffer.h djmount-0.71_patched/djmount/file_buffer.h
--- djmount-0.71/djmount/file_buffer.h	2006-08-27 22:12:20.000000000 +0200
+++ djmount-0.71_patched/djmount/file_buffer.h	2012-11-29 09:12:49.000000000 +0100
@@ -60,7 +60,7 @@ typedef struct _FileBuffer FileBuffer;
  *
  *****************************************************************************/
 
-#define FILE_BUFFER_MAX_CONTENT_LENGTH		((uintmax_t) INT_MAX)
+#define FILE_BUFFER_MAX_CONTENT_LENGTH		((uintmax_t) ~0ULL)
 
 
 /*****************************************************************************
diff -urNp djmount-0.71/djmount/media_file.c djmount-0.71_patched/djmount/media_file.c
--- djmount-0.71/djmount/media_file.c	2006-08-27 22:12:20.000000000 +0200
+++ djmount-0.71_patched/djmount/media_file.c	2012-11-29 09:32:36.000000000 +0100
@@ -282,7 +282,7 @@ MediaFile_GetResSize (const MediaFile* c
 {
 	const char* const str = ixmlElement_getAttribute (file->res, "size");
 	off_t res;
-	STRING_TO_INT (str, res, -1);
+	STRING_TO_INT (str, res, 8ULL * 1024 * 1024 * 1024);
 	return res;
 }
 
diff -urNp djmount-0.71/libupnp/upnp/inc/upnp.h djmount-0.71_patched/libupnp/upnp/inc/upnp.h
--- djmount-0.71/libupnp/upnp/inc/upnp.h	2006-08-27 22:12:30.000000000 +0200
+++ djmount-0.71_patched/libupnp/upnp/inc/upnp.h	2012-11-29 09:18:45.000000000 +0100
@@ -2262,9 +2262,9 @@ int UpnpOpenHttpGetEx(
 	IN OUT int *httpStatus,	    /** The status returned on receiving a 
 				        response message from the remote 
 					server. */
-	IN int lowRange,            /** An integer value representing the low 
+	IN unsigned long long lowRange,            /** An integer value representing the low 
 				        end of a range to retrieve. */
-	IN int highRange,           /** An integer value representing the high 
+	IN unsigned long long highRange,           /** An integer value representing the high 
 				        end of a range to retrieve. */
 	IN int timeout	            /** A time out value sent with the request 
 				      	during which a response is expected 
diff -urNp djmount-0.71/libupnp/upnp/src/api/upnpapi.c djmount-0.71_patched/libupnp/upnp/src/api/upnpapi.c
--- djmount-0.71/libupnp/upnp/src/api/upnpapi.c	2006-08-27 22:12:26.000000000 +0200
+++ djmount-0.71_patched/libupnp/upnp/src/api/upnpapi.c	2012-11-29 09:21:22.000000000 +0100
@@ -3117,8 +3117,8 @@ UpnpOpenHttpGetEx( IN const char *url_st
                    IN OUT char **contentType,
                    OUT int *contentLength,
                    OUT int *httpStatus,
-                   IN int lowRange,
-                   IN int highRange,
+                   IN unsigned long long lowRange,
+                   IN unsigned long long highRange,
                    IN int timeout )
 {
     return http_OpenHttpGetEx( url_str,
diff -urNp djmount-0.71/libupnp/upnp/src/genlib/net/http/httpreadwrite.c djmount-0.71_patched/libupnp/upnp/src/genlib/net/http/httpreadwrite.c
--- djmount-0.71/libupnp/upnp/src/genlib/net/http/httpreadwrite.c	2006-08-27 22:12:24.000000000 +0200
+++ djmount-0.71_patched/libupnp/upnp/src/genlib/net/http/httpreadwrite.c	2012-11-29 09:24:39.000000000 +0100
@@ -2072,8 +2072,8 @@ http_OpenHttpGetEx( IN const char *url_s
                     IN OUT char **contentType,
                     OUT int *contentLength,
                     OUT int *httpStatus,
-                    IN int lowRange,
-                    IN int highRange,
+                    IN unsigned long long lowRange,
+                    IN unsigned long long highRange,
                     IN int timeout )
 {
     int http_error_code;
@@ -2107,7 +2107,7 @@ http_OpenHttpGetEx( IN const char *url_s
         }
 
         memset( &rangeBuf, 0, sizeof( rangeBuf ) );
-        sprintf( rangeBuf.RangeHeader, "Range: bytes=%d-%d\r\n",
+        sprintf( rangeBuf.RangeHeader, "Range: bytes=%llu-%llu\r\n",
                  lowRange, highRange );
 
         membuffer_init( &request );
diff -urNp djmount-0.71/libupnp/upnp/src/inc/httpreadwrite.h djmount-0.71_patched/libupnp/upnp/src/inc/httpreadwrite.h
--- djmount-0.71/libupnp/upnp/src/inc/httpreadwrite.h	2006-08-27 22:12:28.000000000 +0200
+++ djmount-0.71_patched/libupnp/upnp/src/inc/httpreadwrite.h	2012-11-29 09:25:41.000000000 +0100
@@ -494,8 +494,8 @@ int http_OpenHttpGetEx(IN const char *ur
 		     IN OUT char **contentType,
 		     OUT int *contentLength,
 		     OUT int *httpStatus,
-			 IN int lowRange,
-			 IN int highRange,
+			 IN unsigned long long lowRange,
+			 IN unsigned long long highRange,
 		     IN int timeout);
 
 /************************************************************************
PS: Bitte nach Buildsystem-Neutrino-MP verschieben, sollte eigentlich da hin

Re: djmount

Verfasst: Samstag 1. Dezember 2012, 20:28
von martii
flk hat geschrieben:Ich hab einen Patch von den Änderungen an djmount gemacht, evtl kann das ja ins BS ?
Würde ich auch befürworten. In meinen Clone hab' ich's mal reingenommen, besten Dank!

Re: djmount

Verfasst: Samstag 1. Dezember 2012, 22:36
von flk
Cool, danke für den commit

Autor ist ein Entwickler bei Boxee

https://github.com/Boxee/djmount