vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue Mar 29 20:14:25 2011 +0300| [4ae811b6cc998370a3213ccd746887f630a42040] | committer: Rémi Denis-Courmont
Motion: fix the vlc_object_find bug and flag the other bugs > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4ae811b6cc998370a3213ccd746887f630a42040 --- modules/control/motion.c | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/modules/control/motion.c b/modules/control/motion.c index 96ed2f5..4ab6739 100644 --- a/modules/control/motion.c +++ b/modules/control/motion.c @@ -35,6 +35,7 @@ #include <vlc_common.h> #include <vlc_plugin.h> #include <vlc_interface.h> +#include <vlc_playlist.h> #include <vlc_vout.h> #ifdef HAVE_UNISTD_H @@ -189,11 +190,11 @@ static void RunIntf( intf_thread_t *p_intf ) for( ;; ) { - vout_thread_t *p_vout; const char *psz_filter, *psz_type; bool b_change = false; /* Wait a bit, get orientation, change filter if necessary */ +#warning FIXME: check once (or less) per picture, not once per interval msleep( INTF_IDLE_SLEEP ); int canc = vlc_savecancel(); @@ -243,14 +244,24 @@ static void RunIntf( intf_thread_t *p_intf ) if( b_change ) { - p_vout = (vout_thread_t *) - vlc_object_find( p_intf, VLC_OBJECT_VOUT, FIND_ANYWHERE ); - if( p_vout ) +#warning FIXME: refactor this plugin as a video filter! + input_thread_t *p_input; + + p_input = playlist_CurrentInput( pl_Get( p_intf ) ); + if( p_input ) { - config_PutPsz( p_vout, "transform-type", psz_type ); - var_SetString( p_vout, "video-filter", psz_filter ); - vlc_object_release( p_vout ); + vout_thread_t *p_vout; + p_vout = input_GetVout( p_input ); + if( p_vout ) + { +#warning FIXME: do not override the permanent configuration! +#warning FIXME: transform-type does not exist anymore + config_PutPsz( p_vout, "transform-type", psz_type ); + var_SetString( p_vout, "video-filter", psz_filter ); + vlc_object_release( p_vout ); + } + vlc_object_release( p_input ); i_oldx = i_x; } } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
