Debug logging: Added logging of playback and tags
Added a logging method that indicates starting playback of a given URL, and added a debug build only logging of every metadata load event. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
326e9d5970
commit
85fd3836c0
|
@ -65,6 +65,8 @@
|
||||||
|
|
||||||
- (void)play:(NSURL *)url withUserInfo:(id)userInfo withRGInfo:(NSDictionary *)rgi startPaused:(BOOL)paused andSeekTo:(double)time
|
- (void)play:(NSURL *)url withUserInfo:(id)userInfo withRGInfo:(NSDictionary *)rgi startPaused:(BOOL)paused andSeekTo:(double)time
|
||||||
{
|
{
|
||||||
|
ALog(@"Opening file for playback: %@ at seek offset %f%@", url, time, (paused) ? @", starting paused" : @"");
|
||||||
|
|
||||||
[self waitUntilCallbacksExit];
|
[self waitUntilCallbacksExit];
|
||||||
output = nil;
|
output = nil;
|
||||||
output = [[OutputNode alloc] initWithController:self previous:nil];
|
output = [[OutputNode alloc] initWithController:self previous:nil];
|
||||||
|
|
|
@ -618,6 +618,8 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
||||||
progress += progressstep;
|
progress += progressstep;
|
||||||
[weakLock unlock];
|
[weakLock unlock];
|
||||||
|
|
||||||
|
DLog(@"Loading metadata for %@", weakPe.URL);
|
||||||
|
|
||||||
NSMutableDictionary *entryInfo = [NSMutableDictionary dictionaryWithCapacity:32];
|
NSMutableDictionary *entryInfo = [NSMutableDictionary dictionaryWithCapacity:32];
|
||||||
|
|
||||||
NSDictionary *entryProperties = [AudioPropertiesReader propertiesForURL:weakPe.URL];
|
NSDictionary *entryProperties = [AudioPropertiesReader propertiesForURL:weakPe.URL];
|
||||||
|
@ -697,20 +699,22 @@ static inline void dispatch_sync_reentrant(dispatch_queue_t queue, dispatch_bloc
|
||||||
}
|
}
|
||||||
|
|
||||||
[load_info_indexes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop)
|
[load_info_indexes enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop)
|
||||||
{
|
{
|
||||||
PlaylistEntry *pe = [entries objectAtIndex:idx];
|
PlaylistEntry *pe = [entries objectAtIndex:idx];
|
||||||
|
|
||||||
NSMutableDictionary *entryInfo = [NSMutableDictionary dictionaryWithCapacity:32];
|
DLog(@"Loading metadata for %@", pe.URL);
|
||||||
|
|
||||||
NSDictionary *entryProperties = [AudioPropertiesReader propertiesForURL:pe.URL];
|
NSMutableDictionary *entryInfo = [NSMutableDictionary dictionaryWithCapacity:32];
|
||||||
if (entryProperties == nil)
|
|
||||||
return;
|
|
||||||
|
|
||||||
[entryInfo addEntriesFromDictionary:entryProperties];
|
NSDictionary *entryProperties = [AudioPropertiesReader propertiesForURL:pe.URL];
|
||||||
[entryInfo addEntriesFromDictionary:[AudioMetadataReader metadataForURL:pe.URL]];
|
if (entryProperties == nil)
|
||||||
|
return;
|
||||||
|
|
||||||
[pe setMetadata:entryInfo];
|
[entryInfo addEntriesFromDictionary:entryProperties];
|
||||||
[store trackUpdate:pe];
|
[entryInfo addEntriesFromDictionary:[AudioMetadataReader metadataForURL:pe.URL]];
|
||||||
|
|
||||||
|
[pe setMetadata:entryInfo];
|
||||||
|
[store trackUpdate:pe];
|
||||||
}];
|
}];
|
||||||
|
|
||||||
[self->playlistController updateTotalTime];
|
[self->playlistController updateTotalTime];
|
||||||
|
|
Loading…
Reference in New Issue