1 /*****************************************************************************
2 * input_ts.h: structures of the input not exported to other modules
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
5 * $Id: input_ts.h,v 1.5 2001/05/28 04:23:52 sam Exp $
7 * Authors: Henri Fallon <henri@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
28 /* Will be used whne NetworkOpen is ready */
29 typedef struct thread_ts_data_s {
37 static __inline__ int readv( int i_fd, struct iovec *p_iovec, int i_count )
39 int i_index, i_len, i_total = 0;
42 for( i_index = i_count; i_index; i_index-- )
44 i_len = p_iovec->iov_len;
45 p_base = p_iovec->iov_base;
49 register signed int i_bytes;
50 i_bytes = read( i_fd, p_base, i_len );
56 intf_ErrMsg( "input error: read failed on socket" );