control/media_list_view.c: Implement media_list_view_parent_media_list().
authorPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 25 Dec 2007 16:18:23 +0000 (16:18 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 25 Dec 2007 16:18:23 +0000 (16:18 +0000)
include/vlc/libvlc.h
src/control/media_list_view.c

index fae05ef..a8f2d00 100644 (file)
@@ -618,6 +618,10 @@ VLC_PUBLIC_API void
                                       libvlc_media_descriptor_t * p_md,
                                       libvlc_exception_t * p_e );
 
+VLC_PUBLIC_API libvlc_media_list_t *
+    libvlc_media_list_view_parent_media_list(  libvlc_media_list_view_t * p_mlv,
+                                               libvlc_exception_t * p_e );
+
 /** @} */
 
 /*****************************************************************************
index 2bd2d19..c3bb901 100644 (file)
@@ -361,6 +361,22 @@ libvlc_media_list_view_event_manager( libvlc_media_list_view_t * p_mlv )
     return p_em;
 }
 
+/**************************************************************************
+ *       libvlc_media_list_view_parent_media_list (Public)
+ **************************************************************************/
+libvlc_media_list_t *
+libvlc_media_list_view_parent_media_list( libvlc_media_list_view_t * p_mlv,
+                                         libvlc_exception_t * p_e)
+{
+    (void)p_e;
+    libvlc_media_list_t * p_mlist;
+    vlc_mutex_lock( &p_mlv->object_lock );
+    p_mlist = p_mlv->p_mlist;
+    libvlc_media_list_retain( p_mlv->p_mlist );
+    vlc_mutex_unlock( &p_mlv->object_lock );
+    return p_mlist;
+}
+
 /* Limited to four args, because it should be enough */
 
 #define AN_SELECT( collapser, dec1, dec2, dec3, dec4, p, ...) p