Jump to content


Photo

djmount/libupnp Support for >2GB Files


  • Please log in to reply
13 replies to this topic

#1 olqs

  • Member
  • 6 posts

0
Neutral

Posted 25 September 2012 - 12:51

Hi,

i have found patches for libupnp and djmount to support files greater 2GB. Thanks to the boxee dev yonathan: https://github.com/B...04e0fe18#diff-0
I have tested this patches with OpenPli 3.0 on a Xtrend ET9500 and it works as expected. Could someone add this to the packages on the feed?

The second problem i had with djmount on the feed was the non working init script. The not needed modprobe command was the reason it doesn't start automatically and i added utf8 as default charset for djmount because i had problems to access files with german umlauts otherwise. This init skript will not work on openpli 2.1, perhaps a "modprobe fuse || true" instead of the "modprobe fuse" in the start section will work too and then for openpli 2.1 and 3.0

I attach the two patches and the edited init script int the tar.gz and djmount/libupnp as compiled packages to this post.

Alex

Attached Files


Edited by olqs, 25 September 2012 - 12:54.


Re: djmount/libupnp Support for >2GB Files #2 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 25 September 2012 - 17:39

Since you tested them, and I hate double work, can you post a complete patch for OE (including changes to .bb etc)? I'll be happy to explain how to do that, if you don't understand what I mean.
Real musicians never die - they just decompose

Re: djmount/libupnp Support for >2GB Files #3 olqs

  • Member
  • 6 posts

0
Neutral

Posted 26 September 2012 - 11:42

The only thing i need to know is how to add patches.
Is it enough to create a folder files an put the patches into it and include the file in the SRC_URI variable?
I have started with "bitbake package.bb -c unpack", then applied the patches manually and finished compiling/package building with "bitbake packege.bb"

Is there a guide to the bitbake system?

Which options should i use for the diff? I'm not familiar with versioning systems like git.

Re: djmount/libupnp Support for >2GB Files #4 MiLo

  • PLi® Core member
  • 14,045 posts

+298
Excellent

Posted 26 September 2012 - 17:45

Just copy the patch file(s) to the "meta-openpli/recipes-connectivity/djmount/files" directory. Add them to the SRC_URI, like the other patch(es) already there. Change the "PR" number of the recipe so that we all get a new version.

There's a reasonable guide on openembedded.org, there's a PLi-specific one on the Wiki on this board to get started.

OE likes the patches that GIT creates just fine.

When it works, commit your work using "git commit" with a description and so, and then create a patch from that commit with "git format-patch" which you can post here.
Real musicians never die - they just decompose

Re: djmount/libupnp Support for >2GB Files #5 olqs

  • Member
  • 6 posts

0
Neutral

Posted 26 September 2012 - 19:51

Shoud the packages be backwards compatible with OpenPLI 2.1?
My new init script will not work with pli 2.1 because i removed the unnecessary (for pli 3.0) modprobe statements.

Can i check the version somehow? If yes i will include a if condition instead.

Re: djmount/libupnp Support for >2GB Files #6 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 26 September 2012 - 19:53

you can just use modprobe -q instead, which will silently continue when the module does not need to be loaded.
We should not make an initscript depend on a certain kernel config I think.

Re: djmount/libupnp Support for >2GB Files #7 olqs

  • Member
  • 6 posts

0
Neutral

Posted 27 September 2012 - 11:24

But the "modprobe -q fuse" statement in the original init script is the reason why djmount is not starting. It exits with return code 1 if no module is loaded.
I don't know which mechanism is responsible for not starting djmount with start-stop-daemon in this case, but i can reproduce this behaviour when i add or remove the modprobe command.
If i change it to "modprobe -q fuse || true" there can be problems on pli 2.1 if no fuse module is installed.

You are right, and i think the same, the init script should work with all kernels, but i need a method to check if fuse is statically compiled into the kernel, or if there is should be a module fuse which i need to load.

Re: djmount/libupnp Support for >2GB Files #8 olqs

  • Member
  • 6 posts

0
Neutral

Posted 27 September 2012 - 11:30

After some searching i have found the reason:
There is a "set -e" early in the init script. I removed the "set -e" and now its working like expected.

Use set -e

This tells bash that it should exit the script if any statement returns a non-true return value.



Re: djmount/libupnp Support for >2GB Files #9 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 27 September 2012 - 12:06

I think the script should not be responsible to check for fuse support, all it needs to do is load the fuse module (if it exists).
The djmount ipk should take care of enforcing fuse support by having the correct dependencies.

removing set -e seems like a good solution.

Re: djmount/libupnp Support for >2GB Files #10 olqs

  • Member
  • 6 posts

0
Neutral

Posted 1 October 2012 - 13:06

Finally i've had the time to build the patch as requested.

I hope it's in the right format. First time i worked with git.

Attached Files



Re: djmount/libupnp Support for >2GB Files #11 henrikrabit

  • Member
  • 1 posts

0
Neutral

Posted 18 October 2012 - 18:34

What should I write in the console in order to install the patch?

Re: djmount/libupnp Support for >2GB Files #12 blueice_haller

  • Member
  • 3 posts

0
Neutral

Posted 24 August 2013 - 08:43

Hello,
I tried to install djmount on my Receiver. But it will not create the directories in /media/upnp/ . When I try to cd /media/upnp the console hangs up until I stop djmount.
  • Linux azboxhd 3.3.1-opensat #1 PREEMPT Fri Jun 7 21:31:45 CEST 2013 mips GNU/Linux
  • This packets are installed:
  • fuse-utils - 2.8.6-r1 - fuse version 2.8.6-r1
  • fuse-utils-dbg - 2.8.6-r1 - fuse version 2.8.6-r1
  • libfuse-dbg - 2.8.6-r1 - fuse version 2.8.6-r1 - Debugging files
  • libfuse-dev - 2.8.6-r1 - fuse version 2.8.6-r1 - Development files
  • libfuse-staticdev - 2.8.6-r1 - fuse version 2.8.6-r1 - Development files (Static Libraries)
  • libfuse2 - 2.8.6-r1 - fuse version 2.8.6-r1
  • libupnp-dbg - 1.6.5-r1 - libupnp version 1.6.5-r1 - Debugging files
  • libupnp-dev - 1.6.5-r1 - libupnp version 1.6.5-r1 - Development files
  • libupnp-staticdev - 1.6.5-r1 - libupnp version 1.6.5-r1 - Development files (Static Libraries)
  • libupnp3 - 1.6.5-r1 - libupnp version 1.6.5-r1
  • libupnp3 - 1.6.5-r2
  • djmount - 0.71-r4
Here is the debug Output of /var/bin/djmount -f /media/upnp/ -o iocharset=utf8 -d fuse > /tmp/djmount-debug.log 2>&1
fuse: invalid argument `fuse'
[I]   Mount options = iocharset=utf8
[D]   Fuse option = -d
[D]   Debug options = debug,fuse,leak
[D]   Fuse option = fuse
[D]   Fuse option = -r
[D]   Fuse option = -o
[D]   Fuse option = readdir_ino
[I] Charset : successfully initialised charset='utf8'
[D]   Fuse option = -f
[D] Intializing UPnP with ipaddress=(null) port=0
[I] UPnP Initialized (192.168.123.100:49152)
[D] Registering Control Point
[D] Control Point Registered
[D] RefreshAll target=urn:schemas-upnp-org:service:ContentDirectory:1
[E] Error in FUSE main loop = 1
[D] Shutting down ...
Here is the debug Output of /var/bin/djmount -f /media/upnp/ -o iocharset=utf8 -d > /tmp/djmount-debug.log 2>&1
FUSE library version: 2.8.6
nullpath_ok: 0
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.18
flags=0x0000047b
max_readahead=0x00020000
   INIT: 7.12
   flags=0x00000010
   max_readahead=0x00020000
   max_write=0x00020000
   unique: 1, success, outsize: 40
[i]   Mount options = iocharset=utf8
[D]   Fuse option = -d
[D]   Debug options = debug,fuse,leak
[D]   Fuse option = -r
[D]   Fuse option = -o
[D]   Fuse option = readdir_ino
[i] Charset : successfully initialised charset='utf8'
[D]   Fuse option = -f
[D] Intializing UPnP with ipaddress=(null) port=0
[i] UPnP Initialized (192.168.123.100:49152)
[D] Registering Control Point
[D] Control Point Registered
[D] RefreshAll target=urn:schemas-upnp-org:service:ContentDirectory:1
[D] 

======================================================================
UPNP_DISCOVERY_SEARCH_RESULT
ErrCode     =  0
Expires     =  1800
DeviceId    =  uuid:d5c43e80-55af-4b05-a487-8c40af26032e
DeviceType  =  
ServiceType =  urn:schemas-upnp-org:service:ContentDirectory:1
ServiceVer  =  
Location    =  http://192.168.123.8:49152/description.xml
OS          =  Linux/2.6.12.6, UPnP/1.0, MediaTomb/0.12.1
Date        =  Sat, 24 Aug 2013 07:41:05 GMT
Ext         =  
======================================================================


[D] Discovery : device type '' OS 'Linux/2.6.12.6, UPnP/1.0, MediaTomb/0.12.1' at URL 'http://192.168.123.8:49152/description.xml'
[D] AddDevice try new device Id=uuid:d5c43e80-55af-4b05-a487-8c40af26032e
[D] Device_Create : Id = 'uuid:d5c43e80-55af-4b05-a487-8c40af26032e', description document = --------------------
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMS-1.50</dlna:X_DLNADOC>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<presentationURL>http://192.168.123.8:49152/</presentationURL>
<friendlyName>DM7025 Mediaserver</friendlyName>
<manufacturer>(c) 2005-2008 Gena Batyan &lt;bgeradz@mediatomb.cc&gt;, Sergey Bostandzhyan &lt;jin@mediatomb.cc&gt;, Leonhard Wimmer &lt;leo@mediatomb.cc&gt;</manufacturer>
<manufacturerURL>http://www.i-have-a-dreambox.com</manufacturerURL>
<modelDescription>Free UPnP AV MediaServer, GNU GPL</modelDescription>
<modelName>MediaTomb</modelName>
<modelNumber>0.12.1</modelNumber>
<serialNumber>1</serialNumber>
<UDN>uuid:d5c43e80-55af-4b05-a487-8c40af26032e</UDN>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/icons/mt-icon120.png</url>
</icon>
<icon>
<mimetype>image/x-ms-bmp</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/icons/mt-icon120.bmp</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/icons/mt-icon120.jpg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/icons/mt-icon48.png</url>
</icon>
<icon>
<mimetype>image/x-ms-bmp</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/icons/mt-icon48.bmp</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/icons/mt-icon48.jpg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>32</width>
<height>32</height>
<depth>8</depth>
<url>/icons/mt-icon32.png</url>
</icon>
<icon>
<mimetype>image/x-ms-bmp</mimetype>
<width>32</width>
<height>32</height>
<depth>8</depth>
<url>/icons/mt-icon32.bmp</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>32</width>
<height>32</height>
<depth>8</depth>
<url>/icons/mt-icon32.jpg</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
<SCPDURL>cm.xml</SCPDURL>
<controlURL>/upnp/control/cm</controlURL>
<eventSubURL>/upnp/event/cm</eventSubURL>
</service>
<service>
<serviceType>urn:schemas-upnp-org:service:ContentDirectory:1</serviceType>
<serviceId>urn:upnp-org:serviceId:ContentDirectory</serviceId>
<SCPDURL>cds.xml</SCPDURL>
<controlURL>/upnp/control/cds</controlURL>
<eventSubURL>/upnp/event/cds</eventunique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56
getattr /
   unique: 2, success, outsize: 120
unique: 3, opcode: ACCESS (34), nodeid: 1, insize: 48
   unique: 3, error: -89 (Function not implemented), outsize: 16
fuse: writing device: Invalid argument
SubURL>
</service>
</serviceList>
</device>
<URLBase>http://192.168.123.8:49152/</URLBase>
</root>

--------------------
[D] Device_Create : UDN = uuid:d5c43e80-55af-4b05-a487-8c40af26032e
[D] Device_Create : type = urn:schemas-upnp-org:device:MediaServer:1
[D] Service_Create: urn:schemas-upnp-org:service:ConnectionManager:1
[D] serviceId: urn:upnp-org:serviceId:ConnectionManager
[D] Service_Create: urn:schemas-upnp-org:service:ContentDirectory:1
[D] serviceId: urn:upnp-org:serviceId:ContentDirectory
[i] Add new device : Name='DM7025 Mediaserver' Id='uuid:d5c43e80-55af-4b05-a487-8c40af26032e' descURL='http://192.168.123.8:49152/description.xml'
[D] Device_SusbcribeAllEvents DM7025 Mediaserver
[D] Subscribing to EventURL http://192.168.123.8:49152/upnp/event/cm
[D] Subscribed to Service EventURL with SID=uuid:9d057ed0-1dd1-11b2-a6a9-c99895e54b97
[D] Subscribing to EventURL http://192.168.123.8:49152/upnp/event/cds
[D] Subscribed to ContentDir EventURL with SID=uuid:9d3b9542-1dd1-11b2-a6a9-c99895e54b97
[D] Discovery: DeviceList after AddDevice = 
 DM7025 Mediaserver   -- uuid:d5c43e80-55af-4b05-a487-8c40af26032e

[D] 

======================================================================
UPNP_EVENT_RECEIVED
SID         =  uuid:9d3b9542-1dd1-11b2-a6a9-c99895e54b97
EventKey    =  0
ChangedVars =  <?xml version="1.0"?>
<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0">
<e:property>
<SystemUpdateID>0</SystemUpdateID>
<ContainerUpdateIDs>0,10</ContainerUpdateIDs>
</e:property>
</e:propertyset>

======================================================================


[D] Received Event: 0 for SID uuid:9d3b9542-1dd1-11b2-a6a9-c99895e54b97
[D] State Update for service ContentDir
[D] Variable Update 'SystemUpdateID' = '0'
[D] Variable Update 'ContainerUpdateIDs' = '0,10'
[D] 

======================================================================
UPNP_EVENT_RECEIVED
SID         =  uuid:9d057ed0-1dd1-11b2-a6a9-c99895e54b97
EventKey    =  0
ChangedVars =  <?xml version="1.0"?>
<e:propertyset xmlns:e="urn:schemas-upnp-org:event-1-0">
<e:property>
<CurrentConnectionIDs>0</CurrentConnectionIDs>
<SinkProtocolInfo></SinkProtocolInfo>
<SourceProtocolInfo>http-get:*:audio/mpeg:*,http-get:*:audio/x-mpegurl:*,http-get:*:image/jpeg:*,http-get:*:text/plain:*</SourceProtocolInfo>
</e:property>
</e:propertyset>

======================================================================


[D] Received Event: 0 for SID uuid:9d057ed0-1dd1-11b2-a6a9-c99895e54b97
[D] State Update for service Service
[D] Variable Update 'CurrentConnectionIDs' = '0'
[D] Variable Update 'SinkProtocolInfo' = '(null)'
[D] Variable Update 'SourceProtocolInfo' = 'http-get:*:audio/mpeg:*,http-get:*:audio/x-mpegurl:*,http-get:*:image/jpeg:*,http-get:*:text/plain:*'
[D] 

======================================================================
UPNP_DISCOVERY_SEARCH_RESULT
ErrCode     =  0
Expires     =  1800
DeviceId    =  uuid:d5c43e80-55af-4b05-a487-8c40af26032e
DeviceType  =  
ServiceType =  urn:schemas-upnp-org:service:ContentDirectory:1
ServiceVer  =  
Location    =  http://192.168.123.8:49152/description.xml
OS          =  Linux/2.6.12.6, UPnP/1.0, MediaTomb/0.12.1
Date        =  Sat, 24 Aug 2013 07:41:07 GMT
Ext         =  
======================================================================


[D] Discovery : device type '' OS 'Linux/2.6.12.6, UPnP/1.0, MediaTomb/0.12.1' at URL 'http://192.168.123.8:49152/description.xml'
[D] AddDevice Id=uuid:d5c43e80-55af-4b05-a487-8c40af26032e already exists, update only
[D] Discovery: DeviceList after AddDevice = 
 DM7025 Mediaserver   -- uuid:d5c43e80-55af-4b05-a487-8c40af26032e

[D] 

======================================================================
UPNP_DISCOVERY_SEARCH_TIMEOUT
(NULL EVENT BODY)
======================================================================


[D] fuse browse : looking for '/' ...
[D] matched '' left ''
[D] GetDevicesNames
[D] Shutting down ...
[D] Unsubscribed from ContentDir EventURL with SID=uuid:9d3b9542-1dd1-11b2-a6a9-c99895e54b97
[D] Unsubscribed from Service EventURL with SID=uuid:9d057ed0-1dd1-11b2-a6a9-c99895e54b97

Edited by blueice_haller, 24 August 2013 - 08:48.


Re: djmount/libupnp Support for >2GB Files #13 sebus

  • Member
  • 10 posts

0
Neutral

Posted 12 January 2014 - 17:41

Thanks olqs, but your djmount compile still has problems. It does not show/list .mkv correctly.

Instead it displays:

 

Phineas.and.Ferb.The.Movie.Across.the.2nd.Dimension.2011.720p.HDTV.x264.mkv.mpg

 

I am sure that could be "corrected"

 

Help much appreciated

 

sebus



Re: djmount/libupnp Support for >2GB Files #14 sebus

  • Member
  • 10 posts

0
Neutral

Posted 16 January 2014 - 22:03

The "fix" is supposed to be like this: http://forum.stmlabs...ad.php?tid=2411

 

sebus




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users