Lost microphone, some news

David Woodhouse dwmw2 at infradead.org
Wed Jun 27 04:31:19 EDT 2018


On Wed, 2018-06-27 at 11:33 +1200, Eion Robb wrote:
> Hi Jocke,
> 
> The devel@ mailing list might be more appropriate to discuss code and
> technical changes.  You might also want to get in touch with the sipe
> plugin developers on their forum, as I don't believe the monitor the
> Pidgin mailing lists.

I suspect it isn't SIPE-specific; I'm seeing something fairly similar
with Chime. Sometimes, the pulsesrc element just stops feeding me data.

https://bugzilla.gnome.org/show_bug.cgi?id=795374

I tried a hack to set the pipeline into PLAYING later, in an attempt to
make it go away. It made it happen 100% of the time instead. Which I
suppose is a step towards diagnosing it...

I think this is the hack I had at the time; I need to get back to it
now I've fixed the more important problem of the incoming audio going
away (which required a Pidgin restart to fix it; this one just needs me
to close the call and rejoin it).

Added Jan to Cc since he seemed to have coherent thoughts about this
when I first reported it.

> On Wed, 27 Jun 2018 at 03:39, Joakim Tjernlund <Joakim.Tjernlund at infinera.com> wrote:
> > I loose my microphone(USB headset) on and off. Fairly easy to trigger doing SIPE Test Calls
> > I have debugged it with GST_DEBUG=3 to:
> > 0:01:44.674183639  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:686:validate_buffer: No SSRC found in buffer
> > 0:01:44.674222435  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:1254:gst_srtp_dec_chain: Invalid buffer, dropping
> > 0:01:44.723644690  9191 0x7f7750005370 WARN                 srtpdec gstsrtpdec.c:686:validate_buffer: No SSRC found in buffer
> > 0:01:44.723684456  9191 0x7f7750005370 WARN                 srtpdec gstsrtpdec.c:1254:gst_srtp_dec_chain: Invalid buffer, dropping
> > 0:01:44.773257417  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:686:validate_buffer: No SSRC found in buffer
> > 0:01:44.773299667  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:1254:gst_srtp_dec_chain: Invalid buffer, dropping
> > 0:01:44.773345513  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:686:validate_buffer: No SSRC found in buffer
> > 0:01:44.773362553  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:1254:gst_srtp_dec_chain: Invalid buffer, dropping
> > 0:01:44.773552549  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:686:validate_buffer: No SSRC found in buffer
> > 0:01:44.773577829  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:1254:gst_srtp_dec_chain: Invalid buffer, dropping
> > 0:01:44.824544605  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:686:validate_buffer: No SSRC found in buffer
> > 0:01:44.824593763  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:1254:gst_srtp_dec_chain: Invalid buffer, dropping
> > 0:01:44.984509825  9191 0x7f7750005370 WARN                 srtpdec gstsrtpdec.c:686:validate_buffer: No SSRC found in buffer
> > 0:01:44.984555736  9191 0x7f7750005370 WARN                 srtpdec gstsrtpdec.c:1254:gst_srtp_dec_chain: Invalid buffer, dropping
> > 0:01:45.038746276  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:686:validate_buffer: No SSRC found in buffer
> > 0:01:45.038816916  9191 0x55f2eff3f0f0 WARN                 srtpdec gstsrtpdec.c:1254:gst_srtp_dec_chain: Invalid buffer, dropping
> > 0:01:45.214407207  9191 0x55f2f0c30400 FIXME               basesink gstbasesink.c:3144:gst_base_sink_default_event: stream-start event without group-id. Consider implementing group-id handling in the upstream elements
> > 0:01:45.297601562  9191 0x7f7784025a40 WARN                   pulse pulsesink.c:702:gst_pulsering_stream_underflow_cb: Got underflow
> > 0:01:53.676467518  9191 0x7f7784025a40 WARN                   pulse pulsesink.c:702:gst_pulsering_stream_underflow_cb: Got underflow
> > 0:02:10.626495331  9191 0x7f7784025a40 WARN                   pulse pulsesink.c:702:gst_pulsering_stream_underflow_cb: Got underflow
> > 0:02:11.988072210  9191 0x7f7784025a40 WARN                   pulse pulsesink.c:702:gst_pulsering_stream_underflow_cb: Got underflow
> > 0:02:15.532355085  9191 0x7f7750004b70 WARN                   pulse pulsesrc.c:1141:gst_pulsesrc_read: error: pa_pause2: OK
> > 0:02:15.532500956  9191 0x7f7750004b70 WARN                   pulse pulsesrc.c:1204:gst_pulsesrc_read: error: pa_unlock_and_fail: OK
> > 0:02:15.532584089  9191 0x7f7750004b70 WARN                audiosrc gstaudiosrc.c:221:audioringbuffer_thread_func: error reading data -1 (reason: Resource temporarily unavailable), skipping segment
> > 
> > Here I loose my microphone and further(with some extra debug in gstreamer, pulsesrc.c:
> > gst_pulsesrc_read()
> > ....
> > while (length > 0) {
> >     size_t l;
> > 
> >     GST_LOG_OBJECT (pulsesrc, "reading %u bytes", length);
> > 
> >     /*check if we have a leftover buffer */
> >     if (!pulsesrc->read_buffer) {
> >       for (;;) {
> >           if (gst_pulsesrc_is_dead (pulsesrc, TRUE)) {
> >               GST_ELEMENT_ERROR (pulsesrc, RESOURCE, FAILED,
> >                                  ("pa_dead: %s",
> >                                   pa_strerror (pa_context_errno (pulsesrc->context))), (NULL));
> >               goto unlock_and_fail;
> >           }
> > 
> >         /* read all available data, we keep a pointer to the data and the length
> >          * and take from it what we need. */
> >         if (pa_stream_peek (pulsesrc->stream, &pulsesrc->read_buffer,
> >                 &pulsesrc->read_buffer_length) < 0)
> >           goto peek_failed;
> > 
> >         GST_LOG_OBJECT (pulsesrc, "have data of %" G_GSIZE_FORMAT " bytes",
> >             pulsesrc->read_buffer_length);
> > 
> >         /* if we have data, process if */
> >         if (pulsesrc->read_buffer && pulsesrc->read_buffer_length)
> >           break;
> > 
> >         /* now wait for more data to become available */
> >         GST_LOG_OBJECT (pulsesrc, "waiting for data");
> >         pa_threaded_mainloop_wait (pulsesrc->mainloop);
> > 
> >         if (pulsesrc->paused) {
> >             GST_ELEMENT_ERROR (pulsesrc, RESOURCE, FAILED,
> >                                ("pa_pause2: %s",
> >                                 pa_strerror (pa_context_errno (pulsesrc->context))), (NULL));
> >             goto was_paused;
> >         }
> >       }
> >     }
> > 
> > .....
> > unlock_and_fail:
> >   {
> >     GST_ELEMENT_ERROR (pulsesrc, RESOURCE, FAILED,
> >         ("pa_unlock_and_fail: %s",
> >             pa_strerror (pa_context_errno (pulsesrc->context))), (NULL));
> >     pulsesrc->in_read = FALSE;
> >     pa_threaded_mainloop_unlock (pulsesrc->mainloop);
> > 
> >     return (guint) - 1;
> >   }
> > }
> > 
> > Here one can se that whenever pause happens, I loose audio.
> > I don't know where to go next, this is audioringbuffer_thread_func()
> > in gstaudiosrc.c:
> > ....
> > do {
> >         read = readfunc (src, readptr, left, ×tamp);
> >         GST_LOG_OBJECT (src, "transfered %d bytes of %d to segment %d", read,
> >             left, readseg);
> >         if (read < 0 || read > left) {
> >           GST_WARNING_OBJECT (src,
> >               "error reading data %d (reason: %s), skipping segment", read,
> >               g_strerror (errno));
> >           break;
> >         }
> >         left -= read;
> >         readptr += read;
> > } while (left > 0);
> > 
> >       /* Update timestamp on buffer if required */
> >       gst_audio_ring_buffer_set_timestamp (buf, readseg, timestamp);
> > 
> >       /* we read one segment */
> >       gst_audio_ring_buffer_advance (buf, 1);
> > ....
> > No idea if pause should be handle here or maybe somewhere in pidgin,pidgin-sipe ?
> > 
> >  Jocke
> > _______________________________________________
> > Support at pidgin.im mailing list
> > Want to unsubscribe?  Use this link:
> > https://pidgin.im/cgi-bin/mailman/listinfo/support
> _______________________________________________
> Devel mailing list
> Devel at pidgin.im
> https://pidgin.im/cgi-bin/mailman/listinfo/devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PLAYING-hacks
Type: text/x-patch
Size: 3229 bytes
Desc: not available
URL: <https://pidgin.im/pipermail/devel/attachments/20180627/12c281e3/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5213 bytes
Desc: not available
URL: <https://pidgin.im/pipermail/devel/attachments/20180627/12c281e3/attachment-0003.bin>


More information about the Devel mailing list