[Bug 734098] New: gst_element_set_state blocked when plugout a usb audio device

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Aug 1 01:57:11 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=734098
  GStreamer | gst-plugins-good | 1.x

           Summary: gst_element_set_state blocked when plugout a usb audio
                    device
    Classification: Platform
           Product: GStreamer
           Version: 1.x
        OS/Version: Windows
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: hustxyj at sina.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Overview:
  gst_element_set_state blocked when plugout a usb audio device.
Steps to Reproduce: 
  1. Iinsert a usb device(like usb earphone).
  2. Start to play music with gstdirectsoundsink. 
  3. Plugout the usb audio device.
Actual Results:
  The application blocked when calling gst_element_set_state( .., NULL).
Expected Results:
  The sound switch to play with the normal earphone.
Platform:
  Built 2014-6-10 with mingw32. Source version 1.3.2
Additional Information
  I trace the code and found something more!

  static gint
  gst_directsound_sink_write (GstAudioSink * asink, gpointer data, guint
length)
  {
    ……
    calculate_freesize:
    ……
      hRes = IDirectSoundBuffer_GetCurrentPosition (dsoundsink->pDSBSecondary,
          &dwCurrentPlayCursor, NULL);

      hRes =
          IDirectSoundBuffer_GetStatus (dsoundsink->pDSBSecondary, &dwStatus);
      if (SUCCEEDED (hRes) && (dwStatus & DSBSTATUS_PLAYING))
        goto calculate_freesize;
      else {
        dsoundsink->first_buffer_after_reset = FALSE;
        GST_DSOUND_UNLOCK (dsoundsink);
        return 0;
      }
    …… 
  }

  If usb earphone was plugged out, IDirectSoundBuffer_GetCurrentPosition return
some error code, which will be overwrote by IDirectSoundBuffer_GetStatus. So
the hRes seemed success every time.
  Treat the return values respectively, and  the problem was soloved.
Comment 1 Marcin Kolny (IRC: loganek) [gstreamermm-plugins-good developer]
2014-07-27 09:12:34 UTC
Thanks for your report, but it seems to be GStreamer, not gstreamermm bug.
Please report it in a correct project.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list