// #define __ATMO_DEBUG__
// [:Zs]+$
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
#include <vlc_vout.h>
#include <vlc_playlist.h>
* Module descriptor
*****************************************************************************/
vlc_module_begin();
-set_description( _("AtmoLight Filter") );
+set_description( N_("AtmoLight Filter") );
set_help( MODULE_DESCRIPTION );
-set_shortname( _( "AtmoLight" ));
+set_shortname( N_( "AtmoLight" ));
set_capability( "video filter2", 0 );
set_category( CAT_VIDEO );
vlc_module_end();
-static const char *ppsz_filter_options[] = {
+static const char *const ppsz_filter_options[] = {
#if defined(WIN32)
- "usebuildin",
+ "usebuildin",
#endif
"serialdev",
p_sys->i_atmo_height = 48;
- vlc_mutex_init( p_filter, &p_sys->filter_lock );
+ vlc_mutex_init( &p_sys->filter_lock );
#if defined(WIN32)
*****************************************************************************/
static void AddStateVariableCallback(filter_t *p_filter)
{
- playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_filter,
- VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist )
+ playlist_t *p_playlist = pl_Yield( p_filter );
+ input_thread_t *p_input = p_playlist->p_input;
+ if(p_input)
{
- input_thread_t *p_input = p_playlist->p_input;
- if(p_input)
- {
- var_AddCallback( p_input, "state", StateCallback, p_filter );
- }
- vlc_object_release( p_playlist );
+ var_AddCallback( p_input, "state", StateCallback, p_filter );
}
+ vlc_object_release( p_playlist );
}
/*****************************************************************************
*****************************************************************************/
static void DelStateVariableCallback( filter_t *p_filter )
{
- playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_filter,
- VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist )
+ playlist_t *p_playlist = pl_Yield( p_filter );
+ input_thread_t *p_input = p_playlist->p_input;
+ if(p_input)
{
- input_thread_t *p_input = p_playlist->p_input;
- if(p_input)
- {
- var_DelCallback( p_input, "state", StateCallback, p_filter );
- }
- vlc_object_release( p_playlist );
+ var_DelCallback( p_input, "state", StateCallback, p_filter );
}
+ vlc_object_release( p_playlist );
}