I modified something for the USB earphone issue.
hustxyj at sina.com
Mon Jun 9 05:59:02 PDT 2014
>After modified, the stuck issue was gone. I want to ask you guys, if this
is a good idea or a bad one. If bad, do you have any other solutions?
>PS: I haven't looked deep into the logic of calculate_freesize loop. So
maybe there is a better way to break the loop which I have not found.
I trace the code and found something more!
gst_directsound_sink_write (GstAudioSink * asink, gpointer data, guint
hRes = IDirectSoundBuffer_GetCurrentPosition
if (SUCCEEDED (hRes) && (dwStatus & DSBSTATUS_PLAYING))
dsoundsink->first_buffer_after_reset = FALSE;
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel