After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 684469 - [pulsesrc] Fail to restart with Gst 1.0
[pulsesrc] Fail to restart with Gst 1.0
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 684435
 
 
Reported: 2012-09-20 12:26 UTC by Guillaume Desmottes
Modified: 2012-09-24 18:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
do not send stream muted to a pa record stream as it is not allowed (986 bytes, patch)
2012-09-20 18:01 UTC, Alban Browaeys
rejected Details | Review
Just disabling mute at startup will silently not mute the stream, and since (1.90 KB, patch)
2012-09-21 02:36 UTC, Arun Raghavan
none Details | Review
pulsesrc: Mute stream post-connection if required (1.90 KB, patch)
2012-09-21 07:40 UTC, Arun Raghavan
none Details | Review
pulsesrc: Mute stream post-connection if required (1.88 KB, patch)
2012-09-21 07:49 UTC, Arun Raghavan
committed Details | Review

Description Guillaume Desmottes 2012-09-20 12:26:07 UTC
0:00:12.502764886 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:911:gst_pulsesrc_open:<pulsesrc0> opening device
0:00:12.503506427 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:927:gst_pulsesrc_open:<pulsesrc0> connect to server (NULL)
0:00:12.504080063 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:952:gst_pulsesrc_open:<pulsesrc0> connected
0:00:12.504221076 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:1639:gst_pulsesrc_play:<pulsesrc0> playing
0:00:12.504233951 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:1593:gst_pulsesrc_set_corked:<pulsesrc0> setting corked state to 0
0:00:12.504253600 16349      0x2a16b20 DEBUG                  pulse pulsesrc.c:1330:gst_pulsesrc_negotiate:<pulsesrc0> caps of src: audio/x-raw, format=(string){ S16LE, S16BE, F32LE, F32BE, S32LE, S32BE, U8 }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-alaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]; audio/x-mulaw, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]
0:00:12.504328426 16349      0x2a16b20 DEBUG                  pulse pulsesrc.c:1337:gst_pulsesrc_negotiate:<pulsesrc0> caps of peer: audio/x-raw, format=(string){ F32LE, F64LE, S8, S16LE, S24LE, S32LE }, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 2147483647 ], layout=(string)interleaved
0:00:12.504383422 16349      0x2a16b20 DEBUG                  pulse pulsesrc.c:1341:gst_pulsesrc_negotiate:<pulsesrc0> intersect: audio/x-raw, format=(string){ S16LE, F32LE, S32LE }, layout=(string)interleaved, rate=(int)[ 1, 2147483647 ], channels=(int)[ 1, 32 ]
0:00:12.504410195 16349      0x2a16b20 DEBUG                  pulse pulsesrc.c:1355:gst_pulsesrc_negotiate:<pulsesrc0> fixated to: audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2
0:00:12.504452084 16349      0x2a16b20 DEBUG                  pulse pulsesrc.c:1246:gst_pulsesrc_create_stream:<pulsesrc0> Caps are audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)44100, channels=(int)2, channel-mask=(bitmask)0x0000000000000003
0:00:12.504488592 16349      0x2a16b20 INFO                   pulse pulsesrc.c:1424:gst_pulsesrc_prepare:<pulsesrc0> maxlength: -1
0:00:12.504502527 16349      0x2a16b20 INFO                   pulse pulsesrc.c:1425:gst_pulsesrc_prepare:<pulsesrc0> tlength:   -1
0:00:12.504511818 16349      0x2a16b20 INFO                   pulse pulsesrc.c:1426:gst_pulsesrc_prepare:<pulsesrc0> prebuf:    0
(lt-empathy-call:16349): tp-fs-DEBUG: Got MediaDescription /org/freedesktop/Telepathy/Connection/gabble/jabber/guillaume_2edesmottes_40collabora_2eco_2euk_2ff9a48ab7/CallChannel17/Content_audio_1/Offer0
0:00:12.504521974 16349      0x2a16b20 INFO                   pulse pulsesrc.c:1427:gst_pulsesrc_prepare:<pulsesrc0> minreq:    -1
0:00:12.504530884 16349      0x2a16b20 INFO                   pulse pulsesrc.c:1428:gst_pulsesrc_prepare:<pulsesrc0> fragsize:  3528
(lt-empathy-call:16349): tp-fs-DEBUG: Delaying codec media_description processing
0:00:12.504547125 16349      0x2a16b20 WARN                   pulse pulsesrc.c:1505:gst_pulsesrc_prepare:<pulsesrc0> error: Failed to connect stream: Invalid argument
(lt-empathy-call:16349): tp-fs-DEBUG: Codecs changed
(lt-empathy-call:16349): tp-fs-DEBUG: updating local codecs: 0
(lt-empathy-call:16349): tp-fs-DEBUG: Local codecs:
(lt-empathy-call:16349): tp-fs-DEBUG: 96: audio SIREN clock:16000 channels:0 bitrate=16000
(lt-empathy-call:16349): tp-fs-DEBUG: 0: audio PCMU clock:8000 channels:0
(lt-empathy-call:16349): tp-fs-DEBUG: 8: audio PCMA clock:8000 channels:0
(lt-empathy-call:16349): tp-fs-DEBUG: 97: audio telephone-event clock:16000 channels:0 events=0-15
(lt-empathy-call:16349): tp-fs-DEBUG: 98: audio telephone-event clock:8000 channels:0 events=0-15
(lt-empathy-call:16349): tp-fs-DEBUG: Transmitter: nice: TpTransportType:3 controlling:0
(lt-empathy-call:16349): tp-fs-DEBUG: Requesting that the application start receiving
(lt-empathy-call:16349): tp-fs-DEBUG: Request to start receiving succeeded
(lt-empathy-call:16349): tp-fs-DEBUG: updating local codecs: 0
(lt-empathy-call:16349): tp-fs-DEBUG: Local codecs:
(lt-empathy-call:16349): tp-fs-DEBUG: 96: audio SIREN clock:16000 channels:0 bitrate=16000
(lt-empathy-call:16349): tp-fs-DEBUG: 0: audio PCMU clock:8000 channels:0
(lt-empathy-call:16349): tp-fs-DEBUG: 8: audio PCMA clock:8000 channels:0
(lt-empathy-call:16349): tp-fs-DEBUG: 97: audio telephone-event clock:16000 channels:0 events=0-15
(lt-empathy-call:16349): tp-fs-DEBUG: 98: audio telephone-event clock:8000 channels:0 events=0-15
To reproduce:
- Build empathy master with --enable-gst-1.0=yes
- Start a XMPP call to some contact
- Cancel the call from the call window (red phone icon)
- Try to recall the contact from the call window (green phone icon)
- Call fails

(lt-empathy-call:16349): tp-fs-DEBUG: Accepting Media Description for contact: 27
(lt-empathy-call:16349): tp-fs-DEBUG: Got Endpoint Properties
empathy-Message: Element error: Failed to connect stream: Invalid argument -- pulsesrc.c(1505): gst_pulsesrc_prepare (): /GstPipeline:pipeline2/EmpathyGstAudioSrc:empathygstaudiosrc0/GstPulseSrc:pulsesrc0

0:00:12.510819077 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:1693:gst_pulsesrc_change_state:<pulsesrc0> corking
0:00:12.510845042 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:1593:gst_pulsesrc_set_corked:<pulsesrc0> setting corked state to 1
0:00:12.510869552 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:1652:gst_pulsesrc_pause:<pulsesrc0> pausing
0:00:12.512814202 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:687:gst_pulsesrc_set_stream_mute:<pulsesrc0> we have no mainloop
0:00:12.530779103 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:522:gst_pulsesrc_get_stream_volume:<pulsesrc0> we have no mainloop
0:00:12.530825345 16349      0x2582b80 DEBUG                  pulse pulsesrc.c:579:gst_pulsesrc_get_stream_mute:<pulsesrc0> we have no mainloop
Comment 1 Alban Browaeys 2012-09-20 18:01:26 UTC
Created attachment 224849 [details] [review]
do not send stream muted to a pa record stream as it is not allowed

this patch fixes the invalid parameter isssue here.
Comment 2 Arun Raghavan 2012-09-21 02:36:07 UTC
Created attachment 224886 [details] [review]
Just disabling mute at startup will silently not mute the stream, and since

Empathy appears to be using this feature, things could break. Attaching an
alternative patch that actually mutes the stream.

The real bug is upstream, though. Will fix it soon.

----

pulsesrc: Mute stream post-connection if required

A bug in PulseAudio causes PA_STREAM_START_MUTED to be rejected on
record streams. Until this is fixed upstream, we mute the stream
manually at startup. Bsed on a patch by Alban Browaeys
<prahal@yahoo.com>.
Comment 3 Arun Raghavan 2012-09-21 07:40:42 UTC
Created attachment 224899 [details] [review]
pulsesrc: Mute stream post-connection if required

A bug in PulseAudio causes PA_STREAM_START_MUTED to be rejected on
record streams. Until this is fixed upstream, we mute the stream
manually at startup. Bsed on a patch by Alban Browaeys
<prahal@yahoo.com>.
Comment 4 Guillaume Desmottes 2012-09-21 07:46:05 UTC
Review of attachment 224899 [details] [review]:

::: ext/pulse/pulsesrc.c
@@ +1468,3 @@
+   * are fixed on the PulseAudio side. */
+  if (pulsesrc->mute_set && pulsesrc->mute) {
+    gst_pulsesrc_set_stream_mute (pulsesrc, pulsesrc->volume, pulsesrc->mute);

pulsesrc.c:1470:5: error: too many arguments to function 'gst_pulsesrc_set_stream_mute'
Comment 5 Arun Raghavan 2012-09-21 07:49:20 UTC
Created attachment 224900 [details] [review]
pulsesrc: Mute stream post-connection if required

Reuploading after screwing up the patch again.
Comment 6 Guillaume Desmottes 2012-09-21 07:50:27 UTC
Review of attachment 224900 [details] [review]:

Thanks, with this patch it works fine.
Comment 7 Arun Raghavan 2012-09-21 08:59:23 UTC
Attachment 224900 [details] pushed as 027cc0e - pulsesrc: Mute stream post-connection if required