wxListView *list_ctrl;
};
+
+/*****************************************************************************
+ * Event Table.
+ *****************************************************************************/
+
DEFINE_LOCAL_EVENT_TYPE( wxEVT_BOOKMARKS );
BEGIN_EVENT_TABLE(BookmarksDialog, wxFrame)
p_seekpoint->psz_name : "" ),
wxDefaultPosition, wxSize( 100, 20) );
time_text = new wxTextCtrl( this, -1, wxString::Format(wxT("%d"),
- p_seekpoint->i_time_offset/1000000 ),
+ (int)(p_seekpoint->i_time_offset / 1000000) ),
wxDefaultPosition, wxSize( 100, 20) );
bytes_text = new wxTextCtrl( this, -1, wxString::Format(wxT("%d"),
- p_seekpoint->i_byte_offset ),
+ (int)p_seekpoint->i_byte_offset ),
wxDefaultPosition, wxSize( 100, 20) );
sizer->Add( new wxStaticText( this, -1, wxU(_("Name") ) ), 0, wxLEFT, 5 );
panel_sizer->Add( button_add, 0, wxEXPAND );
panel_sizer->Add( button_del, 0, wxEXPAND );
panel_sizer->Add( button_clear, 0, wxEXPAND );
+
panel_sizer->Add( button_edit, 0, wxEXPAND );
panel_sizer->Add( 0, 0, 1 );
panel_sizer->Add( button_extract, 0, wxEXPAND );
+
panel->SetSizerAndFit( panel_sizer );
list_ctrl = new wxListView( main_panel, -1,
for( int i = 0; i < i_bookmarks; i++ )
{
list_ctrl->InsertItem( i, wxL2U( pp_bookmarks[i]->psz_name ) );
+ /* FIXME: see if we can use the 64 bits integer format string */
list_ctrl->SetItem( i, 1, wxString::Format(wxT("%d"),
- pp_bookmarks[i]->i_byte_offset ) );
+ (int)(pp_bookmarks[i]->i_byte_offset) ) );
list_ctrl->SetItem( i, 2, wxString::Format(wxT("%d"),
- pp_bookmarks[i]->i_time_offset/1000000 ) );
+ (int)(pp_bookmarks[i]->i_time_offset / 1000000) ) );
}
vlc_object_release( p_input );
seekpoint_t bookmark;
vlc_value_t pos;
+ bookmark.psz_name = NULL;
+ bookmark.i_byte_offset = 0;
+ bookmark.i_time_offset = 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);
+ input_Control( p_input, INPUT_GET_BYTE_POSITION, &bookmark.i_byte_offset );
var_Get( p_input, "time", &pos );
bookmark.i_time_offset = pos.i_time;
input_Control( p_input, INPUT_ADD_BOOKMARK, &bookmark );
-
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 );
if( !p_input )
{
wxMessageBox( wxU( _("No input found. The stream must be "
- "playing or paused for bookmarks to work") ),
+ "playing or paused for bookmarks to work.") ),
wxU( _("No input") ), wxICON_WARNING | wxOK,
this );
return;