- /* Initialize pictures - translation tables and functions
- * will be initialized later in InitThread */
- for( i_index = 0; i_index < 2 * VOUT_MAX_PICTURES + 1; i_index++)
- {
- p_vout->p_picture[i_index].pf_lock = NULL;
- p_vout->p_picture[i_index].pf_unlock = NULL;
- p_vout->p_picture[i_index].i_status = FREE_PICTURE;
- p_vout->p_picture[i_index].i_type = EMPTY_PICTURE;
- p_vout->p_picture[i_index].b_slow = 0;
- }
-
- /* No images in the heap */
- p_vout->i_heap_size = 0;
-
- /* Initialize the rendering heap */
- I_RENDERPICTURES = 0;
-
- p_vout->fmt_render = *p_fmt; /* FIXME palette */
- p_vout->fmt_in = *p_fmt; /* FIXME palette */
-
- p_vout->render.i_width = i_width;
- p_vout->render.i_height = i_height;
- p_vout->render.i_chroma = i_chroma;
- p_vout->render.i_aspect = i_aspect;
-
- p_vout->render.i_rmask = p_fmt->i_rmask;
- p_vout->render.i_gmask = p_fmt->i_gmask;
- p_vout->render.i_bmask = p_fmt->i_bmask;
-
- p_vout->render.i_last_used_pic = -1;
- p_vout->render.b_allow_modify_pics = 1;
-
- /* Zero the output heap */
- I_OUTPUTPICTURES = 0;
- p_vout->output.i_width = 0;
- p_vout->output.i_height = 0;
- p_vout->output.i_chroma = 0;
- p_vout->output.i_aspect = 0;
-
- p_vout->output.i_rmask = 0;
- p_vout->output.i_gmask = 0;
- p_vout->output.i_bmask = 0;
-
- /* Initialize misc stuff */
- p_vout->i_changes = 0;
- p_vout->b_autoscale = 1;
- p_vout->i_zoom = ZOOM_FP_FACTOR;
- p_vout->b_fullscreen = 0;
- p_vout->i_alignment = 0;
- p_vout->p->render_time = 10;
- p_vout->p->c_fps_samples = 0;
- p_vout->p->i_picture_lost = 0;
- p_vout->p->i_picture_displayed = 0;
- p_vout->p->b_filter_change = 0;
- p_vout->p->b_paused = false;
- p_vout->p->i_pause_date = 0;
- p_vout->pf_control = NULL;
- p_vout->p->i_par_num =
- p_vout->p->i_par_den = 1;
- p_vout->p->p_picture_displayed = NULL;
- p_vout->p->i_picture_displayed_date = 0;
- p_vout->p->b_picture_displayed = false;
- p_vout->p->b_picture_empty = false;
- p_vout->p->i_picture_qtype = QTYPE_NONE;
-
- /* Initialize locks */
- vlc_mutex_init( &p_vout->picture_lock );
- vlc_cond_init( &p_vout->p->picture_wait );
- vlc_mutex_init( &p_vout->change_lock );
- vlc_mutex_init( &p_vout->p->vfilter_lock );
-
- /* Mouse coordinates */
- var_Create( p_vout, "mouse-x", VLC_VAR_INTEGER );
- var_Create( p_vout, "mouse-y", VLC_VAR_INTEGER );
- var_Create( p_vout, "mouse-button-down", VLC_VAR_INTEGER );
- var_Create( p_vout, "mouse-moved", VLC_VAR_BOOL );
- var_Create( p_vout, "mouse-clicked", VLC_VAR_BOOL );
-
- /* Initialize subpicture unit */
- p_vout->p_spu = spu_Create( p_vout );
- spu_Attach( p_vout->p_spu, p_parent, true );
-
- /* Attach the new object now so we can use var inheritance below */
- vlc_object_attach( p_vout, p_parent );