needs nothing specific to change angle.
* Fixed a bug in clock management where ES without a program couldn't get
timestamped.
*Fixed program management in gnome/gtk. Program now also appears in popup.
*In interface, only display ES associated with the selected program, or with
no program at all.
* control the pace of reading.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: input_ext-intf.h,v 1.61 2002/03/01 00:33:17 massiot Exp $
+ * $Id: input_ext-intf.h,v 1.62 2002/03/05 17:46:33 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
int i_part_nb; /* number of parts (chapter for DVD)*/
int i_part; /* currently selected part */
- int i_angle_nb; /* number of angles/title units */
- int i_angle;
/* offset to plugin related data */
off_t i_plugin_data;
* found in .ifo.
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: dvd_summary.c,v 1.12 2001/12/30 07:09:55 sam Exp $
+ * $Id: dvd_summary.c,v 1.13 2002/03/05 17:46:33 stef Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
"352x240 ntsc or 352x288 pal"
};
- intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s"
- "display mode %s", video.i_compression + 1,
+ intf_WarnMsg( 5, "dvd info: MPEG-%d video, %sHz, aspect ratio %s",
+ video.i_compression + 1,
video.i_system ? "pal 625 @50" : "ntsc 525 @60",
video.i_ratio ? (video.i_ratio == 3) ? "16:9"
: "unknown"
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_dvd.c,v 1.131 2002/03/05 00:50:37 stef Exp $
+ * $Id: input_dvd.c,v 1.132 2002/03/05 17:46:33 stef Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
* Data access functions
*/
-#define PARSE( chr, action ) \
- psz_parser = p_input->psz_name; \
- while( *(psz_parser) && *(psz_parser) != (chr) ) \
- { \
- (psz_parser)++; \
- } \
- \
- if( *(psz_parser) == (chr) ) \
- { \
- *(psz_parser) = '\0'; \
- (action); \
- }
-
/*****************************************************************************
* DVDOpen: open dvd
*****************************************************************************/
p_dvd->dvdhandle = (dvdcss_handle) dvdhandle;
p_input->p_access_data = (void *)p_dvd;
- p_dvd->i_title = i_title;
- p_dvd->i_chapter = i_chapter;
- p_dvd->i_angle = i_angle;
-
if( dvdcss_seek( p_dvd->dvdhandle, 0, DVDCSS_NOFLAGS ) < 0 )
{
intf_ErrMsg( "dvd error: %s", dvdcss_error( p_dvd->dvdhandle ) );
area[i]->i_part_nb = title_inf.p_attr[i-1].i_chapter_nb;
area[i]->i_part = 1;
- /* Number of angles */
- area[i]->i_angle_nb = 0;
- area[i]->i_angle = 1;
-
/* Offset to vts_i_0.ifo */
area[i]->i_plugin_data = p_dvd->p_ifo->i_start +
title_inf.p_attr[i-1].i_start_sector;
}
#undef area
+
+ p_dvd->i_title = i_title <= title_inf.i_title_nb ? i_title : 1;
#undef title_inf
- p_area = p_input->stream.pp_areas[i_title];
- p_area->i_part = i_chapter;
+
+ p_area = p_input->stream.pp_areas[p_dvd->i_title];
+
+ p_dvd->i_chapter = i_chapter < p_area->i_part_nb ? i_chapter : 1;
+ p_area->i_part = p_dvd->i_chapter;
+
+ p_dvd->i_angle = i_angle;
/* set title, chapter, audio and subpic */
if( DVDSetArea( p_input, p_area ) )
/*****************************************************************************
* DVDSetProgram: Does nothing, a DVD is mono-program
*****************************************************************************/
-static int DVDSetProgram( input_thread_t * p_input,
- pgrm_descriptor_t * p_program )
+static int DVDSetProgram( input_thread_t * p_input,
+ pgrm_descriptor_t * p_program )
{
+ if( p_input->stream.p_selected_program != p_program )
+ {
+ thread_dvd_data_t * p_dvd;
+ int i_angle;
+
+ p_dvd = (thread_dvd_data_t*)(p_input->p_access_data);
+ i_angle = p_program->i_number;
+
+ memcpy( p_program, p_input->stream.p_selected_program,
+ sizeof(pgrm_descriptor_t) );
+ p_program->i_number = i_angle;
+ p_input->stream.p_selected_program = p_program;
+
+#define title \
+ p_dvd->p_ifo->vts.title_unit.p_title[p_dvd->i_title_id-1].title
+ if( title.p_cell_play[p_dvd->i_prg_cell].i_category & 0xf000 )
+ {
+ if( ( p_program->i_number - p_dvd->i_angle ) < 0 )
+ {
+ p_dvd->i_cell = 0;
+ }
+ p_dvd->i_prg_cell += ( p_program->i_number - p_dvd->i_angle );
+ p_dvd->i_angle = p_program->i_number;
+
+ DVDFindSector( p_dvd );
+ p_dvd->i_cell += p_dvd->i_angle_cell;
+ }
+ else
+ {
+ p_dvd->i_angle = p_program->i_number;
+ }
+#undef title
+ intf_WarnMsg( 3, "dvd info: angle %d selected", p_dvd->i_angle );
+ }
+
return 0;
}
/* Area definition */
p_input->stream.p_selected_area->i_start = LB2OFF( p_dvd->i_start );
p_input->stream.p_selected_area->i_size = LB2OFF( p_dvd->i_size );
- p_input->stream.p_selected_area->i_angle_nb = p_dvd->i_angle_nb;
- p_input->stream.p_selected_area->i_angle = p_dvd->i_angle;
#if 0
/* start at the beginning of the title */
#endif
/*
- * Destroy obsolete ES by reinitializing program 0
+ * Destroy obsolete ES by reinitializing programs
* and find all ES in title with ifo data
*/
if( p_input->stream.pp_programs != NULL )
/* We don't use input_EndStream here since
* we keep area structures */
+ /* Unselect all ES */
+ /*
for( i = 0 ; i < p_input->stream.i_selected_es_number ; i++ )
{
input_UnselectES( p_input, p_input->stream.pp_selected_es[i] );
}
+*/
+
+ for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
+ {
+ input_DelES( p_input, p_input->stream.pp_es[i] );
+ }
+
+ for( i = 0 ; i < p_input->stream.i_pgrm_number ; i++ )
+ {
+ input_DelProgram( p_input, p_input->stream.pp_programs[i] );
+ }
- free( p_input->stream.pp_selected_es );
- input_DelProgram( p_input, p_input->stream.p_selected_program );
-
- p_input->stream.pp_selected_es = NULL;
+ if( p_input->stream.pp_selected_es )
+ {
+ free( p_input->stream.pp_selected_es );
+ p_input->stream.pp_selected_es = NULL;
+ }
p_input->stream.i_selected_es_number = 0;
}
+
+ /* angle */
- input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
+ input_AddProgram( p_input, 1, sizeof( stream_ps_data_t ) );
p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
-// p_input->stream.p_new_program = p_input->stream.pp_programs[0];
+
+ for( i = 1 ; i < p_dvd->i_angle_nb ; i++ )
+ {
+ input_AddProgram( p_input, i+1, 0 );
+ }
+
+ DVDSetProgram( p_input,
+ p_input->stream.pp_programs[p_dvd->i_angle-1] );
+
/* No PSM to read in DVD mode, we already have all information */
p_input->stream.p_selected_program->b_is_ok = 1;
/* ES 0 -> video MPEG2 */
IfoPrintVideo( p_dvd );
- p_es = input_AddES( p_input, p_input->stream.p_selected_program,
- 0xe0, 0 );
+ p_es = input_AddES( p_input, NULL, 0xe0, 0 );
p_es->i_stream_id = 0xe0;
p_es->i_type = MPEG2_VIDEO_ES;
p_es->i_cat = VIDEO_ES;
{
case 0x00: /* AC3 */
i_id = ( ( 0x80 + audio_status.i_position ) << 8 ) | 0xbd;
- p_es = input_AddES( p_input,
- p_input->stream.p_selected_program, i_id, 0 );
+ p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = 0xbd;
p_es->i_type = AC3_AUDIO_ES;
p_es->b_audio = 1;
case 0x02:
case 0x03: /* MPEG audio */
i_id = 0xc0 + audio_status.i_position;
- p_es = input_AddES( p_input,
- p_input->stream.p_selected_program, i_id
- , 0 );
+ p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = i_id;
p_es->i_type = MPEG2_AUDIO_ES;
p_es->b_audio = 1;
case 0x04: /* LPCM */
i_id = ( ( 0xa0 + audio_status.i_position ) << 8 ) | 0xbd;
- p_es = input_AddES( p_input,
- p_input->stream.p_selected_program,
- i_id, 0 );
+ p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = 0xbd;
p_es->i_type = LPCM_AUDIO_ES;
p_es->b_audio = 1;
i_id = ( ( 0x20 + spu_status.i_position_43 ) << 8 )
| 0xbd;
}
- p_es = input_AddES( p_input,
- p_input->stream.p_selected_program,
- i_id, 0 );
+ p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = 0xbd;
p_es->i_type = DVD_SPU_ES;
p_es->i_cat = SPU_ES;
#define title \
p_dvd->p_ifo->vts.title_unit.p_title[p_dvd->i_title_id-1].title
- if( p_area->i_angle != p_dvd->i_angle )
- {
- if( title.p_cell_play[p_dvd->i_prg_cell].i_category & 0xf000 )
- {
- if( ( p_area->i_angle - p_dvd->i_angle ) < 0 )
- {
- p_dvd->i_cell = 0;
- }
- p_dvd->i_prg_cell += ( p_area->i_angle - p_dvd->i_angle );
- p_dvd->i_angle = p_area->i_angle;
-
- DVDFindSector( p_dvd );
- p_dvd->i_cell += p_dvd->i_angle_cell;
- }
- else
- {
- p_dvd->i_angle = p_area->i_angle;
- }
-
- intf_WarnMsg( 3, "dvd info: angle %d selected", p_area->i_angle );
- }
/* warn interface that something has changed */
p_input->stream.b_seekable = 1;
* It depends on: libdvdread for ifo files and block reading.
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: input_dvdread.c,v 1.28 2002/03/05 00:50:37 stef Exp $
+ * $Id: input_dvdread.c,v 1.29 2002/03/05 17:46:33 stef Exp $
*
* Author: Stéphane Borel <stef@via.ecp.fr>
*
p_dvd->p_title = NULL;
p_dvd->p_vts_file = NULL;
- p_dvd->i_title = i_title;
- p_dvd->i_chapter = i_chapter;
- p_dvd->i_angle = i_angle;
p_input->p_access_data = (void *)p_dvd;
area[i]->i_part_nb = tt_srpt->title[i-1].nr_of_ptts;
area[i]->i_part = 1;
- /* Number of angles */
- area[i]->i_angle_nb = 0;
- area[i]->i_angle = 1;
-
area[i]->i_plugin_data = tt_srpt->title[i-1].title_set_nr;
}
#undef area
+
+ p_dvd->i_title = i_title <= tt_srpt->nr_of_srpts ? i_title : 1;
#undef tt_srpt
- p_input->stream.pp_areas[i_title]->i_part = i_chapter;
+ p_area = p_input->stream.pp_areas[p_dvd->i_title];
+ p_dvd->i_chapter = i_chapter;
- p_area = p_input->stream.pp_areas[i_title];
+ p_dvd->i_chapter = i_chapter < p_area->i_part_nb ? i_chapter : 1;
+ p_area->i_part = p_dvd->i_chapter;
+
+ p_dvd->i_angle = i_angle;
/* set title, chapter, audio and subpic */
if( DvdReadSetArea( p_input, p_area ) )
static int DvdReadSetProgram( input_thread_t * p_input,
pgrm_descriptor_t * p_program )
{
+ if( p_input->stream.p_selected_program != p_program )
+ {
+ thread_dvd_data_t * p_dvd;
+
+ p_dvd = (thread_dvd_data_t*)(p_input->p_access_data);
+ p_dvd->i_angle = p_program->i_number;
+
+ memcpy( p_program, p_input->stream.p_selected_program,
+ sizeof(pgrm_descriptor_t) );
+ p_program->i_number = p_dvd->i_angle;
+ p_input->stream.p_selected_program = p_program;
+
+ intf_WarnMsg( 3, "dvd info: angle %d selected", p_dvd->i_angle );
+ }
+
return 0;
}
*/
p_dvd->i_angle_nb = p_vmg->tt_srpt->title[p_area->i_id-1].nr_of_angles;
- if( p_dvd->i_angle > p_area->i_angle_nb )
+ if( p_dvd->i_angle > p_dvd->i_angle_nb )
{
p_dvd->i_angle = 1;
}
- p_area->i_angle = p_dvd->i_angle;
- p_area->i_angle_nb = p_dvd->i_angle_nb;
-
/*
* We've got enough info, time to open the title set data.
*/
/* We don't use input_EndStream here since
* we keep area structures */
- for( i = 0 ; i < p_input->stream.i_selected_es_number ; i++ )
+ for( i = 0 ; i < p_input->stream.i_es_number ; i++ )
{
- input_UnselectES( p_input, p_input->stream.pp_selected_es[i] );
+ input_DelES( p_input, p_input->stream.pp_es[i] );
}
- free( p_input->stream.pp_selected_es );
- input_DelProgram( p_input, p_input->stream.p_selected_program );
+ for( i = 0 ; i < p_input->stream.i_pgrm_number ; i++ )
+ {
+ input_DelProgram( p_input, p_input->stream.pp_programs[i] );
+ }
- p_input->stream.pp_selected_es = NULL;
+ if( p_input->stream.pp_selected_es )
+ {
+ free( p_input->stream.pp_selected_es );
+ p_input->stream.pp_selected_es = NULL;
+ }
p_input->stream.i_selected_es_number = 0;
}
- input_AddProgram( p_input, 0, sizeof( stream_ps_data_t ) );
+ input_AddProgram( p_input, 1, sizeof( stream_ps_data_t ) );
p_input->stream.p_selected_program = p_input->stream.pp_programs[0];
+ for( i = 1 ; i < p_dvd->i_angle_nb ; i++ )
+ {
+ input_AddProgram( p_input, i+1, 0 );
+ }
+
+ DvdReadSetProgram( p_input,
+ p_input->stream.pp_programs[p_dvd->i_angle-1] );
+
/* No PSM to read in DVD mode, we already have all information */
p_input->stream.p_selected_program->b_is_ok = 1;
/* ES 0 -> video MPEG2 */
// IfoPrintVideo( p_dvd );
- p_es = input_AddES( p_input, p_input->stream.p_selected_program, 0xe0, 0 );
+ p_es = input_AddES( p_input, NULL, 0xe0, 0 );
p_es->i_stream_id = 0xe0;
p_es->i_type = MPEG2_VIDEO_ES;
p_es->i_cat = VIDEO_ES;
{
case 0x00: /* AC3 */
i_id = ( ( 0x80 + i_position ) << 8 ) | 0xbd;
- p_es = input_AddES( p_input,
- p_input->stream.p_selected_program, i_id, 0 );
+ p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = 0xbd;
p_es->i_type = AC3_AUDIO_ES;
p_es->b_audio = 1;
case 0x02:
case 0x03: /* MPEG audio */
i_id = 0xc0 + i_position;
- p_es = input_AddES( p_input,
- p_input->stream.p_selected_program, i_id, 0 );
+ p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = i_id;
p_es->i_type = MPEG2_AUDIO_ES;
p_es->b_audio = 1;
case 0x04: /* LPCM */
i_id = ( ( 0xa0 + i_position ) << 8 ) | 0xbd;
- p_es = input_AddES( p_input,
- p_input->stream.p_selected_program, i_id, 0 );
+ p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = i_id;
p_es->i_type = LPCM_AUDIO_ES;
p_es->b_audio = 1;
}
i_id = ( ( 0x20 + i_position ) << 8 ) | 0xbd;
- p_es = input_AddES( p_input,
- p_input->stream.p_selected_program, i_id, 0 );
+ p_es = input_AddES( p_input, NULL, i_id, 0 );
p_es->i_stream_id = 0xbd;
p_es->i_type = DVD_SPU_ES;
p_es->i_cat = SPU_ES;
#undef p_vts
#undef p_vmg
- if( p_area->i_angle != p_dvd->i_angle )
- {
- p_dvd->i_angle = p_area->i_angle;
-
- intf_WarnMsg( 3, "dvd info: angle %d selected", p_area->i_angle );
- }
/* warn interface that something has changed */
p_area->i_tell = LB2OFF( p_dvd->i_next_vobu ) - p_area->i_start;
p_input->stream.b_seekable = 1;
<right_justify>False</right_justify>
</widget>
- <widget>
- <class>GtkMenuItem</class>
- <name>menubar_angle</name>
- <sensitive>False</sensitive>
- <tooltip>Choose angle</tooltip>
- <label>An_gle</label>
- <right_justify>False</right_justify>
- </widget>
-
<widget>
<class>GtkMenuItem</class>
<name>separator7</name>
<last_modification_time>Sat, 19 May 2001 03:13:28 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_PREV</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
+ <relief>GTK_RELIEF_NONE</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<last_modification_time>Sat, 19 May 2001 03:13:23 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_NEXT</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
+ <relief>GTK_RELIEF_NONE</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<last_modification_time>Tue, 29 May 2001 13:13:41 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_DOWN</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
+ <relief>GTK_RELIEF_NONE</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<last_modification_time>Sat, 19 May 2001 03:13:08 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_UP</stock_button>
- <relief>GTK_RELIEF_NORMAL</relief>
+ <relief>GTK_RELIEF_NONE</relief>
<child>
<padding>0</padding>
<expand>False</expand>
<signal>
<name>activate</name>
<handler>GnomePopupPlayActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:16:58 GMT</last_modification_time>
</signal>
<label>Play</label>
<signal>
<name>activate</name>
<handler>GnomePopupPauseActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:17:31 GMT</last_modification_time>
</signal>
<label>Pause</label>
<signal>
<name>activate</name>
<handler>GnomePopupStopActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:18:10 GMT</last_modification_time>
</signal>
<label>Stop</label>
<signal>
<name>activate</name>
<handler>GnomePopupBackActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:18:21 GMT</last_modification_time>
</signal>
<label>Back</label>
<signal>
<name>activate</name>
<handler>GnomePopupSlowActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:18:29 GMT</last_modification_time>
</signal>
<label>Slow</label>
<signal>
<name>activate</name>
<handler>GnomePopupFastActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:18:37 GMT</last_modification_time>
</signal>
<label>Fast</label>
<signal>
<name>activate</name>
<handler>GnomePopupWindowToggleActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:18:51 GMT</last_modification_time>
</signal>
<label>Toggle _Interface</label>
<signal>
<name>activate</name>
<handler>GnomePopupFullscreenActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:19:07 GMT</last_modification_time>
</signal>
<label>_Fullscreen</label>
<signal>
<name>activate</name>
<handler>GnomePopupNextActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:19:18 GMT</last_modification_time>
</signal>
<label>Next</label>
<signal>
<name>activate</name>
<handler>GnomePopupPrevActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:19:26 GMT</last_modification_time>
</signal>
<label>Prev</label>
<signal>
<name>activate</name>
<handler>GnomePopupJumpActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:34:46 GMT</last_modification_time>
</signal>
<label>_Jump...</label>
</widget>
<widget>
- <class>GtkPixmapMenuItem</class>
- <name>popup_navigation</name>
+ <class>GtkMenuItem</class>
+ <name>popup_program</name>
<sensitive>False</sensitive>
- <tooltip>Navigate through titles and chapters</tooltip>
- <label>_Navigation</label>
+ <tooltip>Switch program</tooltip>
+ <label>Program</label>
<right_justify>False</right_justify>
- <stock_icon>GNOME_STOCK_MENU_SEARCH</stock_icon>
</widget>
<widget>
- <class>GtkMenuItem</class>
- <name>popup_angle</name>
+ <class>GtkPixmapMenuItem</class>
+ <name>popup_navigation</name>
<sensitive>False</sensitive>
- <label>An_gle</label>
+ <tooltip>Navigate through titles and chapters</tooltip>
+ <label>_Navigation</label>
<right_justify>False</right_justify>
+ <stock_icon>GNOME_STOCK_MENU_SEARCH</stock_icon>
</widget>
<widget>
<signal>
<name>activate</name>
<handler>GnomePopupFileOpenActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:20:08 GMT</last_modification_time>
</signal>
<label>_Open File...</label>
<signal>
<name>activate</name>
<handler>GnomePopupDiscOpenActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:20:44 GMT</last_modification_time>
</signal>
<label>Open _Disc...</label>
<signal>
<name>activate</name>
<handler>GnomePopupNetworkOpenActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:20:54 GMT</last_modification_time>
</signal>
<label>_Network Stream...</label>
<signal>
<name>activate</name>
<handler>GnomePopupAboutActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:21:02 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
<signal>
<name>activate</name>
<handler>GnomePopupPlaylistActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:21:14 GMT</last_modification_time>
</signal>
<label>Playlist...</label>
<signal>
<name>activate</name>
<handler>GnomePopupPreferencesActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:21:25 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_PREFERENCES_ITEM</stock_item>
<signal>
<name>activate</name>
<handler>GnomePopupExitActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Sat, 19 May 2001 16:21:45 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
GNOME_APP_PIXMAP_NONE, NULL,
0, (GdkModifierType) 0, NULL
},
- {
- GNOME_APP_UI_ITEM, N_("An_gle"),
- N_("Choose angle"),
- (gpointer) NULL, NULL, NULL,
- GNOME_APP_PIXMAP_NONE, NULL,
- 0, (GdkModifierType) 0, NULL
- },
GNOMEUIINFO_SEPARATOR,
{
GNOME_APP_UI_ITEM, N_("_Playlist..."),
gtk_widget_set_sensitive (menubar_view_menu_uiinfo[5].widget, FALSE);
gtk_widget_ref (menubar_view_menu_uiinfo[6].widget);
- gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_angle",
+ gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator7",
menubar_view_menu_uiinfo[6].widget,
(GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_set_sensitive (menubar_view_menu_uiinfo[6].widget, FALSE);
gtk_widget_ref (menubar_view_menu_uiinfo[7].widget);
- gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator7",
+ gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_playlist",
menubar_view_menu_uiinfo[7].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (menubar_view_menu_uiinfo[8].widget);
- gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_playlist",
+ gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_modules",
menubar_view_menu_uiinfo[8].widget,
(GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_set_sensitive (menubar_view_menu_uiinfo[8].widget, FALSE);
gtk_widget_ref (menubar_view_menu_uiinfo[9].widget);
- gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_modules",
- menubar_view_menu_uiinfo[9].widget,
- (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_set_sensitive (menubar_view_menu_uiinfo[9].widget, FALSE);
-
- gtk_widget_ref (menubar_view_menu_uiinfo[10].widget);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_messages",
- menubar_view_menu_uiinfo[10].widget,
+ menubar_view_menu_uiinfo[9].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (menubar_uiinfo[2].widget);
gtk_widget_show (button_title_prev);
gtk_box_pack_start (GTK_BOX (title_chapter_box), button_title_prev, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button_title_prev, _("Select previous title"), NULL);
+ gtk_button_set_relief (GTK_BUTTON (button_title_prev), GTK_RELIEF_NONE);
button_title_next = gnome_stock_button (GNOME_STOCK_BUTTON_NEXT);
gtk_widget_ref (button_title_next);
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button_title_next);
gtk_box_pack_start (GTK_BOX (title_chapter_box), button_title_next, FALSE, FALSE, 0);
+ gtk_button_set_relief (GTK_BUTTON (button_title_next), GTK_RELIEF_NONE);
vseparator1 = gtk_vseparator_new ();
gtk_widget_ref (vseparator1);
gtk_widget_show (button_chapter_prev);
gtk_box_pack_start (GTK_BOX (dvd_chapter_box), button_chapter_prev, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button_chapter_prev, _("Select previous chapter"), NULL);
+ gtk_button_set_relief (GTK_BUTTON (button_chapter_prev), GTK_RELIEF_NONE);
button_chapter_next = gnome_stock_button (GNOME_STOCK_BUTTON_UP);
gtk_widget_ref (button_chapter_next);
gtk_widget_show (button_chapter_next);
gtk_box_pack_start (GTK_BOX (dvd_chapter_box), button_chapter_next, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, button_chapter_next, _("Select next chapter"), NULL);
+ gtk_button_set_relief (GTK_BUTTON (button_chapter_next), GTK_RELIEF_NONE);
network_box = gtk_hbox_new (TRUE, 0);
gtk_widget_ref (network_box);
0, (GdkModifierType) 0, NULL
},
{
- GNOME_APP_UI_ITEM, N_("_Navigation"),
- N_("Navigate through titles and chapters"),
+ GNOME_APP_UI_ITEM, N_("Program"),
+ N_("Switch program"),
(gpointer) NULL, NULL, NULL,
- GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SEARCH,
+ GNOME_APP_PIXMAP_NONE, NULL,
0, (GdkModifierType) 0, NULL
},
{
- GNOME_APP_UI_ITEM, N_("An_gle"),
- NULL,
+ GNOME_APP_UI_ITEM, N_("_Navigation"),
+ N_("Navigate through titles and chapters"),
(gpointer) NULL, NULL, NULL,
- GNOME_APP_PIXMAP_NONE, NULL,
+ GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_SEARCH,
0, (GdkModifierType) 0, NULL
},
{
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_ref (intf_popup_uiinfo[13].widget);
- gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_navigation",
+ gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_program",
intf_popup_uiinfo[13].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (intf_popup_uiinfo[13].widget, FALSE);
gtk_widget_ref (intf_popup_uiinfo[14].widget);
- gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_angle",
+ gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_navigation",
intf_popup_uiinfo[14].widget,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_set_sensitive (intf_popup_uiinfo[14].widget, FALSE);
<right_justify>False</right_justify>
</widget>
- <widget>
- <class>GtkMenuItem</class>
- <name>menubar_angle</name>
- <sensitive>False</sensitive>
- <label>An_gle</label>
- <right_justify>False</right_justify>
- </widget>
-
<widget>
<class>GtkMenuItem</class>
<name>separator11</name>
<signal>
<name>activate</name>
<handler>GtkPlayActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:53:43 GMT</last_modification_time>
</signal>
<label>_Play</label>
<signal>
<name>activate</name>
<handler>GtkPauseActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:53:37 GMT</last_modification_time>
</signal>
<label>Pause</label>
<signal>
<name>activate</name>
<handler>GtKStopActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:53:29 GMT</last_modification_time>
</signal>
<label>Stop</label>
<signal>
<name>activate</name>
<handler>GtkBackActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:53:21 GMT</last_modification_time>
</signal>
<label>Back</label>
<signal>
<name>activate</name>
<handler>GtkSlowActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:53:15 GMT</last_modification_time>
</signal>
<label>Slow</label>
<signal>
<name>activate</name>
<handler>GtkFastActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:53:07 GMT</last_modification_time>
</signal>
<label>Fast</label>
<signal>
<name>activate</name>
<handler>GtkWindowToggleActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:53:00 GMT</last_modification_time>
</signal>
<label>Toggle _Interface</label>
<signal>
<name>activate</name>
<handler>GtkFullscreenActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:52:38 GMT</last_modification_time>
</signal>
<label>_Fullscreen</label>
<signal>
<name>activate</name>
<handler>GtkNextActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:52:31 GMT</last_modification_time>
</signal>
<label>Next</label>
<signal>
<name>activate</name>
<handler>GtkPrevActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:52:23 GMT</last_modification_time>
</signal>
<label>Prev</label>
<signal>
<name>activate</name>
<handler>GtkJumpActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:52:13 GMT</last_modification_time>
</signal>
<label>_Jump...</label>
<widget>
<class>GtkMenuItem</class>
- <name>popup_navigation</name>
+ <name>popup_program</name>
<sensitive>False</sensitive>
- <label>_Navigation</label>
+ <label>Program</label>
<right_justify>False</right_justify>
</widget>
<widget>
<class>GtkMenuItem</class>
- <name>popup_angle</name>
+ <name>popup_navigation</name>
<sensitive>False</sensitive>
- <label>An_gle</label>
+ <label>_Navigation</label>
<right_justify>False</right_justify>
</widget>
<signal>
<name>activate</name>
<handler>GtkFileOpenActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Mon, 14 May 2001 21:33:55 GMT</last_modification_time>
</signal>
<label>_Open File...</label>
<signal>
<name>activate</name>
<handler>GtkDiscOpenActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Mon, 14 May 2001 21:34:09 GMT</last_modification_time>
</signal>
<label>Open _Disc...</label>
<signal>
<name>activate</name>
<handler>GtkNetworkOpenActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Mon, 14 May 2001 21:34:23 GMT</last_modification_time>
</signal>
<label>_Network Stream...</label>
<signal>
<name>activate</name>
<handler>GtkAboutActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Mon, 14 May 2001 21:34:54 GMT</last_modification_time>
</signal>
<label>_About...</label>
<signal>
<name>activate</name>
<handler>GtkPlaylistActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:51:55 GMT</last_modification_time>
</signal>
<label>Playlist...</label>
<signal>
<name>activate</name>
<handler>GtkPreferencesActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:51:46 GMT</last_modification_time>
</signal>
<label>_Preferences...</label>
<signal>
<name>activate</name>
<handler>GtkExitActivate</handler>
- <data>"intf_popup"</data>
<last_modification_time>Tue, 15 May 2001 13:52:03 GMT</last_modification_time>
</signal>
<label>E_xit</label>
* gtk_common.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: gtk_common.h,v 1.3 2002/02/24 21:36:20 jobi Exp $
+ * $Id: gtk_common.h,v 1.4 2002/03/05 17:46:33 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
boolean_t b_title_update; /* do we need to update title menus */
boolean_t b_chapter_update; /* do we need to update
chapter menus */
- boolean_t b_angle_update; /* do we need to update angle menus */
boolean_t b_audio_update; /* do we need to update audio menus */
boolean_t b_spu_update; /* do we need to update spu menus */
* gtk_display.c: Gtk+ tools for main interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: gtk_display.c,v 1.16 2002/03/01 00:33:18 massiot Exp $
+ * $Id: gtk_display.c,v 1.17 2002/03/05 17:46:33 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
p_intf->p_sys->b_program_update = 1;
p_intf->p_sys->b_title_update = 1;
p_intf->p_sys->b_chapter_update = 1;
- p_intf->p_sys->b_angle_update = 1;
p_intf->p_sys->b_audio_update = 1;
p_intf->p_sys->b_spu_update = 1;
p_intf->p_sys->i_part = 0;
GtkWidget *menubar_program;
GtkWidget *menubar_title;
GtkWidget *menubar_chapter;
- GtkWidget *menubar_angle;
GtkWidget *separator11;
GtkWidget *menubar_playlist;
GtkWidget *menubar_modules;
gtk_container_add (GTK_CONTAINER (menubar_view_menu), menubar_chapter);
gtk_widget_set_sensitive (menubar_chapter, FALSE);
- menubar_angle = gtk_menu_item_new_with_label ("");
- tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (menubar_angle)->child),
- _("An_gle"));
- gtk_widget_add_accelerator (menubar_angle, "activate_item", menubar_view_menu_accels,
- tmp_key, 0, 0);
- gtk_widget_ref (menubar_angle);
- gtk_object_set_data_full (GTK_OBJECT (intf_window), "menubar_angle", menubar_angle,
- (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (menubar_angle);
- gtk_container_add (GTK_CONTAINER (menubar_view_menu), menubar_angle);
- gtk_widget_set_sensitive (menubar_angle, FALSE);
-
separator11 = gtk_menu_item_new ();
gtk_widget_ref (separator11);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "separator11", separator11,
GtkWidget *popup_next;
GtkWidget *popup_prev;
GtkWidget *popup_jump;
+ GtkWidget *popup_program;
GtkWidget *popup_navigation;
- GtkWidget *popup_angle;
GtkWidget *popup_audio;
GtkWidget *popup_subpictures;
GtkWidget *popup_open;
gtk_widget_show (popup_jump);
gtk_container_add (GTK_CONTAINER (intf_popup), popup_jump);
+ popup_program = gtk_menu_item_new_with_label (_("Program"));
+ gtk_widget_ref (popup_program);
+ gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_program", popup_program,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (popup_program);
+ gtk_container_add (GTK_CONTAINER (intf_popup), popup_program);
+ gtk_widget_set_sensitive (popup_program, FALSE);
+
popup_navigation = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_navigation)->child),
_("_Navigation"));
gtk_container_add (GTK_CONTAINER (intf_popup), popup_navigation);
gtk_widget_set_sensitive (popup_navigation, FALSE);
- popup_angle = gtk_menu_item_new_with_label ("");
- tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_angle)->child),
- _("An_gle"));
- gtk_widget_add_accelerator (popup_angle, "activate_item", intf_popup_accels,
- tmp_key, 0, 0);
- gtk_widget_ref (popup_angle);
- gtk_object_set_data_full (GTK_OBJECT (intf_popup), "popup_angle", popup_angle,
- (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (popup_angle);
- gtk_container_add (GTK_CONTAINER (intf_popup), popup_angle);
- gtk_widget_set_sensitive (popup_angle, FALSE);
-
popup_audio = gtk_menu_item_new_with_label ("");
tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (popup_audio)->child),
_("_Audio"));
gtk_signal_connect (GTK_OBJECT (popup_play), "activate",
GTK_SIGNAL_FUNC (GtkPlayActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_pause), "activate",
GTK_SIGNAL_FUNC (GtkPauseActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_stop), "activate",
GTK_SIGNAL_FUNC (GtKStopActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_back), "activate",
GTK_SIGNAL_FUNC (GtkBackActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_slow), "activate",
GTK_SIGNAL_FUNC (GtkSlowActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_fast), "activate",
GTK_SIGNAL_FUNC (GtkFastActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_interface_toggle), "activate",
GTK_SIGNAL_FUNC (GtkWindowToggleActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_fullscreen), "activate",
GTK_SIGNAL_FUNC (GtkFullscreenActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_next), "activate",
GTK_SIGNAL_FUNC (GtkNextActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_prev), "activate",
GTK_SIGNAL_FUNC (GtkPrevActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_jump), "activate",
GTK_SIGNAL_FUNC (GtkJumpActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_file), "activate",
GTK_SIGNAL_FUNC (GtkFileOpenActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_disc), "activate",
GTK_SIGNAL_FUNC (GtkDiscOpenActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_network), "activate",
GTK_SIGNAL_FUNC (GtkNetworkOpenActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_about), "activate",
GTK_SIGNAL_FUNC (GtkAboutActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_playlist), "activate",
GTK_SIGNAL_FUNC (GtkPlaylistActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_preferences), "activate",
GTK_SIGNAL_FUNC (GtkPreferencesActivate),
- "intf_popup");
+ NULL);
gtk_signal_connect (GTK_OBJECT (popup_exit), "activate",
GTK_SIGNAL_FUNC (GtkExitActivate),
- "intf_popup");
+ NULL);
gtk_object_set_data (GTK_OBJECT (intf_popup), "tooltips", tooltips);
* gtk_menu.c : functions to handle menu items.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: gtk_menu.c,v 1.20 2002/02/25 04:30:03 sam Exp $
+ * $Id: gtk_menu.c,v 1.21 2002/03/05 17:46:33 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stéphane Borel <stef@via.ecp.fr>
GTK_OBJECT( p_intf->p_sys->window ), (menu) ) ); \
p_es = (es_descriptor_t*)user_data; \
\
- input_ToggleES( p_input_bank->pp_input[0], p_es, menuitem->active ); \
+ input_ToggleES( p_input_bank->pp_input[0], \
+ p_es, menuitem->active ); \
\
p_intf->p_sys->b_update = menuitem->active; \
\
/*
* Program
*/
+#define GTKPROGRAMTOGGLE( intf ) \
+ intf_thread_t * p_intf = GetIntf( GTK_WIDGET(menuitem), intf ); \
+ \
+ if( menuitem->active && !p_intf->p_sys->b_program_update ) \
+ { \
+ u16 i_program_id = (ptrdiff_t)user_data; \
+ \
+ input_ChangeProgram( p_input_bank->pp_input[0], i_program_id ); \
+ \
+ p_intf->p_sys->b_program_update = 1; \
+ \
+ vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock ); \
+ GtkSetupMenus( p_intf ); \
+ vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock ); \
+ \
+ p_intf->p_sys->b_program_update = 0; \
+ \
+ input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY ); \
+ }
void GtkMenubarProgramToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
{
- intf_thread_t * p_intf = GetIntf( GTK_WIDGET(menuitem), "intf_window" );
-
- if( menuitem->active && !p_intf->p_sys->b_program_update )
- {
- u16 i_program_id = (ptrdiff_t)user_data;
-
- input_ChangeProgram( p_input_bank->pp_input[0], i_program_id );
-
- p_intf->p_sys->b_program_update = 1;
-
- vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
- GtkSetupMenus( p_intf );
- vlc_mutex_unlock( &p_input_bank->pp_input[0]->stream.stream_lock );
-
- p_intf->p_sys->b_title_update = 0;
-
- input_SetStatus( p_input_bank->pp_input[0], INPUT_STATUS_PLAY );
-
- }
+ GTKPROGRAMTOGGLE( "intf_window" );
}
+void GtkPopupProgramToggle( GtkCheckMenuItem * menuitem, gpointer user_data )
+{
+ GTKPROGRAMTOGGLE( "intf_popup" );
+}
/*
* Title
* Angle
*/
+#if 0
#define GTKANGLETOGGLE( intf, window, menu, callback ) \
intf_thread_t * p_intf; \
GtkWidget * p_menu; \
}
#undef GTKANGLETOGGLE
-
+#endif
/****************************************************************************
* Functions to generate menus
****************************************************************************/
* Builds the program menu according to what have been found in the PAT
* by the input. Usefull for multi-programs streams such as DVB ones.
*****************************************************************************/
-static gint GtkProgramMenu( gpointer p_data,
- GtkWidget * p_root,
- void(*pf_toggle )( GtkCheckMenuItem *, gpointer ) )
+static gint GtkProgramMenu( gpointer p_data,
+ GtkWidget * p_root,
+ pgrm_descriptor_t * p_pgrm,
+ void(*pf_toggle )( GtkCheckMenuItem *, gpointer ) )
{
intf_thread_t * p_intf;
GtkWidget * p_menu;
GtkWidget * p_item_active;
GSList * p_group;
char psz_name[ GTK_MENU_LABEL_SIZE ];
- gint i_item;
gint i;
/* cast */
p_menu = gtk_menu_new();
p_item_active = NULL;
- i_item = 0;
/* create a set of program buttons and append them to the container */
for( i = 0 ; i < p_input_bank->pp_input[0]->stream.i_pgrm_number ; i++ )
{
- i_item++;
- snprintf( psz_name, GTK_MENU_LABEL_SIZE, "id %x",
+ snprintf( psz_name, GTK_MENU_LABEL_SIZE, "id %d",
p_input_bank->pp_input[0]->stream.pp_programs[i]->i_number );
+ psz_name[GTK_MENU_LABEL_SIZE-1] = '\0';
- if( psz_name[0] == '\0' )
- {
- snprintf( psz_name, GTK_MENU_LABEL_SIZE,
- "Program %d", i_item );
- psz_name[ GTK_MENU_LABEL_SIZE - 1 ] = '\0';
- }
-
p_item = gtk_radio_menu_item_new_with_label( p_group, psz_name );
p_group =
gtk_radio_menu_item_group( GTK_RADIO_MENU_ITEM( p_item ) );
- if( p_input_bank->pp_input[0]->stream.p_new_program ==
- p_input_bank->pp_input[0]->stream.pp_programs[i] ||
- p_input_bank->pp_input[0]->stream.p_selected_program ==
- p_input_bank->pp_input[0]->stream.pp_programs[i] )
+ if( p_pgrm == p_input_bank->pp_input[0]->stream.pp_programs[i] )
{
/* don't lose p_item when we append into menu */
p_item_active = p_item;
}
/* be sure that menu is sensitive if more than 1 program */
- if( i_item > 1 )
+ if( p_input_bank->pp_input[0]->stream.i_pgrm_number > 1 )
{
gtk_widget_set_sensitive( p_root, TRUE );
}
vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
+#define ES p_input_bank->pp_input[0]->stream.pp_es[i]
/* create a set of language buttons and append them to the container */
for( i = 0 ; i < p_input_bank->pp_input[0]->stream.i_es_number ; i++ )
{
- if( p_input_bank->pp_input[0]->stream.pp_es[i]->i_cat == i_cat )
+ if( ( ES->i_cat == i_cat ) &&
+ ( !ES->p_pgrm ||
+ ES->p_pgrm ==
+ p_input_bank->pp_input[0]->stream.p_selected_program ) )
{
i_item++;
- strcpy( psz_name, p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc );
+ strcpy( psz_name,
+ p_input_bank->pp_input[0]->stream.pp_es[i]->psz_desc );
if( psz_name[0] == '\0' )
{
snprintf( psz_name, GTK_MENU_LABEL_SIZE,
gtk_widget_show( p_item );
#define p_area p_input_bank->pp_input[0]->stream.pp_areas[i_title]
- if( ( p_area == p_input_bank->pp_input[0]->stream.p_selected_area ) &&
+ if( ( p_area ==
+ p_input_bank->pp_input[0]->stream.p_selected_area ) &&
( p_area->i_part == i_chapter + 1 ) )
{
p_item_active = p_item;
gtk_widget_set_sensitive( p_navigation, TRUE );
}
#else
- GtkRadioMenu( p_intf, p_title_item, p_chapter_group, "Chapter",
- p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb,
- i_title * 100,
- p_input_bank->pp_input[0]->stream.p_selected_area->i_part +
- p_input_bank->pp_input[0]->stream.p_selected_area->i_id *100,
- pf_toggle );
+ GtkRadioMenu( p_intf, p_title_item, p_chapter_group, "Chapter",
+ p_input_bank->pp_input[0]->stream.pp_areas[i_title]->i_part_nb,
+ i_title * 100,
+ p_input_bank->pp_input[0]->stream.p_selected_area->i_part +
+ p_input_bank->pp_input[0]->stream.p_selected_area->i_id *100,
+ pf_toggle );
#endif
}
/*****************************************************************************
* GtkSetupMenus: function that generates title/chapter/audio/subpic
* menus with help from preceding functions
+ *****************************************************************************
+ * Function called with the lock on stream
*****************************************************************************/
gint GtkSetupMenus( intf_thread_t * p_intf )
{
GtkWidget * p_popup_menu;
gint i;
- p_intf->p_sys->b_title_update |= p_intf->p_sys->b_program_update;
p_intf->p_sys->b_chapter_update |= p_intf->p_sys->b_title_update;
- p_intf->p_sys->b_angle_update |= p_intf->p_sys->b_title_update;
- p_intf->p_sys->b_audio_update |= p_intf->p_sys->b_title_update;
- p_intf->p_sys->b_spu_update |= p_intf->p_sys->b_title_update;
-
-// vlc_mutex_lock( &p_input_bank->pp_input[0]->stream.stream_lock );
+ p_intf->p_sys->b_audio_update |= p_intf->p_sys->b_title_update |
+ p_intf->p_sys->b_program_update;
+ p_intf->p_sys->b_spu_update |= p_intf->p_sys->b_title_update |
+ p_intf->p_sys->b_program_update;
if( p_intf->p_sys->b_program_update )
{
+ pgrm_descriptor_t * p_pgrm;
+
+ if( p_input_bank->pp_input[0]->stream.p_new_program )
+ {
+ p_pgrm = p_input_bank->pp_input[0]->stream.p_new_program;
+ }
+ else
+ {
+ p_pgrm = p_input_bank->pp_input[0]->stream.p_selected_program;
+ }
+
p_menubar_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
p_intf->p_sys->p_window ), "menubar_program" ) );
+ GtkProgramMenu( p_intf, p_menubar_menu, p_pgrm,
+ GtkMenubarProgramToggle );
- GtkProgramMenu( p_intf, p_menubar_menu, GtkMenubarProgramToggle );
-
+ p_intf->p_sys->b_program_update = 1;
+ p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
+ p_intf->p_sys->p_popup ), "popup_program" ) );
+ GtkProgramMenu( p_intf, p_popup_menu, p_pgrm,
+ GtkPopupProgramToggle );
+
p_intf->p_sys->b_program_update = 0;
}
p_intf->p_sys->b_chapter_update = 0;
}
- if( p_intf->p_sys->b_angle_update )
- {
- p_menubar_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
- p_intf->p_sys->p_window ), "menubar_angle" ) );
- GtkRadioMenu( p_intf, p_menubar_menu, NULL, "Angle",
- p_input_bank->pp_input[0]->stream.p_selected_area->i_angle_nb,
- p_input_bank->pp_input[0]->stream.p_selected_area->i_angle,
- GtkMenubarAngleToggle );
-
- p_popup_menu = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
- p_intf->p_sys->p_popup ), "popup_angle" ) );
- GtkRadioMenu( p_intf, p_popup_menu, NULL, "Angle",
- p_input_bank->pp_input[0]->stream.p_selected_area->i_angle_nb,
- p_input_bank->pp_input[0]->stream.p_selected_area->i_angle,
- GtkPopupAngleToggle );
-
- p_intf->p_sys->b_angle_update = 0;
- }
-
/* look for selected ES */
p_audio_es = NULL;
p_spu_es = NULL;
* input_clock.c: Clock/System date convertions, stream management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_clock.c,v 1.28 2001/12/30 07:09:56 sam Exp $
+ * $Id: input_clock.c,v 1.29 2002/03/05 17:46:33 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
void input_ClockManageRef( input_thread_t * p_input,
pgrm_descriptor_t * p_pgrm, mtime_t i_clock )
{
+ /* take selected program if none specified */
+ if( !p_pgrm )
+ {
+ p_pgrm = p_input->stream.p_selected_program;
+ }
+
if( ( p_pgrm->i_synchro_state != SYNCHRO_OK ) || ( i_clock == 0 ) )
{
/* Feed synchro with a new reference point. */
mtime_t input_ClockGetTS( input_thread_t * p_input,
pgrm_descriptor_t * p_pgrm, mtime_t i_ts )
{
+ /* take selected program if none specified */
+ if( !p_pgrm )
+ {
+ p_pgrm = p_input->stream.p_selected_program;
+ }
+
if( p_pgrm->i_synchro_state == SYNCHRO_OK )
{
return( ClockToSysdate( p_input, p_pgrm, i_ts + p_pgrm->delta_cr )
* input_ext-intf.c: services to the interface
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: input_ext-intf.c,v 1.34 2002/02/24 21:36:20 jobi Exp $
+ * $Id: input_ext-intf.c,v 1.35 2002/03/05 17:46:33 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/****************************************************************************
* input_ChangeProgram: interface request a program change
****************************************************************************/
-int input_ChangeProgram( input_thread_t * p_input,
- u16 i_program_number )
+int input_ChangeProgram( input_thread_t * p_input, u16 i_program_number )
{
pgrm_descriptor_t * p_program;
* input_programs.c: es_descriptor_t, pgrm_descriptor_t management
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: input_programs.c,v 1.72 2002/03/03 20:42:21 gbazin Exp $
+ * $Id: input_programs.c,v 1.73 2002/03/05 17:46:33 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
p_input->stream.pp_areas[i_area_index]->i_seek = NO_SEEK;
p_input->stream.pp_areas[i_area_index]->i_part_nb = 1;
p_input->stream.pp_areas[i_area_index]->i_part= 0;
- p_input->stream.pp_areas[i_area_index]->i_angle_nb = 1;
- p_input->stream.pp_areas[i_area_index]->i_angle = 0;
return p_input->stream.pp_areas[i_area_index];
}
* mpeg_system.c: TS, PS and PES management
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
- * $Id: mpeg_system.c,v 1.82 2002/03/04 23:56:37 massiot Exp $
+ * $Id: mpeg_system.c,v 1.83 2002/03/05 17:46:33 stef Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Lespinasse <walken@via.ecp.fr>
i_mux_rate = (U32_AT(p_header + 8) & 0x7FFFFE) >> 1;
}
/* Call the pace control. */
- input_ClockManageRef( p_input, p_input->stream.pp_programs[0],
+ input_ClockManageRef( p_input,
+ p_input->stream.p_selected_program,
scr_time );
if( i_mux_rate != p_input->stream.i_mux_rate