[vlc-devel] commit: playlist: de-inline p_input setters. (Pierre d'Herbemont )

git version control git at videolan.org
Sat Jun 14 15:17:00 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Sat Jun 14 15:11:41 2008 +0200| [def34b917dc0694ae650f3962662e79e63f22924]

playlist: de-inline p_input setters.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=def34b917dc0694ae650f3962662e79e63f22924
---

 src/playlist/engine.c            |   35 +++++++++++++++++++++++++++++++++++
 src/playlist/playlist_internal.h |   33 +++------------------------------
 2 files changed, 38 insertions(+), 30 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index 0313acd..b6b8487 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -203,6 +203,41 @@ static void ObjectGarbageCollector( playlist_t *p_playlist, bool b_force )
     vlc_mutex_unlock( &p_playlist->gc_lock );
 }
 
+/* Internals */
+void playlist_release_current_input( playlist_t * p_playlist )
+{
+    vlc_assert_locked( &p_playlist->object_lock );
+
+    if( !p_playlist->p_input ) return;
+
+    input_thread_t * p_input = p_playlist->p_input;
+    p_playlist->p_input = NULL;
+
+    /* Release the playlist lock, because we may get stuck
+     * in vlc_object_release() for some time. */
+    PL_UNLOCK;
+    vlc_object_release( p_input );
+    PL_LOCK;
+}
+
+void playlist_set_current_input(
+    playlist_t * p_playlist, input_thread_t * p_input )
+{
+    vlc_assert_locked( &p_playlist->object_lock );
+
+    playlist_release_current_input( p_playlist );
+
+    if( p_input )
+    {
+        vlc_object_yield( p_input );
+        p_playlist->p_input = p_input;
+    }
+}
+
+/**
+ * @}
+ */
+
 /**
  * Main loop
  *
diff --git a/src/playlist/playlist_internal.h b/src/playlist/playlist_internal.h
index 9729137..f12f8c6 100644
--- a/src/playlist/playlist_internal.h
+++ b/src/playlist/playlist_internal.h
@@ -110,36 +110,9 @@ playlist_item_t *playlist_ItemFindFromInputAndRoot( playlist_t *p_playlist,
 int playlist_DeleteFromItemId( playlist_t*, int );
 int playlist_ItemDelete ( playlist_item_t * );
 
-static inline void playlist_release_current_input( playlist_t * p_playlist )
-{
-    vlc_assert_locked( &p_playlist->object_lock );
-
-    if( !p_playlist->p_input ) return;
-
-    input_thread_t * p_input = p_playlist->p_input;
-    p_playlist->p_input = NULL;
-
-    /* Release the playlist lock, because we may get stuck
-     * in vlc_object_release() for some time. */
-    PL_UNLOCK;
-    vlc_object_release( p_input );
-    PL_LOCK;
-}
-
-static inline void playlist_set_current_input(
-    playlist_t * p_playlist, input_thread_t * p_input )
-{
-    vlc_assert_locked( &p_playlist->object_lock );
-
-    playlist_release_current_input( p_playlist );
-
-    if( p_input )
-    {
-        vlc_object_yield( p_input );
-        p_playlist->p_input = p_input;
-    }
-}
-
+void playlist_release_current_input( playlist_t * p_playlist );
+void playlist_set_current_input(
+    playlist_t * p_playlist, input_thread_t * p_input );
 
 /**
  * @}




More information about the vlc-devel mailing list