gstalsasrc.c暂停时如何释放PCM?

时间:2018-10-08 07:57:22

标签: alsa

当AudioRecorder应用程序暂停时,gstreamer alsa源仍会打开PCM。

我试图打电话做准备,当状态为PLAYING_TO_PAUSED时关闭。

  

gst_alsasrc_change_state()

     

。 。

     

GST_STATE_CHANGE_PLAYING_TO_PAUSED案例:

 gst_alsasrc_unprepare(alsa);
 gst_alsasrc_close(alsa);
     

。 。

但是gstreamer仍然像下面这样调用snd_pcm_readi()

  

/alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi:alsalib错误:PCM未设置   /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery:xrun恢复-5:未知错误-5   /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi:alsalib错误:PCM未设置   /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery:xrun恢复-5:未知错误-5   /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi:alsalib错误:PCM未设置   /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery:xrun恢复-5:未知错误-5   /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi:alsalib错误:PCM未设置   /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery:xrun恢复-5:未知错误-5

gstalsasrc.c暂停时如何释放PCM?

这是日志

/gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:1102:gst_alsasrc_read: gst_alsasrc_read() /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:1102:gst_alsasrc_read: gst_alsasrc_read() /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:251:gst_alsasrc_change_state: GST_STATE_CHANGE_PLAYING_TO_PAUSED /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:258:gst_alsasrc_change_state: call unprepare /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:917:gst_alsasrc_unprepare: gst_alsasrc_unprepare() /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:933:gst_alsasrc_unprepare: gst_alsasrc_unprepare() done /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:261:gst_alsasrc_change_state: call close /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi: alsalib error: PCM not set up systemd[1]: app-logic-voicerecorder.service: main process exited, code=killed, status=6/ABRT /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery: xrun recovery -5: Unknown error -5 /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi: alsalib error: PCM not set up . . . systemd[1]: Unit app-logic-voicerecorder.service entered failed state. /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery: xrun recovery -5: Unknown error -5 /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi: alsalib error: PCM not set up /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery: xrun recovery -5: Unknown error -5 /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi: alsalib error: PCM not set up /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:941:gst_alsasrc_close: gst_alsasrc_close() /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:957:gst_alsasrc_close: gst_alsasrc_close() call snd_pcm_close() /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery: xrun recovery -5: Unknown error -5 /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi: alsalib error: PCM not set up /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery: xrun recovery -5: Unknown error -5 /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi: alsalib error: PCM not set up /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery: xrun recovery -5: Unknown error -5 /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi: alsalib error: PCM not set up /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery: xrun recovery -5: Unknown error -5 /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:977:gst_alsasrc_close: gst_alsasrc_close() done /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:263:gst_alsasrc_change_state: set isPCMOpened = FALSE /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1318:snd_pcm_readi: alsalib error: PCM not set up /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:990: snd_pcm_delay: Assertion pcm' failed. /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:988:xrun_recovery:<alsasrc0> xrun recovery -5: Unknown error -5 /alsa-lib/1.0.29-r0/alsa-lib-1.0.29/src/pcm/pcm.c:1315: snd_pcm_readi: Assertionpcm' failed. start-stop-daemon[831]: No /usr/bin/app-logic-voicerecorder found running; none killed. /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsaplugin.c:71:plugin_init: binding text domain gst-plugins-base-1.0 to locale dir /usr/share/locale /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsaplugin.c:71:plugin_init: binding text domain gst-plugins-base-1.0 to locale dir /usr/share/locale /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasink.c:357:gst_alsasink_init: gst_alsasink_init() /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:361:gst_alsasrc_init: gst_alsasrc_init /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:382:gst_alsasrc_getcaps: gst_alsasrc_getcaps /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:386:gst_alsasrc_getcaps: device not open, using template caps /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:382:gst_alsasrc_getcaps: gst_alsasrc_getcaps /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:386:gst_alsasrc_getcaps: device not open, using template caps /gstreamer1.0-plugins-base/1.2.4-r0/git/ext/alsa/gstalsasrc.c:191:gst_alsasrc_set_property: gst_alsasrc_set_property

0 个答案:

没有答案