Hi Ismo, Thanks for the reply.
I am using the C-library based example provided at murphy webpage link: https://01.org/murphy/documentation/resource-aware-applications The resource callback for C library code is not working as expected. It does not give resource set changes state when it gives up resources. I tried this by creating two copies of the same example provided on weblink and trying to create, acquire and giveup resources, but I think there is a bug in resource callback, where we don't get resource set changes when state is changed when you execute giveup resources. Can you please look into it and let me know if there is any workaround for the same? Thanks, Jay -----Original Message----- From: Puustinen, Ismo [mailto:[email protected]] Sent: 14 October 2014 14:09 To: Jay D Bhatt Cc: [email protected] Subject: Re: Resource Availability information is not provided by callback function - Murphy Hi Jay! > > I have created audio and video player based on api_test sample > program. I am trying out the following use-case: > > 1) Audio Player - acquires audio_playback resource and starts playing > 2) Video Player - acquires audio_playback resource and starts playing > > This results in a resource_callback in the Audio Player, where it > comes to know that it has "lost" the audio_playback resource. Hence it > pauses the audio Playback. > > 3) Video Player is paused - so it releases audio_playback resource > This results in a resource_callback to the video player that it has > "lost" the audio_playback resource > > At this point, I expect the Audio Player to get a resource_callback, > saying that the audio_playback resource is "available" . However, I > see that there is no resource_callback happening in Audio Player. Is > this behaviour correct? There should be a callback every single time a resource set changes state. If there isn't, there's a bug somewhere. :-) There are three states that a resource set can have after initialization: "acquired", "available", and "lost". "Available" means that the resource is available for acquiring. It is still lost, meaning that the application does not have it, but the application is told that it will (most likely) get it if it tries to acquire it. You should not use "available" as part of your state machine -- for this case, tracking the "acquired" state will be enough. If "autorelease" is off (as it is by default) and app1 has called acquire, app1 will automatically reacquire the resource set when app2 releases it. > I am asking because Audio Player is depending on the resource_callback > telling it that the audio_playback resource is "available" when the > Video Player releases the resource audio_playback, so the Audio Player > can resume the playing of the audio(i.e audio playback) When Video Player releases the resource set, Audio Player should have it's own resource set do transition "available" -> "acquired" and a callback be called accordingly. Ismo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Disclaimer~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Information contained and transmitted by this e-mail is confidential and proprietary to IGATE and its affiliates and is intended for use only by the recipient. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, copying or use of this e-mail is strictly prohibited and you are requested to delete this e-mail immediately and notify the originator or [email protected] <mailto:[email protected]>. IGATE does not enter into any agreement with any party by e-mail. Any views expressed by an individual do not necessarily reflect the view of IGATE. IGATE is not responsible for the consequences of any actions taken on the basis of information provided, through this email. The contents of an attachment to this e-mail may contain software viruses, which could damage your own computer system. While IGATE has taken every reasonable precaution to minimise this risk, we cannot accept liability for any damage which you sustain as a result of softwar e viruses. You should carry out your own virus checks before opening an attachment. To know more about IGATE please visit www.igate.com <http://www.igate.com>. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _______________________________________________ IVI mailing list [email protected] https://lists.tizen.org/listinfo/ivi
