-
- /*
- * Error loop - wait until the thread destruction is requested
- *
- * XXX I wonder if we should periodically clean the decoder_fifo
- * or have a way to prevent it filling up.
- */
- while (vout->p->b_error && !vout->p->b_done)
- vlc_cond_wait(&vout->p->change_wait, &vout->p->change_lock);
-
- /* Clean thread */
- ThreadClean(vout);
-
-exit_thread:
- /* Detach subpicture unit from both input and vout */
- spu_Attach(vout->p->p_spu, VLC_OBJECT(vout), false);
- vlc_object_detach(vout->p->p_spu);
-
- vlc_mutex_unlock(&vout->p->change_lock);
-
- if (has_wrapper)
- vout_CloseWrapper(vout);
- vout_control_Dead(&vout->p->control);
-
- /* Destroy the video filters2 */
- filter_chain_Delete(vout->p->vfilter_chain);
-
- return NULL;
-}
-
-/*****************************************************************************
- * object variables callbacks: a bunch of object variables are used by the
- * interfaces to interact with the vout.
- *****************************************************************************/
-static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd,
- vlc_value_t oldval, vlc_value_t newval, void *p_data )
-{
- vout_thread_t *p_vout = (vout_thread_t *)p_this;
- input_thread_t *p_input;
- (void)psz_cmd; (void)oldval; (void)p_data;
-
- p_input = (input_thread_t *)vlc_object_find( p_this, VLC_OBJECT_INPUT,
- FIND_PARENT );
- if (!p_input)
- {
- msg_Err( p_vout, "Input not found" );
- return VLC_EGENERIC;
- }
-
- /* Modify input as well because the vout might have to be restarted */
- var_Create( p_input, "vout-filter", VLC_VAR_STRING );
- var_SetString( p_input, "vout-filter", newval.psz_string );
-
- /* Now restart current video stream */
- input_Control( p_input, INPUT_RESTART_ES, -VIDEO_ES );
- vlc_object_release( p_input );
-
- return VLC_SUCCESS;
-}
-
-/*****************************************************************************
- * Video Filter2 stuff
- *****************************************************************************/
-static int VideoFilter2Callback(vlc_object_t *object, char const *cmd,
- vlc_value_t oldval, vlc_value_t newval,
- void *data)
-{
- vout_thread_t *vout = (vout_thread_t *)object;
- (void)cmd; (void)oldval; (void)data;
-
- vout_control_PushString(&vout->p->control, VOUT_CONTROL_CHANGE_FILTERS,
- newval.psz_string);
- return VLC_SUCCESS;
-}
-
-/* */
-static void PrintVideoFormat(vout_thread_t *vout,
- const char *description,
- const video_format_t *fmt)
-{
- msg_Dbg(vout, "%s sz %ix%i, of (%i,%i), vsz %ix%i, 4cc %4.4s, sar %i:%i, msk r0x%x g0x%x b0x%x",
- description,
- fmt->i_width, fmt->i_height, fmt->i_x_offset, fmt->i_y_offset,
- fmt->i_visible_width, fmt->i_visible_height,
- (char*)&fmt->i_chroma,
- fmt->i_sar_num, fmt->i_sar_den,
- fmt->i_rmask, fmt->i_gmask, fmt->i_bmask);