intel / dleyna-renderer

dleyna-renderer is a library for implementing services that allow clients to discover and manipulate Digital Media Renderers. An implementation of such a service for linux is also included
https://01.org/dleyna/
GNU Lesser General Public License v2.1
16 stars 19 forks source link

[Device] Add X_DLNA_PS transport action support - v3 #52

Closed cguiraud closed 11 years ago

cguiraud commented 11 years ago

when SetAVTransportURI() action is called, MINIMUM_RATE, MAXIMUM_RATE and TRANSPORT_PLAY_SPEEDS properties will be reset with the renderer default playspeeds.

action string = Play,Stop,Seek,X_DLNA_PS=-8\,2\,4\,8

Signed-off-by: Christophe Guiraud christophe.guiraud@intel.com

cguiraud commented 11 years ago

I've tested with a BRAVIA TV which provides default speeds list with (-120.0,-30.0,-10.0,1.0,10.0,30.0,120.0) and also provide the X_DLNA_PS action with also (-120.0,-30.0,-10.0,1.0,10.0,30.0,120.0) values.

markdryan commented 11 years ago

Great. I'll test the patch today with WMP and XBOX 360.

cguiraud commented 11 years ago

yes the dev->mpris_transport_play_speeds is only set once during the initialization of the device (from the transport service description xml), it's a kind of default device value. when we check a rate validity upon a set prop rate request, we first try to use the dynamic speeds (device->dlna_transport_play_speeds) if they are available and if not we fallback on the default ones (dev->mpris_transport_play_speeds).

markdryan commented 11 years ago

Christophe,

Okay, I'm a bit confused now

When prv_set_rate is called it calls prv_get_rate_value_from_double.

prv_get_rate_value_from_double iterates through device->mpris_transport_play_speeds (tps) and checks to see if the new rate is in device->mpris_transport_play_speeds. If the new rate is not in device->mpris_transport_play_speeds it cannot be set. So I can't see how any rate in DLNA_PS that are not in the service file can be set.

cguiraud commented 11 years ago

ok, you're right I've missed here that tps should also be set with the dynamic speed list in "mpris" format, i.e TRANSPORT_PLAY_SPEEDS prop value, in the case where we have device->dlna_transport_play_speeds != NULL. I fix this if you agree

markdryan commented 11 years ago

Sounds good.