Commit 83e72916 authored by Laurent Aimar's avatar Laurent Aimar

* added stream output dialog box.

parent 3bcbf474
COMMON_gtk = \
modules/gui/gtk/display.c \
modules/gui/gtk/open.c \
modules/gui/gtk/sout.c \
modules/gui/gtk/control.c \
modules/gui/gtk/menu.c \
modules/gui/gtk/playlist.c \
......
......@@ -2,7 +2,7 @@
* gtk_common.h: private Gtk+ interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: common.h,v 1.6 2003/01/20 20:07:06 fenrir Exp $
* $Id: common.h,v 1.7 2003/01/26 14:49:09 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -66,6 +66,7 @@ struct intf_sys_t
GtkWidget * p_about; /* about window */
GtkWidget * p_open; /* multiopen window */
GtkWidget * p_jump; /* jump window */
GtkWidget * p_sout; /* stream output */
GtkTooltips * p_tooltips; /* tooltips */
......
......@@ -2,7 +2,7 @@
* gnome.c : Gnome plugin for vlc
*****************************************************************************
* Copyright (C) 2000 VideoLAN
* $Id: gnome.c,v 1.6 2003/01/20 20:07:06 fenrir Exp $
* $Id: gnome.c,v 1.7 2003/01/26 14:49:09 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -167,6 +167,8 @@ static void Run( intf_thread_t *p_intf )
{ "text/uri-list", 0, DROP_ACCEPT_TEXT_URI_LIST },
{ "text/plain", 0, DROP_ACCEPT_TEXT_PLAIN }
};
char *psz_sout;
GString * p_target;
gdk_threads_enter();
......@@ -176,6 +178,7 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->p_playwin = create_intf_playlist();
p_intf->p_sys->p_messages = create_intf_messages();
p_intf->p_sys->p_tooltips = gtk_tooltips_new();
p_intf->p_sys->p_sout = create_intf_sout();
/* Set the title of the main window */
gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
......@@ -254,6 +257,23 @@ static void Run( intf_thread_t *p_intf )
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
"p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_sout ),
"p_intf", p_intf );
psz_sout = config_GetPsz( p_intf, "sout" );
p_target = g_string_new( psz_sout ? psz_sout : "" );
if( psz_sout ) free( psz_sout );
gtk_entry_set_text( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_sout ), "sout_entry_target" ), p_target->str );
g_string_free( p_target, TRUE );
/* FIXME it's to be sure that only file entry is selected */
gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_sout ),
"sout_access_udp" ), TRUE );
gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_sout ),
"sout_access_file" ), TRUE );
/* Show the control window */
gtk_widget_show( p_intf->p_sys->p_window );
......
......@@ -3111,6 +3111,55 @@ http://www.videolan.org/
</child>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox28</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>2</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkCheckButton</class>
<name>show_sout_settings</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>GtkOpenSoutShow</handler>
<last_modification_time>Sun, 26 Jan 2003 11:50:50 GMT</last_modification_time>
</signal>
<label>Stream output</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>sout_settings</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>GtkSoutSettings</handler>
<last_modification_time>Sun, 26 Jan 2003 11:51:35 GMT</last_modification_time>
</signal>
<label>Settings...</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>20</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget>
......@@ -3873,4 +3922,539 @@ http://www.videolan.org/
</widget>
</widget>
<widget>
<class>GnomeDialog</class>
<name>intf_sout</name>
<border_width>5</border_width>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>True</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>False</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_close>False</auto_close>
<hide_on_close>False</hide_on_close>
<widget>
<class>GtkVBox</class>
<child_name>GnomeDialog:vbox</child_name>
<name>dialog-vbox7</name>
<homogeneous>False</homogeneous>
<spacing>8</spacing>
<child>
<padding>4</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkHButtonBox</class>
<child_name>GnomeDialog:action_area</child_name>
<name>dialog-action_area7</name>
<layout_style>GTK_BUTTONBOX_END</layout_style>
<spacing>8</spacing>
<child_min_width>85</child_min_width>
<child_min_height>27</child_min_height>
<child_ipad_x>7</child_ipad_x>
<child_ipad_y>0</child_ipad_y>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
<pack>GTK_PACK_END</pack>
</child>
<widget>
<class>GtkButton</class>
<name>button7</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>GtkSoutSettingsOk</handler>
<last_modification_time>Sun, 26 Jan 2003 10:59:18 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
</widget>
<widget>
<class>GtkButton</class>
<name>button9</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>GtkSoutSettingsCancel</handler>
<last_modification_time>Sun, 26 Jan 2003 10:58:55 GMT</last_modification_time>
</signal>
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
</widget>
</widget>
<widget>
<class>GtkVBox</class>
<name>vbox16</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkFrame</class>
<name>frame11</name>
<label>Stream output (MRL)</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkHBox</class>
<name>hbox26</name>
<border_width>5</border_width>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkLabel</class>
<name>label39</name>
<label>Destination Target: </label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>combo4</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>sout_entry_target</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GtkFrame</class>
<name>frame12</name>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkTable</class>
<name>table6</name>
<rows>3</rows>
<columns>5</columns>
<homogeneous>False</homogeneous>
<row_spacing>5</row_spacing>
<column_spacing>5</column_spacing>
<widget>
<class>GtkRadioButton</class>
<name>sout_access_file</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsAccessFile</handler>
<last_modification_time>Sun, 26 Jan 2003 10:18:26 GMT</last_modification_time>
</signal>
<label>File</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_access</group>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>sout_access_udp</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsAccessUdp</handler>
<last_modification_time>Sun, 26 Jan 2003 10:18:55 GMT</last_modification_time>
</signal>
<label>UDP</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_access</group>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>sout_access_rtp</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsAccessUdp</handler>
<last_modification_time>Sun, 26 Jan 2003 10:19:27 GMT</last_modification_time>
</signal>
<label>RTP</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_access</group>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>sout_file_path_label</name>
<label>Path:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>sout_udp_address_label</name>
<label>Address:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>sout_udp_address_combo</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>sout_udp_address</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 10:21:33 GMT</last_modification_time>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>sout_udp_port_label</name>
<label>Port</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>3</left_attach>
<right_attach>4</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkSpinButton</class>
<name>sout_udp_port</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 11:00:44 GMT</last_modification_time>
</signal>
<climb_rate>1</climb_rate>
<digits>0</digits>
<numeric>False</numeric>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>1234</value>
<lower>0</lower>
<upper>65535</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<child>
<left_attach>4</left_attach>
<right_attach>5</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>combo5</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>2</left_attach>
<right_attach>5</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>sout_file_path</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 10:21:04 GMT</last_modification_time>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox27</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<left_attach>4</left_attach>
<right_attach>5</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
<widget>
<class>GtkRadioButton</class>
<name>sout_mux_ts</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 10:23:59 GMT</last_modification_time>
</signal>
<label>TS</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_mux</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>sout_mux_ps</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 10:24:33 GMT</last_modification_time>
</signal>
<label>PS</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_mux</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>sout_mux_avi</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 10:25:01 GMT</last_modification_time>
</signal>
<label>AVI</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_mux</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
</widget>
</GTK-Interface>
/*****************************************************************************
* This file is not used: everything is in gtk_callbacks.c
*****************************************************************************/
void
GtkOpenSoutShow (GtkButton *button,
gpointer user_data)
{
}
void
GtkSoutSettings (GtkButton *button,
gpointer user_data)
{
}
......@@ -3,3 +3,12 @@
*****************************************************************************/
#include "gtk_callbacks.h"
void
GtkOpenSoutShow (GtkButton *button,
gpointer user_data);
void
GtkSoutSettings (GtkButton *button,
gpointer user_data);
......@@ -1433,6 +1433,9 @@ create_intf_open (void)
GtkWidget *label38;
GtkObject *subtitle_fps_adj;
GtkWidget *subtitle_fps;
GtkWidget *hbox28;
GtkWidget *show_sout_settings;
GtkWidget *sout_settings;
GtkWidget *dialog_action_area5;
GtkWidget *button1;
GtkWidget *button3;
......@@ -2070,6 +2073,27 @@ create_intf_open (void)
gtk_widget_show (subtitle_fps);
gtk_box_pack_start (GTK_BOX (hbox_subtitle), subtitle_fps, TRUE, TRUE, 0);
hbox28 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox28);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "hbox28", hbox28,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox28);
gtk_box_pack_start (GTK_BOX (dialog_vbox5), hbox28, TRUE, TRUE, 2);
show_sout_settings = gtk_check_button_new_with_label (_("Stream output"));
gtk_widget_ref (show_sout_settings);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "show_sout_settings", show_sout_settings,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (show_sout_settings);
gtk_box_pack_start (GTK_BOX (hbox28), show_sout_settings, FALSE, FALSE, 0);
sout_settings = gtk_button_new_with_label (_("Settings..."));
gtk_widget_ref (sout_settings);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "sout_settings", sout_settings,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_settings);
gtk_box_pack_start (GTK_BOX (hbox28), sout_settings, FALSE, FALSE, 20);
dialog_action_area5 = GNOME_DIALOG (intf_open)->action_area;
gtk_object_set_data (GTK_OBJECT (intf_open), "dialog_action_area5", dialog_action_area5);
gtk_widget_show (dialog_action_area5);
......@@ -2179,6 +2203,12 @@ create_intf_open (void)
gtk_signal_connect (GTK_OBJECT (subtitle_fps), "changed",
GTK_SIGNAL_FUNC (GtkOpenChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (show_sout_settings), "clicked",
GTK_SIGNAL_FUNC (GtkOpenSoutShow),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_settings), "clicked",
GTK_SIGNAL_FUNC (GtkSoutSettings),
NULL);
gtk_signal_connect (GTK_OBJECT (button1), "clicked",
GTK_SIGNAL_FUNC (GtkOpenOk),
NULL);
......@@ -2761,3 +2791,298 @@ create_intf_messages (void)
return intf_messages;
}
GtkWidget*
create_intf_sout (void)
{
GtkWidget *intf_sout;
GtkWidget *dialog_vbox7;
GtkWidget *vbox16;
GtkWidget *frame11;
GtkWidget *hbox26;
GtkWidget *label39;
GtkWidget *combo4;
GtkWidget *sout_entry_target;
GtkWidget *frame12;
GtkWidget *table6;
GSList *sout_access_group = NULL;
GtkWidget *sout_access_file;
GtkWidget *sout_access_udp;
GtkWidget *sout_access_rtp;
GtkWidget *sout_file_path_label;
GtkWidget *sout_udp_address_label;
GtkWidget *sout_udp_address_combo;
GtkWidget *sout_udp_address;
GtkWidget *sout_udp_port_label;
GtkObject *sout_udp_port_adj;
GtkWidget *sout_udp_port;
GtkWidget *combo5;
GtkWidget *sout_file_path;
GtkWidget *hbox27;
GSList *sout_mux_group = NULL;
GtkWidget *sout_mux_ts;
GtkWidget *sout_mux_ps;
GtkWidget *sout_mux_avi;
GtkWidget *dialog_action_area7;
GtkWidget *button7;
GtkWidget *button9;
intf_sout = gnome_dialog_new (NULL, NULL);
gtk_object_set_data (GTK_OBJECT (intf_sout), "intf_sout", intf_sout);
gtk_container_set_border_width (GTK_CONTAINER (intf_sout), 5);
gtk_window_set_modal (GTK_WINDOW (intf_sout), TRUE);
gtk_window_set_policy (GTK_WINDOW (intf_sout), FALSE, FALSE, FALSE);
dialog_vbox7 = GNOME_DIALOG (intf_sout)->vbox;
gtk_object_set_data (GTK_OBJECT (intf_sout), "dialog_vbox7", dialog_vbox7);
gtk_widget_show (dialog_vbox7);
vbox16 = gtk_vbox_new (FALSE, 0);
gtk_widget_ref (vbox16);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "vbox16", vbox16,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox16);
gtk_box_pack_start (GTK_BOX (dialog_vbox7), vbox16, TRUE, TRUE, 0);
frame11 = gtk_frame_new (_("Stream output (MRL)"));
gtk_widget_ref (frame11);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "frame11", frame11,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame11);
gtk_box_pack_start (GTK_BOX (vbox16), frame11, FALSE, TRUE, 0);
hbox26 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox26);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "hbox26", hbox26,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox26);
gtk_container_add (GTK_CONTAINER (frame11), hbox26);
gtk_container_set_border_width (GTK_CONTAINER (hbox26), 5);
label39 = gtk_label_new (_("Destination Target: "));
gtk_widget_ref (label39);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "label39", label39,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label39);
gtk_box_pack_start (GTK_BOX (hbox26), label39, FALSE, FALSE, 0);
combo4 = gtk_combo_new ();
gtk_widget_ref (combo4);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "combo4", combo4,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (combo4);
gtk_box_pack_start (GTK_BOX (hbox26), combo4, TRUE, TRUE, 0);
sout_entry_target = GTK_COMBO (combo4)->entry;
gtk_widget_ref (sout_entry_target);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_entry_target", sout_entry_target,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_entry_target);
frame12 = gtk_frame_new (NULL);
gtk_widget_ref (frame12);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "frame12", frame12,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame12);
gtk_box_pack_start (GTK_BOX (vbox16), frame12, TRUE, TRUE, 0);
table6 = gtk_table_new (3, 5, FALSE);
gtk_widget_ref (table6);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "table6", table6,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (table6);
gtk_container_add (GTK_CONTAINER (frame12), table6);
gtk_table_set_row_spacings (GTK_TABLE (table6), 5);
gtk_table_set_col_spacings (GTK_TABLE (table6), 5);
sout_access_file = gtk_radio_button_new_with_label (sout_access_group, _("File"));
sout_access_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_access_file));
gtk_widget_ref (sout_access_file);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_access_file", sout_access_file,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_access_file);
gtk_table_attach (GTK_TABLE (table6), sout_access_file, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_access_udp = gtk_radio_button_new_with_label (sout_access_group, _("UDP"));
sout_access_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_access_udp));
gtk_widget_ref (sout_access_udp);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_access_udp", sout_access_udp,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_access_udp);
gtk_table_attach (GTK_TABLE (table6), sout_access_udp, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_access_rtp = gtk_radio_button_new_with_label (sout_access_group, _("RTP"));
sout_access_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_access_rtp));
gtk_widget_ref (sout_access_rtp);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_access_rtp", sout_access_rtp,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_access_rtp);
gtk_table_attach (GTK_TABLE (table6), sout_access_rtp, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_file_path_label = gtk_label_new (_("Path:"));
gtk_widget_ref (sout_file_path_label);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_file_path_label", sout_file_path_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_file_path_label);
gtk_table_attach (GTK_TABLE (table6), sout_file_path_label, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (sout_file_path_label), 0, 0.5);
sout_udp_address_label = gtk_label_new (_("Address:"));
gtk_widget_ref (sout_udp_address_label);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_address_label", sout_udp_address_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_address_label);
gtk_table_attach (GTK_TABLE (table6), sout_udp_address_label, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (sout_udp_address_label), 0, 0.5);
sout_udp_address_combo = gtk_combo_new ();
gtk_widget_ref (sout_udp_address_combo);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_address_combo", sout_udp_address_combo,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_address_combo);
gtk_table_attach (GTK_TABLE (table6), sout_udp_address_combo, 2, 3, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_udp_address = GTK_COMBO (sout_udp_address_combo)->entry;
gtk_widget_ref (sout_udp_address);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_address", sout_udp_address,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_address);
sout_udp_port_label = gtk_label_new (_("Port"));
gtk_widget_ref (sout_udp_port_label);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_port_label", sout_udp_port_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_port_label);
gtk_table_attach (GTK_TABLE (table6), sout_udp_port_label, 3, 4, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (sout_udp_port_label), 0, 0.5);
sout_udp_port_adj = gtk_adjustment_new (1234, 0, 65535, 1, 10, 10);
sout_udp_port = gtk_spin_button_new (GTK_ADJUSTMENT (sout_udp_port_adj), 1, 0);
gtk_widget_ref (sout_udp_port);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_port", sout_udp_port,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_port);
gtk_table_attach (GTK_TABLE (table6), sout_udp_port, 4, 5, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
combo5 = gtk_combo_new ();
gtk_widget_ref (combo5);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "combo5", combo5,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (combo5);
gtk_table_attach (GTK_TABLE (table6), combo5, 2, 5, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_file_path = GTK_COMBO (combo5)->entry;
gtk_widget_ref (sout_file_path);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_file_path", sout_file_path,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_file_path);
hbox27 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox27);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "hbox27", hbox27,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox27);
gtk_table_attach (GTK_TABLE (table6), hbox27, 4, 5, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
sout_mux_ts = gtk_radio_button_new_with_label (sout_mux_group, _("TS"));
sout_mux_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_mux_ts));
gtk_widget_ref (sout_mux_ts);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_mux_ts", sout_mux_ts,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_mux_ts);
gtk_box_pack_start (GTK_BOX (hbox27), sout_mux_ts, FALSE, FALSE, 0);
sout_mux_ps = gtk_radio_button_new_with_label (sout_mux_group, _("PS"));
sout_mux_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_mux_ps));
gtk_widget_ref (sout_mux_ps);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_mux_ps", sout_mux_ps,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_mux_ps);
gtk_box_pack_start (GTK_BOX (hbox27), sout_mux_ps, FALSE, FALSE, 0);
sout_mux_avi = gtk_radio_button_new_with_label (sout_mux_group, _("AVI"));
sout_mux_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_mux_avi));
gtk_widget_ref (sout_mux_avi);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_mux_avi", sout_mux_avi,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_mux_avi);
gtk_box_pack_start (GTK_BOX (hbox27), sout_mux_avi, FALSE, FALSE, 0);
dialog_action_area7 = GNOME_DIALOG (intf_sout)->action_area;
gtk_object_set_data (GTK_OBJECT (intf_sout), "dialog_action_area7", dialog_action_area7);
gtk_widget_show (dialog_action_area7);
gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area7), GTK_BUTTONBOX_END);
gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area7), 8);
gnome_dialog_append_button (GNOME_DIALOG (intf_sout), GNOME_STOCK_BUTTON_OK);
button7 = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_sout)->buttons)->data);
gtk_widget_ref (button7);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "button7", button7,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button7);
GTK_WIDGET_SET_FLAGS (button7, GTK_CAN_DEFAULT);
gnome_dialog_append_button (GNOME_DIALOG (intf_sout), GNOME_STOCK_BUTTON_CANCEL);
button9 = GTK_WIDGET (g_list_last (GNOME_DIALOG (intf_sout)->buttons)->data);
gtk_widget_ref (button9);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "button9", button9,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button9);
GTK_WIDGET_SET_FLAGS (button9, GTK_CAN_DEFAULT);
gtk_signal_connect (GTK_OBJECT (sout_access_file), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsAccessFile),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_access_udp), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsAccessUdp),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_access_rtp), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsAccessUdp),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_udp_address), "changed",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_udp_port), "changed",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_file_path), "changed",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_mux_ts), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_mux_ps), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_mux_avi), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (button7), "clicked",
GTK_SIGNAL_FUNC (GtkSoutSettingsOk),
NULL);
gtk_signal_connect (GTK_OBJECT (button9), "clicked",
GTK_SIGNAL_FUNC (GtkSoutSettingsCancel),
NULL);
return intf_sout;
}
......@@ -11,3 +11,4 @@ GtkWidget* create_intf_modules (void);
GtkWidget* create_intf_playlist (void);
GtkWidget* create_intf_jump (void);
GtkWidget* create_intf_messages (void);
GtkWidget* create_intf_sout (void);
......@@ -2,7 +2,7 @@
* gtk.c : Gtk+ plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: gtk.c,v 1.11 2003/01/20 20:07:06 fenrir Exp $
* $Id: gtk.c,v 1.12 2003/01/26 14:49:09 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -172,6 +172,8 @@ static void Run( intf_thread_t *p_intf )
{ "text/uri-list", 0, DROP_ACCEPT_TEXT_URI_LIST },
{ "text/plain", 0, DROP_ACCEPT_TEXT_PLAIN }
};
char *psz_sout;
GString * p_target;
#ifdef NEED_GTK_MAIN
gdk_threads_enter();
......@@ -192,6 +194,7 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->p_playwin = create_intf_playlist();
p_intf->p_sys->p_messages = create_intf_messages();
p_intf->p_sys->p_tooltips = gtk_tooltips_new();
p_intf->p_sys->p_sout = create_intf_sout();
/* Set the title of the main window */
gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
......@@ -235,6 +238,8 @@ static void Run( intf_thread_t *p_intf )
p_intf->p_sys->f_adj_oldvalue = 0;
#undef P_SLIDER
/* We don't create these ones yet because we perhaps won't need them */
p_intf->p_sys->p_about = NULL;
p_intf->p_sys->p_modules = NULL;
......@@ -262,6 +267,22 @@ static void Run( intf_thread_t *p_intf )
gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
"p_intf", p_intf );
gtk_object_set_data( GTK_OBJECT( p_intf->p_sys->p_sout ),
"p_intf", p_intf );
psz_sout = config_GetPsz( p_intf, "sout" );
p_target = g_string_new( psz_sout ? psz_sout : "" );
if( psz_sout ) free( psz_sout );
gtk_entry_set_text( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_sout ), "sout_entry_target" ), p_target->str );
g_string_free( p_target, TRUE );
/* FIXME it's to be sure that only file entry is selected */
gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_sout ),
"sout_access_udp" ), TRUE );
gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_sout ),
"sout_access_file" ), TRUE );
/* Show the control window */
gtk_widget_show( p_intf->p_sys->p_window );
......
......@@ -511,6 +511,7 @@
<last_modification_time>Mon, 08 Jul 2002 16:14:58 GMT</last_modification_time>
</signal>
<label>File</label>
<icon>file.xpm</icon>
</widget>
<widget>
......@@ -1617,7 +1618,7 @@ http://www.videolan.org/</label>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<auto_shrink>True</auto_shrink>
<widget>
<class>GtkVBox</class>
......@@ -3079,6 +3080,7 @@ http://www.videolan.org/</label>
<widget>
<class>GtkCheckButton</class>
<name>show_subtitle</name>
<tooltip>Use a subtitles file</tooltip>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
......@@ -3126,6 +3128,7 @@ http://www.videolan.org/</label>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>entry_subtitle</name>
<tooltip>Select a subtitles file</tooltip>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
......@@ -3190,6 +3193,7 @@ http://www.videolan.org/</label>
<widget>
<class>GtkSpinButton</class>
<name>subtitle_delay</name>
<tooltip>Set the delay (in seconds)</tooltip>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
......@@ -3235,6 +3239,7 @@ http://www.videolan.org/</label>
<widget>
<class>GtkSpinButton</class>
<name>subtitle_fps</name>
<tooltip>Set the number of Frames Per Second</tooltip>
<can_focus>True</can_focus>
<climb_rate>1</climb_rate>
<digits>1</digits>
......@@ -3256,6 +3261,57 @@ http://www.videolan.org/</label>
</widget>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox30</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>3</padding>
<expand>False</expand>
<fill>False</fill>
</child>
<widget>
<class>GtkCheckButton</class>
<name>show_sout_settings</name>
<tooltip>Use stream output</tooltip>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>GtkOpenSoutShow</handler>
<last_modification_time>Sun, 26 Jan 2003 07:01:23 GMT</last_modification_time>
</signal>
<label>Stream output</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>sout_settings</name>
<tooltip>Stream output configuration </tooltip>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>GtkSoutSettings</handler>
<last_modification_time>Sun, 26 Jan 2003 04:22:08 GMT</last_modification_time>
</signal>
<label>Settings...</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>20</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
</widget>
</widget>
......@@ -3911,4 +3967,551 @@ http://www.videolan.org/</label>
</widget>
</widget>
<widget>
<class>GtkWindow</class>
<name>intf_sout</name>
<border_width>5</border_width>
<title>Stream output</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<position>GTK_WIN_POS_NONE</position>
<modal>True</modal>
<allow_shrink>False</allow_shrink>
<allow_grow>True</allow_grow>
<auto_shrink>False</auto_shrink>
<widget>
<class>GtkVBox</class>
<name>vbox15</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkVBox</class>
<name>vbox16</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkFrame</class>
<name>frame11</name>
<label>Stream output (MRL)</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkHBox</class>
<name>hbox28</name>
<border_width>5</border_width>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<widget>
<class>GtkLabel</class>
<name>label38</name>
<label>Destination Target: </label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>combo4</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>sout_entry_target</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GtkFrame</class>
<name>frame12</name>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
<padding>0</padding>
<expand>True</expand>
<fill>True</fill>
</child>
<widget>
<class>GtkTable</class>
<name>table6</name>
<rows>3</rows>
<columns>5</columns>
<homogeneous>False</homogeneous>
<row_spacing>5</row_spacing>
<column_spacing>5</column_spacing>
<widget>
<class>GtkRadioButton</class>
<name>sout_access_file</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsAccessFile</handler>
<last_modification_time>Sun, 26 Jan 2003 05:40:41 GMT</last_modification_time>
</signal>
<label>File</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_access</group>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>sout_access_udp</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsAccessUdp</handler>
<last_modification_time>Sun, 26 Jan 2003 05:40:51 GMT</last_modification_time>
</signal>
<label>UDP</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_access</group>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>sout_access_rtp</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsAccessUdp</handler>
<last_modification_time>Sun, 26 Jan 2003 05:50:02 GMT</last_modification_time>
</signal>
<label>RTP</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_access</group>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkLabel</class>
<name>sout_file_path_label</name>
<label>Path:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>combo6</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>2</left_attach>
<right_attach>5</right_attach>
<top_attach>0</top_attach>
<bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>sout_file_path</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 04:54:22 GMT</last_modification_time>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>sout_udp_address_label</name>
<label>Address:</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkCombo</class>
<name>sout_udp_address_combo</name>
<value_in_list>False</value_in_list>
<ok_if_empty>True</ok_if_empty>
<case_sensitive>False</case_sensitive>
<use_arrows>True</use_arrows>
<use_arrows_always>False</use_arrows_always>
<items></items>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
<widget>
<class>GtkEntry</class>
<child_name>GtkCombo:entry</child_name>
<name>sout_udp_address</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 04:54:29 GMT</last_modification_time>
</signal>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
</widget>
</widget>
<widget>
<class>GtkSpinButton</class>
<name>sout_udp_port</name>
<can_focus>True</can_focus>
<signal>
<name>changed</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 10:27:52 GMT</last_modification_time>
</signal>
<climb_rate>1</climb_rate>
<digits>0</digits>
<numeric>False</numeric>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>1234</value>
<lower>0</lower>
<upper>65535</upper>
<step>1</step>
<page>10</page>
<page_size>10</page_size>
<child>
<left_attach>4</left_attach>
<right_attach>5</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox29</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<left_attach>4</left_attach>
<right_attach>5</right_attach>
<top_attach>2</top_attach>
<bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>True</yfill>
</child>
<widget>
<class>GtkRadioButton</class>
<name>sout_mux_ts</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 06:42:47 GMT</last_modification_time>
</signal>
<label>TS</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_mux</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>sout_mux_ps</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 06:42:53 GMT</last_modification_time>
</signal>
<label>PS</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_mux</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
<widget>
<class>GtkRadioButton</class>
<name>sout_mux_avi</name>
<can_focus>True</can_focus>
<signal>
<name>toggled</name>
<handler>GtkSoutSettingsChanged</handler>
<last_modification_time>Sun, 26 Jan 2003 06:42:58 GMT</last_modification_time>
</signal>
<label>AVI</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>sout_mux</group>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
</widget>
</widget>
<widget>
<class>GtkLabel</class>
<name>sout_udp_port_label</name>
<label>Port</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
<left_attach>3</left_attach>
<right_attach>4</right_attach>
<top_attach>1</top_attach>
<bottom_attach>2</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<xfill>True</xfill>
<yfill>False</yfill>
</child>
</widget>
</widget>
</widget>
</widget>
<widget>
<class>GtkHBox</class>
<name>hbox25</name>
<border_width>5</border_width>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>True</fill>
<pack>GTK_PACK_END</pack>
</child>
<widget>
<class>GtkHBox</class>
<name>hbox26</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<padding>3</padding>
<expand>True</expand>
<fill>True</fill>
<pack>GTK_PACK_END</pack>
</child>
<widget>
<class>GtkButton</class>
<name>button1</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>GtkSoutSettingsOk</handler>
<last_modification_time>Sun, 26 Jan 2003 04:52:18 GMT</last_modification_time>
</signal>
<label>OK</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>2</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
<widget>
<class>GtkButton</class>
<name>button2</name>
<can_focus>True</can_focus>
<signal>
<name>clicked</name>
<handler>GtkSoutSettingsCancel</handler>
<last_modification_time>Sun, 26 Jan 2003 04:32:24 GMT</last_modification_time>
</signal>
<label>Cancel</label>
<relief>GTK_RELIEF_NORMAL</relief>
<child>
<padding>2</padding>
<expand>True</expand>
<fill>True</fill>
</child>
</widget>
</widget>
</widget>
</widget>
</widget>
</GTK-Interface>
......@@ -2,7 +2,7 @@
* gtk_callbacks.c : Callbacks for the Gtk+ plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.c,v 1.9 2003/01/21 12:36:11 fenrir Exp $
* $Id: gtk_callbacks.c,v 1.10 2003/01/26 14:49:09 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -688,3 +688,5 @@ GtkPopupDeinterlace (GtkRadioMenuItem *radiomenuitem,
msg_Dbg( p_intf, "GtkPopupDeinterlace" );
}
......@@ -2,7 +2,7 @@
* gtk_callbacks.h : Callbacks for the gtk plugin.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: gtk_callbacks.h,v 1.4 2003/01/21 12:36:11 fenrir Exp $
* $Id: gtk_callbacks.h,v 1.5 2003/01/26 14:49:09 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -178,3 +178,32 @@ GtkPopupDeinterlace (GtkRadioMenuItem *radiomenuitem,
void
GtkOpenSubtitleShow (GtkButton *button,
gpointer user_data);
void
GtkSoutSettings (GtkButton *button,
gpointer user_data);
void
GtkSoutSettingsCancel (GtkButton *button,
gpointer user_data);
void
GtkSoutSettingsChanged (GtkWidget *button,
gpointer user_data);
void
GtkSoutSettingsOk (GtkButton *button,
gpointer user_data);
void
GtkSoutSettingsAccessFile (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkSoutSettingsAccessUdp (GtkToggleButton *togglebutton,
gpointer user_data);
void
GtkOpenSoutShow (GtkButton *button,
gpointer user_data);
......@@ -73,6 +73,7 @@ create_intf_window (void)
GtkWidget *menubar_about;
GtkWidget *toolbar_handlebox;
GtkWidget *toolbar;
GtkWidget *tmp_toolbar_icon;
GtkWidget *toolbar_open;
GtkWidget *toolbar_disc;
GtkWidget *toolbar_network;
......@@ -599,12 +600,13 @@ create_intf_window (void)
gtk_toolbar_set_space_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_SPACE_LINE);
gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NONE);
tmp_toolbar_icon = create_pixmap (intf_window, "file.xpm");
toolbar_open = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar),
GTK_TOOLBAR_CHILD_BUTTON,
NULL,
_("File"),
_("Open a file"), NULL,
NULL, NULL, NULL);
tmp_toolbar_icon, NULL, NULL);
gtk_widget_ref (toolbar_open);
gtk_object_set_data_full (GTK_OBJECT (intf_window), "toolbar_open", toolbar_open,
(GtkDestroyNotify) gtk_widget_unref);
......@@ -1697,12 +1699,18 @@ create_intf_open (void)
GtkWidget *label3;
GtkObject *subtitle_fps_adj;
GtkWidget *subtitle_fps;
GtkWidget *hbox30;
GtkWidget *show_sout_settings;
GtkWidget *sout_settings;
GtkWidget *dialog_action_area6;
GtkWidget *hbox18;
GtkWidget *hbox19;
GtkWidget *open_ok;
GtkWidget *open_cancel;
GtkAccelGroup *accel_group;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new ();
accel_group = gtk_accel_group_new ();
......@@ -1710,6 +1718,7 @@ create_intf_open (void)
gtk_object_set_data (GTK_OBJECT (intf_open), "intf_open", intf_open);
gtk_container_set_border_width (GTK_CONTAINER (intf_open), 5);
gtk_window_set_title (GTK_WINDOW (intf_open), _("Open Target"));
gtk_window_set_policy (GTK_WINDOW (intf_open), FALSE, TRUE, TRUE);
dialog_vbox7 = GTK_DIALOG (intf_open)->vbox;
gtk_object_set_data (GTK_OBJECT (intf_open), "dialog_vbox7", dialog_vbox7);
......@@ -2272,6 +2281,7 @@ create_intf_open (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (show_subtitle);
gtk_box_pack_start (GTK_BOX (open_vbox), show_subtitle, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, show_subtitle, _("Use a subtitles file"), NULL);
hbox_subtitle = gtk_hbox_new (FALSE, 5);
gtk_widget_ref (hbox_subtitle);
......@@ -2293,6 +2303,7 @@ create_intf_open (void)
gtk_object_set_data_full (GTK_OBJECT (intf_open), "entry_subtitle", entry_subtitle,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (entry_subtitle);
gtk_tooltips_set_tip (tooltips, entry_subtitle, _("Select a subtitles file"), NULL);
vbox14 = gtk_vbox_new (TRUE, 0);
gtk_widget_ref (vbox14);
......@@ -2322,6 +2333,7 @@ create_intf_open (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (subtitle_delay);
gtk_box_pack_start (GTK_BOX (hbox_subtitle), subtitle_delay, TRUE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, subtitle_delay, _("Set the delay (in seconds)"), NULL);
label3 = gtk_label_new (_("fps"));
gtk_widget_ref (label3);
......@@ -2337,6 +2349,30 @@ create_intf_open (void)
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (subtitle_fps);
gtk_box_pack_start (GTK_BOX (hbox_subtitle), subtitle_fps, TRUE, TRUE, 0);
gtk_tooltips_set_tip (tooltips, subtitle_fps, _("Set the number of Frames Per Second"), NULL);
hbox30 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox30);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "hbox30", hbox30,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox30);
gtk_box_pack_start (GTK_BOX (dialog_vbox7), hbox30, FALSE, FALSE, 3);
show_sout_settings = gtk_check_button_new_with_label (_("Stream output"));
gtk_widget_ref (show_sout_settings);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "show_sout_settings", show_sout_settings,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (show_sout_settings);
gtk_box_pack_start (GTK_BOX (hbox30), show_sout_settings, FALSE, FALSE, 0);
gtk_tooltips_set_tip (tooltips, show_sout_settings, _("Use stream output"), NULL);
sout_settings = gtk_button_new_with_label (_("Settings..."));
gtk_widget_ref (sout_settings);
gtk_object_set_data_full (GTK_OBJECT (intf_open), "sout_settings", sout_settings,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_settings);
gtk_box_pack_start (GTK_BOX (hbox30), sout_settings, FALSE, FALSE, 20);
gtk_tooltips_set_tip (tooltips, sout_settings, _("Stream output configuration "), NULL);
dialog_action_area6 = GTK_DIALOG (intf_open)->action_area;
gtk_object_set_data (GTK_OBJECT (intf_open), "dialog_action_area6", dialog_action_area6);
......@@ -2461,6 +2497,12 @@ create_intf_open (void)
gtk_signal_connect (GTK_OBJECT (subtitle_delay), "changed",
GTK_SIGNAL_FUNC (GtkOpenChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (show_sout_settings), "clicked",
GTK_SIGNAL_FUNC (GtkOpenSoutShow),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_settings), "clicked",
GTK_SIGNAL_FUNC (GtkSoutSettings),
NULL);
gtk_signal_connect (GTK_OBJECT (open_ok), "clicked",
GTK_SIGNAL_FUNC (GtkOpenOk),
NULL);
......@@ -2468,6 +2510,8 @@ create_intf_open (void)
GTK_SIGNAL_FUNC (GtkOpenCancel),
NULL);
gtk_object_set_data (GTK_OBJECT (intf_open), "tooltips", tooltips);
gtk_window_add_accel_group (GTK_WINDOW (intf_open), accel_group);
return intf_open;
......@@ -2957,3 +3001,309 @@ create_intf_messages (void)
return intf_messages;
}
GtkWidget*
create_intf_sout (void)
{
GtkWidget *intf_sout;
GtkWidget *vbox15;
GtkWidget *vbox16;
GtkWidget *frame11;
GtkWidget *hbox28;
GtkWidget *label38;
GtkWidget *combo4;
GtkWidget *sout_entry_target;
GtkWidget *frame12;
GtkWidget *table6;
GSList *sout_access_group = NULL;
GtkWidget *sout_access_file;
GtkWidget *sout_access_udp;
GtkWidget *sout_access_rtp;
GtkWidget *sout_file_path_label;
GtkWidget *combo6;
GtkWidget *sout_file_path;
GtkWidget *sout_udp_address_label;
GtkWidget *sout_udp_address_combo;
GtkWidget *sout_udp_address;
GtkObject *sout_udp_port_adj;
GtkWidget *sout_udp_port;
GtkWidget *hbox29;
GSList *sout_mux_group = NULL;
GtkWidget *sout_mux_ts;
GtkWidget *sout_mux_ps;
GtkWidget *sout_mux_avi;
GtkWidget *sout_udp_port_label;
GtkWidget *hbox25;
GtkWidget *hbox26;
GtkWidget *button1;
GtkWidget *button2;
intf_sout = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_object_set_data (GTK_OBJECT (intf_sout), "intf_sout", intf_sout);
gtk_container_set_border_width (GTK_CONTAINER (intf_sout), 5);
gtk_window_set_title (GTK_WINDOW (intf_sout), _("Stream output"));
gtk_window_set_modal (GTK_WINDOW (intf_sout), TRUE);
vbox15 = gtk_vbox_new (FALSE, 0);
gtk_widget_ref (vbox15);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "vbox15", vbox15,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox15);
gtk_container_add (GTK_CONTAINER (intf_sout), vbox15);
vbox16 = gtk_vbox_new (FALSE, 0);
gtk_widget_ref (vbox16);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "vbox16", vbox16,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (vbox16);
gtk_box_pack_start (GTK_BOX (vbox15), vbox16, TRUE, TRUE, 0);
frame11 = gtk_frame_new (_("Stream output (MRL)"));
gtk_widget_ref (frame11);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "frame11", frame11,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame11);
gtk_box_pack_start (GTK_BOX (vbox16), frame11, FALSE, TRUE, 0);
hbox28 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox28);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "hbox28", hbox28,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox28);
gtk_container_add (GTK_CONTAINER (frame11), hbox28);
gtk_container_set_border_width (GTK_CONTAINER (hbox28), 5);
label38 = gtk_label_new (_("Destination Target: "));
gtk_widget_ref (label38);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "label38", label38,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (label38);
gtk_box_pack_start (GTK_BOX (hbox28), label38, FALSE, FALSE, 0);
combo4 = gtk_combo_new ();
gtk_widget_ref (combo4);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "combo4", combo4,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (combo4);
gtk_box_pack_start (GTK_BOX (hbox28), combo4, TRUE, TRUE, 0);
sout_entry_target = GTK_COMBO (combo4)->entry;
gtk_widget_ref (sout_entry_target);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_entry_target", sout_entry_target,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_entry_target);
frame12 = gtk_frame_new (NULL);
gtk_widget_ref (frame12);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "frame12", frame12,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (frame12);
gtk_box_pack_start (GTK_BOX (vbox16), frame12, TRUE, TRUE, 0);
table6 = gtk_table_new (3, 5, FALSE);
gtk_widget_ref (table6);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "table6", table6,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (table6);
gtk_container_add (GTK_CONTAINER (frame12), table6);
gtk_table_set_row_spacings (GTK_TABLE (table6), 5);
gtk_table_set_col_spacings (GTK_TABLE (table6), 5);
sout_access_file = gtk_radio_button_new_with_label (sout_access_group, _("File"));
sout_access_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_access_file));
gtk_widget_ref (sout_access_file);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_access_file", sout_access_file,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_access_file);
gtk_table_attach (GTK_TABLE (table6), sout_access_file, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_access_udp = gtk_radio_button_new_with_label (sout_access_group, _("UDP"));
sout_access_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_access_udp));
gtk_widget_ref (sout_access_udp);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_access_udp", sout_access_udp,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_access_udp);
gtk_table_attach (GTK_TABLE (table6), sout_access_udp, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_access_rtp = gtk_radio_button_new_with_label (sout_access_group, _("RTP"));
sout_access_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_access_rtp));
gtk_widget_ref (sout_access_rtp);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_access_rtp", sout_access_rtp,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_access_rtp);
gtk_table_attach (GTK_TABLE (table6), sout_access_rtp, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_file_path_label = gtk_label_new (_("Path:"));
gtk_widget_ref (sout_file_path_label);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_file_path_label", sout_file_path_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_file_path_label);
gtk_table_attach (GTK_TABLE (table6), sout_file_path_label, 1, 2, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (sout_file_path_label), 0, 0.5);
combo6 = gtk_combo_new ();
gtk_widget_ref (combo6);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "combo6", combo6,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (combo6);
gtk_table_attach (GTK_TABLE (table6), combo6, 2, 5, 0, 1,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_file_path = GTK_COMBO (combo6)->entry;
gtk_widget_ref (sout_file_path);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_file_path", sout_file_path,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_file_path);
sout_udp_address_label = gtk_label_new (_("Address:"));
gtk_widget_ref (sout_udp_address_label);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_address_label", sout_udp_address_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_address_label);
gtk_table_attach (GTK_TABLE (table6), sout_udp_address_label, 1, 2, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (sout_udp_address_label), 0, 0.5);
sout_udp_address_combo = gtk_combo_new ();
gtk_widget_ref (sout_udp_address_combo);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_address_combo", sout_udp_address_combo,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_address_combo);
gtk_table_attach (GTK_TABLE (table6), sout_udp_address_combo, 2, 3, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
sout_udp_address = GTK_COMBO (sout_udp_address_combo)->entry;
gtk_widget_ref (sout_udp_address);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_address", sout_udp_address,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_address);
sout_udp_port_adj = gtk_adjustment_new (1234, 0, 65535, 1, 10, 10);
sout_udp_port = gtk_spin_button_new (GTK_ADJUSTMENT (sout_udp_port_adj), 1, 0);
gtk_widget_ref (sout_udp_port);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_port", sout_udp_port,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_port);
gtk_table_attach (GTK_TABLE (table6), sout_udp_port, 4, 5, 1, 2,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
hbox29 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox29);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "hbox29", hbox29,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox29);
gtk_table_attach (GTK_TABLE (table6), hbox29, 4, 5, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
sout_mux_ts = gtk_radio_button_new_with_label (sout_mux_group, _("TS"));
sout_mux_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_mux_ts));
gtk_widget_ref (sout_mux_ts);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_mux_ts", sout_mux_ts,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_mux_ts);
gtk_box_pack_start (GTK_BOX (hbox29), sout_mux_ts, FALSE, FALSE, 0);
sout_mux_ps = gtk_radio_button_new_with_label (sout_mux_group, _("PS"));
sout_mux_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_mux_ps));
gtk_widget_ref (sout_mux_ps);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_mux_ps", sout_mux_ps,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_mux_ps);
gtk_box_pack_start (GTK_BOX (hbox29), sout_mux_ps, FALSE, FALSE, 0);
sout_mux_avi = gtk_radio_button_new_with_label (sout_mux_group, _("AVI"));
sout_mux_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sout_mux_avi));
gtk_widget_ref (sout_mux_avi);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_mux_avi", sout_mux_avi,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_mux_avi);
gtk_box_pack_start (GTK_BOX (hbox29), sout_mux_avi, FALSE, FALSE, 0);
sout_udp_port_label = gtk_label_new (_("Port"));
gtk_widget_ref (sout_udp_port_label);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "sout_udp_port_label", sout_udp_port_label,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (sout_udp_port_label);
gtk_table_attach (GTK_TABLE (table6), sout_udp_port_label, 3, 4, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment (GTK_MISC (sout_udp_port_label), 0, 0.5);
hbox25 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox25);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "hbox25", hbox25,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox25);
gtk_box_pack_end (GTK_BOX (vbox15), hbox25, FALSE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (hbox25), 5);
hbox26 = gtk_hbox_new (FALSE, 0);
gtk_widget_ref (hbox26);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "hbox26", hbox26,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (hbox26);
gtk_box_pack_end (GTK_BOX (hbox25), hbox26, TRUE, TRUE, 3);
button1 = gtk_button_new_with_label (_("OK"));
gtk_widget_ref (button1);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "button1", button1,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button1);
gtk_box_pack_start (GTK_BOX (hbox26), button1, TRUE, TRUE, 2);
button2 = gtk_button_new_with_label (_("Cancel"));
gtk_widget_ref (button2);
gtk_object_set_data_full (GTK_OBJECT (intf_sout), "button2", button2,
(GtkDestroyNotify) gtk_widget_unref);
gtk_widget_show (button2);
gtk_box_pack_start (GTK_BOX (hbox26), button2, TRUE, TRUE, 2);
gtk_signal_connect (GTK_OBJECT (sout_access_file), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsAccessFile),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_access_udp), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsAccessUdp),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_access_rtp), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsAccessUdp),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_file_path), "changed",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_udp_address), "changed",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_udp_port), "changed",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_mux_ts), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_mux_ps), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (sout_mux_avi), "toggled",
GTK_SIGNAL_FUNC (GtkSoutSettingsChanged),
NULL);
gtk_signal_connect (GTK_OBJECT (button1), "clicked",
GTK_SIGNAL_FUNC (GtkSoutSettingsOk),
NULL);
gtk_signal_connect (GTK_OBJECT (button2), "clicked",
GTK_SIGNAL_FUNC (GtkSoutSettingsCancel),
NULL);
return intf_sout;
}
......@@ -10,3 +10,4 @@ GtkWidget* create_intf_file (void);
GtkWidget* create_intf_jump (void);
GtkWidget* create_intf_playlist (void);
GtkWidget* create_intf_messages (void);
GtkWidget* create_intf_sout (void);
......@@ -2,7 +2,7 @@
* gtk_open.c : functions to handle file/disc/network open widgets.
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: open.c,v 1.10 2003/01/21 17:00:41 fenrir Exp $
* $Id: open.c,v 1.11 2003/01/26 14:49:09 fenrir Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr>
......@@ -453,6 +453,28 @@ GtkOpenSubtitleShow (GtkButton *button,
}
}
/*****************************************************************************
* Open sout callbacks
*****************************************************************************
* The following callbacks are related to the sout
*****************************************************************************/
void GtkOpenSoutShow ( GtkButton *button,
gpointer user_data)
{
intf_thread_t * p_intf = GtkGetIntf( button );
if( GTK_TOGGLE_BUTTON( button )->active )
{
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "sout_settings" ) ), TRUE );
}
else
{
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "sout_settings" ) ), FALSE );
}
}
/******************************
******************************/
......@@ -538,6 +560,19 @@ static void GtkOpenShow( intf_thread_t *p_intf, int i_page )
/* subtitle stuff */
/* hide hbox_subtitle */
gtk_widget_hide_all( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "hbox_subtitle" ) ) );
/* sout */
psz_var = config_GetPsz( p_intf, "sout" );
if( psz_var && *psz_var )
{
gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "show_sout_settings" ), TRUE );
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "sout_settings" ) ), TRUE );
}
else
{
gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "show_sout_settings" ), FALSE );
gtk_widget_set_sensitive( GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( p_intf->p_sys->p_open ), "sout_settings" ) ), FALSE );
}
if( psz_var ) free( psz_var );
/* Set the right page */
setpage:
......@@ -601,6 +636,19 @@ void GtkOpenOk( GtkButton * button, gpointer user_data )
{
config_PutPsz( p_intf, "sub-file", "" );
}
/* export sout */
if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
"show_sout_settings" ) )->active )
{
char *psz_sout;
psz_sout = gtk_entry_get_text( GTK_ENTRY( lookup_widget( GTK_WIDGET( p_intf->p_sys->p_sout ), "sout_entry_target" ) ) );
config_PutPsz( p_intf, "sout", psz_sout );
}
else
{
config_PutPsz( p_intf, "sout", "" );
}
/* Enable the channel box when network channel is selected */
if( GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button),
......
/*****************************************************************************
* sout.c :
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
* $Id: sout.c,v 1.1 2003/01/26 14:49:09 fenrir Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <sys/types.h> /* off_t */
#include <stdlib.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#ifdef MODULE_NAME_IS_gnome
# include <gnome.h>
#else
# include <gtk/gtk.h>
#endif
#include <string.h>
#include "gtk_callbacks.h"
#include "gtk_interface.h"
#include "gtk_support.h"
#include "playlist.h"
#include "common.h"
#include "netutils.h"
void GtkSoutSettings ( GtkButton *button,
gpointer user_data );
void GtkSoutSettingsChanged ( GtkWidget *button, gpointer user_data);
void GtkSoutSettingsAccessFile (GtkToggleButton *togglebutton,
gpointer user_data)
{
GtkWidget * p_sout;
p_sout = gtk_widget_get_toplevel( GTK_WIDGET (togglebutton) );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_file_path_label" ),
gtk_toggle_button_get_active( togglebutton ) );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_file_path" ),
gtk_toggle_button_get_active( togglebutton ) );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_mux_ts" ), TRUE );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_mux_ps" ), TRUE );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_mux_avi" ), TRUE );
GtkSoutSettingsChanged( GTK_WIDGET( togglebutton ), user_data );
}
void GtkSoutSettingsAccessUdp (GtkToggleButton *togglebutton,
gpointer user_data)
{
GtkWidget * p_sout;
p_sout = gtk_widget_get_toplevel( GTK_WIDGET (togglebutton) );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_udp_address_label" ),
gtk_toggle_button_get_active( togglebutton ) );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_udp_address_combo" ),
gtk_toggle_button_get_active( togglebutton ) );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_udp_port_label" ),
gtk_toggle_button_get_active( togglebutton ) );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_udp_port" ),
gtk_toggle_button_get_active( togglebutton ) );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_mux_ts" ), TRUE );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_mux_ps" ), FALSE );
gtk_widget_set_sensitive( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_mux_avi" ), FALSE );
gtk_toggle_button_set_active( gtk_object_get_data( GTK_OBJECT( p_sout ),
"sout_mux_ts" ), TRUE );
GtkSoutSettingsChanged( GTK_WIDGET( togglebutton ), user_data );
}
void GtkSoutSettingsChanged ( GtkWidget *button,
gpointer user_data)
{
#define SELECTED( s ) GTK_TOGGLE_BUTTON( lookup_widget( GTK_WIDGET(button), \
(s) ) )->active
//intf_thread_t * p_intf = GtkGetIntf( button );
GString * p_target;
p_target = g_string_new( "" );
/* first set access */
if( SELECTED( "sout_access_file" ) )
{
g_string_append( p_target, "file/" );
}
else if( SELECTED( "sout_access_udp" ) )
{
g_string_append( p_target, "udp/" );
}
else if( SELECTED( "sout_access_rtp" ) )
{
g_string_append( p_target, "rtp/" );
}
/* then set muxer */
if( SELECTED( "sout_mux_ts" ) )
{
g_string_append( p_target, "ts://" );
}
else if( SELECTED( "sout_mux_ps" ) )
{
g_string_append( p_target, "ps://" );
}
else if( SELECTED( "sout_mux_avi" ) )
{
g_string_append( p_target, "avi://" );
}
/* last part of the url */
if( SELECTED( "sout_access_file" ) )
{
g_string_append( p_target,
gtk_entry_get_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "sout_file_path" ) ) ) );
}
else if( SELECTED( "sout_access_udp" ) || SELECTED( "sout_access_rtp" ) )
{
g_string_append( p_target,
gtk_entry_get_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "sout_udp_address" ) ) ) );
g_string_append( p_target, ":" );
g_string_sprintfa( p_target, "%i",
gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( lookup_widget(
GTK_WIDGET(button), "sout_udp_port" ) ) ) );
}
gtk_entry_set_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "sout_entry_target" ) ),
p_target->str );
g_string_free( p_target, TRUE );
}
/****************************************************************************/
void GtkSoutSettingsOk ( GtkButton *button,
gpointer user_data)
{
/* Hide the dialog box */
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
/* set sout */
#if 0
psz_target = gtk_entry_get_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "sout_entry_target" ) ) );
config_PutPsz( p_intf, "sout", psz_target );
#endif
}
void GtkSoutSettingsCancel ( GtkButton *button,
gpointer user_data)
{
/* Hide the dialog box */
gtk_widget_hide( gtk_widget_get_toplevel( GTK_WIDGET (button) ) );
}
void GtkSoutSettings ( GtkButton *button,
gpointer user_data )
{
intf_thread_t * p_intf = GtkGetIntf( button );
gtk_widget_show( p_intf->p_sys->p_sout );
gdk_window_raise( p_intf->p_sys->p_sout->window );
}
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