vlc_value_t val_list;
/* Source */
- mvnprintw( y++, 0, COLS, " Source : %s", p_input->psz_source );
+ mvnprintw( y++, 0, COLS, " Source : %s",
+ p_input->input.p_item->psz_uri );
/* State */
var_Get( p_input, "state", &val );
if( p_input )
{
int i,j;
- vlc_mutex_lock( &p_input->p_item->lock );
- for ( i = 0; i < p_input->p_item->i_categories; i++ )
+ vlc_mutex_lock( &p_input->input.p_item->lock );
+ for ( i = 0; i < p_input->input.p_item->i_categories; i++ )
{
- info_category_t *p_category = p_input->p_item->pp_categories[i];
+ info_category_t *p_category = p_input->input.p_item->pp_categories[i];
if( y >= y_end ) break;
MainBoxWrite( p_intf, l++, 1, " [%s]", p_category->psz_name );
for ( j = 0; j < p_category->i_infos; j++ )
MainBoxWrite( p_intf, l++, 1, " %s: %s", p_info->psz_name, p_info->psz_value );
}
}
- vlc_mutex_unlock( &p_input->p_item->lock );
+ vlc_mutex_unlock( &p_input->input.p_item->lock );
}
else
{
seekpoint_t bookmark;
vlc_value_t pos;
+ bookmark.psz_name = NULL;
+ bookmark.i_byte_offset = 0;
+ bookmark.i_time_offset = 0;
+
+
+ /* FIXME --fenrir
+ * - stream_Tell can't be use (not reentrant)
+ * - nobody except src/input/ could touch p_input
+ * -> create new INPUT_CONTROL ...
+ */
+#if 0
var_Get( p_input, "position", &pos );
bookmark.psz_name = NULL;
- bookmark.i_byte_offset =
- (int64_t)((double)pos.f_float * p_input->stream.p_selected_area->i_size);
+ bookmark.i_byte_offset = stream_Tell( p_input->input.p_stream );
+ (int64_t)((double)pos.f_float * p_input->input.p_access->info.i_size);
var_Get( p_input, "time", &pos );
bookmark.i_time_offset = pos.i_time;
input_Control( p_input, INPUT_ADD_BOOKMARK, &bookmark );
-
+#endif
vlc_object_release( p_input );
Update();
if( i_first < i_bookmarks && i_second <= i_bookmarks )
{
WizardDialog *p_wizard_dialog = new WizardDialog( p_intf, this,
- p_input->p_item->psz_uri,
+ p_input->input.p_item->psz_uri,
pp_bookmarks[i_first]->i_time_offset/1000000,
pp_bookmarks[i_second]->i_time_offset/1000000 );
vlc_object_release( p_input );
#include <vlc/vlc.h>
#include <vlc/aout.h>
#include <vlc/intf.h>
-#include "stream_control.h"
#include "wxwindows.h"
{
input_thread_t *p_input = p_intf->p_sys->p_input;
- if( !p_input || p_input->b_dead || !p_input->psz_name )
+ if( !p_input || p_input->b_dead || p_input->input.p_item->psz_name )
{
if( fileinfo_root )
{
* retrieved with the GetItemText() method, but it doesn't work on
* Windows when the wxTR_HIDE_ROOT style is set. That's why we need to
* use the fileinfo_root_label variable... */
- fileinfo_root = fileinfo_tree->AddRoot( wxL2U(p_input->psz_name) );
- fileinfo_root_label = wxL2U(p_input->psz_name);
+ fileinfo_root = fileinfo_tree->AddRoot( wxL2U(p_input->input.p_item->psz_name) );
+ fileinfo_root_label = wxL2U(p_input->input.p_item->psz_name);
}
- else if( fileinfo_root_label == wxL2U(p_input->psz_name) )
+ else if( fileinfo_root_label == wxL2U(p_input->input.p_item->psz_name) )
{
return;
}
/* We rebuild the tree from scratch */
fileinfo_tree->DeleteChildren( fileinfo_root );
- fileinfo_root_label = wxL2U(p_input->psz_name);
+ fileinfo_root_label = wxL2U(p_input->input.p_item->psz_name);
- vlc_mutex_lock( &p_input->p_item->lock );
- for( int i = 0; i < p_input->p_item->i_categories; i++ )
+ vlc_mutex_lock( &p_input->input.p_item->lock );
+ for( int i = 0; i < p_input->input.p_item->i_categories; i++ )
{
- info_category_t *p_cat = p_input->p_item->pp_categories[i];
+ info_category_t *p_cat = p_input->input.p_item->pp_categories[i];
wxTreeItemId cat = fileinfo_tree->AppendItem( fileinfo_root,
wxL2U(p_cat->psz_name) );
}
fileinfo_tree->Expand( cat );
}
- vlc_mutex_unlock( &p_input->p_item->lock );
+ vlc_mutex_unlock( &p_input->input.p_item->lock );
return;
}
#include <vlc/aout.h>
#include <vlc/vout.h>
#include <vlc/intf.h>
-#include "stream_control.h"
#include "wxwindows.h"
return;
}
- vlc_mutex_lock( &p_playlist->object_lock );
+ /* FIXME --fenrir */
+#if 0
if( p_playlist->p_input != NULL )
{
vlc_mutex_lock( &p_playlist->p_input->stream.stream_lock );
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
}
vlc_mutex_unlock( &p_playlist->object_lock );
+#endif
playlist_Prev( p_playlist );
vlc_object_release( p_playlist );
return;
}
+ /* FIXME --fenrir */
+#if 0
+ var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val, NULL );
vlc_mutex_lock( &p_playlist->object_lock );
if( p_playlist->p_input != NULL )
{
vlc_mutex_unlock( &p_playlist->p_input->stream.stream_lock );
}
vlc_mutex_unlock( &p_playlist->object_lock );
-
+#endif
playlist_Next( p_playlist );
vlc_object_release( p_playlist );
}
p_intf = _p_intf;
p_main_interface = _p_main_interface;
i_old_playing_status = PAUSE_S;
- i_old_rate = DEFAULT_RATE;
+ i_old_rate = INPUT_RATE_DEFAULT;
/* Register callback for the intf-popupmenu variable */
playlist_t *p_playlist =
b_old_seekable = VLC_FALSE;
p_main_interface->statusbar->SetStatusText(
- wxU(p_intf->p_sys->p_input->p_item->psz_name), 2 );
+ wxU(p_intf->p_sys->p_input->input.p_item->psz_name), 2 );
p_main_interface->TogglePlayButton( PLAYING_S );
i_old_playing_status = PLAYING_S;
if( p_intf->p_sys->p_input )
{
input_thread_t *p_input = p_intf->p_sys->p_input;
-
- vlc_mutex_lock( &p_input->stream.stream_lock );
+ vlc_value_t val;
if( !p_input->b_die )
{
+ vlc_value_t pos;
+
/* New input or stream map change */
p_intf->p_sys->b_playing = 1;
/* Manage the slider */
+ /* FIXME --fenrir */
+ /* Change the name of b_old_seekable into b_show_bar or something like that */
+ var_Get( p_input, "position", &pos );
+
+ if( !b_old_seekable )
+ {
+ if( pos.f_float > 0.0 )
+ {
+ /* Done like this, as it's the only way to know if the slider
+ * has to be displayed */
+ b_old_seekable = VLC_TRUE;
+ p_main_interface->slider_frame->Show();
+ p_main_interface->frame_sizer->Show(
+ p_main_interface->slider_frame );
+ p_main_interface->frame_sizer->Layout();
+ p_main_interface->frame_sizer->Fit( p_main_interface );
+
+ }
+ }
+
+ if( p_intf->p_sys->b_playing && b_old_seekable )
+ {
+ /* Update the slider if the user isn't dragging it. */
+ if( p_intf->p_sys->b_slider_free )
+ {
+ char psz_time[ MSTRTIME_MAX_SIZE ];
+ char psz_total[ MSTRTIME_MAX_SIZE ];
+ vlc_value_t time;
+ mtime_t i_seconds;
+
+ /* Update the value */
+ if( pos.f_float >= 0.0 )
+ {
+ p_intf->p_sys->i_slider_pos =
+ (int)(SLIDER_MAX_POS * pos.f_float);
+
+ p_main_interface->slider->SetValue(
+ p_intf->p_sys->i_slider_pos );
+
+ var_Get( p_intf->p_sys->p_input, "time", &time );
+ i_seconds = time.i_time / 1000000;
+ secstotimestr ( psz_time, i_seconds );
+
+ var_Get( p_intf->p_sys->p_input, "length", &time );
+ i_seconds = time.i_time / 1000000;
+ secstotimestr ( psz_total, i_seconds );
+
+ p_main_interface->statusbar->SetStatusText(
+ wxU(psz_time) + wxString(wxT(" / ")) +
+ wxU(psz_total), 0 );
+ }
+ }
+ }
+#if 0
+ vlc_mutex_lock( &p_input->stream.stream_lock );
if( p_intf->p_sys->p_input->stream.b_seekable && !b_old_seekable )
{
/* Done like this because b_seekable is set slightly after
}
}
}
-
+ vlc_mutex_unlock( &p_input->stream.stream_lock );
+#endif
/* Take care of the volume, etc... */
p_main_interface->Update();
/* Manage Playing status */
- if( i_old_playing_status != p_input->stream.control.i_status )
+ var_Get( p_input, "state", &val );
+ if( i_old_playing_status != val.i_int )
{
- if( p_input->stream.control.i_status == PAUSE_S )
+ if( val.i_int == PAUSE_S )
{
p_main_interface->TogglePlayButton( PAUSE_S );
}
{
p_main_interface->TogglePlayButton( PLAYING_S );
}
- i_old_playing_status = p_input->stream.control.i_status;
+ i_old_playing_status = val.i_int;
}
/* Manage Speed status */
- if( i_old_rate != p_input->stream.control.i_rate )
+ var_Get( p_input, "rate", &val );
+ if( i_old_rate != val.i_int )
{
p_main_interface->statusbar->SetStatusText(
wxString::Format(wxT("x%.2f"),
- 1000.0 / p_input->stream.control.i_rate), 1 );
- i_old_rate = p_input->stream.control.i_rate;
+ (float)INPUT_RATE_DEFAULT / val.i_int ), 1 );
+ i_old_rate = val.i_int;
}
}
- vlc_mutex_unlock( &p_input->stream.stream_lock );
}
else if( p_intf->p_sys->b_playing && !p_intf->b_die )
{
#include <vlc/vlc.h>
#include <vlc/vout.h>
#include <vlc/intf.h>
-#include "stream_control.h"
#include "wxwindows.h"