Changeset 470b47fe952dbba82beca44cafefd4b6ec711384
- Timestamp:
- 28/03/06 22:29:28
(3 years ago)
- Author:
- Clément Stenac <zorglub@videolan.org>
- git-committer:
- Clément Stenac <zorglub@videolan.org> 1143577768 +0000
- git-parent:
[4dfd839aff9cfb0e3cd0e30b92e60af388bb0fc7]
- git-author:
- Clément Stenac <zorglub@videolan.org> 1143577768 +0000
- Message:
String fixes in src (Refs:#438)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r9302aca |
r470b47f |
|
| 167 | 167 | if( psz_parser == NULL || !*psz_parser ) |
|---|
| 168 | 168 | continue; |
|---|
| 169 | | |
|---|
| | 169 | |
|---|
| 170 | 170 | while( psz_parser && *psz_parser ) |
|---|
| 171 | 171 | { |
|---|
| … | … | |
| 174 | 174 | if( p_input->i_nb_filters >= AOUT_MAX_FILTERS ) |
|---|
| 175 | 175 | { |
|---|
| 176 | | msg_Dbg( p_aout, "max filter reached (%d)", AOUT_MAX_FILTERS ); |
|---|
| | 176 | msg_Dbg( p_aout, "max filters reached (%d)", AOUT_MAX_FILTERS ); |
|---|
| 177 | 177 | break; |
|---|
| 178 | 178 | } |
|---|
| … | … | |
| 211 | 211 | memcpy( &p_filter->output, &chain_output_format, |
|---|
| 212 | 212 | sizeof(audio_sample_format_t) ); |
|---|
| 213 | | |
|---|
| | 213 | |
|---|
| 214 | 214 | p_filter->p_module = module_Need( p_filter, "visualization", |
|---|
| 215 | 215 | psz_parser, VLC_TRUE ); |
|---|
| … | … | |
| 236 | 236 | aout_FormatPrepare( &p_filter->input ); |
|---|
| 237 | 237 | aout_FormatPrepare( &p_filter->output ); |
|---|
| 238 | | p_filter->p_module = module_Need( p_filter, "audio filter", |
|---|
| | 238 | p_filter->p_module = module_Need( p_filter, |
|---|
| | 239 | "audio filter", |
|---|
| 239 | 240 | psz_parser, VLC_TRUE ); |
|---|
| 240 | 241 | } |
|---|
| … | … | |
| 246 | 247 | memcpy( &p_filter->output, &chain_output_format, |
|---|
| 247 | 248 | sizeof(audio_sample_format_t) ); |
|---|
| 248 | | p_filter->p_module = module_Need( p_filter, "visualization", |
|---|
| | 249 | p_filter->p_module = module_Need( p_filter, |
|---|
| | 250 | "visualization", |
|---|
| 249 | 251 | psz_parser, VLC_TRUE ); |
|---|
| 250 | 252 | } |
|---|
| … | … | |
| 461 | 463 | if( p_input->p_input_thread ) |
|---|
| 462 | 464 | { |
|---|
| 463 | | stats_UpdateInteger( p_input->p_input_thread, STATS_LOST_ABUFFERS, 1, |
|---|
| 464 | | NULL ); |
|---|
| | 465 | stats_UpdateInteger( p_input->p_input_thread, STATS_LOST_ABUFFERS, |
|---|
| | 466 | 1, NULL ); |
|---|
| 465 | 467 | } |
|---|
| 466 | 468 | aout_BufferFree( p_buffer ); |
|---|
| … | … | |
| 503 | 505 | if( p_input->p_input_thread ) |
|---|
| 504 | 506 | { |
|---|
| 505 | | stats_UpdateInteger( p_input->p_input_thread, STATS_LOST_ABUFFERS, 1, |
|---|
| 506 | | NULL ); |
|---|
| | 507 | stats_UpdateInteger( p_input->p_input_thread, STATS_LOST_ABUFFERS, |
|---|
| | 508 | 1, NULL ); |
|---|
| 507 | 509 | } |
|---|
| 508 | 510 | return 0; |
|---|
| r2cb472d |
r470b47f |
|
| 159 | 159 | config_PutInt( p_object, "volume", i_volume ); |
|---|
| 160 | 160 | var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER ); |
|---|
| 161 | | var_SetInteger( p_object->p_libvlc, "saved-volume" , (audio_volume_t) i_volume ); |
|---|
| | 161 | var_SetInteger( p_object->p_libvlc, "saved-volume" , |
|---|
| | 162 | (audio_volume_t) i_volume ); |
|---|
| 162 | 163 | if ( pi_volume != NULL ) *pi_volume = (audio_volume_t) i_volume; |
|---|
| 163 | 164 | |
|---|
| … | … | |
| 167 | 168 | if ( !p_aout->mixer.b_error ) |
|---|
| 168 | 169 | { |
|---|
| 169 | | i_result = p_aout->output.pf_volume_set( p_aout, (audio_volume_t) i_volume ); |
|---|
| | 170 | i_result = p_aout->output.pf_volume_set( p_aout, |
|---|
| | 171 | (audio_volume_t) i_volume ); |
|---|
| 170 | 172 | } |
|---|
| 171 | 173 | vlc_mutex_unlock( &p_aout->mixer_lock ); |
|---|
| r5bd61a8 |
r470b47f |
|
| 47 | 47 | if ( p_aout->mixer.p_module == NULL ) |
|---|
| 48 | 48 | { |
|---|
| 49 | | msg_Err( p_aout, "no suitable aout mixer" ); |
|---|
| | 49 | msg_Err( p_aout, "no suitable audio mixer" ); |
|---|
| 50 | 50 | return -1; |
|---|
| 51 | 51 | } |
|---|
| r2cb472d |
r470b47f |
|
| 58 | 58 | if ( p_aout->output.p_module == NULL ) |
|---|
| 59 | 59 | { |
|---|
| 60 | | msg_Err( p_aout, "no suitable aout module" ); |
|---|
| | 60 | msg_Err( p_aout, "no suitable audio output module" ); |
|---|
| 61 | 61 | vlc_mutex_unlock( &p_aout->output_fifo_lock ); |
|---|
| 62 | 62 | return -1; |
|---|
| … | … | |
| 196 | 196 | &p_aout->output.output ) < 0 ) |
|---|
| 197 | 197 | { |
|---|
| 198 | | msg_Err( p_aout, "couldn't set an output pipeline" ); |
|---|
| | 198 | msg_Err( p_aout, "couldn't create audio output pipeline" ); |
|---|
| 199 | 199 | module_Unneed( p_aout, p_aout->output.p_module ); |
|---|
| 200 | 200 | return -1; |
|---|
| rebeebc5 |
r470b47f |
|
| 98 | 98 | p_pic = _mediacontrol_createRGBPicture( p_snapshot->i_width, |
|---|
| 99 | 99 | p_snapshot->i_height, |
|---|
| 100 | | VLC_FOURCC( 'p','n','g',' ' ), |
|---|
| | 100 | VLC_FOURCC( 'p','n','g',' ' ), |
|---|
| 101 | 101 | p_snapshot->date, |
|---|
| 102 | 102 | p_snapshot->p_data, |
|---|
| … | … | |
| 200 | 200 | mtime_t i_now = mdate(); |
|---|
| 201 | 201 | |
|---|
| 202 | | i_duration = 1000 * mediacontrol_unit_convert( self->p_playlist->p_input, |
|---|
| 203 | | end->key, |
|---|
| 204 | | mediacontrol_MediaTime, |
|---|
| 205 | | end->value ); |
|---|
| | 202 | i_duration = 1000 * mediacontrol_unit_convert( |
|---|
| | 203 | self->p_playlist->p_input, |
|---|
| | 204 | end->key, |
|---|
| | 205 | mediacontrol_MediaTime, |
|---|
| | 206 | end->value ); |
|---|
| 206 | 207 | |
|---|
| 207 | 208 | mediacontrol_showtext( p_vout, DEFAULT_CHAN, psz_message, NULL, |
|---|
| … | … | |
| 226 | 227 | |
|---|
| 227 | 228 | i_debut = mediacontrol_position2microsecond( p_input, |
|---|
| 228 | | ( mediacontrol_Position* ) begin ); |
|---|
| | 229 | ( mediacontrol_Position* ) begin ); |
|---|
| 229 | 230 | i_debut += i_now; |
|---|
| 230 | 231 | |
|---|
| 231 | 232 | i_fin = mediacontrol_position2microsecond( p_input, |
|---|
| 232 | | ( mediacontrol_Position * ) end ); |
|---|
| | 233 | ( mediacontrol_Position * ) end ); |
|---|
| 233 | 234 | i_fin += i_now; |
|---|
| 234 | 235 | |
|---|
| rf1dd5a8 |
r470b47f |
|
| 124 | 124 | { |
|---|
| 125 | 125 | /* Relative or ModuloPosition make no sense */ |
|---|
| 126 | | RAISE( mediacontrol_PositionOriginNotSupported, "Only absolute position is valid." ); |
|---|
| | 126 | RAISE( mediacontrol_PositionOriginNotSupported, |
|---|
| | 127 | "Only absolute position is valid." ); |
|---|
| 127 | 128 | return NULL; |
|---|
| 128 | 129 | } |
|---|
| … | … | |
| 365 | 366 | vlc_value_t val; |
|---|
| 366 | 367 | |
|---|
| 367 | | retval = ( mediacontrol_StreamInformation* )malloc( sizeof( mediacontrol_StreamInformation ) ); |
|---|
| | 368 | retval = ( mediacontrol_StreamInformation* ) |
|---|
| | 369 | malloc( sizeof( mediacontrol_StreamInformation ) ); |
|---|
| 368 | 370 | if( ! retval ) |
|---|
| 369 | 371 | { |
|---|
| … | … | |
| 411 | 413 | |
|---|
| 412 | 414 | retval->position = mediacontrol_unit_convert( p_input, |
|---|
| 413 | | mediacontrol_MediaTime, a_key, |
|---|
| 414 | | retval->position ); |
|---|
| | 415 | mediacontrol_MediaTime, a_key, |
|---|
| | 416 | retval->position ); |
|---|
| 415 | 417 | retval->length = mediacontrol_unit_convert( p_input, |
|---|
| 416 | | mediacontrol_MediaTime, a_key, |
|---|
| 417 | | retval->length ); |
|---|
| | 418 | mediacontrol_MediaTime, a_key, |
|---|
| | 419 | retval->length ); |
|---|
| 418 | 420 | } |
|---|
| 419 | 421 | return retval; |
|---|
| r4fdac05 |
r470b47f |
|
| 97 | 97 | double f_fps; |
|---|
| 98 | 98 | |
|---|
| 99 | | if( demux2_Control( p_input->input.p_demux, DEMUX_GET_FPS, &f_fps ) || f_fps < 0.1 ) |
|---|
| | 99 | if( demux2_Control( p_input->input.p_demux, DEMUX_GET_FPS, &f_fps ) || |
|---|
| | 100 | f_fps < 0.1 ) |
|---|
| 100 | 101 | return 0; |
|---|
| 101 | 102 | |
|---|
| rbe639de2 |
r470b47f |
|
| 897 | 897 | tv.tv_sec = 0; |
|---|
| 898 | 898 | tv.tv_usec = 10000; |
|---|
| 899 | | |
|---|
| | 899 | |
|---|
| 900 | 900 | i_ret = select( pi_stdin[0] > pi_stdout[0] ? pi_stdin[0] + 1 : |
|---|
| 901 | 901 | pi_stdout[0] + 1, &readfds, &writefds, NULL, &tv ); |
|---|
| … | … | |
| 959 | 959 | |
|---|
| 960 | 960 | #elif defined( WIN32 ) && !defined( UNDER_CE ) |
|---|
| 961 | | SECURITY_ATTRIBUTES saAttr; |
|---|
| 962 | | PROCESS_INFORMATION piProcInfo; |
|---|
| | 961 | SECURITY_ATTRIBUTES saAttr; |
|---|
| | 962 | PROCESS_INFORMATION piProcInfo; |
|---|
| 963 | 963 | STARTUPINFO siStartInfo; |
|---|
| 964 | | BOOL bFuncRetn = FALSE; |
|---|
| | 964 | BOOL bFuncRetn = FALSE; |
|---|
| 965 | 965 | HANDLE hChildStdinRd, hChildStdinWr, hChildStdoutRd, hChildStdoutWr; |
|---|
| 966 | 966 | DWORD i_status; |
|---|
| … | … | |
| 970 | 970 | |
|---|
| 971 | 971 | /* Set the bInheritHandle flag so pipe handles are inherited. */ |
|---|
| 972 | | saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); |
|---|
| 973 | | saAttr.bInheritHandle = TRUE; |
|---|
| 974 | | saAttr.lpSecurityDescriptor = NULL; |
|---|
| | 972 | saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); |
|---|
| | 973 | saAttr.bInheritHandle = TRUE; |
|---|
| | 974 | saAttr.lpSecurityDescriptor = NULL; |
|---|
| 975 | 975 | |
|---|
| 976 | 976 | /* Create a pipe for the child process's STDOUT. */ |
|---|
| 977 | | if ( !CreatePipe( &hChildStdoutRd, &hChildStdoutWr, &saAttr, 0 ) ) |
|---|
| 978 | | { |
|---|
| 979 | | msg_Err( p_object, "stdout pipe creation failed" ); |
|---|
| | 977 | if ( !CreatePipe( &hChildStdoutRd, &hChildStdoutWr, &saAttr, 0 ) ) |
|---|
| | 978 | { |
|---|
| | 979 | msg_Err( p_object, "stdout pipe creation failed" ); |
|---|
| 980 | 980 | return -1; |
|---|
| 981 | 981 | } |
|---|
| … | … | |
| 985 | 985 | |
|---|
| 986 | 986 | /* Create a pipe for the child process's STDIN. */ |
|---|
| 987 | | if ( !CreatePipe( &hChildStdinRd, &hChildStdinWr, &saAttr, 0 ) ) |
|---|
| 988 | | { |
|---|
| 989 | | msg_Err( p_object, "stdin pipe creation failed" ); |
|---|
| | 987 | if ( !CreatePipe( &hChildStdinRd, &hChildStdinWr, &saAttr, 0 ) ) |
|---|
| | 988 | { |
|---|
| | 989 | msg_Err( p_object, "stdin pipe creation failed" ); |
|---|
| 990 | 990 | return -1; |
|---|
| 991 | 991 | } |
|---|
| … | … | |
| 996 | 996 | /* Set up members of the PROCESS_INFORMATION structure. */ |
|---|
| 997 | 997 | ZeroMemory( &piProcInfo, sizeof(PROCESS_INFORMATION) ); |
|---|
| 998 | | |
|---|
| | 998 | |
|---|
| 999 | 999 | /* Set up members of the STARTUPINFO structure. */ |
|---|
| 1000 | 1000 | ZeroMemory( &siStartInfo, sizeof(STARTUPINFO) ); |
|---|
| 1001 | | siStartInfo.cb = sizeof(STARTUPINFO); |
|---|
| | 1001 | siStartInfo.cb = sizeof(STARTUPINFO); |
|---|
| 1002 | 1002 | siStartInfo.hStdError = hChildStdoutWr; |
|---|
| 1003 | 1003 | siStartInfo.hStdOutput = hChildStdoutWr; |
|---|
| … | … | |
| 1046 | 1046 | } |
|---|
| 1047 | 1047 | *p = '\0'; |
|---|
| 1048 | | |
|---|
| | 1048 | |
|---|
| 1049 | 1049 | /* Create the child process. */ |
|---|
| 1050 | 1050 | bFuncRetn = CreateProcess( NULL, |
|---|
| 1051 | | psz_cmd, // command line |
|---|
| 1052 | | NULL, // process security attributes |
|---|
| 1053 | | NULL, // primary thread security attributes |
|---|
| 1054 | | TRUE, // handles are inherited |
|---|
| 1055 | | 0, // creation flags |
|---|
| | 1051 | psz_cmd, // command line |
|---|
| | 1052 | NULL, // process security attributes |
|---|
| | 1053 | NULL, // primary thread security attributes |
|---|
| | 1054 | TRUE, // handles are inherited |
|---|
| | 1055 | 0, // creation flags |
|---|
| 1056 | 1056 | p_env, |
|---|
| 1057 | 1057 | psz_cwd, |
|---|
| 1058 | | &siStartInfo, // STARTUPINFO pointer |
|---|
| 1059 | | &piProcInfo ); // receives PROCESS_INFORMATION |
|---|
| | 1058 | &siStartInfo, // STARTUPINFO pointer |
|---|
| | 1059 | &piProcInfo ); // receives PROCESS_INFORMATION |
|---|
| 1060 | 1060 | |
|---|
| 1061 | 1061 | free( psz_cmd ); |
|---|
| 1062 | 1062 | free( p_env ); |
|---|
| 1063 | | |
|---|
| 1064 | | if ( bFuncRetn == 0 ) |
|---|
| 1065 | | { |
|---|
| 1066 | | msg_Err( p_object, "child creation failed" ); |
|---|
| | 1063 | |
|---|
| | 1064 | if ( bFuncRetn == 0 ) |
|---|
| | 1065 | { |
|---|
| | 1066 | msg_Err( p_object, "child creation failed" ); |
|---|
| 1067 | 1067 | return -1; |
|---|
| 1068 | 1068 | } |
|---|
| … | … | |
| 1084 | 1084 | * read end of the pipe. */ |
|---|
| 1085 | 1085 | CloseHandle(hChildStdoutWr); |
|---|
| 1086 | | |
|---|
| | 1086 | |
|---|
| 1087 | 1087 | /* Read output from the child process. */ |
|---|
| 1088 | 1088 | *pi_data = 0; |
|---|
| … | … | |
| 1092 | 1092 | { |
|---|
| 1093 | 1093 | DWORD i_read; |
|---|
| 1094 | | if ( !ReadFile( hChildStdoutRd, &(*pp_data)[*pi_data], 1024, &i_read, |
|---|
| | 1094 | if ( !ReadFile( hChildStdoutRd, &(*pp_data)[*pi_data], 1024, &i_read, |
|---|
| 1095 | 1095 | NULL ) |
|---|
| 1096 | 1096 | || i_read == 0 ) |
|---|
| 1097 | | break; |
|---|
| | 1097 | break; |
|---|
| 1098 | 1098 | *pi_data += i_read; |
|---|
| 1099 | 1099 | *pp_data = realloc( *pp_data, *pi_data + 1025 ); |
|---|
| r2cb472d |
r470b47f |
|
| 534 | 534 | if( p_playlist ) |
|---|
| 535 | 535 | { |
|---|
| 536 | | var_SetInteger( p_playlist, "item-change", p_input->input.p_item->i_id ); |
|---|
| | 536 | var_SetInteger( p_playlist, "item-change", |
|---|
| | 537 | p_input->input.p_item->i_id ); |
|---|
| 537 | 538 | vlc_object_release( p_playlist ); |
|---|
| 538 | 539 | } |
|---|
| r0b44cb9 |
r470b47f |
|
| 944 | 944 | { |
|---|
| 945 | 945 | p_dec->fmt_out.video.i_visible_height = 1080; |
|---|
| 946 | | p_dec->fmt_out.video.i_sar_num *= 135; |
|---|
| 947 | | p_dec->fmt_out.video.i_sar_den *= 136; |
|---|
| | 946 | p_dec->fmt_out.video.i_sar_num *= 135; |
|---|
| | 947 | p_dec->fmt_out.video.i_sar_den *= 136; |
|---|
| 948 | 948 | msg_Warn( p_dec, "Fixing broken HDTV stream (display_height=1088)"); |
|---|
| 949 | 949 | } |
|---|
| … | … | |
| 952 | 952 | !p_dec->fmt_out.video.i_sar_den ) |
|---|
| 953 | 953 | { |
|---|
| 954 | | p_dec->fmt_out.video.i_sar_num = p_dec->fmt_out.video.i_aspect * |
|---|
| | 954 | p_dec->fmt_out.video.i_sar_num = p_dec->fmt_out.video.i_aspect * |
|---|
| 955 | 955 | p_dec->fmt_out.video.i_visible_height; |
|---|
| 956 | 956 | |
|---|
| r2cb472d |
r470b47f |
|
| 76 | 76 | if( s && *psz_module == '\0' && strrchr( p_demux->psz_path, '.' ) ) |
|---|
| 77 | 77 | { |
|---|
| 78 | | /* XXX: add only file without any problem here and with strong detection. |
|---|
| 79 | | * - no .mp3, .a52, ... (aac is added as it works only by file ext anyway |
|---|
| 80 | | * - wav can't be added 'cause of a52 and dts in them as raw audio |
|---|
| | 78 | /* XXX: add only file without any problem here and with strong detection. |
|---|
| | 79 | * - no .mp3, .a52, ... (aac is added as it works only by file ext |
|---|
| | 80 | * anyway |
|---|
| | 81 | * - wav can't be added 'cause of a52 and dts in them as raw audio |
|---|
| 81 | 82 | */ |
|---|
| 82 | 83 | static struct { char *ext; char *demux; } exttodemux[] = |
|---|
| … | … | |
| 100 | 101 | }; |
|---|
| 101 | 102 | /* Here, we don't mind if it does not work, it must be quick */ |
|---|
| 102 | | static struct { char *ext; char *demux; } exttodemux_quick[] = |
|---|
| | 103 | static struct { char *ext; char *demux; } exttodemux_quick[] = |
|---|
| 103 | 104 | { |
|---|
| 104 | 105 | { "mp3", "mpga" }, |
|---|
| rcf716aa |
r470b47f |
|
| 180 | 180 | { |
|---|
| 181 | 181 | for( i = 0; p_sys->ppsz_audio_language[i]; i++ ) |
|---|
| 182 | | msg_Dbg( p_input, "select audio in language[%d] %s", |
|---|
| | 182 | msg_Dbg( p_input, "selected audio language[%d] %s", |
|---|
| 183 | 183 | i, p_sys->ppsz_audio_language[i] ); |
|---|
| 184 | 184 | } |
|---|
| … | … | |
| 190 | 190 | { |
|---|
| 191 | 191 | for( i = 0; p_sys->ppsz_sub_language[i]; i++ ) |
|---|
| 192 | | msg_Dbg( p_input, "select subtitle in language[%d] %s", |
|---|
| | 192 | msg_Dbg( p_input, "selected subtitle language[%d] %s", |
|---|
| 193 | 193 | i, p_sys->ppsz_sub_language[i] ); |
|---|
| 194 | 194 | } |
|---|
| … | … | |
| 288 | 288 | es_out_id_t *es = p_sys->es[i]; |
|---|
| 289 | 289 | es->b_discontinuity = VLC_TRUE; /* signal discontinuity */ |
|---|
| 290 | | |
|---|
| | 290 | |
|---|
| 291 | 291 | /* Send a dummy block to let decoder know that |
|---|
| 292 | 292 | * there is a discontinuity */ |
|---|
| … | … | |
| 369 | 369 | if( es->psz_language && *es->psz_language ) |
|---|
| 370 | 370 | { |
|---|
| 371 | | text.psz_string = malloc( strlen( es->fmt.psz_description) + strlen( es->psz_language ) + 10 ); |
|---|
| 372 | | sprintf( text.psz_string, "%s - [%s]", es->fmt.psz_description, es->psz_language ); |
|---|
| | 371 | text.psz_string = malloc( strlen( es->fmt.psz_description) + |
|---|
| | 372 | strlen( es->psz_language ) + 10 ); |
|---|
| | 373 | sprintf( text.psz_string, "%s - [%s]", es->fmt.psz_description, |
|---|
| | 374 | es->psz_language ); |
|---|
| 373 | 375 | } |
|---|
| 374 | 376 | else text.psz_string = strdup( es->fmt.psz_description ); |
|---|
| … | … | |
| 379 | 381 | { |
|---|
| 380 | 382 | char *temp; |
|---|
| 381 | | text.psz_string = malloc( strlen( _("Track %i") )+ strlen( es->psz_language ) + 30 ); |
|---|
| | 383 | text.psz_string = malloc( strlen( _("Track %i") )+ |
|---|
| | 384 | strlen( es->psz_language ) + 30 ); |
|---|
| 382 | 385 | asprintf( &temp, _("Track %i"), val.i_int ); |
|---|
| 383 | 386 | sprintf( text.psz_string, "%s - [%s]", temp, es->psz_language ); |
|---|
| … | … | |
| 781 | 784 | es->i_id ); |
|---|
| 782 | 785 | return; |
|---|
| 783 | | } |
|---|
| | 786 | } |
|---|
| 784 | 787 | } |
|---|
| 785 | 788 | |
|---|
| r6b99a43 |
r470b47f |
|
| 208 | 208 | else if( !strncmp( psz_start, "time=", 5 ) ) |
|---|
| 209 | 209 | { |
|---|
| 210 | | p_seekpoint->i_time_offset = atoll(psz_start + 5) * 1000000; |
|---|
| | 210 | p_seekpoint->i_time_offset = atoll(psz_start + 5) * |
|---|
| | 211 | 1000000; |
|---|
| 211 | 212 | } |
|---|
| 212 | 213 | psz_start = psz_end + 1; |
|---|
| … | … | |
| 1577 | 1578 | input_EsOutDiscontinuity( p_input->p_es_out, VLC_FALSE ); |
|---|
| 1578 | 1579 | es_out_Control( p_input->p_es_out, ES_OUT_RESET_PCR ); |
|---|
| 1579 | | |
|---|
| | 1580 | |
|---|
| 1580 | 1581 | access2_Control( p_access, ACCESS_SET_TITLE, i_title ); |
|---|
| 1581 | 1582 | stream_AccessReset( p_input->input.p_stream ); |
|---|
| … | … | |
| 1618 | 1619 | input_EsOutDiscontinuity( p_input->p_es_out, VLC_FALSE ); |
|---|
| 1619 | 1620 | es_out_Control( p_input->p_es_out, ES_OUT_RESET_PCR ); |
|---|
| 1620 | | |
|---|
| | 1621 | |
|---|
| 1621 | 1622 | demux2_Control( p_demux, DEMUX_SET_SEEKPOINT, i_seekpoint ); |
|---|
| 1622 | 1623 | } |
|---|
| … | … | |
| 1654 | 1655 | input_EsOutDiscontinuity( p_input->p_es_out, VLC_FALSE ); |
|---|
| 1655 | 1656 | es_out_Control( p_input->p_es_out, ES_OUT_RESET_PCR ); |
|---|
| 1656 | | |
|---|
| 1657 | | access2_Control( p_access, ACCESS_SET_SEEKPOINT, i_seekpoint ); |
|---|
| | 1657 | |
|---|
| | 1658 | access2_Control( p_access, ACCESS_SET_SEEKPOINT, |
|---|
| | 1659 | i_seekpoint ); |
|---|
| 1658 | 1660 | stream_AccessReset( p_input->input.p_stream ); |
|---|
| 1659 | 1661 | } |
|---|
| … | … | |
| 1972 | 1974 | { |
|---|
| 1973 | 1975 | input_source_t *in = (input_source_t*) malloc( sizeof( input_source_t ) ); |
|---|
| 1974 | | |
|---|
| | 1976 | |
|---|
| 1975 | 1977 | if( !in ) |
|---|
| 1976 | 1978 | { |
|---|
| … | … | |
| 2044 | 2046 | psz_demux = psz_var_demux; |
|---|
| 2045 | 2047 | |
|---|
| 2046 | | msg_Dbg( p_input, "Enforce demux ` %s'", psz_demux ); |
|---|
| | 2048 | msg_Dbg( p_input, "enforced demux ` %s'", psz_demux ); |
|---|
| 2047 | 2049 | } |
|---|
| 2048 | 2050 | else if( psz_var_demux ) |
|---|
| … | … | |
| 2282 | 2284 | int64_t i_time; |
|---|
| 2283 | 2285 | int i; |
|---|
| 2284 | | |
|---|
| | 2286 | |
|---|
| 2285 | 2287 | if( demux2_Control( p_input->input.p_demux, DEMUX_GET_TIME, &i_time ) ) |
|---|
| 2286 | 2288 | { |
|---|
| rdc229fd |
r470b47f |
|
| 37 | 37 | #endif |
|---|
| 38 | 38 | |
|---|
| 39 | | #ifdef HAVE_LIMITS_H |
|---|
| 40 | | # include <limits.h> |
|---|
| | 39 | #ifdef HAVE_LIMITS_H |
|---|
| | 40 | # include <limits.h> |
|---|
| 41 | 41 | #endif |
|---|
| 42 | 42 | |
|---|
| … | … | |
| 65 | 65 | * The possible extentions for subtitle files we support |
|---|
| 66 | 66 | */ |
|---|
| 67 | | static const char * sub_exts[] = { "utf", "utf8", "utf-8", "sub", "srt", "smi", "txt", "ssa", "idx", NULL}; |
|---|
| | 67 | static const char * sub_exts[] = { "utf", "utf8", "utf-8", "sub", "srt", "smi", "txt", "ssa", "idx", NULL }; |
|---|
| 68 | 68 | /* extensions from unsupported types */ |
|---|
| 69 | 69 | /* rt, aqt, jss, js, ass */ |
|---|
| … | … | |
| 162 | 162 | } |
|---|
| 163 | 163 | |
|---|
| 164 | | /* Utility function for scandir */ |
|---|
| | 164 | /* Utility function for scandir */ |
|---|
| 165 | 165 | static int Filter( const char *psz_dir_content ) |
|---|
| 166 | 166 | { |
|---|
| … | … | |
| 230 | 230 | if( psz_temp ) |
|---|
| 231 | 231 | { |
|---|
| 232 | | sprintf( psz_temp, "%s%s%c", |
|---|
| | 232 | sprintf( psz_temp, "%s%s%c", |
|---|
| 233 | 233 | psz_subdir[0] == '.' ? psz_dir : "", |
|---|
| 234 | 234 | psz_subdir, |
|---|
| … | … | |
| 344 | 344 | subdirs = tmp_subdirs; |
|---|
| 345 | 345 | |
|---|
| 346 | | for( j = -1; (j == -1) || ( (j >= 0) && (subdirs != NULL) && (*subdirs != NULL) ); |
|---|
| 347 | | j++) |
|---|
| | 346 | for( j = -1; (j == -1) || ( (j >= 0) && (subdirs != NULL) && |
|---|
| | 347 | (*subdirs != NULL) ); j++) |
|---|
| 348 | 348 | { |
|---|
| 349 | 349 | const char *psz_dir = j < 0 ? f_dir : *subdirs; |
|---|
| … | … | |
| 365 | 365 | for( a = 0; a < i_dir_content; a++ ) |
|---|
| 366 | 366 | { |
|---|
| 367 | | char *psz_name = vlc_fix_readdir_charset( p_this, ppsz_dir_content[a] ); |
|---|
| | 367 | char *psz_name = vlc_fix_readdir_charset( p_this, |
|---|
| | 368 | ppsz_dir_content[a] ); |
|---|
| 368 | 369 | int i_prio = 0; |
|---|
| 369 | 370 | |
|---|
| … | … | |
| 409 | 410 | |
|---|
| 410 | 411 | sprintf( psz_path, "%s%s", psz_dir, psz_name ); |
|---|
| 411 | | msg_Dbg( p_this, "autodetected subtitle: %s with priority %d", psz_path, i_prio ); |
|---|
| | 412 | msg_Dbg( p_this, |
|---|
| | 413 | "autodetected subtitle: %s with priority %d", |
|---|
| | 414 | psz_path, i_prio ); |
|---|
| 412 | 415 | /* FIXME: a portable wrapper for stat() or access() would be more suited */ |
|---|
| 413 | 416 | if( ( f = utf8_fopen( psz_path, "rt" ) ) ) |
|---|
| 414 | 417 | { |
|---|
| 415 | 418 | fclose( f ); |
|---|
| 416 | | msg_Dbg( p_this, "autodetected subtitle: %s with priority %d", psz_path, i_prio ); |
|---|
| | 419 | msg_Dbg( p_this, |
|---|
| | 420 | "autodetected subtitle: %s with priority %d", |
|---|
| | 421 | psz_path, i_prio ); |
|---|
| 417 | 422 | result[i_sub_count].priority = i_prio; |
|---|
| 418 | 423 | result[i_sub_count].psz_fname = psz_path; |
|---|
| … | … | |
| 457 | 462 | { |
|---|
| 458 | 463 | if( result[i].psz_fname && result[j].psz_fname && |
|---|
| 459 | | !strncasecmp( result[j].psz_fname, result[i].psz_fname, sizeof( result[j].psz_fname) - 4 ) && |
|---|
| | 464 | !strncasecmp( result[j].psz_fname, result[i].psz_fname, |
|---|
| | 465 | sizeof( result[j].psz_fname) - 4 ) && |
|---|
| 460 | 466 | !strcasecmp( result[i].psz_ext, "idx" ) ) |
|---|
| 461 | 467 | break; |
|---|
| r68f500c |
r470b47f |
|
| 514 | 514 | interaction_t *p_interaction; |
|---|
| 515 | 515 | |
|---|
| 516 | | msg_Dbg( p_playlist, "initializing interaction system" ); |
|---|
| 517 | | |
|---|
| 518 | 516 | p_interaction = vlc_object_create( VLC_OBJECT( p_playlist ), |
|---|
| 519 | 517 | sizeof( interaction_t ) ); |
|---|
| … | … | |
| 545 | 543 | if( !p_list ) |
|---|
| 546 | 544 | { |
|---|
| 547 | | msg_Err( p_interaction, "Unable to create module list" ); |
|---|
| | 545 | msg_Err( p_interaction, "unable to create module list" ); |
|---|
| 548 | 546 | return; |
|---|
| 549 | 547 | } |
|---|
| rc4fef7e |
r470b47f |
|
| 120 | 120 | if( p_intf->p_module == NULL ) |
|---|
| 121 | 121 | { |
|---|
| 122 | | msg_Err( p_intf, "no suitable intf module" ); |
|---|
| | 122 | msg_Err( p_intf, "no suitable interface module" ); |
|---|
| 123 | 123 | vlc_object_destroy( p_intf ); |
|---|
| 124 | 124 | return NULL; |
|---|
| … | … | |
| 161 | 161 | /* This is the primary intf */ |
|---|
| 162 | 162 | /* Run a manager thread, launch the interface, kill the manager */ |
|---|
| 163 | | if( vlc_thread_create( p_intf, "manager", Manager, |
|---|
| | 163 | if( vlc_thread_create( p_intf, "manage", Manager, |
|---|
| 164 | 164 | VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) ) |
|---|
| 165 | 165 | { |
|---|
| … | … | |
| 190 | 190 | if( !strcmp( p_intf->p_module->psz_object_name, "macosx" ) ) |
|---|
| 191 | 191 | { |
|---|
| 192 | | msg_Err( p_intf, "You cannot run the MacOS X module as an extrainterface. Please read the README.MacOSX.rtf file"); |
|---|
| | 192 | msg_Err( p_intf, "You cannot run the MacOS X module as an " |
|---|
| | 193 | "extra interface. Please read the " |
|---|
| | 194 | "README.MacOSX.rtf file"); |
|---|
| 193 | 195 | return VLC_EGENERIC; |
|---|
| 194 | 196 | } |
|---|
| r70e482e |
r470b47f |
|
| 123 | 123 | case VLC_OBJECT_DIALOGS: |
|---|
| 124 | 124 | i_size = sizeof(intf_thread_t); |
|---|
| 125 | | psz_type = "dialogs provider"; |
|---|
| | 125 | psz_type = "dialogs"; |
|---|
| 126 | 126 | break; |
|---|
| 127 | 127 | case VLC_OBJECT_PLAYLIST: |
|---|
| … | … | |
| 171 | 171 | case VLC_OBJECT_SPU: |
|---|
| 172 | 172 | i_size = sizeof(spu_t); |
|---|
| 173 | | psz_type = "subpicture unit"; |
|---|
| | 173 | psz_type = "subpicture"; |
|---|
| 174 | 174 | break; |
|---|
| 175 | 175 | case VLC_OBJECT_AOUT: |
|---|
| … | … | |
| 207 | 207 | case VLC_OBJECT_OPENGL: |
|---|
| 208 | 208 | i_size = sizeof( vout_thread_t ); |
|---|
| 209 | | psz_type = "opengl provider"; |
|---|
| | 209 | psz_type = "opengl"; |
|---|
| 210 | 210 | break; |
|---|
| 211 | 211 | case VLC_OBJECT_ANNOUNCE: |
|---|
| 212 | 212 | i_size = sizeof( announce_handler_t ); |
|---|
| 213 | | psz_type = "announce handler"; |
|---|
| | 213 | psz_type = "announce"; |
|---|
| 214 | 214 | break; |
|---|
| 215 | 215 | case VLC_OBJECT_OSDMENU: |
|---|
| r0b44cb9 |
r470b47f |
|
| 506 | 506 | p_counter->i_compute_type != STATS_LAST ) |
|---|
| 507 | 507 | { |
|---|
| 508 | | msg_Err( p_handler, "Unable to compute MIN or MAX for this type"); |
|---|
| | 508 | msg_Err( p_handler, "unable to compute MIN or MAX for this type"); |
|---|
| 509 | 509 | return VLC_EGENERIC; |
|---|
| 510 | 510 | } |
|---|
| ra1ff886 |
r470b47f |
|
| 83 | 83 | if( !(p_vlm = vlc_object_find( p_this, VLC_OBJECT_VLM, FIND_ANYWHERE )) ) |
|---|
| 84 | 84 | { |
|---|
| 85 | | msg_Info( p_this, "creating vlm" ); |
|---|
| | 85 | msg_Info( p_this, "creating VLM" ); |
|---|
| 86 | 86 | if( ( p_vlm = vlc_object_create( p_this, VLC_OBJECT_VLM ) ) == NULL ) |
|---|
| 87 | 87 | { |
|---|
| … | … | |
| 118 | 118 | char *psz_buffer = NULL; |
|---|
| 119 | 119 | |
|---|
| 120 | | msg_Dbg( p_this, "loading vlm conf ..." ); |
|---|
| | 120 | msg_Dbg( p_this, "loading VLM configuration" ); |
|---|
| 121 | 121 | asprintf(&psz_buffer, "load %s", psz_vlmconf ); |
|---|
| 122 | 122 | if( psz_buffer ) |
|---|
| … | … | |
| 124 | 124 | msg_Dbg( p_this, psz_buffer); |
|---|
| 125 | 125 | if( vlm_ExecuteCommand( p_vlm, psz_buffer, &p_message ) ){ |
|---|
| 126 | | msg_Warn( p_this, "error while loading the vlm conf file" ); |
|---|
| | 126 | msg_Warn( p_this, "error while loading the configuration file" ); |
|---|
| 127 | 127 | } |
|---|
| 128 | 128 | vlm_MessageDelete(p_message); |
|---|
| r1c35288 |
r470b47f |
|
| 98 | 98 | |
|---|
| 99 | 99 | default: |
|---|
| 100 | | msg_Err( p_this, "IMPOSSIBLE: unknown address family!" ); |
|---|
| | 100 | msg_Err( p_this, "unknown address family" ); |
|---|
| 101 | 101 | vlc_freeaddrinfo( res ); |
|---|
| 102 | 102 | return -1; |
|---|
| … | … | |
| 284 | 284 | if( ferror( file ) ) |
|---|
| 285 | 285 | { |
|---|
| 286 | | msg_Err( p_acl->p_owner, "Error reading %s : %s\n", psz_path, |
|---|
| | 286 | msg_Err( p_acl->p_owner, "error reading %s : %s\n", psz_path, |
|---|
| 287 | 287 | strerror( errno ) ); |
|---|
| 288 | 288 | goto error; |
|---|
| … | … | |
| 304 | 304 | if( ptr == NULL ) |
|---|
| 305 | 305 | { |
|---|
| 306 | | msg_Warn( p_acl->p_owner, "Skipping overly long line in %s\n", |
|---|
| | 306 | msg_Warn( p_acl->p_owner, "skipping overly long line in %s\n", |
|---|
| 307 | 307 | psz_path); |
|---|
| 308 | 308 | do |
|---|
| … | … | |
| 311 | 311 | if( ferror( file ) || feof( file ) ) |
|---|
| 312 | 312 | { |
|---|
| 313 | | msg_Err( p_acl->p_owner, "Error reading %s : %s\n", |
|---|
| | 313 | msg_Err( p_acl->p_owner, "error reading %s : %s\n", |
|---|
| 314 | 314 | psz_path, strerror( errno ) ); |
|---|
| 315 | 315 | goto error; |
|---|