Skip to content
Snippets Groups Projects
Commit d7aca869 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

goom: keep track of video format

parent 91324233
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......@@ -111,22 +110,20 @@ static int Open( vlc_object_t *p_this )
{
filter_t *p_filter = (filter_t *)p_this;
goom_thread_t *p_thread;
video_format_t fmt;
/* Create goom thread */
p_filter->p_sys = 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" );
......@@ -280,7 +277,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( ;; )
{
......@@ -319,7 +316,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 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment