Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple DvProviderAvOpenhomeOrgRadio1 Sources
11-11-2013, 10:24 AM
Post: #1
Multiple DvProviderAvOpenhomeOrgRadio1 Sources
Hi,

Is it possible to create multiple instances of DvProviderAvOpenhomeOrgRadio1 in a Renderer.

I have tried to create two Radio Sources but I always get a Fatal Java Error when creating the second instance.

My plan was to use the second Radio source as an input source so that on a pre amp I could switch between sources, that way the inputs could easily be controlled by Kinsky.

Code:
    private PrvRadio iRadio =  null;
    private PrvRadio iInput = null;
        ....
        public SimpleDevice()
        {
            
            iProduct = new PrvProduct(iDevice);
        iVolume = new PrvVolume(iDevice);
        iPlayList = new PrvPlayList(iDevice);
        iInfo = new PrvInfo(iDevice);
        iTime = new PrvTime(iDevice);
        iRadio = new PrvRadio(iDevice);
        iInput = new PrvRadio(iDevice);
                .......

Where PrvRadio is my implementation of DvProviderAvOpenhomeOrgRadio1

Code:
public class PrvRadio extends DvProviderAvOpenhomeOrgRadio1 implements Observer {


Thanks,

Pete.
Find all posts by this user
11-11-2013, 11:21 AM
Post: #2
RE: Multiple DvProviderAvOpenhomeOrgRadio1 Sources
(11-11-2013 10:24 AM)PeteManchester Wrote:  Is it possible to create multiple instances of DvProviderAvOpenhomeOrgRadio1 in a Renderer.

I have tried to create two Radio Sources but I always get a Fatal Java Error when creating the second instance.

This isn't possible. I don't think it could work reliably over UPnP... An action invocation lists the domain/name/type for a service; if two providers implemented the same service, the UPnP stack couldn't know which of them to route each invocation to.

(11-11-2013 10:24 AM)PeteManchester Wrote:  My plan was to use the second Radio source as an input source so that on a pre amp I could switch between sources, that way the inputs could easily be controlled by Kinsky.

I'm not sure I understand what you're trying to do here.

If you want the Radio source to be controllable via Kinsky, you just need to list it in the SourceXml state variable on the Product service.

If you want to add support for external sources (e.g. SPDIF or HDMI), you could add a different source (to Product's SourceXml as above). This doesn't need to have a UPnP service associated with it.
Find all posts by this user
11-11-2013, 12:07 PM
Post: #3
RE: Multiple DvProviderAvOpenhomeOrgRadio1 Sources
(11-11-2013 11:21 AM)simonc Wrote:  
(11-11-2013 10:24 AM)PeteManchester Wrote:  Is it possible to create multiple instances of DvProviderAvOpenhomeOrgRadio1 in a Renderer.

I have tried to create two Radio Sources but I always get a Fatal Java Error when creating the second instance.

This isn't possible. I don't think it could work reliably over UPnP... An action invocation lists the domain/name/type for a service; if two providers implemented the same service, the UPnP stack couldn't know which of them to route each invocation to.

(11-11-2013 10:24 AM)PeteManchester Wrote:  My plan was to use the second Radio source as an input source so that on a pre amp I could switch between sources, that way the inputs could easily be controlled by Kinsky.

I'm not sure I understand what you're trying to do here.

If you want the Radio source to be controllable via Kinsky, you just need to list it in the SourceXml state variable on the Product service.

If you want to add support for external sources (e.g. SPDIF or HDMI), you could add a different source (to Product's SourceXml as above). This doesn't need to have a UPnP service associated with it.

Hi Simon,

Thanks for the quick reply.
That makes sense that you cannot have two Radio Sources.

As usual i was trying to over complicate things and have a group of sources (like you have a Radio section and within that you have the stations), but the suggestion of just adding the sources to the SourceXml is a good one.

Thanks again,

Pete.
Find all posts by this user


Forum Jump: