|
2010-06-15
, 15:29
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#22
|
The Following User Says Thank You to fatalsaint For This Useful Post: | ||
|
2010-06-15
, 15:32
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#23
|
Heh, it's me that wrote #33...
PulseAudio doesn't seem to have Python bindings but http://gnome-pulse-applet.googlecode...inloop_glib.py seems to wrap it. I'll try it out.
pa_context_new_with_proplist = pulse_lib.pa_context_new_with_proplist pa_context_new_with_proplist.restype = POINTER(PA_CONTEXT) pa_context_new_with_proplist.argtypes = [ POINTER(PA_MAINLOOP_API), c_char_p, POINTER(PA_PROPLIST) ] # # pa_proplist_* pa_proplist_new = pulse_lib.pa_proplist_new pa_proplist_new.restype = POINTER(PA_PROPLIST) pa_proplist_new.argtypes = [ ] pa_proplist_sets = pulse_lib.pa_proplist_sets pa_proplist_sets.restype = c_int pa_proplist_sets.argtypes = [ POINTER(PA_PROPLIST), c_char_p, c_char_p ]
|
2010-06-15
, 15:35
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#24
|
|
2010-06-15
, 15:36
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#25
|
This workaround works.
Setting the application name to FMRadio. I really don't like how ugly this is to work around this problem.
Is there a "proper" way to do this? I still would like any information on setting the pulseaudio proplist like above.. it seems a better solution than "mimicking" another application that has a proper police.
Is the "proper" way to modify the xpolicy file and create my own block for my own app?
Meh. Ugly.
But, my phone is currently playing Pandora while in Silent Mode. I'm not home, or I'd build a package and submit it.. I'll have something up tonight though.
|
2010-06-15
, 15:53
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#26
|
I don't really like that workaround because the policy system will group your app into the radio category, which has less privileges than one in the "player" category. If you want to edit xpolicy.conf, check out my headset-control package which'll add the information to whitelist headset-control (I do some libplayback stuff in it) and adds a trigger so that if xpolicy.conf is replaced by another package, headset-control's postinst will add it back in. (I happened to test that when dist-upgrading from leaked PR 1.2 to "proper" PR 1.2.)
The Following User Says Thank You to fatalsaint For This Useful Post: | ||
|
2010-06-15
, 15:59
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#27
|
However, will being in the 'player' category prevent the audio hiccup when the screen dims to black as well? Because currently as a 'radio' app, I still suffer from that problem.
The Following User Says Thank You to qwerty12 For This Useful Post: | ||
|
2010-06-15
, 16:03
|
Posts: 1,283 |
Thanked: 370 times |
Joined on Sep 2009
@ South Florida
|
#28
|
|
2010-06-15
, 16:23
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#29
|
Yes, it will. The built in Media Player uses this category to play its stuff. I have yet to notice it stuttering when the display goes off.
If you don't want to go the ctypes route, then editing xpolicy.conf is the way to go. I can't figure out how to pass the proplist in pulsesink's set_property function as it wants a GParamSpecPointer. How the **** am I meant to provide that? That bit of C I posted works fine because it expects a pointer and recieves one. Man, no wonder people prefer PyQt to PyGTK...
self.pa_proplist_p = pa_proplist_new() self.set_proplist({ "window.name": self.client_name, "media.name": self.client_name, "application.name": self.client_name }) #self.pa_context_p = pa_context_new_with_proplist( # self.pa_mainloop_api_p, # self.client_name) self.pa_context_p = pa_context_new_with_proplist( self.pa_mainloop_api_p, self.client_name, self.pa_proplist_p)
The Following User Says Thank You to fatalsaint For This Useful Post: | ||
|
2010-06-15
, 16:23
|
Posts: 3,428 |
Thanked: 2,856 times |
Joined on Jul 2008
|
#30
|
PulseAudio doesn't seem to have Python bindings but http://gnome-pulse-applet.googlecode...inloop_glib.py seems to wrap it. I'll try it out.