OpenHome Forum
Java Media Renderer - Printable Version

+- OpenHome Forum (http://forum.openhome.org)
+-- Forum: OpenHome (/forumdisplay.php?fid=1)
+--- Forum: Media (/forumdisplay.php?fid=3)
+--- Thread: Java Media Renderer (/showthread.php?tid=1108)



Java Media Renderer - PeteManchester - 27-03-2013 01:57 PM

Hi,

Sorry for the question...

I am playing about with developing a Renderer (audio) using ohNet Java.

I have implemented the following services:
Info
PlayList
Product
Time
Volume
ConnectionManager

Looking at other renderers this seems to be the minimum services needed.

Everything is working fine except for one thing, the Control Point does not indicate which track is playing in the play list. For example in Kinsky the track that is playing should have a loudspeaker icon in the playlist listview.

In the Renderer when I receive a seekindex event from the Control Point I do the following:

Find my track in the playlist

Set the Playlist transport state to buffering (setPropertyTransportState = "Buffering")
Start the track playing
Info setTrack(uri, metadata, duration etc..)
Info setMetaText
set the PlayList transport state to playing (setPropertyTransportState = "Playing")
Update the Time (duration and seconds)

Does anybody know what I am missing? I have looked at other renderers and it seems as though the notification to the control point about which track is playing seems to be done at the start either just before or just after the buffering state.

Are there any docs that specify how a renderer should work.

Thanks,

Pete

PS thanks for a great product..


RE: Java Media Renderer - simonc - 28-03-2013 09:36 AM

(27-03-2013 01:57 PM)PeteManchester Wrote:  Everything is working fine except for one thing, the Control Point does not indicate which track is playing in the play list. For example in Kinsky the track that is playing should have a loudspeaker icon in the playlist listview.

At a guess, you may need to set the Id state variable on the Playlist service each time you change the track being played. i.e. try adding a call to DvProviderAvOpenhomeOrgPlaylist1.setPropertyId

(27-03-2013 01:57 PM)PeteManchester Wrote:  Are there any docs that specify how a renderer should work.

There are basic docs available at http://www.openhome.org/wiki/Av:Developer#Products . These are still a work in progress so won't answer all your questions. In particular, they don't consider evented state variables yet. They'll hopefully be a good starting point for you; I'm happy to update them if you find specific areas of missing content.


RE: Java Media Renderer - PeteManchester - 04-04-2013 02:54 PM

Hi Simon

That was the solution, I needed to call

Quote:DvProviderAvOpenhomeOrgPlaylist1.setPropertyId

I had a look through the documents and they give a good overview. Following the documents I have now managed to get my PlayList working and also add a Radio Service and a Receiver service.

The only thing that it would have been good to have had included in the docs was the format of the xml required in the

DvProviderAvOpenhomeOrgRadio1.ReadList
Code:
<ChannelList>
     <Entry>
         <Id></Id>
         <Uri></Uri>
         <Metadata></Metadata>
     </Entry>
</ChannelList>

But by looking at the RadioService description xml I got there..

Thanks again.

Pete.


RE: Java Media Renderer - simonc - 04-04-2013 03:36 PM

Thanks Pete, its good to hear that you're making progress. I'll update the docs for the Radio service, probably next week.