Mercurial > mplayer.hg
annotate libmpdemux/demux_real.h @ 34564:96019b1174b8
Workaround a bug in Pulse Audio (http://pulseaudio.org/ticket/866)
that causes 2 second delay while trying to drain the current stream.
It seems that if we wait for the data to be played before calling
the pa_stream_drain function, it would not block for the whole
duration of its internal buffer, thus avoid the 2 seconds delay.
The code of this workaround is already used in ao_jack and ao_sdl.
Special thanks to Rune Heggtveit <pblc heggtveit n>
who did all the heavy lifting in finding a working solution.
author | iive |
---|---|
date | Fri, 03 Feb 2012 23:11:48 +0000 |
parents | 02420b32391b |
children |
rev | line source |
---|---|
30573
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
1 /* |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
2 * This file is part of MPlayer. |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
3 * |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
4 * MPlayer is free software; you can redistribute it and/or modify |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
6 * the Free Software Foundation; either version 2 of the License, or |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
7 * (at your option) any later version. |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
8 * |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
9 * MPlayer is distributed in the hope that it will be useful, |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
13 * |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License along |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
17 */ |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
18 |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
19 #ifndef MPLAYER_DEMUX_REAL_H |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
20 #define MPLAYER_DEMUX_REAL_H |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
21 |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
22 #include <stdint.h> |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
23 |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
24 double real_fix_timestamp(unsigned char *buf, unsigned int timestamp, |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
25 unsigned int format, int64_t *kf_base, |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
26 int *kf_pts, double *pts); |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
27 |
02420b32391b
Add separate header for real_fix_timestamp(); avoids forward declarations.
diego
parents:
diff
changeset
|
28 #endif /* MPLAYER_DEMUX_REAL_H */ |