mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
Use alternative method for getting delay
Original commit message from CVS: Use alternative method for getting delay
This commit is contained in:
parent
7ad2309eea
commit
fc8757bc01
1 changed files with 9 additions and 1 deletions
|
@ -464,7 +464,15 @@ gst_osssink_chain (GstPad *pad, GstBuffer *buf)
|
|||
gint64 queued;
|
||||
GstClockTimeDiff jitter;
|
||||
|
||||
ioctl (osssink->fd, SNDCTL_DSP_GETODELAY, &delay);
|
||||
if (ioctl (osssink->fd, SNDCTL_DSP_GETODELAY, &delay) < 0) {
|
||||
audio_buf_info info;
|
||||
if (ioctl (osssink->fd, SNDCTL_DSP_GETOSPACE, &info) < 0) {
|
||||
delay = 0;
|
||||
}
|
||||
else {
|
||||
delay = (info.fragstotal * info.fragsize) - info.bytes;
|
||||
}
|
||||
}
|
||||
queued = delay * GST_SECOND / osssink->bps;
|
||||
|
||||
if (osssink->resync && osssink->sync) {
|
||||
|
|
Loading…
Reference in a new issue