-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenHome services #45
base: master
Are you sure you want to change the base?
Conversation
this does not create an OpenHome renderer yet, but can be controlled with an UPnP device and service analyzer, e.g. UPnP Inspector
OpenHome services do not use LastChange for eventing
…e (same for previous) This has to be revisited when properly implementing shuffle and repeat
Manually merged upstream commit b59259c, I am at a point where automatic merge would not work
Manually merged upstream commit fd8f9c7
Manually merged upstream commit 238a3c6
Manually merged upstream commit 90f9b9b
When using LastChange, not all modified variables must be sent in event. We use sendevents flag to filter out unwanted variables. See: hzeller@47da829 hzeller@ed0f527
@@ -191,7 +194,7 @@ enum UPNPTransportError { | |||
[TRANSPORT_VAR_ABS_TIME_POS] = "NOT_IMPLEMENTED", | |||
[TRANSPORT_VAR_REL_CTR_POS] = "2147483647", | |||
[TRANSPORT_VAR_ABS_CTR_POS] = "2147483647", | |||
[TRANSPORT_VAR_LAST_CHANGE] = "<Event xmlns=\"urn:schemas-upnp-org:metadata-1-0/AVT/\"/>", | |||
[TRANSPORT_VAR_LAST_CHANGE] = "<Event xmlns=\"" TRANSPORT_EVENT_XML_NS "\"/>", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this is better.
Sorry, that looks like a lot of comments, but I am kinda used to detailed code-reviews in my day job. Mostly things are ok, often I just have suggestions for future changes. In general: I like it, nice job! I haven't looked too much into detail in the open-home protocol implementation (what actions are implemented, what variables) - I supposed you did that by spec, so I wasn't looking too much in to cross-verifying that. I played around with BubbleUPnP, and that worked :) I do have some comments regarding the variable notification changes. I like that asynchronous notification scheme with a separate thread, it could help reducing some latency (I have never seen this myself, but this is good nevertheless). There are some problems with the handover between different threads though: it is possible that sometimes a change notification is missed as the notify_collector can be changed by multiple threads in a race condition ... and only one wins. This is potentially benign. But problematic is the access of the variable contents in different threads. Unless I am mistaken, the variables content is read from within the notification thread without a locked mutex that also protects the variable content writing. This certainly can lead to corrupt variable reads. Can you fix these things ? I think then we're ready to merge this into the main branch. Thank you, |
I agree that there is a possible race condition. I think the changes related to notify_mutex I propose can solve this |
@hzeller , I have now made some modifications you proposed - but only those which are trivial. Will take some time this weekend to do the rest |
Can you already submit and push your changes so far, so that I can have a look ? |
I have just finished a couple of changes, will commit soon |
service-level mutex was only used to protect access to variable containers, and notifications thread did not protect access to containers The mutex was moved to variable container, and is now used in all places where variable containers are accessed. Also, the notification code was improved to make sure variable changes are not missed
that is the right place where variable names belong, and this allows to not pass complete service descriptor to variable container constructor
distinguish SENDEVENT_YES from SENDEVENT_LASTCHANGE
I am back from vacation now. I ended up travelling so much, that my internet access was actually not that great so couldn't do much of a review. |
Any progress on this one? |
Currently testing this pull request. Looks like the events if the song changed are not send correctly to the UPnP services (e.g. UPnP-display). Well, I wander if this works for gmrender in the original version as well anyway.... |
Shame that this kind of went quiet. You can get OpenHome services with the current code using the bubbleupnp-server wrapper (see http://www.coraline.org/non-fiction/raspi-upnp-renderer for details of how I did it), but a native implementation would probably work better. |
On 5 February 2014 14:54, christiscarborough [email protected]:
I am very sorry for the delay, things went kind of crazy here and I am busy -h |
No worries. Glad to see it may still be on the cards. |
Any news? |
This looks perfect for a project I'm working on. Tantalizingly close... Any chance of a merge? Edit: Nevermind. I see this has been forked already. |
There were a lot of changes needed and the review fizzled out eventually as this was touching so much code that testing without access to a control-point was a gamble. Anyway, want to pick this up again. To do so, it needs to be tested and compared against the specification. This means
|
On 22 Oct 19 5:37 am, Henner Zeller wrote:
There were a lot of changes needed and the review fizzled out
eventually as this was touching so much code that testing without
access to a control-point was a gamble.
Anyway, want to pick this up again. To do so, it needs to be tested
and compared against the specification. This means
* It needs to be testable somehow. Is there an open source OpenHome
control point or some Android app that this can be tested with ?
* specifiction needed. Is there a link to the OpenHome specification
somewhere ?
—
I'm not aware of a current open source OpenHome control point. Lynn
Kazoo is a free install on Windows, Android, Ipad or Mac but obviously
you can't poke around in the source. They had a previous open source
app called Kinsky, which was open source, but they seem to have taken it
down completely. There is a docker vm here.
https://github.com/DoomHammer/kinsky-docker. No idea if that contains
the source or not. bubbleupnp-server (java app) on Android implements
an OpenHome wrapper around other UPNP renderers, and may be a useful
source of understanding, but not sure of the licence.
OpenHome spec is at http://wiki.openhome.org/wiki/OhMedia.
Hope this helps.
Christi
|
I consider OpenHome services working now
There are few things I think could be done: