Okay scratch all of the above. Found the issue - no bug - its me of course!<br>It seemed a little too fundamental to be a bug and not raise obvious google hits/IRC alarm bells.<br><br>I was not strictly adhering to the callback prototype parameter lists.<br>
<br>My callback's signature was <br><br>(pa_context *c, const pa_sink_input_info *info, void *userdata)<br><br>The prototype in the APi is<br><br>(pa_context *c, const pa_sink_input_info *info, int eol, void *userdata<br>
<br>I missed out on the eol ...<br><br><br><br><br><div class="gmail_quote">On Wed, Oct 14, 2009 at 11:29 AM, Forwind info <span dir="ltr"><<a href="mailto:forward@forwind.net">forward@forwind.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Colin<div class="im"><br><br>
>>The functions themselves look OK, but it's entirely possible <br>>>context_get_sink_input_info_callback() is used/called elsewhere too.<br>
<br></div>Yeah I checked that. Just that one call I'm afriad<div class="im"><br><br>>>The error messages you print out are identical by the way... which may lead to strange >>debug info.<br><br></div>Sure I should have tidied this before posting. <br>
<div class="im">
<br>>>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<br><br></div>
Yeah I was hoping to get this to work with 0.9.14 since it ships with Jaunty. <br>Does the upcoming Karmic ship with 0.9.15 ?<br><br>Conor<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Oct 14, 2009 at 8:28 AM, Colin Guthrie <span dir="ltr"><<a href="mailto:gmane@colin.guthr.ie" target="_blank">gmane@colin.guthr.ie</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">'Twas brillig, and Forwind info at 13/10/09 22:36 did gyre and gimble:<div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi folks,<br>
<br>
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 ?<br>
<br>
I'm on 0.9.1.4 on Jaunty.<br>
<br>
Scenario:<br>
<br>
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.<br>
<br>
After receiving this event, I then call<br>
<br>
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.<br>
<br>
But when the callback is called the userdata obj is NULL !<br>
<br>
Any ideas ?<br>
<br>
Code is pasted below<br>
</blockquote>
<br></div>
The functions themselves look OK, but it's entirely possible context_get_sink_input_info_callback() is used/called elsewhere too.<br>
<br>
The error messages you print out are identical by the way... which may lead to strange debug info.<br>
<br>
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<br>
<br>
Col<br>
<br>
<br>
-- <br>
<br>
Colin Guthrie<br>
gmane(at)<a href="http://colin.guthr.ie" target="_blank">colin.guthr.ie</a><br>
<a href="http://colin.guthr.ie/" target="_blank">http://colin.guthr.ie/</a><br>
<br>
Day Job:<br>
Tribalogic Limited [<a href="http://www.tribalogic.net/" target="_blank">http://www.tribalogic.net/</a>]<br>
Open Source:<br>
Mandriva Linux Contributor [<a href="http://www.mandriva.com/" target="_blank">http://www.mandriva.com/</a>]<br>
PulseAudio Hacker [<a href="http://www.pulseaudio.org/" target="_blank">http://www.pulseaudio.org/</a>]<br>
Trac Hacker [<a href="http://trac.edgewall.org/" target="_blank">http://trac.edgewall.org/</a>]<br>
<br>
_______________________________________________<br>
pulseaudio-discuss mailing list<br>
<a href="mailto:pulseaudio-discuss@mail.0pointer.de" target="_blank">pulseaudio-discuss@mail.0pointer.de</a><br>
<a href="https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss" target="_blank">https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss</a><br>
</blockquote></div><br>
</div></div></blockquote></div><br>