INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: UPnP implementation  (Read 3678 times)

doulos

  • World Citizen
  • ***
  • Posts: 148
UPnP implementation
« on: March 30, 2012, 03:02:33 am »

Hello,

I am using my spare time to write an android tablet-only UPnP control point, which I would like to test against JRiver MC. It already works with other media servers, e.g. Logitech, but when I try to browse the MC folders, I get empty contents. Could it be that I am using the wrong folder ID ("0")?

Also, it seems I am not getting LastChange events from the MediaRenderer/AVTransport. Again, is there something I may be doing wrong? Is LastChange published? Could someone maybe tell me how solid MCs UPnP implementation is, and how many surprises are waiting?

thanks,
chris
Logged
MediaSteersman - Your Media at Your Fingertips

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: UPnP implementation
« Reply #1 on: March 30, 2012, 06:46:29 am »

Hello,

I am using my spare time to write an android tablet-only UPnP control point, which I would like to test against JRiver MC. It already works with other media servers, e.g. Logitech, but when I try to browse the MC folders, I get empty contents. Could it be that I am using the wrong folder ID ("0")?

Also, it seems I am not getting LastChange events from the MediaRenderer/AVTransport. Again, is there something I may be doing wrong? Is LastChange published? Could someone maybe tell me how solid MCs UPnP implementation is, and how many surprises are waiting?
Try setting MC's DLNA to "DLNA Extra".
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: UPnP implementation
« Reply #2 on: March 30, 2012, 03:19:39 pm »

Hello,

I am using my spare time to write an android tablet-only UPnP control point, which I would like to test against JRiver MC. It already works with other media servers, e.g. Logitech, but when I try to browse the MC folders, I get empty contents. Could it be that I am using the wrong folder ID ("0")?

Also, it seems I am not getting LastChange events from the MediaRenderer/AVTransport. Again, is there something I may be doing wrong? Is LastChange published? Could someone maybe tell me how solid MCs UPnP implementation is, and how many surprises are waiting?

thanks,
chris
Container 0 is the root container. You should see the audio, image, video and playlist containers within that.
You should make sure that you've got the MC's renderer enabled under tools->options->Media Network->Advanced.
Logged

doulos

  • World Citizen
  • ***
  • Posts: 148
Re: UPnP implementation
« Reply #3 on: March 31, 2012, 11:47:16 am »

ok, thanks for your replies. The browsing isse was on my side, I can see the contentdirectory now. However, I am hitting another issue: when I execute the GetProtocolInfo action against the connection manager, I get a string that contains the following sequence towards the end:

http-get:*:application/x-srt:*http-get:*:application/x-sub:*http-get:*:text/srt:*http-get:*:text/sub:*file:*:audio/x-ms-wma:*

that value is illegal, as it does not follow the <protocol>’:’ <network>’:’<contentFormat>’:’<additionalInfo> pattern prescribed by the UPnP spec, and therefore it doesn't parse with my UPnP library. It appears that somehow along the way, a couple of protocolinfo sequences get appended without the required comma separator. Would you agree that this is a bug on MC's side (which I will have to work around for now)?

thanks,
christian
Logged
MediaSteersman - Your Media at Your Fingertips

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: UPnP implementation
« Reply #4 on: April 02, 2012, 10:42:25 am »

ok, thanks for your replies. The browsing isse was on my side, I can see the contentdirectory now. However, I am hitting another issue: when I execute the GetProtocolInfo action against the connection manager, I get a string that contains the following sequence towards the end:

http-get:*:application/x-srt:*http-get:*:application/x-sub:*http-get:*:text/srt:*http-get:*:text/sub:*file:*:audio/x-ms-wma:*

that value is illegal, as it does not follow the <protocol>’:’ <network>’:’<contentFormat>’:’<additionalInfo> pattern prescribed by the UPnP spec, and therefore it doesn't parse with my UPnP library. It appears that somehow along the way, a couple of protocolinfo sequences get appended without the required comma separator. Would you agree that this is a bug on MC's side (which I will have to work around for now)?

thanks,
christian
Thanks for catching that. It'll be fixed in the next build!
Logged

doulos

  • World Citizen
  • ***
  • Posts: 148
Re: UPnP implementation
« Reply #5 on: April 02, 2012, 12:54:40 pm »

you dont happen to share code with TVMobili (http://www.tvmobili.com/)? I've seen the same behavior from them..

I also found that gaplessness was not fully achievable.
Logged
MediaSteersman - Your Media at Your Fingertips

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: UPnP implementation
« Reply #6 on: April 02, 2012, 01:36:28 pm »

you dont happen to share code with TVMobili (http://www.tvmobili.com/)? I've seen the same behavior from them..
No we don't use the same code. I guess missing commas is easy ;)

Quote
I also found that gaplessness was not fully achievable.
You can do it with SetNextAVTransportURI. Any time after you issue a play command with the first URI, you can use SetNext.. to setup the next item to be played. This bypasses all of the start/stop logic for transitioning tracks. If you keep track of what's playing, whenever the current uri finishes you can call SetNext.. again for the next URI.
Logged

doulos

  • World Citizen
  • ***
  • Posts: 148
Re: UPnP implementation
« Reply #7 on: April 02, 2012, 02:06:59 pm »

Quote
You can do it with SetNextAVTransportURI

well, thats what I am doing. Guess I got mixed up with threads, SetNextAVTransportURI was the subject on the other one. What I wanted to say is that even when using SetNextAVTransportURI, there are small gaps left
Logged
MediaSteersman - Your Media at Your Fingertips

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: UPnP implementation
« Reply #8 on: April 02, 2012, 02:15:13 pm »

well, thats what I am doing. Guess I got mixed up with threads, SetNextAVTransportURI was the subject on the other one. What I wanted to say is that even when using SetNextAVTransportURI, there are small gaps left
Using MC as the renderer?
What file types?
Even on our dead slow Sony Netbook I get completely gapless transitions...
What sound hardware on the renderer??

Logged

doulos

  • World Citizen
  • ***
  • Posts: 148
Re: UPnP implementation
« Reply #9 on: April 02, 2012, 02:35:25 pm »

no, not with MC as renderer. As I said, I got mixed up with the different threads, didnt want to mention SetNext.. on this one. However, to clarify: my SetNext.. test was mainly on the Sony CMT, and that is where I encountered gaps nonetheless. I am currently using MC for testing video.

Since we're at it: I am right now looking at a paused video, but when I launch my CP, I get no transportState reported in the LastChange event (value is empty, would expect PAUSED). I do get the PLAYING state when MC is playing, however.
Logged
MediaSteersman - Your Media at Your Fingertips

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: UPnP implementation
« Reply #10 on: April 02, 2012, 03:54:06 pm »

no, not with MC as renderer. As I said, I got mixed up with the different threads, didnt want to mention SetNext.. on this one. However, to clarify: my SetNext.. test was mainly on the Sony CMT, and that is where I encountered gaps nonetheless. I am currently using MC for testing video.
OK, I missed that..
Quote
Since we're at it: I am right now looking at a paused video, but when I launch my CP, I get no transportState reported in the LastChange event (value is empty, would expect PAUSED). I do get the PLAYING state when MC is playing, however.
Can you layout the sequence of events to get to that point?
Were you using your CP to start playing with MC as the renderer or did you start playing in MC then check state with your CP?
I assume you were using MC as a server too?
Logged

doulos

  • World Citizen
  • ***
  • Posts: 148
Re: UPnP implementation
« Reply #11 on: April 02, 2012, 04:39:28 pm »

yes, using MC as both server and renderer. Heres the sequence:

- start playing video from within MC (Windows application, not CP)
- start CP and look at the device. All is nice!
- press the pause button from my CP. Playback is paused (screen shows still picture)
- terminate and restart the CP
- look at the device (and logs and all): no state received.

my logs show that I receive a LastChange event, but transportState is empty.
Logged
MediaSteersman - Your Media at Your Fingertips

johnno001

  • Recent member
  • *
  • Posts: 17
Re: UPnP implementation
« Reply #12 on: April 03, 2012, 06:59:19 am »

I cant profess to understand half of what you all have posted here but I would really welcome development of Android players and renderers specifically for MC - my ideal would be an app that would let me use the Theatre View.

As posted in the network thread I have bought an Android Tablet (Archos 101 IT Internet Tablet) which on first looks and playing around with various apk's seems to be really good for the price.

I have tried the Gizmo but I really wanted a beter way of browsing and choosing my albums and tracks; I have to date been useing a touchscreen monitor with Theater View whish is awsome for parties etc....
I have found two packages that work pretty well "2Play" and "BubbleUpnplay" - "UpnPlay" not so good - both the former allow for network Upn browsing and choice of renderer i.e. either local or network MC. Unfortunately both of them are a little temperamental and some of the features for setting up playlists arent great.

Let me know if any of you are getting close to a suitable apk and if you need a guinea pig for testing.

Message for Jim - still think that MC rocks and I am seling it to everyone I can....... everyone I have converted so far loves it.
Logged

doulos

  • World Citizen
  • ***
  • Posts: 148
Re: UPnP implementation
« Reply #13 on: April 03, 2012, 08:12:55 am »

you can have an initial look at what I am about to present here: http://www.byterefinery.de/?page_id=2 (site will be in english soon, just look at the picture for now). This is an initial prototype without any visual pizazz. I will post here as soon as it is public-testable. Of course, the quality of the overall experience depends on all involved parties - Server, Controller, and Renderer. My tool just does the controlling part, there is no rendering on the android device. MC does the serving and rendering part, and with the latter I currently have the issue (to continue my previous post) of a missing PAUSED status notification..
Logged
MediaSteersman - Your Media at Your Fingertips

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: UPnP implementation
« Reply #14 on: April 03, 2012, 09:48:45 am »

yes, using MC as both server and renderer. Heres the sequence:

- start playing video from within MC (Windows application, not CP)
- start CP and look at the device. All is nice!
- press the pause button from my CP. Playback is paused (screen shows still picture)
- terminate and restart the CP
- look at the device (and logs and all): no state received.

my logs show that I receive a LastChange event, but transportState is empty.
When you terminate the CP assuming you unsubscribe, the LastChange event will send all of the variables next time you subscribe otherwise you will only get changed variables.
So I'm guessing that either you aren't unsubscribing before terminating or are missing the event when you resubscribe.
You could always query GetTransportInfo when you startup the CP...
Logged

doulos

  • World Citizen
  • ***
  • Posts: 148
Re: UPnP implementation
« Reply #15 on: April 03, 2012, 04:31:03 pm »

yes, that explains what I am seeing, thanks. However, I was under the impression that subscriptions run out if not renewed periodically? I'll have to read up on that..
Logged
MediaSteersman - Your Media at Your Fingertips

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13870
Re: UPnP implementation
« Reply #16 on: April 05, 2012, 10:02:19 am »

yes, that explains what I am seeing, thanks. However, I was under the impression that subscriptions run out if not renewed periodically? I'll have to read up on that..
I think you're correct but the timeout is pretty long...
Logged
Pages: [1]   Go Up