# include "config.h"
#endif
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_input.h>
#include <vlc_demux.h>
p_intf->pf_run = Run;
// Suscribe to messages bank
- p_intf->p_sys->p_sub = msg_Subscribe( p_intf, MSG_QUEUE_NORMAL );
+ p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
p_intf->p_sys->p_input = NULL;
- p_intf->p_sys->p_playlist = (playlist_t *)vlc_object_find( p_intf,
- VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
- if( p_intf->p_sys->p_playlist == NULL )
- {
- msg_Err( p_intf, "No playlist object found" );
- msg_Unsubscribe( p_intf, p_intf->p_sys->p_sub );
- return VLC_EGENERIC;
- }
+ p_intf->p_sys->p_playlist = pl_Yield( p_intf );
// Initialize "singleton" objects
p_intf->p_sys->p_logger = NULL;
Dialogs::instance( p_intf );
ThemeRepository::instance( p_intf );
- // We support play on start
- p_intf->b_play = true;
-
return( VLC_SUCCESS );
}
// Get the instance of OSLoop
OSLoop *loop = OSFactory::instance( p_intf )->getOSLoop();
- // Check if we need to start playing
- if( p_intf->b_play )
- {
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist )
- {
- playlist_Control( p_playlist, PLAYLIST_PLAY, false );
- vlc_object_release( p_playlist );
- }
- }
-
// Enter the main event loop
loop->run();
// Do nothing is skins2 is not the main interface
if( var_Type( p_intf, "skin-to-load" ) == VLC_VAR_STRING )
{
- playlist_t *p_playlist =
- (playlist_t *) vlc_object_find( p_this, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist != NULL )
- {
- // Make sure the item is deleted afterwards
- /// \bug does not always work
- p_playlist->status.p_item->i_flags |= PLAYLIST_REMOVE_FLAG;
- vlc_object_release( p_playlist );
- }
+ playlist_t *p_playlist = pl_Yield( p_this );
+ // Make sure the item is deleted afterwards
+ /// \bug does not always work
+ p_playlist->status.p_item->i_flags |= PLAYLIST_REMOVE_FLAG;
+ vlc_object_release( p_playlist );
vlc_value_t val;
val.psz_string = p_demux->psz_path;
add_bool( "skinned-playlist", true, NULL, SKINS2_PLAYLIST,
SKINS2_PLAYLIST_LONG, false );
- set_shortname( _("Skins"));
- set_description( _("Skinnable Interface") );
+ set_shortname( N_("Skins"));
+ set_description( N_("Skinnable Interface") );
set_capability( "interface", 30 );
set_callbacks( Open, Close );
add_shortcut( "skins" );
add_submodule();
- set_description( _("Skins loader demux") );
+ set_description( N_("Skins loader demux") );
set_capability( "demux", 5 );
set_callbacks( DemuxOpen, NULL );