Mercurial > mplayer.hg
annotate stream/tcp.h @ 24900:9079c9745ff9
A/V sync: take audio filter buffers into account
Substract the delay caused by filter buffering when calculating
currently playing audio position. This matters for af_scaletempo which
buffers significant and varying amounts of data. For other current
filters the effect is normally insignificant.
Instead of the old time-based filter delay field (which was ignored)
this version stores the per-filter delay in units of bytes input read
without corresponding output. This allows the current scaletempo
behavior where other filters before and after it can see the same
nominal samplerate even though the real duration of the data varies;
in this case the other filters can not know the delay they're causing
in terms of real time.
author | uau |
---|---|
date | Thu, 01 Nov 2007 06:52:50 +0000 |
parents | 3f0d00abc073 |
children | 4129c8cfa742 |
rev | line source |
---|---|
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
1 /* |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
2 * Copyright (C) 2001 Bertrand BAUDET, 2006 Benjamin Zores |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
3 * Network helpers for TCP connections |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
4 * (originally borrowed from network.c, |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
5 * by Bertrand BAUDET <bertrand_baudet@yahoo.com>). |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
6 * |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
9 * the Free Software Foundation; either version 2 of the License, or |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
10 * (at your option) any later version. |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
11 * |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
15 * GNU General Public License for more details. |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
16 * |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
18 * along with this program; if not, write to the Free Software Foundation, |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
20 */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
21 |
23689
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
19335
diff
changeset
|
22 #ifndef TCP_H |
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
19335
diff
changeset
|
23 #define TCP_H |
19335
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
24 |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
25 /* Connect to a server using a TCP connection */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
26 int connect2Server (char *host, int port, int verb); |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
27 |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
28 #define TCP_ERROR_TIMEOUT -3 /* connection timeout */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
29 #define TCP_ERROR_FATAL -2 /* unable to resolve name */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
30 #define TCP_ERROR_PORT -1 /* unable to connect to a particular port */ |
2a9d669e5ff6
isolated tcp socket code from network.c to a dedicated file
ben
parents:
diff
changeset
|
31 |
23689
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
19335
diff
changeset
|
32 #endif /* TCP_H */ |