Changeset 607b74b2a18121c12033f59027f9ab2fa5201235
- Timestamp:
- 24/03/03 18:15:30
(6 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1048526130 +0000
- git-parent:
[c4969929b53f7327517b2839a892b0b5b5540215]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1048526130 +0000
- Message:
* modules/access/*: pf_read() in access modules is now blocking. We still
check regularly for p_input->b_die though. Now the demuxers can safely
assume that pf_read() == 0 means EOF.
* ALL: got rid of the p_input->b_connected flag.
* src/input/input_ext-plugins.c, src/input/input.c: fixed the infinite loop
of "decoder stuck" messages that sometimes happened.
* src/interface/intf_eject.c, modules/misc/network/ipv4.c: fixed compilation
warnings.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r74912d2 |
r607b74b |
|
| 5 | 5 | ***************************************************************************** |
|---|
| 6 | 6 | * Copyright (C) 1999, 2000 VideoLAN |
|---|
| 7 | | * $Id: input_ext-intf.h,v 1.86 2003/03/09 23:39:05 jlj Exp $ |
|---|
| | 7 | * $Id: input_ext-intf.h,v 1.87 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 8 | 8 | * |
|---|
| 9 | 9 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 223 | 223 | vlc_bool_t b_pace_control; /* can we read when we want ? */ |
|---|
| 224 | 224 | vlc_bool_t b_seekable; /* can we do lseek() ? */ |
|---|
| 225 | | vlc_bool_t b_connected; /* does read() == 0 imply EOF ? */ |
|---|
| 226 | 225 | |
|---|
| 227 | 226 | /* if (b_seekable) : */ |
|---|
| reb0eac0 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: directory.c,v 1.2 2003/03/24 01:39:58 gbazin Exp $ |
|---|
| | 5 | * $Id: directory.c,v 1.3 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net> |
|---|
| … | … | |
| 239 | 239 | return (ssize_t) i_ret; |
|---|
| 240 | 240 | } |
|---|
| 241 | | |
|---|
| 242 | | p_input->stream.b_connected = VLC_TRUE; |
|---|
| | 241 | |
|---|
| 243 | 242 | return 0; |
|---|
| 244 | 243 | } |
|---|
| r1171979 |
r607b74b |
|
| 9 | 9 | ***************************************************************************** |
|---|
| 10 | 10 | * Copyright (C) 1998-2001 VideoLAN |
|---|
| 11 | | * $Id: access.c,v 1.11 2003/03/11 23:56:53 gbazin Exp $ |
|---|
| | 11 | * $Id: access.c,v 1.12 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 12 | 12 | * |
|---|
| 13 | 13 | * Author: St�ane Borel <stef@via.ecp.fr> |
|---|
| … | … | |
| 192 | 192 | p_input->stream.b_pace_control = 1; |
|---|
| 193 | 193 | p_input->stream.b_seekable = 1; |
|---|
| 194 | | p_input->stream.b_connected = 1; |
|---|
| 195 | 194 | p_input->stream.p_selected_area->i_size = 0; |
|---|
| 196 | 195 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| r3f822b5 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001 VideoLAN |
|---|
| 5 | | * $Id: access.c,v 1.14 2003/03/24 14:18:28 hartman Exp $ |
|---|
| | 5 | * $Id: access.c,v 1.15 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Author: St�ane Borel <stef@via.ecp.fr> |
|---|
| … | … | |
| 131 | 131 | /* seek is only allowed when we have size info */ |
|---|
| 132 | 132 | p_input->stream.b_seekable = 0; |
|---|
| 133 | | p_input->stream.b_connected = 1; |
|---|
| 134 | 133 | |
|---|
| 135 | 134 | /* Initialize ES structures */ |
|---|
| r3f822b5 |
r607b74b |
|
| 7 | 7 | ***************************************************************************** |
|---|
| 8 | 8 | * Copyright (C) 2001, 2003 VideoLAN |
|---|
| 9 | | * $Id: input.c,v 1.18 2003/03/24 14:18:28 hartman Exp $ |
|---|
| | 9 | * $Id: input.c,v 1.19 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 10 | 10 | * |
|---|
| 11 | 11 | * Author: St�ane Borel <stef@via.ecp.fr> |
|---|
| … | … | |
| 365 | 365 | p_input->stream.b_pace_control = VLC_TRUE; |
|---|
| 366 | 366 | p_input->stream.b_seekable = VLC_TRUE; |
|---|
| 367 | | p_input->stream.b_connected = VLC_TRUE; |
|---|
| 368 | 367 | |
|---|
| 369 | 368 | p_input->stream.p_selected_area->i_size = 0; |
|---|
| r2dd2df6 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: file.c,v 1.13 2003/03/04 21:12:04 gbazin Exp $ |
|---|
| | 5 | * $Id: file.c,v 1.14 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 131 | 131 | vlc_mutex_lock( &p_input->stream.stream_lock ); |
|---|
| 132 | 132 | |
|---|
| 133 | | p_input->stream.b_connected = 1; |
|---|
| 134 | 133 | if( *p_input->psz_access && !strncmp( p_input->psz_access, "stream", 7 ) ) |
|---|
| 135 | 134 | { |
|---|
| r7211d64 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: ftp.c,v 1.9 2003/03/03 14:21:08 gbazin Exp $ |
|---|
| | 5 | * $Id: ftp.c,v 1.10 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| … | … | |
| 375 | 375 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| 376 | 376 | p_input->stream.b_seekable = 1; |
|---|
| 377 | | p_input->stream.b_connected = 1; |
|---|
| 378 | 377 | p_input->stream.p_selected_area->i_size = p_access->i_filesize; |
|---|
| 379 | 378 | p_input->stream.i_method = INPUT_METHOD_NETWORK; |
|---|
| … | … | |
| 818 | 817 | struct timeval timeout; |
|---|
| 819 | 818 | fd_set fds; |
|---|
| | 819 | ssize_t i_recv; |
|---|
| 820 | 820 | int i_ret; |
|---|
| 821 | 821 | |
|---|
| … | … | |
| 829 | 829 | |
|---|
| 830 | 830 | /* Find if some data is available */ |
|---|
| 831 | | i_ret = select( p_socket->i_handle + 1, &fds, |
|---|
| 832 | | NULL, NULL, &timeout ); |
|---|
| 833 | | |
|---|
| 834 | | if( i_ret == -1 && errno != EINTR ) |
|---|
| | 831 | while( (i_ret = select( p_socket->i_handle + 1, &fds, |
|---|
| | 832 | NULL, NULL, &timeout )) == 0 |
|---|
| | 833 | || (i_ret < 0 && errno == EINTR) ) |
|---|
| | 834 | { |
|---|
| | 835 | if( p_input->b_die || p_input->b_error ) |
|---|
| | 836 | { |
|---|
| | 837 | return 0; |
|---|
| | 838 | } |
|---|
| | 839 | } |
|---|
| | 840 | |
|---|
| | 841 | if( i_ret < 0 ) |
|---|
| 835 | 842 | { |
|---|
| 836 | 843 | msg_Err( p_input, "network select error (%s)", strerror(errno) ); |
|---|
| 837 | | } |
|---|
| 838 | | else if( i_ret > 0 ) |
|---|
| 839 | | { |
|---|
| 840 | | ssize_t i_recv = recv( p_socket->i_handle, p_buffer, i_len, 0 ); |
|---|
| 841 | | |
|---|
| 842 | | if( i_recv < 0 ) |
|---|
| 843 | | { |
|---|
| 844 | | msg_Err( p_input, "recv failed (%s)", strerror(errno) ); |
|---|
| 845 | | } |
|---|
| 846 | | |
|---|
| 847 | | return i_recv; |
|---|
| 848 | | } |
|---|
| 849 | | |
|---|
| 850 | | return 0; |
|---|
| | 844 | return -1; |
|---|
| | 845 | } |
|---|
| | 846 | |
|---|
| | 847 | i_recv = recv( p_socket->i_handle, p_buffer, i_len, 0 ); |
|---|
| | 848 | |
|---|
| | 849 | if( i_recv < 0 ) |
|---|
| | 850 | { |
|---|
| | 851 | msg_Err( p_input, "recv failed (%s)", strerror(errno) ); |
|---|
| | 852 | } |
|---|
| | 853 | |
|---|
| | 854 | return i_recv; |
|---|
| 851 | 855 | |
|---|
| 852 | 856 | #endif |
|---|
| rd5ca285 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: http.c,v 1.27 2003/03/22 23:03:02 sigmunau Exp $ |
|---|
| | 5 | * $Id: http.c,v 1.28 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 612 | 612 | p_input->stream.b_pace_control = VLC_TRUE; |
|---|
| 613 | 613 | p_input->stream.b_seekable = VLC_TRUE; |
|---|
| 614 | | p_input->stream.b_connected = VLC_TRUE; |
|---|
| 615 | 614 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| 616 | 615 | p_input->stream.p_selected_area->i_size = 0; |
|---|
| … | … | |
| 701 | 700 | struct timeval timeout; |
|---|
| 702 | 701 | fd_set fds; |
|---|
| | 702 | ssize_t i_recv; |
|---|
| 703 | 703 | int i_ret; |
|---|
| 704 | 704 | |
|---|
| … | … | |
| 712 | 712 | |
|---|
| 713 | 713 | /* Find if some data is available */ |
|---|
| 714 | | i_ret = select( p_access_data->i_handle + 1, &fds, |
|---|
| 715 | | NULL, NULL, &timeout ); |
|---|
| 716 | | |
|---|
| | 714 | while( (i_ret = select( p_access_data->i_handle + 1, &fds, |
|---|
| | 715 | NULL, NULL, &timeout )) == 0 |
|---|
| 717 | 716 | #ifdef HAVE_ERRNO_H |
|---|
| 718 | | if( i_ret == -1 && errno != EINTR ) |
|---|
| 719 | | { |
|---|
| 720 | | msg_Err( p_input, "network select error (%s)", strerror(errno) ); |
|---|
| 721 | | } |
|---|
| | 717 | || (i_ret < 0 && errno == EINTR) |
|---|
| | 718 | #endif |
|---|
| | 719 | ) |
|---|
| | 720 | { |
|---|
| | 721 | if( p_input->b_die || p_input->b_error ) |
|---|
| | 722 | { |
|---|
| | 723 | return 0; |
|---|
| | 724 | } |
|---|
| | 725 | } |
|---|
| | 726 | |
|---|
| | 727 | if( i_ret < 0 ) |
|---|
| | 728 | { |
|---|
| | 729 | msg_Err( p_input, "network select error" ); |
|---|
| | 730 | return -1; |
|---|
| | 731 | } |
|---|
| | 732 | |
|---|
| | 733 | i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); |
|---|
| | 734 | |
|---|
| | 735 | if( i_recv < 0 ) |
|---|
| | 736 | { |
|---|
| | 737 | #ifdef HAVE_ERRNO_H |
|---|
| | 738 | msg_Err( p_input, "recv failed (%s)", strerror(errno) ); |
|---|
| 722 | 739 | #else |
|---|
| 723 | | if( i_ret == -1 ) |
|---|
| 724 | | { |
|---|
| 725 | | msg_Err( p_input, "network select error" ); |
|---|
| 726 | | } |
|---|
| 727 | | #endif |
|---|
| 728 | | else if( i_ret > 0 ) |
|---|
| 729 | | { |
|---|
| 730 | | ssize_t i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); |
|---|
| 731 | | |
|---|
| 732 | | if( i_recv < 0 ) |
|---|
| 733 | | { |
|---|
| 734 | | #ifdef HAVE_ERRNO_H |
|---|
| 735 | | msg_Err( p_input, "recv failed (%s)", strerror(errno) ); |
|---|
| 736 | | #else |
|---|
| 737 | | msg_Err( p_input, "recv failed" ); |
|---|
| 738 | | #endif |
|---|
| 739 | | } |
|---|
| 740 | | |
|---|
| 741 | | return i_recv; |
|---|
| 742 | | } |
|---|
| 743 | | |
|---|
| 744 | | return 0; |
|---|
| | 740 | msg_Err( p_input, "recv failed" ); |
|---|
| | 741 | #endif |
|---|
| | 742 | } |
|---|
| | 743 | |
|---|
| | 744 | return i_recv; |
|---|
| 745 | 745 | } |
|---|
| r2f9b46d |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: mms.c,v 1.27 2003/03/16 01:49:28 fenrir Exp $ |
|---|
| | 5 | * $Id: mms.c,v 1.28 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Laurent Aimar <fenrir@via.ecp.fr> |
|---|
| … | … | |
| 253 | 253 | vlc_mutex_lock( &p_input->stream.stream_lock ); |
|---|
| 254 | 254 | p_input->stream.b_pace_control = 0; |
|---|
| 255 | | if( p_access->i_proto == MMS_PROTO_UDP ) |
|---|
| 256 | | { |
|---|
| 257 | | p_input->stream.b_connected = 0; |
|---|
| 258 | | } |
|---|
| 259 | | else |
|---|
| 260 | | { |
|---|
| 261 | | p_input->stream.b_connected = 1; |
|---|
| 262 | | } |
|---|
| 263 | 255 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| 264 | 256 | /* |
|---|
| … | … | |
| 1478 | 1470 | |
|---|
| 1479 | 1471 | /* Find if some data is available */ |
|---|
| 1480 | | i_ret = select( i_handle_max + 1, |
|---|
| 1481 | | &fds, |
|---|
| 1482 | | NULL, NULL, &timeout ); |
|---|
| 1483 | | |
|---|
| 1484 | | if( i_ret == -1 && errno != EINTR ) |
|---|
| | 1472 | while( (i_ret = select( i_handle_max + 1, &fds, |
|---|
| | 1473 | NULL, NULL, &timeout )) == 0 |
|---|
| | 1474 | || (i_ret < 0 && errno == EINTR) ) |
|---|
| | 1475 | { |
|---|
| | 1476 | if( p_input->b_die || p_input->b_error ) |
|---|
| | 1477 | { |
|---|
| | 1478 | return 0; |
|---|
| | 1479 | } |
|---|
| | 1480 | } |
|---|
| | 1481 | |
|---|
| | 1482 | if( i_ret < 0 ) |
|---|
| 1485 | 1483 | { |
|---|
| 1486 | 1484 | msg_Err( p_input, "network select error (%s)", strerror(errno) ); |
|---|
| r86b811f |
r607b74b |
|
| 288 | 288 | p_input->stream.b_pace_control = 1; |
|---|
| 289 | 289 | p_input->stream.b_seekable = 0; |
|---|
| 290 | | p_input->stream.b_connected = 0; |
|---|
| 291 | 290 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| 292 | 291 | |
|---|
| r5a13b47 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: slp.c,v 1.8 2003/02/20 01:52:45 sigmunau Exp $ |
|---|
| | 5 | * $Id: slp.c,v 1.9 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Lo�Minier <lool@videolan.org> |
|---|
| … | … | |
| 341 | 341 | p_input->stream.b_pace_control = VLC_FALSE; |
|---|
| 342 | 342 | p_input->stream.b_seekable = VLC_FALSE; |
|---|
| 343 | | p_input->stream.b_connected = VLC_TRUE; |
|---|
| 344 | 343 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| 345 | 344 | p_input->stream.p_selected_area->i_size = 0; |
|---|
| r7211d64 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: udp.c,v 1.15 2003/03/03 14:21:08 gbazin Exp $ |
|---|
| | 5 | * $Id: udp.c,v 1.16 2003/03/24 17:15:29 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 236 | 236 | p_input->stream.b_pace_control = 0; |
|---|
| 237 | 237 | p_input->stream.b_seekable = 0; |
|---|
| 238 | | p_input->stream.b_connected = 0; |
|---|
| 239 | 238 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| 240 | 239 | p_input->stream.i_method = INPUT_METHOD_NETWORK; |
|---|
| … | … | |
| 325 | 324 | struct timeval timeout; |
|---|
| 326 | 325 | fd_set fds; |
|---|
| | 326 | ssize_t i_recv; |
|---|
| 327 | 327 | int i_ret; |
|---|
| 328 | 328 | |
|---|
| … | … | |
| 336 | 336 | |
|---|
| 337 | 337 | /* Find if some data is available */ |
|---|
| 338 | | i_ret = select( p_access_data->i_handle + 1, &fds, |
|---|
| 339 | | NULL, NULL, &timeout ); |
|---|
| 340 | | |
|---|
| 341 | | if( i_ret == -1 && errno != EINTR ) |
|---|
| | 338 | while( (i_ret = select( p_access_data->i_handle + 1, &fds, |
|---|
| | 339 | NULL, NULL, &timeout )) == 0 |
|---|
| | 340 | || (i_ret < 0 && errno == EINTR) ) |
|---|
| | 341 | { |
|---|
| | 342 | if( p_input->b_die || p_input->b_error ) |
|---|
| | 343 | { |
|---|
| | 344 | return 0; |
|---|
| | 345 | } |
|---|
| | 346 | } |
|---|
| | 347 | |
|---|
| | 348 | if( i_ret < 0 ) |
|---|
| 342 | 349 | { |
|---|
| 343 | 350 | msg_Err( p_input, "network select error (%s)", strerror(errno) ); |
|---|
| 344 | | } |
|---|
| 345 | | else if( i_ret > 0 ) |
|---|
| 346 | | { |
|---|
| 347 | | ssize_t i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); |
|---|
| 348 | | |
|---|
| 349 | | if( i_recv < 0 ) |
|---|
| 350 | | { |
|---|
| | 351 | return -1; |
|---|
| | 352 | } |
|---|
| | 353 | |
|---|
| | 354 | i_recv = recv( p_access_data->i_handle, p_buffer, i_len, 0 ); |
|---|
| | 355 | |
|---|
| | 356 | if( i_recv < 0 ) |
|---|
| | 357 | { |
|---|
| 351 | 358 | #ifdef WIN32 |
|---|
| 352 | | /* On win32 recv() will fail if the datagram doesn't fit inside |
|---|
| 353 | | * the passed buffer, even though the buffer will be filled with |
|---|
| 354 | | * the first part of the datagram. */ |
|---|
| 355 | | if( WSAGetLastError() == WSAEMSGSIZE ) |
|---|
| 356 | | { |
|---|
| 357 | | msg_Err( p_input, "recv() failed. " |
|---|
| 358 | | "Increase the mtu size (--mtu option)" ); |
|---|
| 359 | | i_recv = i_len; |
|---|
| 360 | | } |
|---|
| 361 | | else |
|---|
| | 359 | /* On win32 recv() will fail if the datagram doesn't fit inside |
|---|
| | 360 | * the passed buffer, even though the buffer will be filled with |
|---|
| | 361 | * the first part of the datagram. */ |
|---|
| | 362 | if( WSAGetLastError() == WSAEMSGSIZE ) |
|---|
| | 363 | { |
|---|
| | 364 | msg_Err( p_input, "recv() failed. " |
|---|
| | 365 | "Increase the mtu size (--mtu option)" ); |
|---|
| | 366 | i_recv = i_len; |
|---|
| | 367 | } |
|---|
| | 368 | else |
|---|
| 362 | 369 | #endif |
|---|
| 363 | | msg_Err( p_input, "recv failed (%s)", strerror(errno) ); |
|---|
| 364 | | } |
|---|
| 365 | | |
|---|
| 366 | | return i_recv; |
|---|
| 367 | | } |
|---|
| 368 | | |
|---|
| 369 | | return 0; |
|---|
| | 370 | msg_Err( p_input, "recv failed (%s)", strerror(errno) ); |
|---|
| | 371 | } |
|---|
| | 372 | |
|---|
| | 373 | return i_recv; |
|---|
| 370 | 374 | |
|---|
| 371 | 375 | #endif |
|---|
| rd3c3b32 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2002 VideoLAN |
|---|
| 5 | | * $Id: v4l.c,v 1.2 2002/12/31 01:54:36 massiot Exp $ |
|---|
| | 5 | * $Id: v4l.c,v 1.3 2003/03/24 17:15:30 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Author: Samuel Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 65 | 65 | p_input->stream.b_pace_control = 0; |
|---|
| 66 | 66 | p_input->stream.b_seekable = 0; |
|---|
| 67 | | p_input->stream.b_connected = 0; |
|---|
| 68 | 67 | p_input->stream.p_selected_area->i_size = 0; |
|---|
| 69 | 68 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| r1171979 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2000 VideoLAN |
|---|
| 5 | | * $Id: vcd.c,v 1.16 2003/03/11 23:56:54 gbazin Exp $ |
|---|
| | 5 | * $Id: vcd.c,v 1.17 2003/03/24 17:15:30 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Author: Johan Bilien <jobi@via.ecp.fr> |
|---|
| … | … | |
| 172 | 172 | p_input->stream.b_pace_control = 1; |
|---|
| 173 | 173 | p_input->stream.b_seekable = 1; |
|---|
| 174 | | p_input->stream.b_connected = 1; |
|---|
| 175 | 174 | p_input->stream.p_selected_area->i_size = 0; |
|---|
| 176 | 175 | p_input->stream.p_selected_area->i_tell = 0; |
|---|
| r097b76d |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: ipv4.c,v 1.16 2003/03/11 13:52:25 titer Exp $ |
|---|
| | 5 | * $Id: ipv4.c,v 1.17 2003/03/24 17:15:30 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 385 | 385 | |
|---|
| 386 | 386 | if( setsockopt( i_handle, IPPROTO_IP, IP_MULTICAST_TTL, |
|---|
| 387 | | &ttl, sizeof( ttl ) ) < 0 ) |
|---|
| | 387 | (void *) &ttl, sizeof( ttl ) ) < 0 ) |
|---|
| 388 | 388 | { |
|---|
| 389 | 389 | #ifdef HAVE_ERRNO_H |
|---|
| rae1b0c7 |
r607b74b |
|
| 5 | 5 | ***************************************************************************** |
|---|
| 6 | 6 | * Copyright (C) 1998-2002 VideoLAN |
|---|
| 7 | | * $Id: input.c,v 1.225 2003/03/14 00:24:08 sigmunau Exp $ |
|---|
| | 7 | * $Id: input.c,v 1.226 2003/03/24 17:15:30 gbazin Exp $ |
|---|
| 8 | 8 | * |
|---|
| 9 | 9 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 342 | 342 | i_count = p_input->pf_demux( p_input ); |
|---|
| 343 | 343 | |
|---|
| 344 | | if( i_count == 0 && p_input->stream.b_connected ) |
|---|
| | 344 | if( i_count == 0 ) |
|---|
| 345 | 345 | { |
|---|
| 346 | 346 | /* End of file - we do not set b_die because only the |
|---|
| rb7b2c20 |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: input_ext-plugins.c,v 1.30 2003/03/05 17:55:13 gbazin Exp $ |
|---|
| | 5 | * $Id: input_ext-plugins.c,v 1.31 2003/03/24 17:15:30 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Christophe Massiot <massiot@via.ecp.fr> |
|---|
| … | … | |
| 518 | 518 | + i_remains, |
|---|
| 519 | 519 | p_input->i_bufsize ); |
|---|
| | 520 | if( i_ret < 0 && i_remains == 0 ) |
|---|
| | 521 | { |
|---|
| | 522 | /* Our internal buffers are empty, we can signal the error */ |
|---|
| | 523 | return -1; |
|---|
| | 524 | } |
|---|
| | 525 | |
|---|
| 520 | 526 | if( i_ret < 0 ) i_ret = 0; |
|---|
| 521 | 527 | |
|---|
| … | … | |
| 539 | 545 | ssize_t i_ret = input_FillBuffer( p_input ); |
|---|
| 540 | 546 | |
|---|
| 541 | | if( i_ret == -1 ) |
|---|
| | 547 | if( i_ret < 0 ) |
|---|
| 542 | 548 | { |
|---|
| 543 | 549 | return -1; |
|---|
| … | … | |
| 565 | 571 | ssize_t i_ret = input_FillBuffer( p_input ); |
|---|
| 566 | 572 | |
|---|
| 567 | | if( i_ret == -1 ) |
|---|
| | 573 | if( i_ret < 0 ) |
|---|
| 568 | 574 | { |
|---|
| 569 | 575 | return -1; |
|---|
| r774372d |
r607b74b |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001, 2002 VideoLAN |
|---|
| 5 | | * $Id: intf_eject.c,v 1.19 2003/03/21 17:14:56 gbazin Exp $ |
|---|
| | 5 | * $Id: intf_eject.c,v 1.20 2003/03/24 17:15:30 gbazin Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Author: Julien Blache <jb@technologeek.org> for the Linux part |
|---|
| … | … | |
| 158 | 158 | st.dwItem = MCI_STATUS_READY; |
|---|
| 159 | 159 | /* Eject disc */ |
|---|
| 160 | | mciSendCommand( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 ); |
|---|
| | 160 | i_ret = mciSendCommand( op.wDeviceID, MCI_SET, MCI_SET_DOOR_OPEN, 0 ); |
|---|
| 161 | 161 | /* Release access to the device */ |
|---|
| 162 | 162 | mciSendCommand( op.wDeviceID, MCI_CLOSE, MCI_WAIT, 0 ); |
|---|
| 163 | 163 | } |
|---|
| 164 | | |
|---|
| | 164 | else i_ret = VLC_EGENERIC; |
|---|
| | 165 | |
|---|
| | 166 | return i_ret; |
|---|
| 165 | 167 | #else /* WIN32 */ |
|---|
| 166 | 168 | |
|---|