- msg_Dbg( p_vout, "spawning %i clone(s)", p_vout->p_sys->i_clones );
-
- p_vout->p_sys->pp_vout = malloc( p_vout->p_sys->i_clones *
- sizeof(vout_thread_t *) );
- if( p_vout->p_sys->pp_vout == NULL )
- {
- msg_Err( p_vout, "out of memory" );
- free( p_vout->p_sys );
- return VLC_ENOMEM;
- }
-
- return VLC_SUCCESS;
-}
-
-/*****************************************************************************
- * Init: initialize Clone video thread output method
- *****************************************************************************/
-static int Init( vout_thread_t *p_vout )
-{
- int i_index, i_vout;
- picture_t *p_pic;
- char *psz_default_vout;
-
- I_OUTPUTPICTURES = 0;
-
- /* Initialize the output structure */
- p_vout->output.i_chroma = p_vout->render.i_chroma;
- p_vout->output.i_width = p_vout->render.i_width;
- p_vout->output.i_height = p_vout->render.i_height;
- p_vout->output.i_aspect = p_vout->render.i_aspect;
-
- /* Try to open the real video output */
- msg_Dbg( p_vout, "spawning the real video outputs" );
-
- /* Save the default vout */
- psz_default_vout = config_GetPsz( p_vout, "vout" );
-
- for( i_vout = 0; i_vout < p_vout->p_sys->i_clones; i_vout++ )
- {
- if( p_vout->p_sys->ppsz_vout_list == NULL
- || ( !strncmp( p_vout->p_sys->ppsz_vout_list[i_vout],
- "default", 8 ) ) )
- {
- p_vout->p_sys->pp_vout[i_vout] =
- vout_Create( p_vout, p_vout->render.i_width,
- p_vout->render.i_height, p_vout->render.i_chroma,
- p_vout->render.i_aspect );
- }
- else
- {
- /* create the appropriate vout instead of the default one */
- config_PutPsz( p_vout, "vout",
- p_vout->p_sys->ppsz_vout_list[i_vout] );
- p_vout->p_sys->pp_vout[i_vout] =
- vout_Create( p_vout, p_vout->render.i_width,
- p_vout->render.i_height, p_vout->render.i_chroma,
- p_vout->render.i_aspect );
-
- /* Reset the default value */
- config_PutPsz( p_vout, "vout", psz_default_vout );
- }