libvlc_audio_set_volume_callback / Python

This forum is about all development around libVLC.
dav1d
New Cone
New Cone
Posts: 1
Joined: 30 Oct 2014 15:26

libvlc_audio_set_volume_callback / Python

Postby dav1d » 30 Oct 2014 19:52

I am currently trying to get a callback whenever the Volume changes, after digging through the binding file and documentation I found `libvlc_audio_set_volume_callback`. Now the question is how does it work?

Excerpt from the code:

Code: Select all

@vlc.CallbackDecorators.AudioSetVolumeCb def test(volume, mute): print('TEST!!!') print(volume, mute) instance = vlc.Instance(self.options) player = self.instance.media_player_new() player.audio_set_volume_callback(test)
Later on a media file is loaded and playback started. All other events work fine, but I have a problem with this specific callback, it is never triggered. Anyone an idea why it doesn't work or a working example in any language but Java (because Java bindings seem to do strange things)?

Help greatly appreciated.
- David

OlivierAubert
Developer
Developer
Posts: 92
Joined: 08 Mar 2007 15:43

Re: libvlc_audio_set_volume_callback / Python

Postby OlivierAubert » 07 Dec 2014 22:16

There has been no answer on this forum, but I would guess that the doc change that was done few minutes after this post is related. For the (forum) record, the documentation for

Code: Select all

libvlc_audio_set_volume_callback
states that "This only works in combination with libvlc_audio_set_callbacks().".


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests