-/*****************************************************************************
- * vout_Request: find a video output thread, create one, or destroy one.
- *****************************************************************************
- * This function looks for a video output thread matching the current
- * properties. If not found, it spawns a new one.
- *****************************************************************************/
-vout_thread_t *(vout_Request)(vlc_object_t *object, vout_thread_t *vout,
- const video_format_t *fmt)
-{
- if (!fmt) {
- if (vout)
- vout_CloseAndRelease(vout);
- return NULL;
- }
-
- /* If a vout is provided, try reusing it */
- if (vout) {
- spu_Attach(vout->p->p_spu, VLC_OBJECT(vout), false);
- vlc_object_detach(vout);
- vlc_object_attach(vout, object);
- spu_Attach(vout->p->p_spu, VLC_OBJECT(vout), true);
-
- vout_control_cmd_t cmd;
- vout_control_cmd_Init(&cmd, VOUT_CONTROL_REINIT);
- cmd.u.reinit.fmt = fmt;
-
- vout_control_Push(&vout->p->control, &cmd);
- vout_control_WaitEmpty(&vout->p->control);
- if (!vout->p->dead) {
- msg_Dbg(object, "reusing provided vout");
- return vout;
- }
- vout_CloseAndRelease(vout);
-
- msg_Warn(object, "cannot reuse provided vout");
- }
- return vout_Create(object, fmt);
-}
-
-/*****************************************************************************
- * vout_Create: creates a new video output thread
- *****************************************************************************
- * This function creates a new video output thread, and returns a pointer
- * to its description. On error, it returns NULL.
- *****************************************************************************/
-vout_thread_t *(vout_Create)(vlc_object_t *object, const video_format_t *fmt)