[pulseaudio-discuss] userdata not being relayed in callback method
Forwind info
forward at forwind.net
Wed Oct 14 03:49:39 PDT 2009
Okay scratch all of the above. Found the issue - no bug - its me of course!
It seemed a little too fundamental to be a bug and not raise obvious google
hits/IRC alarm bells.
I was not strictly adhering to the callback prototype parameter lists.
My callback's signature was
(pa_context *c, const pa_sink_input_info *info, void *userdata)
The prototype in the APi is
(pa_context *c, const pa_sink_input_info *info, int eol, void *userdata
I missed out on the eol ...
On Wed, Oct 14, 2009 at 11:29 AM, Forwind info <forward at forwind.net> wrote:
> Hi Colin
>
> >>The functions themselves look OK, but it's entirely possible
> >>context_get_sink_input_info_callback() is used/called elsewhere too.
>
> Yeah I checked that. Just that one call I'm afriad
>
> >>The error messages you print out are identical by the way... which may
> lead to strange >>debug info.
>
> Sure I should have tidied this before posting.
>
> >>I'd also try your app on a newer PA as .14 is quite old and was a bit of
> a short lived >>release anyway, .15 was more of a long term release. That
> said, I don't remember any >>specific commits claiming to fix callback
> userdata, but that said, I've not read *every* >>commit and my memory is not
> *always* reliable anyway :p
>
> Yeah I was hoping to get this to work with 0.9.14 since it ships with
> Jaunty.
> Does the upcoming Karmic ship with 0.9.15 ?
>
> Conor
>
>
> On Wed, Oct 14, 2009 at 8:28 AM, Colin Guthrie <gmane at colin.guthr.ie>wrote:
>
>> 'Twas brillig, and Forwind info at 13/10/09 22:36 did gyre and gimble:
>>
>>> Hi folks,
>>>
>>> I have made considerable progress from earlier on. I have almost
>>> completed my task but it looks as if there may be a bug or more than likely
>>> I'm being a bit stupid ?
>>>
>>> I'm on 0.9.1.4 on Jaunty.
>>>
>>> Scenario:
>>>
>>> On a PA_SUBSCRIPTION_EVENT_SINK_INPUT my subscription callback method is
>>> called with the relevant userdata obj which was passed in at the main method
>>> stage. All fine so far.
>>>
>>> After receiving this event, I then call
>>>
>>> pa_context_get_sink_input_info(c, index,
>>> context_get_sink_input_info_callback, userdata)); //please note at this
>>> point the userdata obj is as it should be.
>>>
>>> But when the callback is called the userdata obj is NULL !
>>>
>>> Any ideas ?
>>>
>>> Code is pasted below
>>>
>>
>> The functions themselves look OK, but it's entirely possible
>> context_get_sink_input_info_callback() is used/called elsewhere too.
>>
>> The error messages you print out are identical by the way... which may
>> lead to strange debug info.
>>
>> I'd also try your app on a newer PA as .14 is quite old and was a bit of a
>> short lived release anyway, .15 was more of a long term release. That said,
>> I don't remember any specific commits claiming to fix callback userdata, but
>> that said, I've not read *every* commit and my memory is not *always*
>> reliable anyway :p
>>
>> Col
>>
>>
>> --
>>
>> Colin Guthrie
>> gmane(at)colin.guthr.ie
>> http://colin.guthr.ie/
>>
>> Day Job:
>> Tribalogic Limited [http://www.tribalogic.net/]
>> Open Source:
>> Mandriva Linux Contributor [http://www.mandriva.com/]
>> PulseAudio Hacker [http://www.pulseaudio.org/]
>> Trac Hacker [http://trac.edgewall.org/]
>>
>> _______________________________________________
>> pulseaudio-discuss mailing list
>> pulseaudio-discuss at mail.0pointer.de
>> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20091014/51cb9728/attachment.htm>
More information about the pulseaudio-discuss
mailing list