From 53c74579305052334468d130a3f4bfcfc3757209 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Sun, 1 Jun 2008 13:49:42 +0200 Subject: [PATCH] s/vout_Destroy/vlc_object_release/ - A cat is a cat --- doc/developer/video_output.xml | 5 ----- include/vlc_vout.h | 1 - modules/gui/minimal_macosx/VLCOpenGLVoutView.m | 2 +- modules/video_filter/clone.c | 2 +- modules/video_filter/crop.c | 4 ++-- modules/video_filter/deinterlace.c | 4 ++-- modules/video_filter/logo.c | 2 +- modules/video_filter/magnify.c | 2 +- modules/video_filter/opencv_wrapper.c | 2 +- modules/video_filter/panoramix.c | 4 ++-- modules/video_filter/puzzle.c | 2 +- modules/video_filter/transform.c | 2 +- modules/video_filter/wall.c | 2 +- modules/visualization/goom.c | 2 +- src/control/video.c | 2 +- src/libvlc.c | 2 +- src/libvlccore.sym | 1 - src/playlist/engine.c | 4 ++-- src/video_output/video_output.c | 18 +----------------- 19 files changed, 20 insertions(+), 43 deletions(-) diff --git a/doc/developer/video_output.xml b/doc/developer/video_output.xml index 3cdb855e50..f609b8db1f 100644 --- a/doc/developer/video_output.xml +++ b/doc/developer/video_output.xml @@ -186,11 +186,6 @@ functions : Frees optional picture buffers. - vout_Destroy - ( vout_thread_t *p_vout ) : - Unmaps the window and frees all allocated resources. - - int vout_Manage ( vout_thread_t *p_vout ) : Manages events (including for instance resize events). diff --git a/include/vlc_vout.h b/include/vlc_vout.h index f148d3653f..4c6b35b7e9 100644 --- a/include/vlc_vout.h +++ b/include/vlc_vout.h @@ -568,7 +568,6 @@ struct vout_thread_t VLC_EXPORT( vout_thread_t *, __vout_Request, ( vlc_object_t *, vout_thread_t *, video_format_t * ) ); #define vout_Create(a,b) __vout_Create(VLC_OBJECT(a),b) VLC_EXPORT( vout_thread_t *, __vout_Create, ( vlc_object_t *, video_format_t * ) ); -VLC_EXPORT( void, vout_Destroy, ( vout_thread_t * ) ); VLC_EXPORT( int, vout_VarCallback, ( vlc_object_t *, const char *, vlc_value_t, vlc_value_t, void * ) ); VLC_EXPORT( int, vout_ChromaCmp, ( uint32_t, uint32_t ) ); diff --git a/modules/gui/minimal_macosx/VLCOpenGLVoutView.m b/modules/gui/minimal_macosx/VLCOpenGLVoutView.m index 99fd2cb249..31e53d0643 100644 --- a/modules/gui/minimal_macosx/VLCOpenGLVoutView.m +++ b/modules/gui/minimal_macosx/VLCOpenGLVoutView.m @@ -290,7 +290,7 @@ void cocoaglvoutviewUnlock( vout_thread_t * p_vout ) { vlc_object_detach( p_vout ); vlc_object_release( p_vout ); - vout_Destroy( (vout_thread_t *)p_vout ); + vlc_object_release( p_vout ); } [objectLock unlock]; } diff --git a/modules/video_filter/clone.c b/modules/video_filter/clone.c index 9343f731dd..1cbfb4790d 100644 --- a/modules/video_filter/clone.c +++ b/modules/video_filter/clone.c @@ -391,7 +391,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) DEL_CALLBACKS( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones], SendEvents ); vlc_object_detach( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] ); - vout_Destroy( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] ); + vlc_object_release( p_vout->p_sys->pp_vout[p_vout->p_sys->i_clones] ); } } diff --git a/modules/video_filter/crop.c b/modules/video_filter/crop.c index 689e7c22ba..d7a24219cd 100644 --- a/modules/video_filter/crop.c +++ b/modules/video_filter/crop.c @@ -424,7 +424,7 @@ static void Destroy( vlc_object_t *p_this ) { DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); } DEL_PARENT_CALLBACKS( SendEventsToChild ); @@ -458,7 +458,7 @@ static int Manage( vout_thread_t *p_vout ) msg_Info( p_vout, "ratio %d", p_vout->p_sys->i_aspect / 432); #endif - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); fmt.i_width = fmt.i_visible_width = p_vout->p_sys->i_width; fmt.i_height = fmt.i_visible_height = p_vout->p_sys->i_height; diff --git a/modules/video_filter/deinterlace.c b/modules/video_filter/deinterlace.c index 6eecac31e1..9ebbf51e81 100644 --- a/modules/video_filter/deinterlace.c +++ b/modules/video_filter/deinterlace.c @@ -433,7 +433,7 @@ static void End( vout_thread_t *p_vout ) { DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); } DEL_PARENT_CALLBACKS( SendEventsToChild ); @@ -2067,7 +2067,7 @@ static int FilterCallback( vlc_object_t *p_this, char const *psz_cmd, DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); /* Try to open a new video output */ p_vout->p_sys->p_vout = SpawnRealVout( p_vout ); diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c index 20f7386bc5..6fcedca021 100644 --- a/modules/video_filter/logo.c +++ b/modules/video_filter/logo.c @@ -491,7 +491,7 @@ static void End( vout_thread_t *p_vout ) DEL_CALLBACKS( p_sys->p_vout, SendEvents ); vlc_object_detach( p_sys->p_vout ); - vout_Destroy( p_sys->p_vout ); + vlc_object_release( p_sys->p_vout ); if( p_sys->p_blend->p_module ) module_Unneed( p_sys->p_blend, p_sys->p_blend->p_module ); diff --git a/modules/video_filter/magnify.c b/modules/video_filter/magnify.c index 7a77573c3e..12eb061591 100644 --- a/modules/video_filter/magnify.c +++ b/modules/video_filter/magnify.c @@ -212,7 +212,7 @@ static void Destroy( vlc_object_t *p_this ) { DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); } image_HandlerDelete( p_vout->p_sys->p_image ); diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c index 1095f6cf06..db6b4a527f 100644 --- a/modules/video_filter/opencv_wrapper.c +++ b/modules/video_filter/opencv_wrapper.c @@ -409,7 +409,7 @@ static void Destroy( vlc_object_t *p_this ) { DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); } DEL_PARENT_CALLBACKS( SendEventsToChild ); diff --git a/modules/video_filter/panoramix.c b/modules/video_filter/panoramix.c index 1ac44f69cd..7a08fe68ad 100644 --- a/modules/video_filter/panoramix.c +++ b/modules/video_filter/panoramix.c @@ -900,7 +900,7 @@ static void Destroy( vlc_object_t *p_this ) #ifdef GLOBAL_OUTPUT DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); DEL_PARENT_CALLBACKS( SendEventsToChild); #endif @@ -1914,7 +1914,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) SendEvents ); vlc_object_detach( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); - vout_Destroy( + vlc_object_release( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); } } diff --git a/modules/video_filter/puzzle.c b/modules/video_filter/puzzle.c index d9f07e31ac..c2bcfd76ea 100644 --- a/modules/video_filter/puzzle.c +++ b/modules/video_filter/puzzle.c @@ -334,7 +334,7 @@ static void Destroy( vlc_object_t *p_this ) { DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); } image_HandlerDelete( p_vout->p_sys->p_image ); diff --git a/modules/video_filter/transform.c b/modules/video_filter/transform.c index 3b2266ca5c..40eab9db00 100644 --- a/modules/video_filter/transform.c +++ b/modules/video_filter/transform.c @@ -300,7 +300,7 @@ static void Destroy( vlc_object_t *p_this ) { DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents ); vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); + vlc_object_release( p_vout->p_sys->p_vout ); } DEL_PARENT_CALLBACKS( SendEventsToChild ); diff --git a/modules/video_filter/wall.c b/modules/video_filter/wall.c index 9327b9cb4b..96c82f40bb 100644 --- a/modules/video_filter/wall.c +++ b/modules/video_filter/wall.c @@ -589,7 +589,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) SendEvents ); vlc_object_detach( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); - vout_Destroy( + vlc_object_release( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); } } diff --git a/modules/visualization/goom.c b/modules/visualization/goom.c index b8190251a2..9382b80494 100644 --- a/modules/visualization/goom.c +++ b/modules/visualization/goom.c @@ -196,7 +196,7 @@ static int Open( vlc_object_t *p_this ) VLC_THREAD_PRIORITY_LOW, false ) ) { msg_Err( p_filter, "cannot lauch goom thread" ); - vout_Destroy( p_thread->p_vout ); + vlc_object_release( p_thread->p_vout ); vlc_mutex_destroy( &p_thread->lock ); vlc_cond_destroy( &p_thread->wait ); free( p_thread->psz_title ); diff --git a/src/control/video.c b/src/control/video.c index 9490261416..91ec92aaa4 100644 --- a/src/control/video.c +++ b/src/control/video.c @@ -573,7 +573,7 @@ int libvlc_video_destroy( libvlc_media_player_t *p_mi, vout_thread_t *p_vout = GetVout( p_mi, p_e ); vlc_object_detach( p_vout ); vlc_object_release( p_vout ); - vout_Destroy( p_vout ); + vlc_object_release( p_vout ); return 0; } diff --git a/src/libvlc.c b/src/libvlc.c index 90e2a791b2..4871e2a93b 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -978,7 +978,7 @@ int libvlc_InternalCleanup( libvlc_int_t *p_libvlc ) { vlc_object_detach( p_vout ); vlc_object_release( p_vout ); - vout_Destroy( p_vout ); + vlc_object_release( p_vout ); } stats_TimersDumpAll( p_libvlc ); diff --git a/src/libvlccore.sym b/src/libvlccore.sym index bd77501ad4..eb996393f9 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -470,7 +470,6 @@ __vout_CopyPicture __vout_Create vout_CreatePicture vout_DatePicture -vout_Destroy vout_DestroyPicture vout_DisplayPicture vout_EnableFilter diff --git a/src/playlist/engine.c b/src/playlist/engine.c index b8731e6d77..1f195f5b97 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -206,7 +206,7 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force ) msg_Dbg( p_playlist, "garbage collector destroying 1 vout" ); vlc_object_detach( p_obj ); vlc_object_release( p_obj ); - vout_Destroy( (vout_thread_t *)p_obj ); + vlc_object_release( (vout_thread_t *)p_obj ); } #ifdef ENABLE_SOUT while( ( p_obj = vlc_object_find( p_playlist, VLC_OBJECT_SOUT, @@ -445,7 +445,7 @@ void playlist_LastLoop( playlist_t *p_playlist ) { vlc_object_detach( p_obj ); vlc_object_release( p_obj ); - vout_Destroy( (vout_thread_t *)p_obj ); + vlc_object_release( (vout_thread_t *)p_obj ); } while( p_playlist->i_sds ) diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index a548530e98..afc82a3311 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -198,7 +198,7 @@ vout_thread_t *__vout_Request( vlc_object_t *p_this, vout_thread_t *p_vout, { /* We are not interested in this format, close this vout */ vlc_object_release( p_vout ); - vout_Destroy( p_vout ); + vlc_object_release( p_vout ); p_vout = NULL; } else @@ -471,22 +471,6 @@ vout_thread_t * __vout_Create( vlc_object_t *p_parent, video_format_t *p_fmt ) return p_vout; } -/***************************************************************************** - * vout_Destroy: destroys a previously created video output - ***************************************************************************** - * Destroy a terminated thread. - * The function will request a destruction of the specified thread. If pi_error - * is NULL, it will return once the thread is destroyed. Else, it will be - * update using one of the THREAD_* constants. - *****************************************************************************/ -void vout_Destroy( vout_thread_t *p_vout ) -{ - /* XXX: should go in the destructor */ - var_Destroy( p_vout, "intf-change" ); - - vlc_object_release( p_vout ); -} - static void vout_Destructor( vlc_object_t * p_this ) { vout_thread_t *p_vout = (vout_thread_t *)p_this; -- 2.39.2