Commit c3e2bf1d authored by Sam Hocevar's avatar Sam Hocevar

  * Fixed my old stupid bug that disabled sound after having played the
    first playlist item.
  * Added `Prev' and `Next' buttons to the interface, with the beginning of
    a playlist window (still empty).
  * Added `Slow' and `Fast' buttons to the interface and popup menu.

  Ok, I promise it's the last time I check bloat in, from now the interface
  commits will be much cleaner and actually fix things :)
parent 02d21f72
......@@ -149,9 +149,9 @@ also accepts a lot of parameters to customize its behaviour.
.TP
.B DVD parameters:
vlc_dvd_device=<device> DVD device
vlc_dvd_audio={ac3|lpcm|mpeg|off} audio type
vlc_dvd_channel=[0-15] audio channel
vlc_dvd_subtitle=[0-31] subtitle channel
vlc_audio={ac3|lpcm|mpeg|off} audio type
vlc_channel=[0-15] audio channel
vlc_subtitle=[0-31] subtitle channel
.TP
.B Input parameters:
vlc_server=<hostname> video server
......
......@@ -219,9 +219,10 @@
#define INPUT_DVD_DEVICE_VAR "vlc_dvd_device"
#define INPUT_DVD_DEVICE_DEFAULT "/dev/dvd"
#define INPUT_DVD_AUDIO_VAR "vlc_dvd_audio"
#define INPUT_DVD_CHANNEL_VAR "vlc_dvd_channel"
#define INPUT_DVD_SUBTITLE_VAR "vlc_dvd_subtitle"
#define INPUT_AUDIO_VAR "vlc_input_audio"
#define INPUT_CHANNEL_VAR "vlc_input_channel"
#define INPUT_SUBTITLE_VAR "vlc_input_subtitle"
/*****************************************************************************
* Audio configuration
......
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.6 2001/02/09 03:51:42 stef Exp $
* $Id: input_dvd.c,v 1.7 2001/02/12 07:52:40 sam Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -289,12 +289,12 @@ static void DVDInit( input_thread_t * p_input )
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
== (p_es->i_id & 0x1F) )
switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
{
case 0:
main_PutIntVariable( INPUT_DVD_AUDIO_VAR,
main_PutIntVariable( INPUT_AUDIO_VAR,
REQUESTED_MPEG );
case REQUESTED_MPEG:
input_SelectES( p_input, p_es );
......@@ -302,12 +302,12 @@ static void DVDInit( input_thread_t * p_input )
break;
case AC3_AUDIO_ES:
if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
== ((p_es->i_id & 0xF00) >> 8) )
switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
{
case 0:
main_PutIntVariable( INPUT_DVD_AUDIO_VAR,
main_PutIntVariable( INPUT_AUDIO_VAR,
REQUESTED_AC3 );
case REQUESTED_AC3:
input_SelectES( p_input, p_es );
......@@ -315,7 +315,7 @@ static void DVDInit( input_thread_t * p_input )
break;
case DVD_SPU_ES:
if( main_GetIntVariable( INPUT_DVD_SUBTITLE_VAR, -1 )
if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 )
== ((p_es->i_id & 0x1F00) >> 8) )
{
input_SelectES( p_input, p_es );
......
......@@ -90,7 +90,15 @@ void
on_menubar_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) )
{
p_intf->p_sys->p_playlist = create_intf_playlist();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_playlist );
}
......@@ -119,6 +127,8 @@ on_menubar_about_activate (GtkMenuItem *menuitem,
if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
{
p_intf->p_sys->p_about = create_intf_about();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_about ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_about );
}
......@@ -189,7 +199,15 @@ void
on_toolbar_playlist_clicked (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
if( !GTK_IS_WIDGET( p_intf->p_sys->p_playlist ) )
{
p_intf->p_sys->p_playlist = create_intf_playlist();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_playlist ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_playlist );
}
......@@ -197,7 +215,15 @@ void
on_toolbar_prev_clicked (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
if( p_intf->p_input != NULL )
{
/* FIXME: temporary hack */
intf_PlstPrev( p_main->p_playlist );
intf_PlstPrev( p_main->p_playlist );
p_intf->p_input->b_eof = 1;
}
}
......@@ -205,7 +231,13 @@ void
on_toolbar_next_clicked (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
if( p_intf->p_input != NULL )
{
/* FIXME: temporary hack */
p_intf->p_input->b_eof = 1;
}
}
......@@ -318,7 +350,105 @@ on_popup_about_activate (GtkMenuItem *menuitem,
if( !GTK_IS_WIDGET( p_intf->p_sys->p_about ) )
{
p_intf->p_sys->p_about = create_intf_about();
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_about ),
"p_intf", p_intf );
}
gtk_widget_show( p_intf->p_sys->p_about );
}
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(object), "intf_playlist" );
p_intf->p_sys->p_playlist = NULL;
}
void
on_playlist_close_clicked (GtkButton *button,
gpointer user_data)
{
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
void
on_popup_slow_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
int i_rate;
if( p_intf->p_input != NULL )
{
i_rate = p_intf->p_input->stream.control.i_rate * 2;
if ( i_rate <= MAXIMAL_RATE )
{
if ( i_rate > 500 && i_rate < 1000 )
i_rate = 1000;
input_Forward( p_intf->p_input, i_rate );
}
}
}
void
on_popup_fast_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_popup" );
int i_rate;
if( p_intf->p_input != NULL )
{
i_rate = p_intf->p_input->stream.control.i_rate / 2;
if ( i_rate >= MINIMAL_RATE )
{
input_Forward( p_intf->p_input, i_rate );
}
}
}
void
on_toolbar_slow_clicked (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
int i_rate;
if( p_intf->p_input != NULL )
{
i_rate = p_intf->p_input->stream.control.i_rate * 2;
if ( i_rate <= MAXIMAL_RATE )
{
if ( i_rate > 500 && i_rate < 1000 )
i_rate = 1000;
input_Forward( p_intf->p_input, i_rate );
}
}
}
void
on_toolbar_fast_clicked (GtkButton *button,
gpointer user_data)
{
intf_thread_t *p_intf = GetIntf( GTK_WIDGET(button), "intf_window" );
int i_rate;
if( p_intf->p_input != NULL )
{
i_rate = p_intf->p_input->stream.control.i_rate / 2;
if ( i_rate >= MINIMAL_RATE )
{
input_Forward( p_intf->p_input, i_rate );
}
}
}
......@@ -120,3 +120,27 @@ on_popup_open_activate (GtkMenuItem *menuitem,
void
on_popup_about_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data);
void
on_playlist_close_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_slow_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_fast_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_toolbar_slow_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_fast_clicked (GtkButton *button,
gpointer user_data);
This diff is collapsed.
......@@ -6,3 +6,4 @@ GtkWidget* create_intf_window (void);
GtkWidget* create_intf_popup (void);
GtkWidget* create_intf_about (void);
GtkWidget* create_intf_fileopen (void);
GtkWidget* create_intf_playlist (void);
......@@ -286,12 +286,35 @@
<last_modification_time>Sun, 11 Feb 2001 17:06:43 GMT</last_modification_time>
</signal>
<label>Pause</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_BOTTOM</stock_pixmap>
</widget>
<widget>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_slow</name>
<tooltip>Play Slower</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_slow_clicked</handler>
<last_modification_time>Mon, 12 Feb 2001 07:20:42 GMT</last_modification_time>
</signal>
<label>Slow</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_TIMER_STOP</stock_pixmap>
</widget>
<widget>
<class>GtkVSeparator</class>
<name>vseparator2</name>
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>toolbar_fast</name>
<tooltip>Play Faster</tooltip>
<signal>
<name>clicked</name>
<handler>on_toolbar_fast_clicked</handler>
<last_modification_time>Mon, 12 Feb 2001 07:20:48 GMT</last_modification_time>
</signal>
<label>Fast</label>
<stock_pixmap>GNOME_STOCK_PIXMAP_TIMER</stock_pixmap>
</widget>
<widget>
......@@ -355,7 +378,7 @@
<name>text1</name>
<can_focus>True</can_focus>
<editable>False</editable>
<text>This is some random text. Nah.</text>
<text>This is some random text. Nah. Eat at Sam's. Rent this place. Wazaaa.</text>
</widget>
</widget>
</widget>
......@@ -401,9 +424,35 @@
</signal>
<label>Pause</label>
<right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_BOTTOM</stock_icon>
</widget>
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_slow</name>
<signal>
<name>activate</name>
<handler>on_popup_slow_activate</handler>
<last_modification_time>Mon, 12 Feb 2001 07:19:57 GMT</last_modification_time>
</signal>
<label>Slow</label>
<right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_TIMER_STOP</stock_icon>
</widget>
<widget>
<class>GtkPixmapMenuItem</class>
<name>popup_fast</name>
<signal>
<name>activate</name>
<handler>on_popup_fast_activate</handler>
<last_modification_time>Mon, 12 Feb 2001 07:19:57 GMT</last_modification_time>
</signal>
<label>Fast</label>
<right_justify>False</right_justify>
<stock_icon>GNOME_STOCK_MENU_TIMER</stock_icon>
</widget>
<widget>
<class>GtkMenuItem</class>
<name>separator2</name>
......@@ -524,4 +573,158 @@ Henri Fallon &lt;henri@via.ecp.fr&gt;
</widget>
</widget>
<widget>
<class>GtkWindow</class>
<name>intf_playlist</name>
<signal>
<name>destroy</name>
<handler>on_intf_playlist_destroy</handler>
<last_modification_time>Mon, 12 Feb 2001 06:02:25 GMT</last_modification_time>
</signal>
<title>Playlist</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<widget>
<class>GtkVBox</class>
<name>vbox1</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkScrolledWindow</class>
<name>scrolledwindow2</name>
<hscrollbar_policy>GTK_POLICY_ALWAYS</hscrollbar_policy>
<vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
<hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
<vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkCList</class>
<name>clist1</name>
<can_focus>True</can_focus>
<columns>3</columns>
<column_widths>189,80,80</column_widths>
<selection_mode>GTK_SELECTION_SINGLE</selection_mode>
<show_titles>True</show_titles>
<shadow_type>GTK_SHADOW_IN</shadow_type>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label3</name>
<label>Name</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label4</name>
<label>Type</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
<widget>
<class>GtkLabel</class>
<child_name>CList:title</child_name>
<name>label5</name>
<label>Length</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
</widget>
</widget>
</widget>
<widget>
<class>GtkHSeparator</class>
<name>hseparator1</name>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox1</name>
<homogeneous>True</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkButton</class>
<name>button1</name>
<can_focus>True</can_focus>
<label>Wazaaaa !</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>playlist_close</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_playlist_close_clicked</handler>
<last_modification_time>Mon, 12 Feb 2001 06:19:17 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>playlist_help</name>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_HELP</stock_button>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget>
</GTK-Interface>
......@@ -2,7 +2,7 @@
* input_ps.c: PS demux and packet management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ps.c,v 1.4 2001/02/08 17:44:12 massiot Exp $
* $Id: input_ps.c,v 1.5 2001/02/12 07:52:40 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -211,12 +211,12 @@ static void PSInit( input_thread_t * p_input )
case MPEG1_AUDIO_ES:
case MPEG2_AUDIO_ES:
if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
== (p_es->i_id & 0x1F) )
switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
{
case 0:
main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
main_PutIntVariable( INPUT_AUDIO_VAR,
REQUESTED_MPEG );
case REQUESTED_MPEG:
input_SelectES( p_input, p_es );
......@@ -224,12 +224,12 @@ static void PSInit( input_thread_t * p_input )
break;
case AC3_AUDIO_ES:
if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
== ((p_es->i_id & 0xF00) >> 8) )
switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
{
case 0:
main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
main_PutIntVariable( INPUT_AUDIO_VAR,
REQUESTED_AC3 );
case REQUESTED_AC3:
input_SelectES( p_input, p_es );
......@@ -237,7 +237,7 @@ static void PSInit( input_thread_t * p_input )
break;
case DVD_SPU_ES:
if( main_GetIntVariable( INPUT_DVD_SUBTITLE_VAR, -1 )
if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 )
== ((p_es->i_id & 0x1F00) >> 8) )
{
input_SelectES( p_input, p_es );
......
......@@ -54,12 +54,12 @@
/*****************************************************************************
* FIXME: this file is ... *
* *
* XXX XXX XXX XXX XXX XXX XXX XXX *
* XXX XXX XXX XXX XXX XXX XXX *
* XXX XXX XXX XXX XXX XXX *
* XXX XXX XXX XXX XXX XXX XXX *
* XXX XXX XXX XXX XXX XXX *
* XXX XXX XXX XXX XXX XXX XXX *
* XXX XXX FIXME XXX XXX XXX XXX *
* XXX XXX XXX XXX XXX XXX XXX XXX *
* XXX XXX XXX XXX FIXME XXX *
* XXX XXX XXX TODO XXX XXX XXX *
* XXX XXX XXX XXX XXX XXX *
* FIXME FIXME FIXME XXX XXX *
* *
*****************************************************************************/
......@@ -79,8 +79,7 @@ typedef struct vout_sys_s
boolean_t b_overlay;
boolean_t b_cursor;
boolean_t b_reopen_display;
Uint8 * p_buffer[2];
/* Buffers informations */
Uint8 * p_sdl_buf[2]; /* Buffer information */
} vout_sys_t;
/*****************************************************************************
......@@ -631,9 +630,9 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
if( p_vout->b_need_render )
{
p_vout->p_sys->p_buffer[ 0 ] = p_vout->p_sys->p_display->pixels;
p_vout->p_sys->p_sdl_buf[ 0 ] = p_vout->p_sys->p_display->pixels;
SDL_Flip(p_vout->p_sys->p_display);
p_vout->p_sys->p_buffer[ 1 ] = p_vout->p_sys->p_display->pixels;
p_vout->p_sys->p_sdl_buf[ 1 ] = p_vout->p_sys->p_display->pixels;
SDL_Flip(p_vout->p_sys->p_display);
/* Set clipping for text */
......@@ -659,21 +658,21 @@ static int SDLOpenDisplay( vout_thread_t *p_vout )
/* FIXME: palette in 8bpp ?? */
/* Set and initialize buffers */
vout_SetBuffers( p_vout, p_vout->p_sys->p_buffer[ 0 ],
p_vout->p_sys->p_buffer[ 1 ] );
vout_SetBuffers( p_vout, p_vout->p_sys->p_sdl_buf[ 0 ],
p_vout->p_sys->p_sdl_buf[ 1 ] );
}
else
{
p_vout->p_sys->p_buffer[ 0 ] = p_vout->p_sys->p_display->pixels;
p_vout->p_sys->p_buffer[ 1 ] = p_vout->p_sys->p_display->pixels;
p_vout->p_sys->p_sdl_buf[ 0 ] = p_vout->p_sys->p_display->pixels;
p_vout->p_sys->p_sdl_buf[ 1 ] = p_vout->p_sys->p_display->pixels;
/* Set thread information */
p_vout->i_width = p_vout->p_sys->p_display->w;
p_vout->i_height = p_vout->p_sys->p_display->h;
p_vout->i_bytes_per_line = p_vout->p_sys->p_display->pitch;
vout_SetBuffers( p_vout, p_vout->p_sys->p_buffer[ 0 ],
p_vout->p_sys->p_buffer[ 1 ] );
vout_SetBuffers( p_vout, p_vout->p_sys->p_sdl_buf[ 0 ],
p_vout->p_sys->p_sdl_buf[ 1 ] );
}
p_vout->p_sys->b_reopen_display = 0;
......
......@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: mpeg_system.c,v 1.34 2001/02/08 17:44:12 massiot Exp $
* $Id: mpeg_system.c,v 1.35 2001/02/12 07:52:40 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
......@@ -703,12 +703,12 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es->b_audio = 1;
#ifdef AUTO_SPAWN
if( !p_input->stream.b_seekable )
if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
== (p_es->i_id & 0x1F) )
switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
{
case 0:
main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
main_PutIntVariable( INPUT_CHANNEL_VAR,
REQUESTED_MPEG );
case REQUESTED_MPEG:
input_SelectES( p_input, p_es );
......@@ -722,12 +722,12 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
p_es->b_audio = 1;
#ifdef AUTO_SPAWN
if( !p_input->stream.b_seekable )
if( main_GetIntVariable( INPUT_DVD_CHANNEL_VAR, 0 )
if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
== ((p_es->i_id & 0xF00) >> 8) )
switch( main_GetIntVariable( INPUT_DVD_AUDIO_VAR, 0 ) )
switch( main_GetIntVariable( INPUT_AUDIO_VAR, 0 ) )
{
case 0:
main_PutIntVariable( INPUT_DVD_CHANNEL_VAR,
main_PutIntVariable( INPUT_CHANNEL_VAR,
REQUESTED_AC3 );
case REQUESTED_AC3:
input_SelectES( p_input, p_es );
......@@ -739,7 +739,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
/* Subtitles video (0x20->0x3F) */
p_es->i_type = DVD_SPU_ES;
#ifdef AUTO_SPAWN
if( main_GetIntVariable( INPUT_DVD_SUBTITLE_VAR, -1 )
if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 )
== ((p_es->i_id & 0x1F00) >> 8) )
{
if( !p_input->stream.b_seekable )
......
......@@ -616,19 +616,19 @@ static int GetConfiguration( int i_argc, char *ppsz_argv[], char *ppsz_env[] )
/* DVD options */
case 'a':
if ( ! strcmp(optarg, "ac3") )
main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_AC3 );
main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_AC3 );
else if ( ! strcmp(optarg, "lpcm") )
main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_LPCM );
main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_LPCM );
else if ( ! strcmp(optarg, "mpeg") )
main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_MPEG );
main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_MPEG );
else
main_PutIntVariable( INPUT_DVD_AUDIO_VAR, REQUESTED_NOAUDIO );
main_PutIntVariable( INPUT_AUDIO_VAR, REQUESTED_NOAUDIO );
break;
case 'c':
main_PutIntVariable( INPUT_DVD_CHANNEL_VAR, atoi(optarg) );
main_PutIntVariable( INPUT_CHANNEL_VAR, atoi(optarg) );
break;
case 's':
main_PutIntVariable( INPUT_DVD_SUBTITLE_VAR, atoi(optarg) );
main_PutIntVariable( INPUT_SUBTITLE_VAR, atoi(optarg) );
break;
/* Input options */
......@@ -776,9 +776,9 @@ static void Usage( int i_fashion )
/* DVD parameters */
intf_MsgImm( "\nDVD parameters:"
"\n " INPUT_DVD_DEVICE_VAR "=<device> \tDVD device"
"\n " INPUT_DVD_AUDIO_VAR "={ac3|lpcm|mpeg|off} \taudio type"
"\n " INPUT_DVD_CHANNEL_VAR "=[0-15] \taudio channel"
"\n " INPUT_DVD_SUBTITLE_VAR "=[0-31] \tsubtitle channel" );
"\n " INPUT_AUDIO_VAR "={ac3|lpcm|mpeg|off} \taudio type"
"\n " INPUT_CHANNEL_VAR "=[0-15] \taudio channel"
"\n " INPUT_SUBTITLE_VAR "=[0-31] \tsubtitle channel" );
/* Input parameters */
intf_MsgImm( "\nInput parameters:\n"
......
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