Commit c7ceea8a authored by Gildas Bazin's avatar Gildas Bazin

* src/input/control.c: bookmarks support is back (will need some more work though).

* modules/gui/wxwindows/bookmarks.cpp: bookmarks support is back.
parent e2ff540d
......@@ -321,10 +321,15 @@ enum input_query_e
/* Meta datas */
INPUT_ADD_INFO, /* arg1= char * arg2= char * arg3=... res=can fail */
INPUT_GET_INFO, /* arg1= char * arg2= char * arg3= char ** res=can fail*/
INPUT_SET_NAME, /* arg1= char * res=can fail */
/* XXX: all next query aren't working for now */
/* Input config options */
INPUT_ADD_OPTION, /* arg1= char * arg2= char * res=can fail*/
/* Input properties */
INPUT_GET_BYTE_POSITION, /* arg1= int64_t * res= */
INPUT_SET_BYTE_SIZE, /* arg1= int64_t * res= */
/* bookmarks */
INPUT_GET_BOOKMARKS, /* arg1= seekpoint_t *** arg2= int * res=can fail */
INPUT_CLEAR_BOOKMARKS, /* res=can fail */
......
......@@ -84,6 +84,11 @@ private:
wxListView *list_ctrl;
};
/*****************************************************************************
* Event Table.
*****************************************************************************/
DEFINE_LOCAL_EVENT_TYPE( wxEVT_BOOKMARKS );
BEGIN_EVENT_TABLE(BookmarksDialog, wxFrame)
......@@ -237,9 +242,11 @@ BookmarksDialog::BookmarksDialog( intf_thread_t *_p_intf, wxWindow *p_parent )
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,
......@@ -345,21 +352,12 @@ void BookmarksDialog::OnAdd( wxCommandEvent& event )
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 = stream_Tell( p_input->input.p_stream );
(int64_t)((double)pos.f_float * p_input->input.p_access->info.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 );
#endif
vlc_object_release( p_input );
Update();
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment