Dear Andre,
thank you very much for the patches you attached.
(for the community I received the files in another message as the mail system has filtered them)

The changes concern the patched Cyberlink library which is maintained in another repository. I forwarded the files to Stefano and they will be likely applied to the version 1.8.

thanks again
francesco




BOTTARO Andre RD-MAPS-GRE wrote:
Thanks to a colleague, our patched version of the UPnP Base Driver now enables 
our OSGi applications to interoperate with several real devices that are 
standard UPnP Media Servers. Here are the classes and a description of the 
patch.

--------------------------

1. Problem introduction Apache Felix UPnP Base Driver doesn't enable osgi applications to correctly browse (UPnP AV Content Directory Service action named browse) media files present on several devices in particular these ones:
-       Quartek Qbox
-       Philips Media Manager
Sending the 'browse' action on the CDS service of these UPnP devices, Apache 
Felix UPnP Base Driver return a null object.


2.      Problem analysis
Sniffing http packet on the network, we see that these servers don't return all variable that the 
Apache Felix UPnP Base Driver wait for. Indeed, the Media Servers don't return the constant 
"CONTENT-LENGTH" in HTTP packets and the HTTP message parsing is obviously skipped by the 
cyberlink UPnP stack that is embedded in the Apache Felix UPnP Base Driver. Then the result of the 
"browse" action appears to be null. Although this problem was raised by the browse action 
that is critical in our application, the problem would probable have occured with other action 
calls.


3.      Solution
In order to resolve this problem, 2 Java(tm) classes in distinct packages are 
modified.

The objective is first to initialize the "CONTENT-LENGTH" variable with a value big enough to contain all the possible values in UPnP applications. We declare a constant "conlen" initially assigned to 999999999. It thus simulates a big "CONTENT-LENGTH" for the browse action response to be parsed and the media controller can correctly browse Media servers. This change is made in HTTPPacket.set(InputStream in, boolean onlyHeaders) method (org.cybergarage.http package).

The Action.postControlAction() method (org.cybergarage.upnp package) is also 
changed to use the new method HTTPPacket.set().

--
André

Reply via email to