在模块中创建变量:

vlc_value_t  valTemp;

var_Create( p_intf, "vlc_test", VLC_VAR_STRING  );

valTemp.psz_string = "test";

vlc_Set( p_intf, "vlc_test", valTemp );

在还有一模块中訪问变量

vlc_value_t  vlc_test;

vlc_vlis_t *p_list;

intf_thread_t *p_input;

int i;

p_list = vlc_list_find( p_intf->p_vlc, VLC_OBJECT_INTF, FIND_ANYWHERE );

if(p_list)

{

for( i = 0; i < p_list->i_count; i++ )

{

p_input = (intf_thread_t *)p_list->p_values[i].p_objects;

if( VLC_SUCCESS == VAR_GET( p_input, "vlc_test",   &vlc_test) )

{

msg_Dbg(p_intf, "Get vlc_test ok");

}

}

}

05-17 06:34