Commit 72ca0539 authored by Stéphane Borel's avatar Stéphane Borel

-changes in gnome interface

-bugfix in input dvd
parent 1843a615
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* control the pace of reading. * control the pace of reading.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: input_ext-intf.h,v 1.29 2001/04/01 07:31:38 stef Exp $ * $Id: input_ext-intf.h,v 1.30 2001/04/08 07:24:47 stef Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -52,7 +52,8 @@ typedef struct es_descriptor_s ...@@ -52,7 +52,8 @@ typedef struct es_descriptor_s
boolean_t b_audio; /* is the stream an audio stream that boolean_t b_audio; /* is the stream an audio stream that
* will need to be discarded with * will need to be discarded with
* fast forward and slow motion ? */ * fast forward and slow motion ? */
boolean_t b_spu; u8 i_cat; /* stream category: video, audio,
* spu, other */
char psz_desc[20]; /* description of ES: audio language char psz_desc[20]; /* description of ES: audio language
* for instance ; NULL if not * for instance ; NULL if not
...@@ -96,6 +97,12 @@ typedef struct es_descriptor_s ...@@ -96,6 +97,12 @@ typedef struct es_descriptor_s
#define LPCM_AUDIO_ES 0x83 #define LPCM_AUDIO_ES 0x83
#define UNKNOWN_ES 0xFF #define UNKNOWN_ES 0xFF
/* ES Categories */
#define VIDEO_ES 0x00
#define AUDIO_ES 0x01
#define SPU_ES 0x02
#define NAV_ES 0x03
#define UNKNOWN_ES 0xFF
/***************************************************************************** /*****************************************************************************
* pgrm_descriptor_t * pgrm_descriptor_t
***************************************************************************** *****************************************************************************
...@@ -352,7 +359,7 @@ void input_SetRate ( struct input_thread_s *, int ); ...@@ -352,7 +359,7 @@ void input_SetRate ( struct input_thread_s *, int );
void input_Seek ( struct input_thread_s *, off_t ); void input_Seek ( struct input_thread_s *, off_t );
void input_DumpStream( struct input_thread_s * ); void input_DumpStream( struct input_thread_s * );
char * input_OffsetToTime( struct input_thread_s *, char * psz_buffer, off_t ); char * input_OffsetToTime( struct input_thread_s *, char * psz_buffer, off_t );
int input_ChangeES ( struct input_thread_s *, struct es_descriptor_s *, int ); int input_ChangeES ( struct input_thread_s *, struct es_descriptor_s *, u8 );
int input_ToggleES ( struct input_thread_s *, int input_ToggleES ( struct input_thread_s *,
struct es_descriptor_s *, struct es_descriptor_s *,
boolean_t ); boolean_t );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvd_ifo.c: Functions for ifo parsing * dvd_ifo.c: Functions for ifo parsing
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_ifo.c,v 1.16 2001/04/01 07:31:38 stef Exp $ * $Id: dvd_ifo.c,v 1.17 2001/04/08 07:24:47 stef Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -539,11 +539,19 @@ FLUSH(2); ...@@ -539,11 +539,19 @@ FLUSH(2);
{ {
GETLL( &i_temp ); GETLL( &i_temp );
//fprintf( stderr, "Audio %d: %llx\n", i, i_temp ); //fprintf( stderr, "Audio %d: %llx\n", i, i_temp );
i_temp >>= 32; i_temp >>= 8;
manager_inf.p_audio_attr[i].i_bar = i_temp & 0xff;
i_temp >>= 8;
manager_inf.p_audio_attr[i].i_caption = i_temp & 0xff;
i_temp >>= 8;
manager_inf.p_audio_attr[i].i_foo = i_temp & 0xff;
i_temp >>= 8;
manager_inf.p_audio_attr[i].i_lang_code = i_temp & 0xffff; manager_inf.p_audio_attr[i].i_lang_code = i_temp & 0xffff;
i_temp >>= 16; i_temp >>= 16;
manager_inf.p_audio_attr[i].i_num_channels = i_temp & 0x7; manager_inf.p_audio_attr[i].i_num_channels = i_temp & 0x7;
i_temp >>= 4; i_temp >>= 3;
manager_inf.p_audio_attr[i].i_test = i_temp & 0x1;
i_temp >>= 1;
manager_inf.p_audio_attr[i].i_sample_freq = i_temp & 0x3; manager_inf.p_audio_attr[i].i_sample_freq = i_temp & 0x3;
i_temp >>= 2; i_temp >>= 2;
manager_inf.p_audio_attr[i].i_quantization = i_temp & 0x3; manager_inf.p_audio_attr[i].i_quantization = i_temp & 0x3;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dvd_ifo.h: Structures for ifo parsing * dvd_ifo.h: Structures for ifo parsing
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: dvd_ifo.h,v 1.10 2001/04/04 02:49:18 sam Exp $ * $Id: dvd_ifo.h,v 1.11 2001/04/08 07:24:47 stef Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -57,7 +57,7 @@ typedef struct ifo_audio_s ...@@ -57,7 +57,7 @@ typedef struct ifo_audio_s
u8 i_quantization ;// 2; u8 i_quantization ;// 2;
u8 i_sample_freq ;// 2; u8 i_sample_freq ;// 2;
// u8 ;// 1; u8 i_test ;// 1;
u8 i_num_channels ;// 3; u8 i_num_channels ;// 3;
u16 i_lang_code ;// 16; // <char> description u16 i_lang_code ;// 16; // <char> description
u8 i_foo ;// 8; // 0x00000000 ? u8 i_foo ;// 8; // 0x00000000 ?
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* -dvd_udf to find files * -dvd_udf to find files
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.37 2001/04/03 03:39:41 stef Exp $ * $Id: input_dvd.c,v 1.38 2001/04/08 07:24:47 stef Exp $
* *
* Author: Stphane Borel <stef@via.ecp.fr> * Author: Stphane Borel <stef@via.ecp.fr>
* *
...@@ -365,6 +365,7 @@ static int DVDFindCell( thread_dvd_data_t * p_dvd ) ...@@ -365,6 +365,7 @@ static int DVDFindCell( thread_dvd_data_t * p_dvd )
if( i_cell == cell.i_cell_nb ) if( i_cell == cell.i_cell_nb )
{ {
intf_ErrMsg( "dvd error: can't find cell" );
return -1; return -1;
} }
else else
...@@ -392,6 +393,7 @@ static int DVDFindSector( thread_dvd_data_t * p_dvd ) ...@@ -392,6 +393,7 @@ static int DVDFindSector( thread_dvd_data_t * p_dvd )
if( DVDFindCell( p_dvd ) < 0 ) if( DVDFindCell( p_dvd ) < 0 )
{ {
intf_ErrMsg( "dvd error: can't find sector" );
return -1; return -1;
} }
...@@ -421,6 +423,7 @@ static int DVDChapterSelect( thread_dvd_data_t * p_dvd, int i_chapter ) ...@@ -421,6 +423,7 @@ static int DVDChapterSelect( thread_dvd_data_t * p_dvd, int i_chapter )
/* Find cell index in Program chain for current chapter */ /* Find cell index in Program chain for current chapter */
p_dvd->i_prg_cell = title.chapter_map.pi_start_cell[i_chapter-1] - 1; p_dvd->i_prg_cell = title.chapter_map.pi_start_cell[i_chapter-1] - 1;
p_dvd->i_cell = 0; p_dvd->i_cell = 0;
p_dvd->i_sector = 0;
/* Search for cell_index in cell adress_table and initialize start sector */ /* Search for cell_index in cell adress_table and initialize start sector */
DVDFindSector( p_dvd ); DVDFindSector( p_dvd );
...@@ -561,12 +564,17 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -561,12 +564,17 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) ); input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
/* No PSM to read in DVD mode, we already have all information */
p_input->stream.pp_programs[0]->b_is_ok = 1;
p_input->stream.pp_programs[0]->i_synchro_state = SYNCHRO_START;
p_es = NULL; p_es = NULL;
/* ES 0 -> video MPEG2 */ /* ES 0 -> video MPEG2 */
p_es = input_AddES( p_input, p_input->stream.pp_programs[0], 0xe0, 0 ); p_es = input_AddES( p_input, p_input->stream.pp_programs[0], 0xe0, 0 );
p_es->i_stream_id = 0xe0; p_es->i_stream_id = 0xe0;
p_es->i_type = MPEG2_VIDEO_ES; p_es->i_type = MPEG2_VIDEO_ES;
p_es->i_cat = VIDEO_ES;
input_SelectES( p_input, p_es ); input_SelectES( p_input, p_es );
intf_WarnMsg( 1, "dvd info: video MPEG2 stream" ); intf_WarnMsg( 1, "dvd info: video MPEG2 stream" );
...@@ -579,15 +587,15 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -579,15 +587,15 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
{ {
#ifdef DEBUG #ifdef DEBUG
intf_DbgMsg( "Audio %d: %x %x %x %x %x %x %x %x %x %x %x %x\n", i, intf_WarnMsg( 1, "Audio %d: %x %x %x %x %x %x %x %x %x %x %x %x", i,
vts.manager_inf.p_audio_attr[i-1].i_num_channels, vts.manager_inf.p_audio_attr[i-1].i_num_channels,
vts.manager_inf.p_audio_attr[i-1].i_coding_mode, vts.manager_inf.p_audio_attr[i-1].i_coding_mode,
vts.manager_inf.p_audio_attr[i-1].i_multichannel_extension, vts.manager_inf.p_audio_attr[i-1].i_multichannel_extension,
vts.manager_inf.p_audio_attr[i-1].i_type, vts.manager_inf.p_audio_attr[i-1].i_type,
vts.manager_inf.p_audio_attr[i-1].i_appl_mode, vts.manager_inf.p_audio_attr[i-1].i_appl_mode,
vts.manager_inf.p_audio_attr[i-1].i_foo, vts.manager_inf.p_audio_attr[i-1].i_foo,
vts.manager_inf.p_audio_attr[i-1].i_test,
vts.manager_inf.p_audio_attr[i-1].i_bar, vts.manager_inf.p_audio_attr[i-1].i_bar,
vts.manager_inf.p_audio_attr[i-1].i_appl_mode,
vts.manager_inf.p_audio_attr[i-1].i_quantization, vts.manager_inf.p_audio_attr[i-1].i_quantization,
vts.manager_inf.p_audio_attr[i-1].i_sample_freq, vts.manager_inf.p_audio_attr[i-1].i_sample_freq,
vts.manager_inf.p_audio_attr[i-1].i_lang_code, vts.manager_inf.p_audio_attr[i-1].i_lang_code,
...@@ -603,8 +611,10 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -603,8 +611,10 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_es->i_stream_id = 0xbd; p_es->i_stream_id = 0xbd;
p_es->i_type = AC3_AUDIO_ES; p_es->i_type = AC3_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, Language( hton16( strcpy( p_es->psz_desc, Language( hton16(
vts.manager_inf.p_audio_attr[i-1].i_lang_code ) ) ); vts.manager_inf.p_audio_attr[i-1].i_lang_code ) ) );
strcat( p_es->psz_desc, " (ac3)" );
intf_WarnMsg( 1, "dvd info: audio stream %d %s\t(0x%x)", intf_WarnMsg( 1, "dvd info: audio stream %d %s\t(0x%x)",
i, p_es->psz_desc, i_id ); i, p_es->psz_desc, i_id );
...@@ -618,8 +628,10 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -618,8 +628,10 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_es->i_stream_id = i_id; p_es->i_stream_id = i_id;
p_es->i_type = MPEG2_AUDIO_ES; p_es->i_type = MPEG2_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES;
strcpy( p_es->psz_desc, Language( hton16( strcpy( p_es->psz_desc, Language( hton16(
vts.manager_inf.p_audio_attr[i-1].i_lang_code ) ) ); vts.manager_inf.p_audio_attr[i-1].i_lang_code ) ) );
strcat( p_es->psz_desc, " (mpeg)" );
intf_WarnMsg( 1, "dvd info: audio stream %d %s\t(0x%x)", intf_WarnMsg( 1, "dvd info: audio stream %d %s\t(0x%x)",
i, p_es->psz_desc, i_id ); i, p_es->psz_desc, i_id );
...@@ -655,7 +667,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -655,7 +667,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_input->stream.pp_programs[0], i_id, 0 ); p_input->stream.pp_programs[0], i_id, 0 );
p_es->i_stream_id = 0xbd; p_es->i_stream_id = 0xbd;
p_es->i_type = DVD_SPU_ES; p_es->i_type = DVD_SPU_ES;
p_es->b_spu = 1; p_es->i_cat = SPU_ES;
strcpy( p_es->psz_desc, Language( hton16( strcpy( p_es->psz_desc, Language( hton16(
vts.manager_inf.p_spu_attr[i-1].i_lang_code ) ) ); vts.manager_inf.p_spu_attr[i-1].i_lang_code ) ) );
intf_WarnMsg( 1, "dvd info: spu stream %d %s\t(0x%x)", intf_WarnMsg( 1, "dvd info: spu stream %d %s\t(0x%x)",
...@@ -674,7 +686,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -674,7 +686,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
main_PutIntVariable( INPUT_CHANNEL_VAR, 1 ); main_PutIntVariable( INPUT_CHANNEL_VAR, 1 );
i_audio = 1; i_audio = 1;
} }
if( i_audio > 0 ) if( i_audio > 0 && vts.manager_inf.i_audio_nb > 0 )
{ {
input_SelectES( p_input, p_input->stream.pp_es[i_audio] ); input_SelectES( p_input, p_input->stream.pp_es[i_audio] );
} }
...@@ -686,7 +698,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -686,7 +698,7 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
main_PutIntVariable( INPUT_CHANNEL_VAR, 1 ); main_PutIntVariable( INPUT_CHANNEL_VAR, 1 );
i_spu = 0; i_spu = 0;
} }
if( i_spu > 0 ) if( i_spu > 0 && vts.manager_inf.i_spu_nb > 0 )
{ {
i_spu += vts.manager_inf.i_audio_nb; i_spu += vts.manager_inf.i_audio_nb;
input_SelectES( p_input, p_input->stream.pp_es[i_spu] ); input_SelectES( p_input, p_input->stream.pp_es[i_spu] );
...@@ -714,10 +726,6 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area ) ...@@ -714,10 +726,6 @@ static int DVDSetArea( input_thread_t * p_input, input_area_t * p_area )
p_area->i_part, p_area->i_tell ); p_area->i_part, p_area->i_tell );
} }
/* No PSM to read in DVD mode, we already have all information */
p_input->stream.pp_programs[0]->b_is_ok = 1;
p_input->stream.pp_programs[0]->i_synchro_state = SYNCHRO_START;
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
#undef vts #undef vts
#undef vmg #undef vmg
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gnome_callbacks.h : Callbacks for the Gnome plugin. * gnome_callbacks.h : Callbacks for the Gnome plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: gnome_callbacks.h,v 1.13 2001/04/03 03:39:41 stef Exp $ * $Id: gnome_callbacks.h,v 1.14 2001/04/08 07:24:47 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -86,14 +86,6 @@ void ...@@ -86,14 +86,6 @@ void
on_toolbar_next_clicked (GtkButton *button, on_toolbar_next_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void
on_toolbar_prev_title_clicked (GtkButton *button,
gpointer user_data);
void
on_toolbar_next_title_clicked (GtkButton *button,
gpointer user_data);
void void
on_popup_play_activate (GtkMenuItem *menuitem, on_popup_play_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
...@@ -289,3 +281,11 @@ on_button_chapter_prev_clicked (GtkButton *button, ...@@ -289,3 +281,11 @@ on_button_chapter_prev_clicked (GtkButton *button,
void void
on_button_chapter_next_clicked (GtkButton *button, on_button_chapter_next_clicked (GtkButton *button,
gpointer user_data); gpointer user_data);
void
on_button_title_prev_clicked (GtkButton *button,
gpointer user_data);
void
on_button_title_next_clicked (GtkButton *button,
gpointer user_data);
This diff is collapsed.
This diff is collapsed.
...@@ -584,8 +584,7 @@ ...@@ -584,8 +584,7 @@
<widget> <widget>
<class>GtkHBox</class> <class>GtkHBox</class>
<name>dvd_box</name> <name>file_box</name>
<visible>False</visible>
<homogeneous>False</homogeneous> <homogeneous>False</homogeneous>
<spacing>0</spacing> <spacing>0</spacing>
<child> <child>
...@@ -596,8 +595,9 @@ ...@@ -596,8 +595,9 @@
<widget> <widget>
<class>GtkLabel</class> <class>GtkLabel</class>
<name>label_title</name> <name>label_file</name>
<label>Title:</label> <height>24</height>
<label>Vlc File Mode</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>
<xalign>0.5</xalign> <xalign>0.5</xalign>
...@@ -607,13 +607,27 @@ ...@@ -607,13 +607,27 @@
<child> <child>
<padding>0</padding> <padding>0</padding>
<expand>True</expand> <expand>True</expand>
<fill>False</fill> <fill>True</fill>
</child> </child>
</widget> </widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>dvd_box</name>
<height>24</height>
<visible>False</visible>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget> <widget>
<class>GtkHBox</class> <class>GtkHBox</class>
<name>hbox6</name> <name>title_chapter_box</name>
<homogeneous>False</homogeneous> <homogeneous>False</homogeneous>
<spacing>10</spacing> <spacing>10</spacing>
<child> <child>
...@@ -622,15 +636,49 @@ ...@@ -622,15 +636,49 @@
<fill>False</fill> <fill>False</fill>
</child> </child>
<widget>
<class>GtkLabel</class>
<name>label19</name>
<label>Title:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>label_title</name>
<label>--</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget> <widget>
<class>GtkButton</class> <class>GtkButton</class>
<name>button_chapter_prev</name> <name>button_title_prev</name>
<tooltip>Select previous chapter</tooltip> <tooltip>Select previous title</tooltip>
<can_focus>True</can_focus> <can_focus>True</can_focus>
<signal> <signal>
<name>clicked</name> <name>clicked</name>
<handler>on_button_chapter_prev_clicked</handler> <handler>on_button_title_prev_clicked</handler>
<last_modification_time>Tue, 03 Apr 2001 00:53:47 GMT</last_modification_time> <last_modification_time>Tue, 03 Apr 2001 03:46:25 GMT</last_modification_time>
</signal> </signal>
<stock_button>GNOME_STOCK_BUTTON_PREV</stock_button> <stock_button>GNOME_STOCK_BUTTON_PREV</stock_button>
<relief>GTK_RELIEF_NONE</relief> <relief>GTK_RELIEF_NONE</relief>
...@@ -641,10 +689,57 @@ ...@@ -641,10 +689,57 @@
</child> </child>
</widget> </widget>
<widget>
<class>GtkButton</class>
<name>button_title_next</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_button_title_next_clicked</handler>
<last_modification_time>Tue, 03 Apr 2001 03:47:01 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_NEXT</stock_button>
<relief>GTK_RELIEF_NONE</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>dvd_chapter_box</name>
<homogeneous>False</homogeneous>
<spacing>10</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label20</name>
<label>Chapter:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget> <widget>
<class>GtkLabel</class> <class>GtkLabel</class>
<name>label_chapter</name> <name>label_chapter</name>
<label>Chapter: </label> <label>--</label>
<justify>GTK_JUSTIFY_CENTER</justify> <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap> <wrap>False</wrap>
<xalign>0.5</xalign> <xalign>0.5</xalign>
...@@ -658,6 +753,25 @@ ...@@ -658,6 +753,25 @@
</child> </child>
</widget> </widget>
<widget>
<class>GtkButton</class>
<name>button_chapter_prev</name>
<tooltip>Select previous chapter</tooltip>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>on_button_chapter_prev_clicked</handler>
<last_modification_time>Tue, 03 Apr 2001 00:53:47 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_PREV</stock_button>
<relief>GTK_RELIEF_NONE</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget> <widget>
<class>GtkButton</class> <class>GtkButton</class>
<name>button_chapter_next</name> <name>button_chapter_next</name>
...@@ -678,6 +792,126 @@ ...@@ -678,6 +792,126 @@
</widget> </widget>
</widget> </widget>
</widget> </widget>
<widget>
<class>GtkHBox</class>
<name>network_box</name>
<height>24</height>
<visible>False</visible>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkLabel</class>
<name>label_network</name>
<label>Network Channel:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkToggleButton</class>
<name>button_network_channel_1</name>
<can_focus>True</can_focus>
<label>Channel 1</label>
<relief>GTK_RELIEF_HALF</relief>
<active>True</active>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkToggleButton</class>
<name>button_network_channel_2</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<label>Channel 2</label>
<relief>GTK_RELIEF_HALF</relief>
<active>False</active>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkToggleButton</class>
<name>button_network_channel_3</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<label>Channel 3</label>
<relief>GTK_RELIEF_HALF</relief>
<active>False</active>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkToggleButton</class>
<name>button_network_channel_4</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<label>Channel 4</label>
<relief>GTK_RELIEF_HALF</relief>
<active>False</active>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkToggleButton</class>
<name>button_network_channel_5</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<label>Channel 5</label>
<relief>GTK_RELIEF_HALF</relief>
<active>False</active>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkToggleButton</class>
<name>button_network_channel_6</name>
<sensitive>False</sensitive>
<can_focus>True</can_focus>
<label>Channel 6</label>
<relief>GTK_RELIEF_HALF</relief>
<active>False</active>
<child>
<padding>2</padding>
<expand>False</expand>
<fill>True</fill>
</child>
</widget>
</widget>
</widget> </widget>
</widget> </widget>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_gnome.h: private Gnome interface description * intf_gnome.h: private Gnome interface description
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gnome.h,v 1.5 2001/04/03 03:39:41 stef Exp $ * $Id: intf_gnome.h,v 1.6 2001/04/08 07:24:47 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -46,7 +46,6 @@ typedef struct intf_sys_s ...@@ -46,7 +46,6 @@ typedef struct intf_sys_s
boolean_t b_playlist_changed; /* playlist display toggled ? */ boolean_t b_playlist_changed; /* playlist display toggled ? */
boolean_t b_slider_free; /* slider status */ boolean_t b_slider_free; /* slider status */
boolean_t b_menus_update; /* do we need to update menus */ boolean_t b_menus_update; /* do we need to update menus */
boolean_t b_menus_ready; /* has the update been commpleted */
/* Windows and widgets */ /* Windows and widgets */
GtkWidget * p_window; /* main window */ GtkWidget * p_window; /* main window */
...@@ -72,9 +71,10 @@ typedef struct intf_sys_s ...@@ -72,9 +71,10 @@ typedef struct intf_sys_s
boolean_t b_mode_changed; boolean_t b_mode_changed;
gint i_intf_mode; /* interface mode: file, net, disc */ gint i_intf_mode; /* interface mode: file, net, disc */
gint i_part; /* current chapter */
/* XXX: Ugly kludge, see intf_gnome.c */ /* XXX: Ugly kludge, see intf_gnome.c */
void ( *pf_gtk_callback ) ( void ); void ( *pf_gtk_callback ) ( void );
void ( *pf_gdk_callback ) ( void ); void ( *pf_gdk_callback ) ( void );
} intf_sys_t; } intf_sys_t;
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_gtk.c: Gtk+ interface * intf_gtk.c: Gtk+ interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gtk.c,v 1.10 2001/03/15 01:42:20 sam Exp $ * $Id: intf_gtk.c,v 1.11 2001/04/08 07:24:47 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -347,12 +347,12 @@ static gint GtkManage( gpointer p_data ) ...@@ -347,12 +347,12 @@ static gint GtkManage( gpointer p_data )
for( i = 0 ; i < p_intf->p_input->stream.i_selected_es_number ; i++ ) for( i = 0 ; i < p_intf->p_input->stream.i_selected_es_number ; i++ )
{ {
if( p_intf->p_input->stream.pp_es[i]->b_audio ) if( p_intf->p_input->stream.pp_es[i]->i_cat == AUDIO_ES )
{ {
p_audio_es = p_intf->p_input->stream.pp_es[i]; p_audio_es = p_intf->p_input->stream.pp_es[i];
} }
if( p_intf->p_input->stream.pp_es[i]->b_spu ) if( p_intf->p_input->stream.pp_es[i]->i_cat == SPU_ES )
{ {
p_spu_es = p_intf->p_input->stream.pp_es[i]; p_spu_es = p_intf->p_input->stream.pp_es[i];
} }
...@@ -367,9 +367,9 @@ static gint GtkManage( gpointer p_data ) ...@@ -367,9 +367,9 @@ static gint GtkManage( gpointer p_data )
p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_popup ), "popup_audio" ) ); p_intf->p_sys->p_popup ), "popup_audio" ) );
GtkLanguageMenus( p_intf, p_menubar_menu, p_audio_es, 1, GtkLanguageMenus( p_intf, p_menubar_menu, p_audio_es, AUDIO_ES,
on_menubar_audio_activate ); on_menubar_audio_activate );
GtkLanguageMenus( p_intf, p_popup_menu, p_audio_es, 1, GtkLanguageMenus( p_intf, p_popup_menu, p_audio_es, AUDIO_ES,
on_popup_audio_activate ); on_popup_audio_activate );
/* sub picture menus */ /* sub picture menus */
...@@ -381,9 +381,9 @@ static gint GtkManage( gpointer p_data ) ...@@ -381,9 +381,9 @@ static gint GtkManage( gpointer p_data )
p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_popup ), "popup_subpictures" ) ); p_intf->p_sys->p_popup ), "popup_subpictures" ) );
GtkLanguageMenus( p_intf, p_menubar_menu, p_spu_es, 2, GtkLanguageMenus( p_intf, p_menubar_menu, p_spu_es, SPU_ES,
on_menubar_subpictures_activate ); on_menubar_subpictures_activate );
GtkLanguageMenus( p_intf, p_popup_menu, p_spu_es, 2, GtkLanguageMenus( p_intf, p_popup_menu, p_spu_es, SPU_ES,
on_popup_subpictures_activate ); on_popup_subpictures_activate );
/* everything is ready */ /* everything is ready */
...@@ -510,7 +510,7 @@ static GtkWidget * GtkMenuRadioItem( GtkWidget * p_menu, ...@@ -510,7 +510,7 @@ static GtkWidget * GtkMenuRadioItem( GtkWidget * p_menu,
static gint GtkLanguageMenus( gpointer p_data, static gint GtkLanguageMenus( gpointer p_data,
GtkWidget * p_root, GtkWidget * p_root,
es_descriptor_t * p_es, es_descriptor_t * p_es,
gint i_type, gint i_cat,
void(*pf_activate )( GtkMenuItem *, gpointer ) ) void(*pf_activate )( GtkMenuItem *, gpointer ) )
{ {
intf_thread_t * p_intf; intf_thread_t * p_intf;
...@@ -520,8 +520,6 @@ static gint GtkLanguageMenus( gpointer p_data, ...@@ -520,8 +520,6 @@ static gint GtkLanguageMenus( gpointer p_data,
GSList * p_button_group; GSList * p_button_group;
char * psz_name; char * psz_name;
gint b_active; gint b_active;
gint b_audio;
gint b_spu;
gint i; gint i;
...@@ -531,14 +529,13 @@ static gint GtkLanguageMenus( gpointer p_data, ...@@ -531,14 +529,13 @@ static gint GtkLanguageMenus( gpointer p_data,
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock ); vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
b_audio = ( i_type == 1 );
p_button_group = NULL; p_button_group = NULL;
/* menu container for audio */ /* menu container for audio */
p_menu = gtk_menu_new(); p_menu = gtk_menu_new();
/* create a set of language buttons and append them to the container */ /* create a set of language buttons and append them to the container */
b_active = ( p_es == NULL ) ? 1 : 0; b_active = ( p_es == NULL );
psz_name = "Off"; psz_name = "Off";
p_item = GtkMenuRadioItem( p_menu, &p_button_group, b_active, psz_name ); p_item = GtkMenuRadioItem( p_menu, &p_button_group, b_active, psz_name );
...@@ -554,11 +551,7 @@ static gint GtkLanguageMenus( gpointer p_data, ...@@ -554,11 +551,7 @@ static gint GtkLanguageMenus( gpointer p_data,
for( i = 0 ; i < p_intf->p_input->stream.i_es_number ; i++ ) for( i = 0 ; i < p_intf->p_input->stream.i_es_number ; i++ )
{ {
if( p_intf->p_input->stream.pp_es[i]->i_cat == i_cat )
b_audio = ( i_type == 1 ) && p_intf->p_input->stream.pp_es[i]->b_audio;
b_spu = ( i_type == 2 ) && p_intf->p_input->stream.pp_es[i]->b_spu;
if( b_audio || b_spu )
{ {
b_active = ( p_es == p_intf->p_input->stream.pp_es[i] ) ? 1 : 0; b_active = ( p_es == p_intf->p_input->stream.pp_es[i] ) ? 1 : 0;
psz_name = p_intf->p_input->stream.pp_es[i]->psz_desc; psz_name = p_intf->p_input->stream.pp_es[i]->psz_desc;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_ext-intf.c: services to the interface * input_ext-intf.c: services to the interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: input_ext-intf.c,v 1.19 2001/04/06 09:15:47 sam Exp $ * $Id: input_ext-intf.c,v 1.20 2001/04/08 07:24:47 stef Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -235,23 +235,18 @@ void input_DumpStream( input_thread_t * p_input ) ...@@ -235,23 +235,18 @@ void input_DumpStream( input_thread_t * p_input )
* Useful since the interface plugins know p_es * Useful since the interface plugins know p_es
*****************************************************************************/ *****************************************************************************/
int input_ChangeES( input_thread_t * p_input, es_descriptor_t * p_es, int input_ChangeES( input_thread_t * p_input, es_descriptor_t * p_es,
int i_type ) u8 i_cat )
{ {
boolean_t b_audio;
boolean_t b_spu;
int i_index; int i_index;
int i; int i;
i_index = -1; i_index = -1;
b_audio = ( i_type == 1 ) ? 1 : 0;
b_spu = ( i_type == 2 ) ? 1 : 0;
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
for( i = 0 ; i < p_input->stream.i_selected_es_number ; i++ ) for( i = 0 ; i < p_input->stream.i_selected_es_number ; i++ )
{ {
if( ( b_audio && p_input->stream.pp_selected_es[i]->b_audio ) if( p_input->stream.pp_selected_es[i]->i_cat == i_cat )
|| ( b_spu && p_input->stream.pp_selected_es[i]->b_spu ) )
{ {
i_index = i; i_index = i;
break; break;
...@@ -313,7 +308,7 @@ int input_ToggleES( input_thread_t * p_input, es_descriptor_t * p_es, ...@@ -313,7 +308,7 @@ int input_ToggleES( input_thread_t * p_input, es_descriptor_t * p_es,
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
if( p_es != NULL && ( p_es->b_audio || p_es->b_spu ) ) if( p_es != NULL )
{ {
if( b_select ) if( b_select )
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management * input_programs.c: es_descriptor_t, pgrm_descriptor_t management
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: input_programs.c,v 1.44 2001/04/06 09:15:47 sam Exp $ * $Id: input_programs.c,v 1.45 2001/04/08 07:24:47 stef Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -373,7 +373,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input, ...@@ -373,7 +373,7 @@ es_descriptor_t * input_AddES( input_thread_t * p_input,
p_es->p_pes = NULL; p_es->p_pes = NULL;
p_es->p_decoder_fifo = NULL; p_es->p_decoder_fifo = NULL;
p_es->b_audio = 0; p_es->b_audio = 0;
p_es->b_spu = 0; p_es->i_cat = UNKNOWN_ES;
if( i_data_len ) if( i_data_len )
{ {
...@@ -730,7 +730,9 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es ) ...@@ -730,7 +730,9 @@ int input_UnselectES( input_thread_t * p_input, es_descriptor_t * p_es )
if( p_input->stream.pp_selected_es == NULL ) if( p_input->stream.pp_selected_es == NULL )
{ {
intf_ErrMsg( "No more selected ES in input_UnselectES" ); #ifdef DEBUG_INPUT
intf_DbgMsg( "No more selected ES in input_UnselectES" );
#endif
return( 1 ); return( 1 );
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mpeg_system.c: TS, PS and PES management * mpeg_system.c: TS, PS and PES management
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: mpeg_system.c,v 1.47 2001/04/06 09:15:47 sam Exp $ * $Id: mpeg_system.c,v 1.48 2001/04/08 07:24:47 stef Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr> * Michel Lespinasse <walken@via.ecp.fr>
...@@ -703,6 +703,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, ...@@ -703,6 +703,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
{ {
/* MPEG video */ /* MPEG video */
p_es->i_type = MPEG2_VIDEO_ES; p_es->i_type = MPEG2_VIDEO_ES;
p_es->i_cat = VIDEO_ES;
#ifdef AUTO_SPAWN #ifdef AUTO_SPAWN
if( !p_input->stream.b_seekable ) if( !p_input->stream.b_seekable )
input_SelectES( p_input, p_es ); input_SelectES( p_input, p_es );
...@@ -713,6 +714,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, ...@@ -713,6 +714,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
/* MPEG audio */ /* MPEG audio */
p_es->i_type = MPEG2_AUDIO_ES; p_es->i_type = MPEG2_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES;
#ifdef AUTO_SPAWN #ifdef AUTO_SPAWN
if( !p_input->stream.b_seekable ) if( !p_input->stream.b_seekable )
if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 ) if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
...@@ -732,6 +734,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, ...@@ -732,6 +734,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
/* AC3 audio (0x80->0x8F) */ /* AC3 audio (0x80->0x8F) */
p_es->i_type = AC3_AUDIO_ES; p_es->i_type = AC3_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES;
#ifdef AUTO_SPAWN #ifdef AUTO_SPAWN
if( !p_input->stream.b_seekable ) if( !p_input->stream.b_seekable )
if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 ) if( main_GetIntVariable( INPUT_CHANNEL_VAR, 0 )
...@@ -750,7 +753,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, ...@@ -750,7 +753,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
{ {
/* Subtitles video (0x20->0x3F) */ /* Subtitles video (0x20->0x3F) */
p_es->i_type = DVD_SPU_ES; p_es->i_type = DVD_SPU_ES;
p_es->b_spu = 1; p_es->i_cat = SPU_ES;
#ifdef AUTO_SPAWN #ifdef AUTO_SPAWN
if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 ) if( main_GetIntVariable( INPUT_SUBTITLE_VAR, -1 )
== ((p_es->i_id & 0x1F00) >> 8) ) == ((p_es->i_id & 0x1F00) >> 8) )
...@@ -765,6 +768,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input, ...@@ -765,6 +768,7 @@ es_descriptor_t * input_ParsePS( input_thread_t * p_input,
/* LPCM audio (0xA0->0xAF) */ /* LPCM audio (0xA0->0xAF) */
p_es->i_type = LPCM_AUDIO_ES; p_es->i_type = LPCM_AUDIO_ES;
p_es->b_audio = 1; p_es->b_audio = 1;
p_es->i_cat = AUDIO_ES;
/* FIXME : write the decoder */ /* FIXME : write the decoder */
} }
else else
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_playlist.c : Playlist management functions * intf_playlist.c : Playlist management functions
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_playlist.c,v 1.2 2001/03/21 13:42:34 sam Exp $ * $Id: intf_playlist.c,v 1.3 2001/04/08 07:24:47 stef Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -244,6 +244,10 @@ void intf_PlaylistDestroy( playlist_t * p_playlist ) ...@@ -244,6 +244,10 @@ void intf_PlaylistDestroy( playlist_t * p_playlist )
intf_WarnMsg( 1, "intf: playlist destroyed" ); intf_WarnMsg( 1, "intf: playlist destroyed" );
} }
/*****************************************************************************
* intf_PlaylistJumpto
*****************************************************************************/
void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos) void intf_PlaylistJumpto( playlist_t * p_playlist , int i_pos)
{ {
vlc_mutex_lock( &p_playlist->change_lock ); vlc_mutex_lock( &p_playlist->change_lock );
......
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