1 /*****************************************************************************
2 * pda.c : PDA Gtk2 plugin for vlc
3 *****************************************************************************
4 * Copyright (C) 2002 VideoLAN
5 * $Id: pda.c,v 1.6 2003/11/07 07:59:00 jpsaman Exp $
7 * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
8 * Marc Ariberti <marcari@videolan.org>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
25 /*****************************************************************************
27 *****************************************************************************/
28 #include <stdlib.h> /* malloc(), free() */
29 #include <errno.h> /* ENOMEM */
30 #include <string.h> /* strerror() */
38 #include "pda_callbacks.h"
39 #include "pda_interface.h"
40 #include "pda_support.h"
43 /*****************************************************************************
45 *****************************************************************************/
46 static int Open ( vlc_object_t * );
47 static void Close ( vlc_object_t * );
48 static void Run ( intf_thread_t * );
50 void GtkAutoPlayFile ( vlc_object_t * );
51 static int Manage ( intf_thread_t *p_intf );
52 void E_(GtkDisplayDate) ( GtkAdjustment *p_adj );
53 gint E_(GtkModeManage) ( intf_thread_t * p_intf );
55 /*****************************************************************************
57 *****************************************************************************/
58 #define AUTOPLAYFILE_TEXT N_("Autoplay selected file")
59 #define AUTOPLAYFILE_LONGTEXT N_("Automatically play a file when selected in the "\
60 "file selection list")
62 /*****************************************************************************
64 *****************************************************************************/
66 add_category_hint( N_("Miscellaneous"), NULL, VLC_TRUE );
67 // add_bool( "pda-autoplayfile", 1, GtkAutoPlayFile, AUTOPLAYFILE_TEXT, AUTOPLAYFILE_LONGTEXT, VLC_TRUE );
68 set_description( _("PDA Linux Gtk2+ interface") );
69 set_capability( "interface", 70 );
70 set_callbacks( Open, Close );
71 add_shortcut( "pda" );
74 /*****************************************************************************
75 * Open: initialize and create window
76 *****************************************************************************/
77 static int Open( vlc_object_t *p_this )
79 intf_thread_t *p_intf = (intf_thread_t *)p_this;
81 /* Allocate instance and initialize some members */
82 p_intf->p_sys = malloc( sizeof( intf_sys_t ) );
83 if( p_intf->p_sys == NULL )
85 msg_Err( p_intf, "out of memory" );
90 msg_Dbg( p_intf, "Using gui-helper" );
91 p_intf->p_sys->p_gtk_main = module_Need( p_this, "gui-helper", "gtk2" );
92 if( p_intf->p_sys->p_gtk_main == NULL )
94 free( p_intf->p_sys );
99 /* Initialize Gtk+ thread */
100 p_intf->p_sys->p_input = NULL;
102 p_intf->p_sys->b_autoplayfile = 1;
103 p_intf->p_sys->b_playing = 0;
104 p_intf->p_sys->b_slider_free = 1;
106 p_intf->pf_run = Run;
111 /*****************************************************************************
112 * Close: destroy interface window
113 *****************************************************************************/
114 static void Close( vlc_object_t *p_this )
116 intf_thread_t *p_intf = (intf_thread_t *)p_this;
118 if( p_intf->p_sys->p_input )
120 vlc_object_release( p_intf->p_sys->p_input );
123 #ifdef NEED_GTK2_MAIN
124 msg_Dbg( p_intf, "Releasing gui-helper" );
125 module_Unneed( p_intf, p_intf->p_sys->p_gtk_main );
128 /* Destroy structure */
129 free( p_intf->p_sys );
132 /*****************************************************************************
134 *****************************************************************************
135 * this part of the interface is in a separate thread so that we can call
136 * gtk_main() from within it without annoying the rest of the program.
137 *****************************************************************************/
138 static void Run( intf_thread_t *p_intf )
140 #ifndef NEED_GTK2_MAIN
141 /* gtk_init needs to know the command line. We don't care, so we
142 * give it an empty one */
143 char *p_args[] = { "", NULL };
144 char **pp_args = p_args;
148 GtkCellRenderer *renderer = NULL;
149 GtkTreeViewColumn *column = NULL;
152 #ifndef NEED_GTK2_MAIN
153 msg_Dbg( p_intf, "Starting pda GTK2+ interface" );
154 gtk_init( &i_args, &pp_args );
156 /* Initialize Gtk+ */
157 msg_Dbg( p_intf, "Starting pda GTK+ interface thread" );
161 /* Create some useful widgets that will certainly be used */
163 add_pixmap_directory("share");
164 add_pixmap_directory("/usr/share/vlc");
166 /* Path for pixmaps under linupy 1.4 */
167 add_pixmap_directory("/usr/local/share/pixmaps/vlc");
169 /* Path for pixmaps under linupy 2.0 */
170 add_pixmap_directory("/usr/share/pixmaps/vlc");
172 p_intf->p_sys->p_window = create_pda();
173 if (p_intf->p_sys->p_window == NULL)
175 msg_Err( p_intf, "unable to create pda interface" );
179 msg_Dbg( p_intf, "setting main window size ... " );
180 gtk_widget_set_usize(p_intf->p_sys->p_window,
181 gdk_screen_width() , gdk_screen_height() - 30 );
182 msg_Dbg( p_intf, "setting main window size ... done" );
185 /* Set the title of the main window */
186 gtk_window_set_title( GTK_WINDOW(p_intf->p_sys->p_window),
187 VOUT_TITLE " (PDA Linux interface)");
189 /* Get the notebook object */
190 p_intf->p_sys->p_notebook = GTK_NOTEBOOK( gtk_object_get_data(
191 GTK_OBJECT( p_intf->p_sys->p_window ), "notebook" ) );
192 p_intf->p_sys->p_mediabook = GTK_NOTEBOOK( gtk_object_get_data(
193 GTK_OBJECT( p_intf->p_sys->p_window ), "mediabook" ) );
195 /* Get the slider object */
196 p_intf->p_sys->p_slider = GTK_HSCALE( gtk_object_get_data(
197 GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) );
198 p_intf->p_sys->p_slider_label = GTK_LABEL( gtk_object_get_data(
199 GTK_OBJECT( p_intf->p_sys->p_window ), "slider_label" ) );
202 /* Connect the date display to the slider */
203 msg_Dbg( p_intf, "setting slider adjustment ... " );
204 #define P_SLIDER GTK_RANGE( gtk_object_get_data( \
205 GTK_OBJECT( p_intf->p_sys->p_window ), "slider" ) )
206 p_intf->p_sys->p_adj = gtk_range_get_adjustment( P_SLIDER );
208 gtk_signal_connect ( GTK_OBJECT( p_intf->p_sys->p_adj ), "value_changed",
209 GTK_SIGNAL_FUNC( E_(GtkDisplayDate) ), NULL );
210 p_intf->p_sys->f_adj_oldvalue = 0;
211 p_intf->p_sys->i_adj_oldvalue = 0;
213 msg_Dbg( p_intf, "setting slider adjustment ... done" );
216 /* BEGIN OF FILEVIEW GTK_TREE_VIEW */
217 msg_Dbg(p_intf, "Getting GtkTreeView FileList" );
218 p_intf->p_sys->p_tvfile = NULL;
219 p_intf->p_sys->p_tvfile = (GtkTreeView *) lookup_widget( p_intf->p_sys->p_window,
221 if (NULL == p_intf->p_sys->p_tvfile)
222 msg_Err(p_intf, "Error obtaining pointer to File List");
224 /* Insert columns 0 */
225 renderer = gtk_cell_renderer_text_new ();
226 gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 0, _("Filename"), renderer, NULL);
227 column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 0 );
228 gtk_tree_view_column_add_attribute(column, renderer, "text", 0 );
229 /* Insert columns 1 */
230 renderer = gtk_cell_renderer_text_new ();
231 gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 1, _("Permissions"), renderer, NULL);
232 column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 1 );
233 gtk_tree_view_column_add_attribute(column, renderer, "text", 1 );
234 /* Insert columns 2 */
235 renderer = gtk_cell_renderer_text_new ();
236 gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 2, _("Size"), renderer, NULL);
237 column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 2 );
238 gtk_tree_view_column_add_attribute(column, renderer, "text", 2 );
239 /* Insert columns 3 */
240 renderer = gtk_cell_renderer_text_new ();
241 gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 3, _("Owner"), renderer, NULL);
242 column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 3 );
243 gtk_tree_view_column_add_attribute(column, renderer, "text", 3 );
244 /* Insert columns 4 */
245 renderer = gtk_cell_renderer_text_new ();
246 gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvfile, 4, _("Group"), renderer, NULL);
247 column = gtk_tree_view_get_column(p_intf->p_sys->p_tvfile, 4 );
248 gtk_tree_view_column_add_attribute(column, renderer, "text", 4 );
250 /* Get new directory listing */
251 msg_Dbg(p_intf, "Populating GtkTreeView FileList" );
252 p_intf->p_sys->p_filelist = gtk_list_store_new (5,
253 G_TYPE_STRING, /* Filename */
254 G_TYPE_STRING, /* permissions */
255 G_TYPE_UINT64, /* File size */
256 G_TYPE_STRING, /* Owner */
257 G_TYPE_STRING);/* Group */
258 ReadDirectory(p_intf, p_intf->p_sys->p_filelist, ".");
259 msg_Dbg(p_intf, "Showing GtkTreeView FileList" );
260 gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile), GTK_TREE_MODEL(p_intf->p_sys->p_filelist));
261 g_object_unref(p_intf->p_sys->p_filelist); /* Model will be released by GtkTreeView */
262 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile)),GTK_SELECTION_MULTIPLE);
264 /* Column properties */
265 gtk_tree_view_set_headers_visible(p_intf->p_sys->p_tvfile, TRUE);
266 gtk_tree_view_columns_autosize(p_intf->p_sys->p_tvfile);
267 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(p_intf->p_sys->p_tvfile),TRUE);
268 /* END OF FILEVIEW GTK_TREE_VIEW */
270 /* BEGIN OF PLAYLIST GTK_TREE_VIEW */
271 msg_Dbg(p_intf, "Getting GtkTreeView PlayList" );
272 p_intf->p_sys->p_tvplaylist = NULL;
273 p_intf->p_sys->p_tvplaylist = (GtkTreeView *) lookup_widget( p_intf->p_sys->p_window,
275 if (NULL == p_intf->p_sys->p_tvplaylist)
276 msg_Err(p_intf, "Error obtaining pointer to Play List");
279 renderer = gtk_cell_renderer_text_new ();
280 gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 0, _("Filename"), renderer, NULL);
281 column = gtk_tree_view_get_column(p_intf->p_sys->p_tvplaylist, 0 );
282 gtk_tree_view_column_add_attribute(column, renderer, "text", 0 );
284 renderer = gtk_cell_renderer_text_new ();
285 gtk_tree_view_insert_column_with_attributes(p_intf->p_sys->p_tvplaylist, 1, _("Time"), renderer, NULL);
286 column = gtk_tree_view_get_column(p_intf->p_sys->p_tvplaylist, 1 );
287 gtk_tree_view_column_add_attribute(column, renderer, "text", 1 );
289 /* update the playlist */
290 msg_Dbg(p_intf, "Populating GtkTreeView Playlist" );
291 p_intf->p_sys->p_playlist = gtk_list_store_new (2,
292 G_TYPE_STRING, /* Filename */
293 G_TYPE_STRING);/* Time */
294 PlaylistRebuildListStore( p_intf->p_sys->p_playlist, vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ));
295 msg_Dbg(p_intf, "Showing GtkTreeView Playlist" );
296 gtk_tree_view_set_model(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist), GTK_TREE_MODEL(p_intf->p_sys->p_playlist));
297 g_object_unref(p_intf->p_sys->p_playlist);
298 gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(p_intf->p_sys->p_tvplaylist)),GTK_SELECTION_MULTIPLE);
300 /* Column properties */
301 gtk_tree_view_set_headers_visible(p_intf->p_sys->p_tvplaylist, TRUE);
302 gtk_tree_view_columns_autosize(p_intf->p_sys->p_tvplaylist);
303 gtk_tree_view_set_headers_clickable(p_intf->p_sys->p_tvplaylist, TRUE);
304 /* END OF PLAYLIST GTK_TREE_VIEW */
306 /* Save MRL entry object */
307 p_intf->p_sys->p_mrlentry = GTK_ENTRY( gtk_object_get_data(
308 GTK_OBJECT( p_intf->p_sys->p_window ), "mrl_entry" ) );
311 /* Store p_intf to keep an eye on it */
312 msg_Dbg( p_intf, "trying to store p_intf pointer ... " );
313 gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_window),
315 gtk_object_set_data( GTK_OBJECT(p_intf->p_sys->p_adj),
317 msg_Dbg( p_intf, "trying to store p_intf pointer ... done" );
320 /* Show the control window */
321 gtk_widget_show( p_intf->p_sys->p_window );
323 #ifdef NEED_GTK2_MAIN
324 msg_Dbg( p_intf, "Manage GTK keyboard events using threads" );
325 while( !p_intf->b_die )
329 /* Sleep to avoid using all CPU - since some interfaces need to
330 * access keyboard events, a 100ms delay is a good compromise */
332 if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
333 msleep( INTF_IDLE_SLEEP );
339 msg_Dbg( p_intf, "Manage GTK keyboard events using timeouts" );
340 /* Sleep to avoid using all CPU - since some interfaces needs to access
341 * keyboard events, a 1000ms delay is a good compromise */
342 if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
343 i_dummy = gtk_timeout_add( INTF_IDLE_SLEEP / 1000, (GtkFunction)Manage, p_intf );
345 i_dummy = gtk_timeout_add( 1000, (GtkFunction)Manage, p_intf );
349 /* Remove the timeout */
350 gtk_timeout_remove( i_dummy );
353 gtk_object_destroy( GTK_OBJECT(p_intf->p_sys->p_window) );
354 #ifdef NEED_GTK2_MAIN
359 /*****************************************************************************
360 * GtkAutoplayFile: Autoplay file depending on configuration settings
361 *****************************************************************************/
362 void GtkAutoPlayFile( vlc_object_t *p_this )
364 GtkWidget *cbautoplay;
365 intf_thread_t *p_intf;
367 vlc_list_t *p_list = vlc_list_find( p_this, VLC_OBJECT_INTF,
370 for( i_index = 0; i_index < p_list->i_count; i_index++ )
372 p_intf = (intf_thread_t *)p_list->p_values[i_index].p_object ;
374 if( strcmp( MODULE_STRING, p_intf->p_module->psz_object_name ) )
378 cbautoplay = GTK_WIDGET( gtk_object_get_data(
379 GTK_OBJECT( p_intf->p_sys->p_window ),
382 if( !config_GetInt( p_this, "pda-autoplayfile" ) )
384 p_intf->p_sys->b_autoplayfile = VLC_FALSE;
388 p_intf->p_sys->b_autoplayfile = VLC_TRUE;
390 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( cbautoplay ),
391 p_intf->p_sys->b_autoplayfile );
393 vlc_list_release( p_list );
396 /* following functions are local */
398 /*****************************************************************************
399 * Manage: manage main thread messages
400 *****************************************************************************
401 * In this function, called approx. 10 times a second, we check what the
402 * main program wanted to tell us.
403 *****************************************************************************/
404 static int Manage( intf_thread_t *p_intf )
406 GtkListStore *p_liststore;
407 vlc_mutex_lock( &p_intf->change_lock );
409 /* Update the input */
410 if( p_intf->p_sys->p_input == NULL )
412 p_intf->p_sys->p_input = vlc_object_find( p_intf, VLC_OBJECT_INPUT,
415 else if( p_intf->p_sys->p_input->b_dead )
417 vlc_object_release( p_intf->p_sys->p_input );
418 p_intf->p_sys->p_input = NULL;
421 if( p_intf->p_sys->p_input )
423 input_thread_t *p_input = p_intf->p_sys->p_input;
425 vlc_mutex_lock( &p_input->stream.stream_lock );
426 if( !p_input->b_die )
428 /* New input or stream map change */
429 if( p_input->stream.b_changed )
431 playlist_t *p_playlist;
433 E_(GtkModeManage)( p_intf );
434 p_intf->p_sys->b_playing = 1;
436 /* update playlist interface */
437 p_playlist = (playlist_t *) vlc_object_find(
438 p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
439 if (p_playlist != NULL)
441 msg_Dbg(p_intf, "Manage: Populating GtkTreeView Playlist" );
442 p_liststore = gtk_list_store_new (2,
445 PlaylistRebuildListStore(p_liststore, p_playlist);
446 msg_Dbg(p_intf, "Manage: Updating GtkTreeView Playlist" );
447 gtk_tree_view_set_model(p_intf->p_sys->p_tvplaylist, (GtkTreeModel*) p_liststore);
451 /* Manage the slider */
452 if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
454 /* Manage the slider for CPU_CAPABILITY_FPU hardware */
455 if( p_input->stream.b_seekable && p_intf->p_sys->b_playing )
457 float newvalue = p_intf->p_sys->p_adj->value;
459 #define p_area p_input->stream.p_selected_area
460 /* If the user hasn't touched the slider since the last time,
461 * then the input can safely change it */
462 if( newvalue == p_intf->p_sys->f_adj_oldvalue )
464 /* Update the value */
465 p_intf->p_sys->p_adj->value =
466 p_intf->p_sys->f_adj_oldvalue =
467 ( 100. * p_area->i_tell ) / p_area->i_size;
468 gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
471 /* Otherwise, send message to the input if the user has
472 * finished dragging the slider */
473 else if( p_intf->p_sys->b_slider_free )
475 off_t i_seek = ( newvalue * p_area->i_size ) / 100;
477 /* release the lock to be able to seek */
478 vlc_mutex_unlock( &p_input->stream.stream_lock );
479 input_Seek( p_input, i_seek, INPUT_SEEK_SET );
480 vlc_mutex_lock( &p_input->stream.stream_lock );
482 /* Update the old value */
483 p_intf->p_sys->f_adj_oldvalue = newvalue;
490 /* Manage the slider without CPU_CAPABILITY_FPU hardware */
491 if( p_input->stream.b_seekable && p_intf->p_sys->b_playing )
493 off_t newvalue = p_intf->p_sys->p_adj->value;
495 #define p_area p_input->stream.p_selected_area
496 /* If the user hasn't touched the slider since the last time,
497 * then the input can safely change it */
498 if( newvalue == p_intf->p_sys->i_adj_oldvalue )
500 /* Update the value */
501 p_intf->p_sys->p_adj->value =
502 p_intf->p_sys->i_adj_oldvalue =
503 ( 100 * p_area->i_tell ) / p_area->i_size;
504 gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
507 /* Otherwise, send message to the input if the user has
508 * finished dragging the slider */
509 else if( p_intf->p_sys->b_slider_free )
511 off_t i_seek = ( newvalue * p_area->i_size ) / 100;
513 /* release the lock to be able to seek */
514 vlc_mutex_unlock( &p_input->stream.stream_lock );
515 input_Seek( p_input, i_seek, INPUT_SEEK_SET );
516 vlc_mutex_lock( &p_input->stream.stream_lock );
518 /* Update the old value */
519 p_intf->p_sys->i_adj_oldvalue = newvalue;
525 vlc_mutex_unlock( &p_input->stream.stream_lock );
527 else if( p_intf->p_sys->b_playing && !p_intf->b_die )
529 E_(GtkModeManage)( p_intf );
530 p_intf->p_sys->b_playing = 0;
533 #ifndef NEED_GTK2_MAIN
536 vlc_mutex_unlock( &p_intf->change_lock );
538 /* Prepare to die, young Skywalker */
545 vlc_mutex_unlock( &p_intf->change_lock );
550 /*****************************************************************************
551 * GtkDisplayDate: display stream date
552 *****************************************************************************
553 * This function displays the current date related to the position in
554 * the stream. It is called whenever the slider changes its value.
555 * The lock has to be taken before you call the function.
556 *****************************************************************************/
557 void E_(GtkDisplayDate)( GtkAdjustment *p_adj )
559 intf_thread_t *p_intf;
561 p_intf = gtk_object_get_data( GTK_OBJECT( p_adj ), "p_intf" );
563 if( p_intf->p_sys->p_input )
565 #define p_area p_intf->p_sys->p_input->stream.p_selected_area
566 char psz_time[ OFFSETTOTIME_MAX_SIZE ];
568 gtk_label_set_text( GTK_LABEL( p_intf->p_sys->p_slider_label ),
569 input_OffsetToTime( p_intf->p_sys->p_input, psz_time,
570 ( p_area->i_size * p_adj->value ) / 100 ) );
575 /*****************************************************************************
576 * GtkModeManage: actualize the aspect of the interface whenever the input
578 *****************************************************************************
579 * The lock has to be taken before you call the function.
580 *****************************************************************************/
581 gint E_(GtkModeManage)( intf_thread_t * p_intf )
583 GtkWidget * p_slider;
584 vlc_bool_t b_control;
586 #define GETWIDGET( ptr, name ) GTK_WIDGET( gtk_object_get_data( GTK_OBJECT( \
587 p_intf->p_sys->ptr ) , ( name ) ) )
589 p_slider = GTK_WIDGET( gtk_object_get_data( GTK_OBJECT(
590 p_intf->p_sys->p_window ), "slider" ) );
591 gtk_widget_hide( GTK_WIDGET( p_slider ) );
593 /* controls unavailable */
596 /* show the box related to current input mode */
597 if( p_intf->p_sys->p_input )
599 /* initialize and show slider for seekable streams */
600 if( p_intf->p_sys->p_input->stream.b_seekable )
602 if (p_intf->p_libvlc->i_cpu & CPU_CAPABILITY_FPU)
603 p_intf->p_sys->p_adj->value = p_intf->p_sys->f_adj_oldvalue = 0;
605 p_intf->p_sys->p_adj->value = p_intf->p_sys->i_adj_oldvalue = 0;
606 gtk_signal_emit_by_name( GTK_OBJECT( p_intf->p_sys->p_adj ),
608 gtk_widget_show( GTK_WIDGET( p_slider ) );
611 /* control buttons for free pace streams */
612 b_control = p_intf->p_sys->p_input->stream.b_pace_control;
614 p_intf->p_sys->p_input->stream.b_changed = 0;
615 msg_Dbg( p_intf, "stream has changed, refreshing interface" );
618 /* set control items */
619 gtk_widget_set_sensitive( GETWIDGET(p_window, "tbRewind"), b_control );
620 gtk_widget_set_sensitive( GETWIDGET(p_window, "tbPause"), b_control );
621 gtk_widget_set_sensitive( GETWIDGET(p_window, "tbForward"), b_control );