Commit 8b90225c authored by Gildas Bazin's avatar Gildas Bazin

* src/libvlc.h: fixed spelling mistake.
* modules/gui/wxwindows/preferences.cpp: allow negative numbers in spinctrls.
* modules/demux/asf,avi,mp4: use p_input->stream.control.b_mute.
parent ac309ac8
......@@ -2,7 +2,7 @@
* asf.c : ASFv01 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: asf.c,v 1.28 2003/05/05 22:23:35 gbazin Exp $
* $Id: asf.c,v 1.29 2003/05/22 21:42:43 gbazin Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -682,13 +682,16 @@ static int DemuxPacket( input_thread_t *p_input, vlc_bool_t b_play_audio )
}
/* FIXME I don't use i_media_object_number, sould I ? */
if( p_stream->p_pes && i_media_object_offset == 0 ) {
if( p_stream->p_pes && i_media_object_offset == 0 )
{
/* send complete packet to decoder */
if( p_stream->p_pes->i_pes_size > 0 )
{
if( p_stream->p_es->p_decoder_fifo &&
( b_play_audio || p_stream->i_cat != AUDIO_ES ) )
{
p_stream->p_pes->i_rate =
p_input->stream.control.i_rate;
input_DecodePES( p_stream->p_es->p_decoder_fifo,
p_stream->p_pes );
}
......@@ -829,29 +832,8 @@ static int Demux( input_thread_t *p_input )
}
}
vlc_mutex_lock( &p_input->stream.stream_lock );
if( p_input->stream.control.i_rate == DEFAULT_RATE )
{
b_play_audio = VLC_TRUE;
}
else
{
int i;
b_play_audio = VLC_TRUE;
for( i = 0; i < 128; i++ )
{
if( p_demux->stream[i] &&
p_demux->stream[i]->i_cat == VIDEO_ES &&
p_demux->stream[i]->p_es &&
p_demux->stream[i]->p_es->p_decoder_fifo )
{
/* there is at least ine video track so no need to play audio */
b_play_audio = VLC_FALSE;
}
}
}
vlc_mutex_unlock( &p_input->stream.stream_lock );
/* Check if we need to send the audio data to decoder */
b_play_audio = !p_input->stream.control.b_mute;
for( ;; )
{
......
......@@ -2,7 +2,7 @@
* avi.c : AVI file Stream input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: avi.c,v 1.47 2003/05/05 22:23:35 gbazin Exp $
* $Id: avi.c,v 1.48 2003/05/22 21:42:44 gbazin Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -2047,17 +2047,8 @@ static int AVIDemux_Seekable( input_thread_t *p_input )
}
#endif
/* *** send audio data to decoder if rate == DEFAULT_RATE or no video *** */
vlc_mutex_lock( &p_input->stream.stream_lock );
if( p_input->stream.control.i_rate == DEFAULT_RATE || !b_video )
{
b_play_audio = VLC_TRUE;
}
else
{
b_play_audio = VLC_FALSE;
}
vlc_mutex_unlock( &p_input->stream.stream_lock );
/* Check if we need to send the audio data to decoder */
b_play_audio = !p_input->stream.control.b_mute;
/* init toread */
for( i_stream = 0; i_stream < p_avi->i_streams; i_stream++ )
......@@ -2326,6 +2317,8 @@ static int AVIDemux_Seekable( input_thread_t *p_input )
p_input->stream.p_selected_program,
p_pes->i_pts * 9/100);
p_pes->i_rate = p_input->stream.control.i_rate;
input_DecodePES( p_stream->p_es->p_decoder_fifo, p_pes );
}
else
......@@ -2349,10 +2342,8 @@ static int AVIDemux_UnSeekable( input_thread_t *p_input )
unsigned int i_stream;
unsigned int i_packet;
/* *** send audio data to decoder only if rate == DEFAULT_RATE *** */
vlc_mutex_lock( &p_input->stream.stream_lock );
b_audio = p_input->stream.control.i_rate == DEFAULT_RATE;
vlc_mutex_unlock( &p_input->stream.stream_lock );
/* Check if we need to send the audio data to decoder */
b_audio = !p_input->stream.control.b_mute;
input_ClockManageRef( p_input,
p_input->stream.p_selected_program,
......@@ -2456,6 +2447,9 @@ static int AVIDemux_UnSeekable( input_thread_t *p_input )
input_ClockGetTS( p_input,
p_input->stream.p_selected_program,
AVI_GetPTS( p_stream ) * 9/100);
p_pes->i_rate = p_input->stream.control.i_rate;
input_DecodePES( p_stream->p_es->p_decoder_fifo, p_pes );
}
else
......
......@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.31 2003/05/09 19:29:57 fenrir Exp $
* $Id: mp4.c,v 1.32 2003/05/22 21:42:44 gbazin Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -511,17 +511,8 @@ static int MP4Demux( input_thread_t *p_input )
p_demux->i_time += __MAX( p_demux->i_timescale / 10 , 1 );
/* *** send audio data to decoder if rate == DEFAULT_RATE or no video *** */
vlc_mutex_lock( &p_input->stream.stream_lock );
if( p_input->stream.control.i_rate == DEFAULT_RATE || !b_video )
{
b_play_audio = VLC_TRUE;
}
else
{
b_play_audio = VLC_FALSE;
}
vlc_mutex_unlock( &p_input->stream.stream_lock );
/* Check if we need to send the audio data to decoder */
b_play_audio = !p_input->stream.control.b_mute;
for( i_track = 0; i_track < p_demux->i_tracks; i_track++ )
{
......@@ -603,6 +594,8 @@ static int MP4Demux( input_thread_t *p_input )
if( track.p_es->p_decoder_fifo )
{
p_pes->i_rate = p_input->stream.control.i_rate;
input_DecodePES( track.p_es->p_decoder_fifo, p_pes );
}
else
......@@ -1380,7 +1373,10 @@ static int TrackGotoChunkSample( input_thread_t *p_input,
{
if( p_track->p_pes_init != NULL )
{
input_DecodePES( p_track->p_es->p_decoder_fifo, p_track->p_pes_init );
p_track->p_pes_init->i_rate = p_input->stream.control.i_rate;
input_DecodePES( p_track->p_es->p_decoder_fifo,
p_track->p_pes_init );
p_track->p_pes_init = NULL;
}
p_track->b_selected = VLC_TRUE;
......
......@@ -2,7 +2,7 @@
* preferences.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: preferences.cpp,v 1.15 2003/05/13 11:44:53 gbazin Exp $
* $Id: preferences.cpp,v 1.16 2003/05/22 21:42:43 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -787,7 +787,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
wxString::Format(wxT("%d"),p_item->i_value),
wxDefaultPosition, wxDefaultSize,
wxSP_ARROW_KEYS,
0, 16000, p_item->i_value);
-16000, 16000, p_item->i_value);
spin->SetToolTip( wxU(p_item->psz_longtext) );
config_data->control.spinctrl = spin;
panel_sizer->Add( label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
......@@ -802,7 +802,7 @@ PrefsPanel::PrefsPanel( wxWindow* parent, intf_thread_t *_p_intf,
wxString::Format(wxT("%f"),p_item->f_value),
wxDefaultPosition, wxDefaultSize,
wxSP_ARROW_KEYS,
0, 16000, (int)p_item->f_value);
-16000, 16000, (int)p_item->f_value);
spin->SetToolTip( wxU(p_item->psz_longtext) );
config_data->control.spinctrl = spin;
panel_sizer->Add( label, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
......
......@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.69 2003/05/21 13:19:32 sigmunau Exp $
* $Id: libvlc.h,v 1.70 2003/05/22 21:42:43 gbazin Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
......@@ -388,7 +388,7 @@ static char *ppsz_language[] = { "auto", "de", "en_GB", "fr", "it",
#define DEMUX_LONGTEXT N_( \
"This is a legacy entry to let you configure demux modules")
#define FAST_MUTEX_TEXT N_("Dast mutex on NT/2K/XP (developers only)")
#define FAST_MUTEX_TEXT N_("Fast mutex on NT/2K/XP (developers only)")
#define FAST_MUTEX_LONGTEXT N_( \
"On Windows NT/2K/XP we use a slow mutex implementation but which " \
"allows us to correctely implement condition variables. " \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment