|
|
|
@ -79,9 +79,8 @@ vlc_module_end () |
|
|
|
typedef struct |
|
|
|
{ |
|
|
|
vlc_thread_t thread; |
|
|
|
video_format_t fmt; |
|
|
|
|
|
|
|
int i_width; |
|
|
|
int i_height; |
|
|
|
vout_thread_t *p_vout; |
|
|
|
int i_speed; |
|
|
|
|
|
|
|
@ -118,7 +117,6 @@ static int Open( vlc_object_t *p_this ) |
|
|
|
filter_t *p_filter = (filter_t *)p_this; |
|
|
|
filter_sys_t *p_sys; |
|
|
|
goom_thread_t *p_thread; |
|
|
|
video_format_t fmt; |
|
|
|
|
|
|
|
/* Allocate structure */ |
|
|
|
p_sys = p_filter->p_sys = malloc( sizeof( filter_sys_t ) ); |
|
|
|
@ -126,17 +124,16 @@ static int Open( vlc_object_t *p_this ) |
|
|
|
/* Create goom thread */ |
|
|
|
p_sys->p_thread = p_thread = calloc( 1, sizeof(*p_thread) ); |
|
|
|
|
|
|
|
const int width = p_thread->i_width = var_InheritInteger( p_filter, "goom-width" ); |
|
|
|
const int height = p_thread->i_height = var_InheritInteger( p_filter, "goom-height" ); |
|
|
|
|
|
|
|
memset( &fmt, 0, sizeof(video_format_t) ); |
|
|
|
const int width = var_InheritInteger( p_filter, "goom-width" ); |
|
|
|
const int height = var_InheritInteger( p_filter, "goom-height" ); |
|
|
|
|
|
|
|
fmt.i_width = fmt.i_visible_width = width; |
|
|
|
fmt.i_height = fmt.i_visible_height = height; |
|
|
|
fmt.i_chroma = VLC_CODEC_RGB32; |
|
|
|
fmt.i_sar_num = fmt.i_sar_den = 1; |
|
|
|
p_thread->fmt.i_width = p_thread->fmt.i_visible_width = width; |
|
|
|
p_thread->fmt.i_height = p_thread->fmt.i_visible_height = height; |
|
|
|
p_thread->fmt.i_chroma = VLC_CODEC_RGB32; |
|
|
|
p_thread->fmt.i_sar_num = p_thread->fmt.i_sar_den = 1; |
|
|
|
|
|
|
|
p_thread->p_vout = aout_filter_RequestVout( p_filter, NULL, &fmt ); |
|
|
|
p_thread->p_vout = aout_filter_RequestVout( p_filter, NULL, |
|
|
|
&p_thread->fmt ); |
|
|
|
if( p_thread->p_vout == NULL ) |
|
|
|
{ |
|
|
|
msg_Err( p_filter, "no suitable vout module" ); |
|
|
|
@ -292,7 +289,7 @@ static void *Thread( void *p_thread_data ) |
|
|
|
PluginInfo *p_plugin_info; |
|
|
|
int canc = vlc_savecancel (); |
|
|
|
|
|
|
|
p_plugin_info = goom_init( p_thread->i_width, p_thread->i_height ); |
|
|
|
p_plugin_info = goom_init( p_thread->fmt.i_width, p_thread->fmt.i_height ); |
|
|
|
|
|
|
|
for( ;; ) |
|
|
|
{ |
|
|
|
@ -331,7 +328,8 @@ static void *Thread( void *p_thread_data ) |
|
|
|
if( unlikely(p_pic == NULL) ) |
|
|
|
continue; |
|
|
|
|
|
|
|
memcpy( p_pic->p[0].p_pixels, plane, p_thread->i_width * p_thread->i_height * 4 ); |
|
|
|
memcpy( p_pic->p[0].p_pixels, plane, |
|
|
|
p_thread->fmt.i_width * p_thread->fmt.i_height * 4 ); |
|
|
|
|
|
|
|
p_pic->date = date_Get( &i_pts ) + GOOM_DELAY; |
|
|
|
vout_PutPicture( p_thread->p_vout, p_pic ); |
|
|
|
|