summaryrefslogtreecommitdiff
path: root/libdleyna/renderer/device.c
Commit message (Collapse)AuthorAgeFilesLines
* Changed the Copyright to 2017Rick Bell2017-02-271-1/+1
|
* Fix for issue #161 -- Uninitialized argument value in prv_open_uri_cbljsachs-patch-1ljsachs2016-10-121-0/+2
|
* Used core functionality dleyna_core_prv_convert_udn_to_path for persistent pathRick Bell2015-05-011-48/+3
|
* Merge pull request #132 from lferrandis/uidRick Bell2015-04-211-2/+52
|\ | | | | Uid
| * to fix upLudovic Ferrandis2013-09-171-7/+49
| | | | | | | | Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
| * [Path] Make object paths stable across restartsLudovic Ferrandis2013-09-161-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix issue #114: <https://github.com/01org/dleyna-renderer/issues/114> Root paths for servers were builded using an incremental counter, based of the discovery order made by GSSDP: Results were of this form: /com/intel/dLeynaRenderer/server/0 /com/intel/dLeynaRenderer/server/1 Object paths were builded on these root paths: /com/intel/dLeynaRenderer/server/0/xxxxxxxxxx There is no persistence between restarts of dleyna because we can't assign the same index to the same server. To fix this issue, we replace the volatile part of the root path, id the index, by a non volatile and unique part, id the server udn. The server udn is a string of this form: "uuid:<uuid string>" <uuid string> is defined by RFC 4122(<http://www.ietf.org/rfc/rfc4122.txt> and it's composed only with hex digit and char '-' To make the path compatible with dbus and 'reversible': 1 - remove the prefix 'uuid:' 2 - convert '-' char to '_' char Result is of the form below: /com/intel/dLeynaRenderer/server/99951d71_23d5_5525_94eb_a4aa78a98211 This path is stable accross dleyna restart and identify uniquely a server. This can be sued to save object path and to use them after multiple restart of the server and dLeyna. Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
* | [Device] Free dlna class strings after useJussi Kukkonen2014-07-071-5/+1
| | | | | | | | | | | | | | | | | | | | Ownership of strings in the GList that gupnp_device_info_list_dlna_device_class_identifier () returns is fully transferred since GUPnP 0.20.4. Free the strings after use. Fixes #129. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
* | [Device] Update playspeed when rate is setJussi Kukkonen2014-06-231-1/+12
| | | | | | | | | | | | | | | | | | Modify renderer playback speed when org.mpris.MediaPlayer2.Player.Rate is changed when the renderer is playing. Fix issue #143: <https://github.com/01org/dleyna-renderer/issues/143> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
* | [Memory Leak] Partial fix for bug 129Mark Ryan2013-09-261-12/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/01org/dleyna-renderer/issues/129 This commit attempts to partially fix bug 129. It cannot be completely fixed at the moment due to a bug in GUPnP. https://bugzilla.gnome.org/show_bug.cgi?id=708751 At least we're freeing the list now, if not the strings that it contains. Also, to reduce the effect of the memory leak, this commit ensures that it only happens once per renderer rather than once each time we receive an event from a renderer. The assumption is that a device will not dynamically change the DLNA classes that it supports. Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
* | [Device] Check X_DLNA_GetBytePositionInfo action availabilityChristophe Guiraud2013-09-171-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Introspection is used to check if the UPnP X_DLNA_GetBytePositionInfo action is supported. If it is not supported we skip its call when we retrieve all the properties. X_DLNA_GetBytePositionInfo doesn't seem to be widely supported by renderer devices. Partial fix for issue: https://github.com/01org/dleyna-renderer/issues/115 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* | [Device] Fix dlr_device_seek implementationChristophe Guiraud2013-09-171-7/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dlr_device_seek was incorrectly implemented. Modify the current implemention to retrieve the current position with the right method depending on the unit (time or byte) and add it to the delta specified in Seek request, and then call dlr_device_set_position(). so now we have: - TIME SEEK OPERATIONS Seek(offset) -> current_position = UPNP GetPositionInfo["RelTime"] -> UPNP Seek["REL_TIME", current_position + offset] SetPosition(position) -> UPNP Seek["REL_TIME", position] - BYTE SEEK OPERATIONS ByteSeek(offset) -> current_position = UPNP X_DLNA_GetBytePositionInfo["RelByte"] -> UPNP Seek["X_DLNA_REL_BYTE", current_position + offset] SetBytePosition(position) -> UPNP Seek["X_DLNA_REL_BYTE", position] Partial fix for issue: https://github.com/01org/dleyna-renderer/issues/115 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* | [Device] Fix DLR_INTERFACE_PROP_BYTE_POSITION retrievalChristophe Guiraud2013-09-171-92/+236
| | | | | | | | | | | | | | | | | | | | | | | | DLR_INTERFACE_PROP_BYTE_POSITION is now assigned with the result of a call to upnp action X_DLNA_GetBytePositionInfo[RelByte] instead of upnp action GetPositionInfo[RelCount]. Partial fix for issue: https://github.com/01org/dleyna-renderer/issues/115 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* | [Device] Fix dlr_device_set_position implementationChristophe Guiraud2013-09-161-2/+2
|/ | | | | | | | | | | | | dlr_device_set_position is incorrectly implemented. now we use the REL_TIME unit for Time based Seeking instead of ABS_TIME unit and the X_DLNA_REL_BYTE unit for Byte Seeking instead of ABS_COUNT unit. Partial fix for issue: https://github.com/01org/dleyna-renderer/issues/115 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* [Renderer] Enable byte seekRegis Merlino2013-08-011-23/+154
| | | | | | | | | Based on original work from Sebastien Bianti <sebastien.bianti@linux.intel.com> - Resolves issue #59 - Documentation updated. Signed-off-by: Regis Merlino <regis.merlino@intel.com>
* [Introspection] Fixed bug 97Mark Ryan2013-07-231-63/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix is nasty but I can't see any other way to fix the issue without having to change dleyna-core and GUPnP. This will have to be done anyway at some point but in the meantime this is a serious bug that needs to be patched ASAP. The fix works as follows: 1. We use a weak refererence to detect if we have lost our renderer during a call to gupnp_service_info_get_introspection. If we have we return control direcly to the main loop failing any task and making sure we do not access the device object. 2. We make sure that gupnp_service_info_get_introspection is not called inside an event callback from GUPnP. Otherwise changes to the list of devices in our callback can result in a crash when we return control back to GUPnP. Long term we need to retrieve introspection information asynchronously during device construction and not during calls to GetProp or in event handlers. We might has well initialise the properties during device construction as well. This will simplify the code. Before this can be done however, we need a way to cancel gupnp_service_info_get_introspection_async and a way to call this function inside a task queue. Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
* [Server] Update following the publish_object() connector API changeRegis Merlino2013-07-231-1/+1
| | | | Signed-off-by: Regis Merlino <regis.merlino@intel.com>
* [Player] Add OpenNextUri() methodRegis Merlino2013-07-191-7/+20
| | | | | | | | | Based on original work from Sébastien Bianti <sebastien.bianti@linux.intel.com> - Resolves bug #35 - Documentation updated. Signed-off-by: Regis Merlino <regis.merlino@intel.com>
* [Coding Convention] CheckPatch [3.8.0.26]Ludovic Ferrandis2013-07-181-3/+0
| | | | | | NOTE: Ignored message types: CAMELCASE NEW_TYPEDEFS PREFER_PRINTF Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
* [API] Issue #94: Add new SetUri API to PlayerLudovic Ferrandis2013-07-181-0/+3
| | | | | | | | | Fix issue #94: <https://github.com/01org/dleyna-renderer/issues/94> Do the same as OpenUriEx, except it doesn't excecute the Play command. Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
* [Device] Fix #78: MPRIS OpenUri() does not start playingLudovic Ferrandis2013-07-181-2/+18
| | | | | | Fix issue #78: <https://github.com/01org/dleyna-renderer/issues/78> Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
* [Device] GetAll: do not fail if the DMR returns an error for GetPositionInfoRegis Merlino2013-07-171-7/+16
| | | | | | Fix issue 92: <https://github.com/01org/dleyna-renderer/issues/92> Signed-off-by: Regis Merlino <regis.merlino@intel.com>
* [Device] Add an extra mimetype parameter to GetIcon()Regis Merlino2013-05-311-1/+4
| | | | Signed-off-by: Regis Merlino <regis.merlino@intel.com>
* [Device] Fix a GetIcon() crash caseRegis Merlino2013-05-301-0/+1
| | | | Signed-off-by: Regis Merlino <regis.merlino@intel.com>
* [Device] Add a GetIcon() methodRegis Merlino2013-05-291-0/+142
| | | | Signed-off-by: Regis Merlino <regis.merlino@intel.com>
* [Device] Fix device constructionRegis Merlino2013-04-181-17/+43
| | | | Signed-off-by: Regis Merlino <regis.merlino@intel.com>
* [GUPnP] Fix warning on releaseLudovic Ferrandis2013-04-111-3/+2
| | | | Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
* [GUPnP] Fix bug introduced in previous commit when managing error.Ludovic Ferrandis2013-04-111-6/+11
| | | | Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
* [GUPnP] Output string parameter not initialized on success.Ludovic Ferrandis2013-04-101-6/+9
| | | | | | | | Fix https://github.com/01org/dleyna-renderer/issues/51 Check output string parameters before use, even if the command succeed. Signed-off-by: Ludovic Ferrandis <ludovic.ferrandis@intel.com>
* [Device] Add X_DLNA_PS transport action supportChristophe Guiraud2013-04-051-52/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add the X_DLNA_PS transport action support to allow the playspeeds provided by the renderer once we have provided it a URI (SetAVTransportURI()) in addition to the renderer default playspeeds retrieved via the introspection. MINIMUM_RATE, MAXIMUM_RATE and TRANSPORT_PLAY_SPEEDS properties will be upddated. when SetAVTransportURI() action is called, MINIMUM_RATE, MAXIMUM_RATE and TRANSPORT_PLAY_SPEEDS properties will be reset with the renderer default playspeeds. - The renderer default playspeeds are stored in the dlr_device_t_ structure to be re-used without having to be re-computed. - When the application set the property RATE, the new rate value is checked with either the renderer default allowed playspeeds or the X_DLNA_PS allowed playspeeds depending on the availability of the X_DLNA_PS. - We now emit a property changed signal when application set the DLR_INTERFACE_PROP_MINIMUM_RATE property with a value not equal to the current one. - For the parsing of the action string containing the X_DLNA_PS content, thanks to regexp API, the sequence "\," are replaced by "*" ("\," is used to separated the X_DLNA_PS speeds), then the action string is splitted by "," to separate each actions token. For getting the X_DLNA_PS playspeeds we then just have to split the string with "*" action string = Play,Stop,Seek,X_DLNA_PS=-8\,2\,4\,8 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* [Bug] Fix Valgrind reports memory corruption when Setting the Mute propertyChristophe Guiraud2013-03-261-7/+9
| | | | | | | | | | | | - Valgrind reports memory corruption when Setting the Mute property. - If you set the Mute value, the received last change event only contains a value for mute. It does not contain a value for Volume, and so device_volume was not initialized. - The fix consists in initializing device_volume with G_MAXUINT, so we can check if the volume was part of the received last change event. - Fix issue: https://github.com/01org/dleyna-renderer/issues/37 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* [Bug] Fix Blatant memory leak in dlr_device_newChristophe Guiraud2013-03-251-1/+1
| | | | | | | | | - In function dlr_device_new(), the variable dev is initialized twice. Remove redundant first dev variable initialization. - Fix issue: https://github.com/01org/dleyna-renderer/issues/36 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* [Device] Add OpenUriEx player methodChristophe Guiraud2013-03-191-1/+4
| | | | | | | | | | | - Add a new player interface method OpenUriEx, which is the same as the existing OpenUri one, with an additional metadata parameter to pass the URI description information in DIDL-Lite XML format. - Documentation updated. - Renderer Console python test application updated. - Fix issue: https://github.com/01org/dleyna-renderer/issues/25 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* [Property] Add Mute PropertyChristophe Guiraud2013-03-121-2/+36
| | | | | | | | | | - Add R/W Mute property support, Mute states are received via the LastChange event, Mute value is set with a SetMute action. - Documentation updated. - Tested with Rygel and XBMC. - Fix issue: https://github.com/01org/dleyna-renderer/issues/29 Signed-off-by: Christophe Guiraud <christophe.guiraud@intel.com>
* [Architecture] Change directory structure to enable build from a master projectRegis Merlino2013-03-111-0/+2373
Signed-off-by: Regis Merlino <regis.merlino@intel.com>