CpProxyAvOpenhomeOrgInfo1 problems
|
01-05-2013, 06:29 PM
Post: #1
|
|||
|
|||
CpProxyAvOpenhomeOrgInfo1 problems
Hi,
First of all thanks for all the help you gave me whilst I was developing my Java MediaRenderer. I now have it working. My next project isto build another Java app, this time it would subscribe to the Info service of the MediaRenderer to receive any notifications when the playing track changes. The idea is that it will then display the cover art and perform web searches for lyrics/band information. I have modified the TestProxy application but am having some problems. It fails if I subscribe to the Info service, but if I use DeviceSpy to subscribe to my MediaRenderer it works, also if I use my modified TestProxy to subscribe for another MediaRenderer (dbPowerAmp Rennassance) Info service that works. If I use TestProxy to subscribe for the Volume or Time service to my Java MediaRenderer that also works... Again could it be something stupid I have done.. Looking at the logs : My Test Proxy subscribes to Java MediaRenderer (no track playing) Quote:Subscribing - service = urn:av-openhome-org:service:Info:1 In the MediaRenderer I see the subscription Quote:2013-05-01 19:08:23,210 [Thread-8] INFO [org.rpi.main.OpenHomeLogger] Method: All is stable until I start a track playing and the info service updates. Then in the TestProxy I see the following messages over and over again Quote:EventSessionUpnp::Run, ReaderError handling In the MediaRenderer I see the subscription being unsubscribed and then resubscribed.. Quote:2013-05-01 19:10:09,757 [Thread-9] INFO [org.rpi.main.OpenHomeLogger] Method: The code for the TestProxy is just a quick test but it works for Time and Volume and it also works for other MediaRenderers which made me wonder is there was an issue between the CpProxyAVOpenhomeOrgInfo1 and the DvProviderAvOpenhomeOrgInfo1 classes. A snippet of the code is below, it's a bit crude but I was trying to keep it as simple as possible.. Code: public void deviceAdded(CpDevice aDevice) { Thanks again, Pete. |
|||
02-05-2013, 09:02 AM
Post: #2
|
|||
|
|||
RE: CpProxyAvOpenhomeOrgInfo1 problems
(01-05-2013 06:29 PM)PeteManchester Wrote: The code for the TestProxy is just a quick test but it works for Time and Volume and it also works for other MediaRenderers which made me wonder is there was an issue between the CpProxyAVOpenhomeOrgInfo1 and the DvProviderAvOpenhomeOrgInfo1 classes. A control point will try resubscribing (unsubscribe followed immediately by a new subscribe) if a proxy's properties get into an inconsistent state. The most common (only?) such states are
|
|||
02-05-2013, 10:51 AM
Post: #3
|
|||
|
|||
RE: CpProxyAvOpenhomeOrgInfo1 problems
Hi Simon,
I seem to have all 12 variables declared.. I forgot to mention that as well as working with DeviceSpy the Info service also works with Kinsky. Code: public PrvInfo(DvDevice iDevice) { |
|||
02-05-2013, 04:33 PM
Post: #4
|
|||
|
|||
RE: CpProxyAvOpenhomeOrgInfo1 problems
(02-05-2013 10:51 AM)PeteManchester Wrote: Hi Simon, Thanks for the extra detail Pete. While its good to know that your device works against other control points, DeviceSpy is pretty lax in its subscription handling and Kinsky is much more forgiving of bad input than ohNet so having them working doesn't completely rule out device-side errors I'm afraid. I tried to reproduce the problem using a simple C# app (below). This seems to subscribe successfully to an Info service provider. Can you update this test (or provider a Java equivalent) that demonstrates your problem please? I'm not sure what else I'll be able to do without being able to reproduce your problem. Code: using System; |
|||
03-05-2013, 08:33 AM
Post: #5
|
|||
|
|||
RE: CpProxyAvOpenhomeOrgInfo1 problems
Hi Simon,
That was a big help thanks, it looks like I need to trim down my metadata to just the relevant information, to me it looks like there is a limit on the length of the String.. I modified the code below as a test and it seems as though it breaks when with the metadata is too long.. Code: using System; |
|||
03-05-2013, 08:55 AM
Post: #6
|
|||
|
|||
RE: CpProxyAvOpenhomeOrgInfo1 problems
(03-05-2013 08:33 AM)PeteManchester Wrote: That was a big help thanks, it looks like I need to trim down my metadata to just the relevant information, to me it looks like there is a limit on the length of the String.. The limit turns out to be on the length of the body in an evented update message. This was set to 1k which is much too low. I'll change it to 16k for now. You might want to consider truncating (or discarding) metadata which is too long in your provider to avoid this problem re-appearing later. We may change things later to remove these hard-coded limits from the control point. Its not an easy problem though - we'd be happy with dynamic memory allocation in CPs using managed bindings but want to avoid heap churn for other embedded users of the stack. The fix I've committed is below. You could apply this locally if you're currently blocked and can't wait for the updates to make it to github. Code: diff --git a/OpenHome/Net/ControlPoint/Upnp/EventUpnp.h b/OpenHome/Net/ControlPoint/Upnp/EventUpnp.h |
|||
03-05-2013, 01:41 PM
Post: #7
|
|||
|
|||
RE: CpProxyAvOpenhomeOrgInfo1 problems
Thanks Simon,
That makes sense, I did try trimming down the meta data because there is a lot of info that's not needed in there but it was still hard to get down to 1k.. So it looks like the increase to 16k will be useful.. Thanks again, Pete. |
|||
« Next Oldest | Next Newest »
|