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

*Much work on the gnome interface: added oct's playlist from gtk plugin,

tuned appearence, added preferences window (with no features yet), jump
window to go to specified time (not functionnal yet), and fixed some
bugs.

*moved b_fullscreen from p_vout->p_sys to p_vout and unified way of
toggling fullscreen in sdl in x11/xvideo output (using p_vout->i_ch
nges) so that an interface plugin can toogle fullscreen (implemented
in gnome)

*added p_input->stream.p_selected_area->i_tell in input TS so that the
slider work with ts files ( however, the time counter doesn't since we
have no mux_rate )

*improved ac3 spdif output ( and made it work again :)). It uses a true
blank frame now, and it allows to switch languages like a traditionnal
output. It doesn't support multiplexing though, neither can we switch
between spdif/analogical mode on-the-fly.

*beginning of the back port of gnome to gtk for those who do not have
gnome.
parent c8c99b21
......@@ -2,7 +2,7 @@
* audio_output.h : audio output thread interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: audio_output.h,v 1.34 2001/05/06 04:32:02 sam Exp $
* $Id: audio_output.h,v 1.35 2001/05/06 18:32:30 stef Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
*
......@@ -188,13 +188,15 @@ typedef struct aout_thread_s
#define AOUT_FMT_U16_BE 0x00000100 /* Big endian U16 */
#define AOUT_FMT_AC3 0x00000400 /* Dolby Digital AC3 */
#ifdef WORDS_BIGENDIAN
#define AOUT_FMT_S16_NE AOUT_FMT_S16_BE
#else
#define AOUT_FMT_S16_NE AOUT_FMT_S16_LE
#endif
/* Size of a frame for spdif output */
#define SPDIF_FRAME_SIZE 6144
/*****************************************************************************
* Prototypes
*****************************************************************************/
......
......@@ -123,6 +123,7 @@
/* Environment variable containing the display method */
#define INTF_METHOD_VAR "vlc_intf"
#define INTF_METHOD_DEFAULT "gtk"
/* Environment variable used to store startup script name and default value */
#define INTF_INIT_SCRIPT_VAR "vlcrc"
......@@ -142,12 +143,16 @@
/* Maximum number of channels */
#define INTF_MAX_CHANNELS 10
/* Default search path for interface file browser */
#define INTF_PATH_VAR "vlc_search_path"
/*****************************************************************************
* Input thread configuration
*****************************************************************************/
/* Environment variable containing the display method */
/* Environment variable containing the input method */
#define INPUT_METHOD_VAR "vlc_input"
#define INPUT_METHOD_DEFAULT "ps"
/* XXX?? */
#define INPUT_IDLE_SLEEP ((int)(0.100*CLOCK_FREQ))
......@@ -169,15 +174,22 @@
/* Maximum length of a hostname or source name */
#define INPUT_MAX_SOURCE_LENGTH 100
/* Default network protocol */
#define INPUT_NETWORK_PROTOCOL_VAR "vlc_network_protocol"
#define INPUT_NETWORK_PROTOCOL_DEFAULT "ts"
/* Default remote server */
#define INPUT_SERVER_VAR "vlc_server"
#define INPUT_SERVER_DEFAULT "138.195.143.220"
#define INPUT_BCAST_ADDR "138.195.143.255"
/* Default input port */
#define INPUT_PORT_VAR "vlc_server_port"
#define INPUT_PORT_DEFAULT 1234
/* Default broadcast address */
#define INPUT_BCAST_ADRR_VAR "vlc_broadcast_addr"
#define INPUT_BCAST_ADDR_DEFAULT "138.195.143.255"
/* Broadcast mode */
#define INPUT_BROADCAST_VAR "vlc_broadcast"
#define INPUT_BROADCAST_DEFAULT 0
......@@ -204,6 +216,7 @@
* mark it to be presented */
#define DEFAULT_PTS_DELAY (mtime_t)(.2*CLOCK_FREQ)
/* DVD defaults */
#define INPUT_DVD_DEVICE_VAR "vlc_dvd_device"
#define INPUT_DVD_DEVICE_DEFAULT "/dev/dvd"
......@@ -214,6 +227,10 @@
#define INPUT_CHANNEL_VAR "vlc_input_channel"
#define INPUT_SUBTITLE_VAR "vlc_input_subtitle"
/* VCD defaults */
#define INPUT_VVC_DEVICE_VAR "vlc_vcd_device"
#define INPUT_VCD_DEVICE_DEFAULT "/dev/cdrom"
/*****************************************************************************
* Audio configuration
*****************************************************************************/
......@@ -223,6 +240,7 @@
/* Environment variable containing the audio output method */
#define AOUT_METHOD_VAR "vlc_aout"
#define AOUT_METHOD_DEFAULT "dsp"
/* Environment variable used to store dsp device name, and default value */
#define AOUT_DSP_VAR "vlc_dsp"
......@@ -284,6 +302,7 @@
/* Environment variable containing the display method */
#define VOUT_METHOD_VAR "vlc_vout"
#define VOUT_METHOD_DEFAULT "x11"
/* Environment variable containing the motion compensation method */
#define MOTION_METHOD_VAR "vlc_motion"
......@@ -304,6 +323,15 @@
#define VOUT_WIDTH_DEFAULT 720
#define VOUT_HEIGHT_DEFAULT 576
#define VOUT_DEPTH_VAR "vlc_depth"
#define VOUT_DEPTH_DEFAULT 15
#define VOUT_FULLSCREEN_VAR "vlc_fullscreen"
#define VOUT_FULLSCREEN_DEFAULT 0
#define VOUT_FULLSCREEN_DEPTH_VAR "vlc_fullscreen_depth"
#define VOUT_FULLSCREEN_DEPTH_DEFAULT 32
/* Maximum width of a scaled source picture - this should be relatively high,
* since higher stream values will result in no display at all. */
#define VOUT_MAX_WIDTH 4096
......@@ -335,7 +363,8 @@
#define VOUT_OVERLAY_DEFAULT 0
/* Default gamma */
#define VOUT_GAMMA 0.
#define VOUT_GAMMA_VAR "vlc_gamma"
#define VOUT_GAMMA_DEFAULT 0.
/* Default fonts */
#define VOUT_DEFAULT_FONT "default8x9.psf"
......@@ -446,7 +475,7 @@
#define INTF_MSG_QSIZE 64
/* Interface warnig message level */
#define INTF_WARNING_VAR "warning_level"
#define INTF_WARNING_VAR "vlc_warning_level"
#define INTF_WARNING_DEFAULT 12
/* Define to enable messages queues - disabling messages queue can be useful
......@@ -473,3 +502,19 @@
/* Maximal number of commands which can be saved in history list */
#define INTF_CONSOLE_MAX_HISTORY 20
/****************************************************************************
* Playlist defaults
****************************************************************************/
/* Launch on start-up */
#define PLAYLIST_STARTUP_VAR "vlc_playlist_on_start_up"
#define PLAYLIST_STARTUP_DEFAULT 0
/* Enqueue drag'n dropped item */
#define PLAYLIST_ENQUEUE_VAR "vlc_playlist_enqueue"
#define PLAYLIST_ENQUEUE_DZFAULT 0
/* Loop on playlist end */
#define PLAYLIST_LOOP_VAR "vlc_playlist_loop"
#define PLAYLIST_LOOP_DEFAULT 0
......@@ -5,7 +5,7 @@
* thread, and destroy a previously oppenned video output thread.
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: video_output.h,v 1.59 2001/05/06 04:32:02 sam Exp $
* $Id: video_output.h,v 1.60 2001/05/06 18:32:30 stef Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
*
......@@ -210,6 +210,7 @@ typedef struct vout_thread_s
boolean_t b_info; /* print additional information */
boolean_t b_interface; /* render interface */
boolean_t b_scale; /* allow picture scaling */
boolean_t b_fullscreen; /* toogle fullscreen dusplay */
mtime_t render_time; /* last picture render time */
......
......@@ -10,7 +10,7 @@
* -dvd_udf to find files
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_dvd.c,v 1.54 2001/04/29 17:57:50 stef Exp $
* $Id: input_dvd.c,v 1.55 2001/05/06 18:32:30 stef Exp $
*
* Author: Stphane Borel <stef@via.ecp.fr>
*
......@@ -380,8 +380,8 @@ static void DVDInit( input_thread_t * p_input )
/* reading several block once seems to cause lock-up
* when using input_ToggleES
* who wrote thez damn buggy piece of shit ??? --stef */
p_dvd->i_block_once = 32;
p_input->i_read_once = 128;
p_dvd->i_block_once = 1;//32;
p_input->i_read_once = 8;//128;
i = CSSTest( p_input->i_handle );
......@@ -398,7 +398,7 @@ static void DVDInit( input_thread_t * p_input )
/* Reading structures initialisation */
p_input->p_method_data =
DVDNetlistInit( 8192, 16384, 2048, DVD_LB_SIZE, p_dvd->i_block_once );
DVDNetlistInit( 2048, 4096, 2048, DVD_LB_SIZE, p_dvd->i_block_once );
intf_WarnMsg( 2, "dvd info: netlist initialized" );
/* Ifo allocation & initialisation */
......@@ -1350,12 +1350,17 @@ static int DVDFindSector( thread_dvd_data_t * p_dvd )
}
/* Find start and end sectors of new cell */
#if 1
p_dvd->i_sector = MAX(
p_dvd->p_ifo->vts.cell_inf.p_cell_map[p_dvd->i_cell].i_start_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_start_sector );
p_dvd->i_end_sector = MIN(
p_dvd->p_ifo->vts.cell_inf.p_cell_map[p_dvd->i_cell].i_end_sector,
title.p_cell_play[p_dvd->i_prg_cell].i_end_sector );
#else
p_dvd->i_sector = title.p_cell_play[p_dvd->i_prg_cell].i_start_sector;
p_dvd->i_end_sector = title.p_cell_play[p_dvd->i_prg_cell].i_end_sector;
#endif
/*
intf_WarnMsg( 1, "cell: %d sector1: 0x%x end1: 0x%x\n"
......
......@@ -7,7 +7,7 @@
# Objects
#
PLUGIN_GNOME = gnome.o intf_gnome.o gnome_callbacks.o gnome_interface.o gnome_support.o
PLUGIN_GNOME = gnome.o intf_gnome.o gnome_callbacks.o gnome_interface.o gnome_support.o gnome_playlist.o
BUILTIN_GNOME = $(PLUGIN_GNOME:%.o=BUILTIN_%.o)
ALL_OBJ = $(PLUGIN_GNOME) $(BUILTIN_GNOME)
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
* gnome_callbacks.h : Callbacks for the Gnome plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gnome_callbacks.h,v 1.15 2001/04/22 00:08:26 stef Exp $
* $Id: gnome_callbacks.h,v 1.16 2001/05/06 18:32:30 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -122,14 +122,6 @@ void
on_popup_about_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data);
void
on_playlist_close_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_slow_activate (GtkMenuItem *menuitem,
gpointer user_data);
......@@ -162,14 +154,6 @@ void
on_modules_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data);
void
on_playlist_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_menubar_modules_activate (GtkMenuItem *menuitem,
gpointer user_data);
......@@ -297,3 +281,148 @@ on_menubar_angle_toggle (GtkCheckMenuItem *menuitem,
void
on_popup_angle_toggle (GtkCheckMenuItem *menuitem,
gpointer user_data);
void
on_popup_stop_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_jump_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_preferences_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_broadcast_check_toggled (GtkToggleButton *togglebutton,
gpointer user_data);
void
on_jump_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_jump_apply_clicked (GtkButton *button,
gpointer user_data);
void
on_jump_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_playlist_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_preferences_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_preferences_apply_clicked (GtkButton *button,
gpointer user_data);
void
on_preferences_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_menubar_fullscreen_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_popup_fullscreen_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_close_clicked (GtkButton *button,
gpointer user_data);
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data);
void
on_intf_playlist_destroy (GtkObject *object,
gpointer user_data);
void
on_playlist_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_playlist_disc_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_file_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_network_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_url_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_crop_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_invert_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_select_activate (GtkMenuItem *menuitem,
gpointer user_data);
gboolean
on_playlist_clist_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data);
void
on_playlist_clist_drag_data_received (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time,
gpointer user_data);
gboolean
on_playlist_clist_drag_motion (GtkWidget *widget,
GdkDragContext *drag_context,
gint x,
gint y,
guint time,
gpointer user_data);
void
on_playlist_delete_all_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_delete_item_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_playlist_ok_clicked (GtkButton *button,
gpointer user_data);
void
on_playlist_apply_clicked (GtkButton *button,
gpointer user_data);
void
on_playlist_cancel_clicked (GtkButton *button,
gpointer user_data);
void
on_popup_back_activate (GtkMenuItem *menuitem,
gpointer user_data);
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7,6 +7,8 @@ GtkWidget* create_intf_popup (void);
GtkWidget* create_intf_about (void);
GtkWidget* create_intf_fileopen (void);
GtkWidget* create_intf_modules (void);
GtkWidget* create_intf_playlist (void);
GtkWidget* create_intf_disc (void);
GtkWidget* create_intf_network (void);
GtkWidget* create_intf_playlist (void);
GtkWidget* create_intf_jump (void);
GtkWidget* create_intf_preferences (void);
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* intf_gnome.h: private Gnome interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gnome.h,v 1.9 2001/05/01 15:12:22 sam Exp $
* $Id: intf_gnome.h,v 1.10 2001/05/06 18:32:30 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -40,6 +40,18 @@
*****************************************************************************/
#define GNOME_MENU_LABEL_SIZE 64
/*****************************************************************************
* Inline function to retrieve the interface structure
*****************************************************************************/
static __inline__ intf_thread_t * GetIntf( GtkWidget *item, char * psz_parent )
{
return( gtk_object_get_data( GTK_OBJECT( lookup_widget(item, psz_parent) ),
"p_intf" ) );
}
/*****************************************************************************
* intf_sys_t: description and status of Gnome interface
*****************************************************************************/
......@@ -66,26 +78,30 @@ typedef struct intf_sys_s
GtkWidget * p_fileopen; /* file open window */
GtkWidget * p_disc; /* disc selection window */
GtkWidget * p_network; /* network stream window */
GtkWidget * p_preferences; /* preferences window */
GtkWidget * p_jump; /* jump window */
/* The slider */
GtkFrame * p_slider_frame;
GtkAdjustment * p_adj; /* slider adjustment object */
float f_adj_oldvalue; /* previous value */
/* The window labels */
GtkLabel * p_label_date;
GtkLabel * p_label_status;
GtkLabel * p_label_title;
GtkLabel * p_label_chapter;
/* Playlist management */
int i_list_timeout;
int i_playing; /* playlist selected item */
/* input mode management */
boolean_t b_mode_changed;
gint i_intf_mode; /* interface mode: file, net, disc */
gint i_part; /* current chapter */
gint i_part; /* current chapter */
/* XXX: Ugly kludge, see intf_gnome.c */
void ( *pf_gtk_callback ) ( void );
void ( *pf_gdk_callback ) ( void );
} intf_sys_t;
......@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.15 2001/04/28 03:36:25 sam Exp $
* $Id: gtk_callbacks.c,v 1.16 2001/05/06 18:32:30 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -914,3 +914,19 @@ on_slider_button_press_event (GtkWidget *widget,
return FALSE;
}
void
on_menubar_fullscreen_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
void
on_menubar_angle_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
}
......@@ -308,3 +308,11 @@ gboolean
on_slider_button_press_event (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
void
on_menubar_fullscreen_activate (GtkMenuItem *menuitem,
gpointer user_data);
void
on_menubar_angle_activate (GtkMenuItem *menuitem,
gpointer user_data);
This diff is collapsed.
......@@ -2,7 +2,7 @@
* intf_gtk.c: Gtk+ interface
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: intf_gtk.c,v 1.15 2001/05/01 15:12:22 sam Exp $
* $Id: intf_gtk.c,v 1.16 2001/05/06 18:32:30 stef Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -225,11 +225,8 @@ static void intf_Run( intf_thread_t *p_intf )
1, GDK_ACTION_COPY );
/* Get the interface labels */
#define P_LABEL( name ) GTK_LABEL( gtk_object_get_data( \
GTK_OBJECT( p_intf->p_sys->p_window ), name ) )
p_intf->p_sys->p_label_date = P_LABEL( "label_date" );
p_intf->p_sys->p_label_status = P_LABEL( "label_status" );
#undef P_LABEL
p_intf->p_sys->p_slider_frame = GTK_FRAME( gtk_object_get_data(
GTK_OBJECT(p_intf->p_sys->p_window ), "slider_frame" ) );
/* Connect the date display to the slider */
#define P_SLIDER GTK_RANGE( gtk_object_get_data( \
......@@ -303,7 +300,7 @@ static gint GtkManage( gpointer p_data )
{
#define p_intf ((intf_thread_t *)p_data)
GtkPlayListManage( p_data );
GtkPlayListManage( p_data );
vlc_mutex_lock( &p_intf->change_lock );
......@@ -758,7 +755,7 @@ void GtkDisplayDate( GtkAdjustment *p_adj )
vlc_mutex_lock( &p_intf->p_input->stream.stream_lock );
gtk_label_set_text( p_intf->p_sys->p_label_date,
gtk_frame_set_label( p_intf->p_sys->p_slider_frame,
input_OffsetToTime( p_intf->p_input, psz_time,
( p_area->i_size * p_adj->value ) / 100 ) );
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,7 +2,7 @@
* ac3_spdif.h: header for ac3 pass-through
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: ac3_spdif.h,v 1.2 2001/05/01 04:18:18 sam Exp $
* $Id: ac3_spdif.h,v 1.3 2001/05/06 18:32:30 stef Exp $
*
* Authors: Stéphane Borel <stef@via.ecp.fr>
*
......@@ -21,8 +21,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
****************************************************************************/
#define SPDIF_FRAME_SIZE 6144
typedef struct ac3_info_s
{
int i_bit_rate;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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