Commit ba9c75bf authored by Stéphane Borel's avatar Stéphane Borel

* Dvd angle is now handled through a program structure, so that the interface
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.
parent 7729c4e2
......@@ -4,7 +4,7 @@
* 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>
*
......@@ -174,8 +174,6 @@ typedef struct input_area_s
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;
......
......@@ -3,7 +3,7 @@
* 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: Stphane Borel <stef@via.ecp.fr>
*
......@@ -98,8 +98,8 @@ void IfoPrintVideo( thread_dvd_data_t * p_dvd )
"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"
......
This diff is collapsed.
......@@ -6,7 +6,7 @@
* 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: Stphane Borel <stef@via.ecp.fr>
*
......@@ -338,9 +338,6 @@ static int DvdReadOpen( struct input_thread_s *p_input )
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;
......@@ -394,18 +391,20 @@ static int DvdReadOpen( struct input_thread_s *p_input )
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 ) )
......@@ -445,6 +444,21 @@ static void DvdReadClose( struct input_thread_s *p_input )
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;
}
......@@ -564,14 +578,11 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
*/
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.
*/
......@@ -598,21 +609,35 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
/* 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;
......@@ -621,7 +646,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
/* 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;
......@@ -647,8 +672,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
{
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;
......@@ -661,8 +685,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
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;
......@@ -675,8 +698,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
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;
......@@ -740,8 +762,7 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
}
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;
......@@ -797,12 +818,6 @@ static int DvdReadSetArea( input_thread_t * p_input, input_area_t * p_area )
#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;
......
......@@ -233,15 +233,6 @@
<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>
......@@ -758,7 +749,7 @@
<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>
......@@ -777,7 +768,7 @@
<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>
......@@ -853,7 +844,7 @@
<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>
......@@ -873,7 +864,7 @@
<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>
......@@ -1017,7 +1008,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupPlayActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:16:58 GMT</last_modification_time>
</signal>
<label>Play</label>
......@@ -1031,7 +1021,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupPauseActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:17:31 GMT</last_modification_time>
</signal>
<label>Pause</label>
......@@ -1045,7 +1034,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupStopActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:18:10 GMT</last_modification_time>
</signal>
<label>Stop</label>
......@@ -1060,7 +1048,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupBackActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:18:21 GMT</last_modification_time>
</signal>
<label>Back</label>
......@@ -1074,7 +1061,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupSlowActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:18:29 GMT</last_modification_time>
</signal>
<label>Slow</label>
......@@ -1088,7 +1074,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupFastActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:18:37 GMT</last_modification_time>
</signal>
<label>Fast</label>
......@@ -1108,7 +1093,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupWindowToggleActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:18:51 GMT</last_modification_time>
</signal>
<label>Toggle _Interface</label>
......@@ -1122,7 +1106,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupFullscreenActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:19:07 GMT</last_modification_time>
</signal>
<label>_Fullscreen</label>
......@@ -1141,7 +1124,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupNextActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:19:18 GMT</last_modification_time>
</signal>
<label>Next</label>
......@@ -1154,7 +1136,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupPrevActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:19:26 GMT</last_modification_time>
</signal>
<label>Prev</label>
......@@ -1168,7 +1149,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupJumpActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:34:46 GMT</last_modification_time>
</signal>
<label>_Jump...</label>
......@@ -1177,21 +1157,22 @@
</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>
......@@ -1236,7 +1217,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupFileOpenActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:20:08 GMT</last_modification_time>
</signal>
<label>_Open File...</label>
......@@ -1251,7 +1231,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupDiscOpenActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:20:44 GMT</last_modification_time>
</signal>
<label>Open _Disc...</label>
......@@ -1266,7 +1245,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupNetworkOpenActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:20:54 GMT</last_modification_time>
</signal>
<label>_Network Stream...</label>
......@@ -1286,7 +1264,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupAboutActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:21:02 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_ABOUT_ITEM</stock_item>
......@@ -1300,7 +1277,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupPlaylistActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:21:14 GMT</last_modification_time>
</signal>
<label>Playlist...</label>
......@@ -1313,7 +1289,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupPreferencesActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:21:25 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_PREFERENCES_ITEM</stock_item>
......@@ -1331,7 +1306,6 @@
<signal>
<name>activate</name>
<handler>GnomePopupExitActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Sat, 19 May 2001 16:21:45 GMT</last_modification_time>
</signal>
<stock_item>GNOMEUIINFO_MENU_EXIT_ITEM</stock_item>
......
......@@ -87,13 +87,6 @@ static GnomeUIInfo menubar_view_menu_uiinfo[] =
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..."),
......@@ -296,30 +289,24 @@ create_intf_window (void)
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);
......@@ -613,6 +600,7 @@ create_intf_window (void)
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);
......@@ -620,6 +608,7 @@ create_intf_window (void)
(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);
......@@ -656,6 +645,7 @@ create_intf_window (void)
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);
......@@ -664,6 +654,7 @@ create_intf_window (void)
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);
......@@ -902,17 +893,17 @@ static GnomeUIInfo intf_popup_uiinfo[] =
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
},
{
......@@ -1021,13 +1012,13 @@ create_intf_popup (void)
(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);
......
......@@ -250,14 +250,6 @@
<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>
......@@ -1020,7 +1012,6 @@
<signal>
<name>activate</name>
<handler>GtkPlayActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:53:43 GMT</last_modification_time>
</signal>
<label>_Play</label>
......@@ -1034,7 +1025,6 @@
<signal>
<name>activate</name>
<handler>GtkPauseActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:53:37 GMT</last_modification_time>
</signal>
<label>Pause</label>
......@@ -1047,7 +1037,6 @@
<signal>
<name>activate</name>
<handler>GtKStopActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:53:29 GMT</last_modification_time>
</signal>
<label>Stop</label>
......@@ -1061,7 +1050,6 @@
<signal>
<name>activate</name>
<handler>GtkBackActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:53:21 GMT</last_modification_time>
</signal>
<label>Back</label>
......@@ -1075,7 +1063,6 @@
<signal>
<name>activate</name>
<handler>GtkSlowActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:53:15 GMT</last_modification_time>
</signal>
<label>Slow</label>
......@@ -1089,7 +1076,6 @@
<signal>
<name>activate</name>
<handler>GtkFastActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:53:07 GMT</last_modification_time>
</signal>
<label>Fast</label>
......@@ -1108,7 +1094,6 @@
<signal>
<name>activate</name>
<handler>GtkWindowToggleActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:53:00 GMT</last_modification_time>
</signal>
<label>Toggle _Interface</label>
......@@ -1121,7 +1106,6 @@
<signal>
<name>activate</name>
<handler>GtkFullscreenActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:52:38 GMT</last_modification_time>
</signal>
<label>_Fullscreen</label>
......@@ -1140,7 +1124,6 @@
<signal>
<name>activate</name>
<handler>GtkNextActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:52:31 GMT</last_modification_time>
</signal>
<label>Next</label>
......@@ -1153,7 +1136,6 @@
<signal>
<name>activate</name>
<handler>GtkPrevActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:52:23 GMT</last_modification_time>
</signal>
<label>Prev</label>
......@@ -1166,7 +1148,6 @@
<signal>
<name>activate</name>
<handler>GtkJumpActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:52:13 GMT</last_modification_time>
</signal>
<label>_Jump...</label>
......@@ -1175,17 +1156,17 @@
<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>
......@@ -1222,7 +1203,6 @@
<signal>
<name>activate</name>
<handler>GtkFileOpenActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:33:55 GMT</last_modification_time>
</signal>
<label>_Open File...</label>
......@@ -1236,7 +1216,6 @@
<signal>
<name>activate</name>
<handler>GtkDiscOpenActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:34:09 GMT</last_modification_time>
</signal>
<label>Open _Disc...</label>
......@@ -1250,7 +1229,6 @@
<signal>
<name>activate</name>
<handler>GtkNetworkOpenActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:34:23 GMT</last_modification_time>
</signal>
<label>_Network Stream...</label>
......@@ -1269,7 +1247,6 @@
<signal>
<name>activate</name>
<handler>GtkAboutActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Mon, 14 May 2001 21:34:54 GMT</last_modification_time>
</signal>
<label>_About...</label>
......@@ -1284,7 +1261,6 @@
<signal>
<name>activate</name>
<handler>GtkPlaylistActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:51:55 GMT</last_modification_time>
</signal>
<label>Playlist...</label>
......@@ -1297,7 +1273,6 @@
<signal>
<name>activate</name>
<handler>GtkPreferencesActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:51:46 GMT</last_modification_time>
</signal>
<label>_Preferences...</label>
......@@ -1316,7 +1291,6 @@
<signal>
<name>activate</name>
<handler>GtkExitActivate</handler>
<data>&quot;intf_popup&quot;</data>
<last_modification_time>Tue, 15 May 2001 13:52:03 GMT</last_modification_time>
</signal>
<label>E_xit</label>
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -57,7 +57,6 @@ typedef struct intf_sys_s
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 */
......
......@@ -2,7 +2,7 @@
* 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>
* Stphane Borel <stef@via.ecp.fr>
......@@ -184,7 +184,6 @@ gint GtkModeManage( intf_thread_t * p_intf )
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;
......
......@@ -41,7 +41,6 @@ create_intf_window (void)
GtkWidget *menubar_program;
GtkWidget *menubar_title;
GtkWidget *menubar_chapter;
GtkWidget *menubar_angle;
GtkWidget *separator11;
GtkWidget *menubar_playlist;
GtkWidget *menubar_modules;
......@@ -323,18 +322,6 @@ create_intf_window (void)
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,
......@@ -950,8 +937,8 @@ create_intf_popup (void)
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;
......@@ -1087,6 +1074,14 @@ create_intf_popup (void)
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"));
......@@ -1099,18 +1094,6 @@ create_intf_popup (void)
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"));
......@@ -1247,58 +1230,58 @@ create_intf_popup (void)
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);
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -219,6 +219,12 @@ int input_ClockManageControl( input_thread_t * p_input,
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. */
......@@ -303,6 +309,12 @@ void input_ClockManageRef( input_thread_t * p_input,
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 )
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -330,8 +330,7 @@ int input_ChangeArea( input_thread_t * p_input, input_area_t * p_area )
/****************************************************************************
* 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;
......
......@@ -2,7 +2,7 @@
* 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>
*
......@@ -283,8 +283,6 @@ input_area_t * input_AddArea( input_thread_t * p_input )
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];
}
......
......@@ -2,7 +2,7 @@
* 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>
......@@ -960,7 +960,8 @@ void input_DemuxPS( input_thread_t * p_input, data_packet_t * p_data )
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
......
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