Re: Playback, volume controls from renderer using Rygel apis



Hi Jens,

Thanks for your feedback.

I am planning to start with the example-player implementation provided with the rygel source instead of using RygelMediaRenderer and operating on the playbin directly.

Regards,
Amit Sadaphule

From: Jens Georg
Sent: Thursday 09 November 2017 09:24:50 PM IST +0530
To: Amit Sadaphule, Rygel-list
Cc:

Subject: Re: Playback, volume controls from renderer using Rygel apisĀ 


On Fri, 2017-10-27 at 17:45 +0530, Amit Sadaphule wrote:
Hi,

I am using RygelPlaybinRenderer APIs for implementing a dlna
renderer. I 
am using BubbleUPnP app on android to push the playback to my
renderer. 
Playback seems to work OK now. The playback controls and volume
controls 
from BubbleUPnP app are responsive and work fine. The reverse is what
I 
am trying to get working i.e. I am trying to find a way to get the 
playback controls (play, pause, stop, seek, next, previous, shuffle, 
repeat) and volume controls to work from my renderer.

Here is the list of things I tried for different controls:
1. Play, Pause, Stop: I just set the state of the playbin obtained
by 
calling 
https://developer.gnome.org/librygel-renderer-gst/unstable/RygelPlayb
inRenderer.html#rygel-playbin-renderer-get-playbin 
and that changes the playback state properly and updates the
playback 
status in BubbleUPnP app too.

2. Seek: With #1 as a guideline, I tried using gst_element_seek on
the 
playbin obtained using 
https://developer.gnome.org/librygel-renderer-gst/unstable/RygelPlayb
inRenderer.html#rygel-playbin-renderer-get-playbin, 
but that seems to take a lot of time to actually apply the seek and 
reflect the status in BubbleUPnP app. Sometimes almost 20 seconds.
So, I 
thought that maybe there is some other way to do this. So, I tried
using 
https://developer.gnome.org/librygel-renderer/unstable/RygelMediaPlay
er.html#rygel-media-player-seek 
by trying to get the player property of RygelMediaRenderer which is
the 
base class of RygelPlaybinRenderer. But that gave error 
"GLib-GObject-WARNING **: g_object_get_valist: property 'player' of 
object class 'RygelPlaybinRenderer' is not readable". Could you
please 
let me know how I can implement seek in the renderer?
In general, operating directly on the playbin is more of working by
luck than by design. It was supposed to work like that in the
beginning, but turned out to be too ugly to pull through.

For the renderer, you can use rygel_media_device_get_plugin and then
rygel_media_renderer_plugin_get_player to get the player. There seems
to be some design flaw in the library, but then again, this is really
just a very simple wrapper to get things up and running quickly.
3. next, previous: I saw in Rygel's API documentation that there are 
APIs rygel_player_controller_next() and 
rygel_player_controller_previous() which could be used for
implementing 
these controls 
(https://developer.gnome.org/librygel-renderer/unstable/RygelPlayerCo
ntroller.html). 
I tried to use those APIs, but they take the pointer to 
RygelPlayerController instance as an argument. I could not find a way
to 
get that instance. So, I'm not sure whether I am on the right path. 
Could you please point me in the right direction?
I would propose to not use the RygelMediaRenderer class and implement
the thin layer it provides yourself; then you have better access to all
the sub-classes.

4. shuffle, repeat: I could not find anything in Rygel's
documentation 
to implement these controls in my renderer.
Those do not exist, you can add them to a custom player controller
class.

5. volume: Changing the volume from BubbleUPnP app changes the
loudness 
of the audio in playbin. I tried setting the "volume" property of
the 
Playbin obtained by calling 
https://developer.gnome.org/librygel-renderer-gst/unstable/RygelPlayb
inRenderer.html#rygel-playbin-renderer-get-playbin 
which had effect on the loudness. But that did not sync the volume
in 
BubbleUPnP to the value set from the renderer. Also, I could not get 
mute to work. When I tried setting the mute property of the playbin,
it 
complained that the mute property did not exist. So, I'm not sure how
I 
can implement volume/mute handling in my renderer.

Could you please help me to get #2 to #5 working?
Again, that is not supposed to work by manipulating the playbin
directly. The easiest way is to talk UPnP to your renderer locally. But
setting the volume property on the RygelMediaPlayer should work as
well.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]