Changeset 2ba646a5ea654996b0e627d589bd712acebb2bf8
- Timestamp:
- 01/10/04 12:03:29
(4 years ago)
- Author:
- Gildas Bazin <gbazin@videolan.org>
- git-committer:
- Gildas Bazin <gbazin@videolan.org> 1096625009 +0000
- git-parent:
[75a2edbf6133555bcc4e4abcc5805c578712ed64]
- git-author:
- Gildas Bazin <gbazin@videolan.org> 1096625009 +0000
- Message:
* src/*: bunch of portability fixes.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rca9ce33 |
r2ba646a |
|
| 1074 | 1074 | static void EsOutAddInfo( es_out_t *out, es_out_id_t *es ) |
|---|
| 1075 | 1075 | { |
|---|
| 1076 | | es_out_sys_t *p_sys = out->p_sys; |
|---|
| 1077 | | input_thread_t *p_input = p_sys->p_input; |
|---|
| 1078 | | es_format_t *fmt = &es->fmt; |
|---|
| 1079 | | |
|---|
| 1080 | | char psz_cat[strlen(_("Stream %d")) + 12]; |
|---|
| | 1076 | es_out_sys_t *p_sys = out->p_sys; |
|---|
| | 1077 | input_thread_t *p_input = p_sys->p_input; |
|---|
| | 1078 | es_format_t *fmt = &es->fmt; |
|---|
| | 1079 | char *psz_cat; |
|---|
| 1081 | 1080 | |
|---|
| 1082 | 1081 | /* Add stream info */ |
|---|
| 1083 | | sprintf( psz_cat, _("Stream %d"), out->p_sys->i_id - 1 ); |
|---|
| | 1082 | asprintf( &psz_cat, _("Stream %d"), out->p_sys->i_id - 1 ); |
|---|
| 1084 | 1083 | |
|---|
| 1085 | 1084 | input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Codec"), |
|---|
| … | … | |
| 1139 | 1138 | break; |
|---|
| 1140 | 1139 | } |
|---|
| 1141 | | } |
|---|
| | 1140 | |
|---|
| | 1141 | free( psz_cat ); |
|---|
| | 1142 | } |
|---|
| rbdb1ee5 |
r2ba646a |
|
| 1109 | 1109 | |
|---|
| 1110 | 1110 | socket_error: |
|---|
| 1111 | | close( fd ); |
|---|
| | 1111 | net_Close( fd ); |
|---|
| 1112 | 1112 | fd = -1; |
|---|
| 1113 | 1113 | } |
|---|
| rd60b3fe |
r2ba646a |
|
| 764 | 764 | |
|---|
| 765 | 765 | #if defined( UNDER_CE ) || defined( _MSC_VER ) |
|---|
| | 766 | #ifdef UNDER_CE |
|---|
| 766 | 767 | MultiByteToWideChar( CP_ACP, 0, psz_dir, -1, psz_wdir, MAX_PATH ); |
|---|
| 767 | 768 | |
|---|
| 768 | 769 | rc = GetFileAttributes( psz_wdir ); |
|---|
| 769 | | if( !(rc & FILE_ATTRIBUTE_DIRECTORY) ) |
|---|
| 770 | | { |
|---|
| 771 | | /* Not a directory */ |
|---|
| 772 | | return; |
|---|
| 773 | | } |
|---|
| | 770 | if( !(rc & FILE_ATTRIBUTE_DIRECTORY) ) return; /* Not a directory */ |
|---|
| 774 | 771 | |
|---|
| 775 | 772 | /* Parse all files in the directory */ |
|---|
| 776 | | #ifdef UNDER_CE |
|---|
| 777 | 773 | swprintf( psz_path, L"%s\\*.*", psz_dir ); |
|---|
| | 774 | |
|---|
| 778 | 775 | #else |
|---|
| | 776 | rc = GetFileAttributes( psz_dir ); |
|---|
| | 777 | if( !(rc & FILE_ATTRIBUTE_DIRECTORY) ) return; /* Not a directory */ |
|---|
| | 778 | |
|---|
| | 779 | /* Parse all files in the directory */ |
|---|
| 779 | 780 | sprintf( psz_path, "%s\\*.*", psz_dir ); |
|---|
| 780 | 781 | #endif |
|---|
| | 782 | |
|---|
| 781 | 783 | handle = FindFirstFile( psz_path, &finddata ); |
|---|
| 782 | 784 | if( handle == INVALID_HANDLE_VALUE ) |
|---|
| r9e63dcf |
r2ba646a |
|
| 54 | 54 | #ifdef HAVE_UNISTD_H |
|---|
| 55 | 55 | # include <unistd.h> |
|---|
| | 56 | #elif defined( WIN32 ) && !defined( UNDER_CE ) |
|---|
| | 57 | # include <io.h> |
|---|
| 56 | 58 | #endif |
|---|
| 57 | 59 | |
|---|
| … | … | |
| 412 | 414 | else |
|---|
| 413 | 415 | { |
|---|
| 414 | | if( fd == STDIN_FILENO ) i_recv = read( fd, p_data, i_data ); else |
|---|
| 415 | | |
|---|
| | 416 | if( fd == 0 /*STDIN_FILENO*/ ) i_recv = read( fd, p_data, i_data ); else |
|---|
| 416 | 417 | if( ( i_recv = recv( fd, p_data, i_data, 0 ) ) <= 0 ) |
|---|
| 417 | 418 | { |
|---|
| rc6b7377 |
r2ba646a |
|
| 1355 | 1355 | if( val.i_int >= 0 ) |
|---|
| 1356 | 1356 | { |
|---|
| | 1357 | vlc_value_t val_es; |
|---|
| | 1358 | val_es.i_int = -VIDEO_ES; |
|---|
| 1357 | 1359 | p_vout->b_filter_change = VLC_TRUE; |
|---|
| 1358 | | var_Set( p_input, "video-es", (vlc_value_t)-VIDEO_ES ); |
|---|
| | 1360 | var_Set( p_input, "video-es", val_es ); |
|---|
| 1359 | 1361 | var_Set( p_input, "video-es", val ); |
|---|
| 1360 | 1362 | } |
|---|
| … | … | |
| 1387 | 1389 | if( val.i_int >= 0 ) |
|---|
| 1388 | 1390 | { |
|---|
| | 1391 | vlc_value_t val_es; |
|---|
| | 1392 | val_es.i_int = -VIDEO_ES; |
|---|
| 1389 | 1393 | p_vout->b_filter_change = VLC_TRUE; |
|---|
| 1390 | | var_Set( p_input, "video-es", (vlc_value_t)-VIDEO_ES ); |
|---|
| | 1394 | var_Set( p_input, "video-es", val_es ); |
|---|
| 1391 | 1395 | var_Set( p_input, "video-es", val ); |
|---|
| 1392 | 1396 | } |
|---|