Changeset 1334901b0bc60f735f2d677242400f7c1c62bb37
- Timestamp:
- 21/12/07 15:31:00
(1 year ago)
- Author:
- Pierre d'Herbemont <pdherbemont@videolan.org>
- git-committer:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1198247460 +0000
- git-parent:
[2ea15499285e7022db965319b587c129e5e9ad05]
- git-author:
- Pierre d'Herbemont <pdherbemont@videolan.org> 1198247460 +0000
- Message:
MacOSX/Framework/VLCMediaList.m: Implement -description: and fix -flatAspect and -hierarchicalAspect when used with bindings.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r40e325a |
r1334901 |
|
| 45 | 45 | id <VLCMediaListDelegate,NSObject> delegate; //< Delegate object |
|---|
| 46 | 46 | NSMutableArray *cachedMedia; /* We need that private copy because of Cocoa Bindings, that need to be working on first thread */ |
|---|
| | 47 | VLCMediaListAspect * flatAspect; |
|---|
| | 48 | VLCMediaListAspect * hierarchicalAspect; |
|---|
| 47 | 49 | } |
|---|
| 48 | 50 | |
|---|
| r73afb6b |
r1334901 |
|
| 94 | 94 | // Initialize internals to defaults |
|---|
| 95 | 95 | cachedMedia = [[NSMutableArray alloc] init]; |
|---|
| 96 | | delegate = nil; |
|---|
| | 96 | delegate = flatAspect = hierarchicalAspect = nil; |
|---|
| 97 | 97 | [self initInternalMediaList]; |
|---|
| 98 | 98 | } |
|---|
| … | … | |
| 122 | 122 | libvlc_media_list_release(p_mlist); |
|---|
| 123 | 123 | [cachedMedia release]; |
|---|
| | 124 | [flatAspect release]; |
|---|
| | 125 | [hierarchicalAspect release]; |
|---|
| 124 | 126 | [super dealloc]; |
|---|
| | 127 | } |
|---|
| | 128 | |
|---|
| | 129 | - (NSString *)description |
|---|
| | 130 | { |
|---|
| | 131 | NSMutableString *content = [NSMutableString string]; |
|---|
| | 132 | int i; |
|---|
| | 133 | [self lock]; |
|---|
| | 134 | for( i = 0; i < [self count]; i++) |
|---|
| | 135 | { |
|---|
| | 136 | [content appendFormat:@"%@\n", [self mediaAtIndex: i]]; |
|---|
| | 137 | } |
|---|
| | 138 | [self unlock]; |
|---|
| | 139 | return [NSString stringWithFormat:@"<%@ %p> {\n%@}", [self className], self, content]; |
|---|
| 125 | 140 | } |
|---|
| 126 | 141 | |
|---|
| … | … | |
| 197 | 212 | - (VLCMediaListAspect *)hierarchicalAspect |
|---|
| 198 | 213 | { |
|---|
| 199 | | VLCMediaListAspect * hierarchicalAspect; |
|---|
| | 214 | if( hierarchicalAspect ) |
|---|
| | 215 | return hierarchicalAspect; |
|---|
| 200 | 216 | libvlc_media_list_view_t * p_mlv = libvlc_media_list_hierarchical_view( p_mlist, NULL ); |
|---|
| 201 | | hierarchicalAspect = [VLCMediaListAspect mediaListAspectWithLibVLCMediaListView: p_mlv]; |
|---|
| | 217 | hierarchicalAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView: p_mlv] retain]; |
|---|
| 202 | 218 | libvlc_media_list_view_release( p_mlv ); |
|---|
| 203 | 219 | return hierarchicalAspect; |
|---|
| … | … | |
| 206 | 222 | - (VLCMediaListAspect *)flatAspect |
|---|
| 207 | 223 | { |
|---|
| 208 | | VLCMediaListAspect * flatAspect; |
|---|
| | 224 | if( flatAspect ) |
|---|
| | 225 | return flatAspect; |
|---|
| 209 | 226 | libvlc_media_list_view_t * p_mlv = libvlc_media_list_flat_view( p_mlist, NULL ); |
|---|
| 210 | | flatAspect = [VLCMediaListAspect mediaListAspectWithLibVLCMediaListView: p_mlv]; |
|---|
| | 227 | flatAspect = [[VLCMediaListAspect mediaListAspectWithLibVLCMediaListView: p_mlv] retain]; |
|---|
| 211 | 228 | libvlc_media_list_view_release( p_mlv ); |
|---|
| 212 | 229 | return flatAspect; |
|---|