浏览代码

MacOSX/Framework/VLCMediaList.m: new aspect for the node hierarchy view.

Pierre d'Herbemont 17 年之前
父节点
当前提交
0e26a9e52d
共有 2 个文件被更改,包括 11 次插入0 次删除
  1. 1 0
      Headers/Public/VLCMediaList.h
  2. 10 0
      Sources/VLCMediaList.m

+ 1 - 0
Headers/Public/VLCMediaList.h

@@ -67,5 +67,6 @@ extern NSString * VLCMediaListItemDeleted;
 
 /* Media list aspect */
 - (VLCMediaListAspect *)hierarchicalAspect;
+- (VLCMediaListAspect *)hierarchicalNodeAspect;
 - (VLCMediaListAspect *)flatAspect;
 @end

+ 10 - 0
Sources/VLCMediaList.m

@@ -229,6 +229,16 @@ static void HandleMediaListItemDeleted( const libvlc_event_t * event, void * use
     return hierarchicalAspect;
 }
 
+- (VLCMediaListAspect *)hierarchicalNodeAspect
+{
+    if( hierarchicalAspect )
+        return hierarchicalAspect;
+    libvlc_media_list_view_t * p_mlv = libvlc_media_list_hierarchical_node_view( p_mlist, NULL );
+    hierarchicalAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView: p_mlv] retain];
+    libvlc_media_list_view_release( p_mlv );
+    return hierarchicalAspect;
+}
+
 - (VLCMediaListAspect *)flatAspect
 {
     if( flatAspect )