|
@@ -83,12 +83,11 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
libupnp_RELoadUpnp();
|
|
libupnp_RELoadUpnp();
|
|
_upnpErrorCode = libupnp_UpnpStartTest([UIDevice currentDeviceMacAddress],userPhoneName,2,dirArgv,[UIDevice currentDeviceInfo],7);
|
|
_upnpErrorCode = libupnp_UpnpStartTest([UIDevice currentDeviceMacAddress],userPhoneName,2,dirArgv,[UIDevice currentDeviceInfo],7);
|
|
if (_upnpErrorCode == 0) {
|
|
if (_upnpErrorCode == 0) {
|
|
- NSLog(@"upnp初始化成功");
|
|
|
|
_upnpErrorCode = libupnp_UpnpSetWebServerRootDir(sharePath);
|
|
_upnpErrorCode = libupnp_UpnpSetWebServerRootDir(sharePath);
|
|
}else if(_upnpErrorCode == -100) {
|
|
}else if(_upnpErrorCode == -100) {
|
|
- NSLog(@"UpnpStart 无网络连接!! ==> %d ", _upnpErrorCode);
|
|
|
|
|
|
+// NSLog(@"UpnpStart 无网络连接!! ==> %d ", _upnpErrorCode);
|
|
}else{//UPNP_ERROR
|
|
}else{//UPNP_ERROR
|
|
- NSLog(@"UpnpStart Error!! ==> %d" ,_upnpErrorCode);
|
|
|
|
|
|
+// NSLog(@"UpnpStart Error!! ==> %d" ,_upnpErrorCode);
|
|
}
|
|
}
|
|
return _upnpErrorCode;
|
|
return _upnpErrorCode;
|
|
}
|
|
}
|
|
@@ -156,7 +155,7 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
});
|
|
});
|
|
dispatch_source_set_cancel_handler(_searchTimer, ^{
|
|
dispatch_source_set_cancel_handler(_searchTimer, ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
- NSLog(@"搜索结束");
|
|
|
|
|
|
+// NSLog(@"搜索结束");
|
|
});
|
|
});
|
|
});
|
|
});
|
|
dispatch_resume(_searchTimer);
|
|
dispatch_resume(_searchTimer);
|
|
@@ -178,7 +177,7 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
#pragma mark - ASControlDelegate
|
|
#pragma mark - ASControlDelegate
|
|
|
|
|
|
-(void)ReceivedPlayCallBack:(NSString *)nUDN{
|
|
-(void)ReceivedPlayCallBack:(NSString *)nUDN{
|
|
- NSLog(@"收到播放回调%@",nUDN);
|
|
|
|
|
|
+// NSLog(@"收到播放回调%@",nUDN);
|
|
wd_main_queue(^{
|
|
wd_main_queue(^{
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
self.currentResource.resourceStatus.playState = MKRResourcePlayStatePlaying;
|
|
self.currentResource.resourceStatus.playState = MKRResourcePlayStatePlaying;
|
|
@@ -188,7 +187,7 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedPauseCallBack:(NSString *)nUDN{
|
|
-(void)ReceivedPauseCallBack:(NSString *)nUDN{
|
|
- NSLog(@"收到暂停回调%@",nUDN);
|
|
|
|
|
|
+// NSLog(@"收到暂停回调%@",nUDN);
|
|
wd_main_queue(^{
|
|
wd_main_queue(^{
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
self.currentResource.resourceStatus.playState = MKRResourcePlayStatePause;
|
|
self.currentResource.resourceStatus.playState = MKRResourcePlayStatePause;
|
|
@@ -198,7 +197,7 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedStopCallBack:(NSString *)nUDN{
|
|
-(void)ReceivedStopCallBack:(NSString *)nUDN{
|
|
- NSLog(@"收到停止回调%@",nUDN);
|
|
|
|
|
|
+// NSLog(@"收到停止回调%@",nUDN);
|
|
wd_main_queue(^{
|
|
wd_main_queue(^{
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
self.currentResource.resourceStatus.playState = MKRResourcePlayStateStopped;
|
|
self.currentResource.resourceStatus.playState = MKRResourcePlayStateStopped;
|
|
@@ -210,42 +209,42 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
-(void)ReceivedSetVolumeCallBack:(NSString *)nUDN Volume:(NSInteger)Volume{
|
|
-(void)ReceivedSetVolumeCallBack:(NSString *)nUDN Volume:(NSInteger)Volume{
|
|
wd_main_queue(^{
|
|
wd_main_queue(^{
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
- NSLog(@"收到设备音量回调SetZoneVolumeCallBack:%zd",Volume);
|
|
|
|
|
|
+// NSLog(@"收到设备音量回调SetZoneVolumeCallBack:%zd",Volume);
|
|
[self.listeners makeObjectsPerformSelectorWithObjects:@selector(didReceiveVolumeChange:),(float)Volume];
|
|
[self.listeners makeObjectsPerformSelectorWithObjects:@selector(didReceiveVolumeChange:),(float)Volume];
|
|
}
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedSetMuteCallBack:(NSString *)nUDN Mute:(NSInteger)Mute{
|
|
-(void)ReceivedSetMuteCallBack:(NSString *)nUDN Mute:(NSInteger)Mute{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedSetZoneMuteCallBack:(NSString *)nUDN Mute:(NSInteger)Mute{
|
|
-(void)ReceivedSetZoneMuteCallBack:(NSString *)nUDN Mute:(NSInteger)Mute{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedSetGroupIdCallBack:(NSString *)nUDN GrouId:(NSString *)GroupId{
|
|
-(void)ReceivedSetGroupIdCallBack:(NSString *)nUDN GrouId:(NSString *)GroupId{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedSetSleepStateCallBack:(NSString *)nUDN SleepState:(NSString *)SleepState{
|
|
-(void)ReceivedSetSleepStateCallBack:(NSString *)nUDN SleepState:(NSString *)SleepState{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedSetSoundSourceCallBack:(NSString *)nUDN SoundSource:(NSString *)SoundSource{
|
|
-(void)ReceivedSetSoundSourceCallBack:(NSString *)nUDN SoundSource:(NSString *)SoundSource{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedSetVolumeChannelCallBack:(NSString *)nUDN Channel:(NSString *)Channel {
|
|
-(void)ReceivedSetVolumeChannelCallBack:(NSString *)nUDN Channel:(NSString *)Channel {
|
|
- NSLog(@"ReceivedSetVolumeChannelCallBack-------------%@ ",Channel);
|
|
|
|
|
|
+// NSLog(@"ReceivedSetVolumeChannelCallBack-------------%@ ",Channel);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)ReceivedSetZoneVolumeCallBack:(NSString *)nUDN Volume:(NSInteger)Volume {
|
|
-(void)ReceivedSetZoneVolumeCallBack:(NSString *)nUDN Volume:(NSInteger)Volume {
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)CallBackRemoveZoneMedia:(NSString *)nByeUDN BaseURL:(NSString *)BaseURL{
|
|
-(void)CallBackRemoveZoneMedia:(NSString *)nByeUDN BaseURL:(NSString *)BaseURL{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
wd_main_queue(^{
|
|
wd_main_queue(^{
|
|
[self.listeners makeObjectsPerformSelectorWithObjects:@selector(didReceiveDeviceOffline:),nByeUDN];
|
|
[self.listeners makeObjectsPerformSelectorWithObjects:@selector(didReceiveDeviceOffline:),nByeUDN];
|
|
});
|
|
});
|
|
@@ -253,39 +252,39 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
|
|
|
|
-(void)CallBackRemoveRenderer:(NSString *)nByeUDN BaseURL:(NSString *)BaseURL
|
|
-(void)CallBackRemoveRenderer:(NSString *)nByeUDN BaseURL:(NSString *)BaseURL
|
|
{
|
|
{
|
|
- NSLog(@"CallBackRemoveRenderer---------%@",nByeUDN);
|
|
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"CallBackRemoveRenderer---------%@",nByeUDN);
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)CallBackRemoveDMS:(NSString *)nByeUDN BaseURL:(NSString *)BaseURL{
|
|
-(void)CallBackRemoveDMS:(NSString *)nByeUDN BaseURL:(NSString *)BaseURL{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)CallBackAddZoneMedia:(NSArray *)nStr Size:(NSInteger)size{
|
|
-(void)CallBackAddZoneMedia:(NSArray *)nStr Size:(NSInteger)size{
|
|
- NSLog(@"搜索到设备:%@",nStr);
|
|
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"搜索到设备:%@",nStr);
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
wd_playControl_queue(^{
|
|
wd_playControl_queue(^{
|
|
[self addDevice:nStr];
|
|
[self addDevice:nStr];
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- (void)updateClockID:(NSString *)clockID clockDic:(NSDictionary *)clockDic clockTime:(NSString *)clockTime operationType:(BOOL)isOn deleteClock:(BOOL)isDelete{
|
|
- (void)updateClockID:(NSString *)clockID clockDic:(NSDictionary *)clockDic clockTime:(NSString *)clockTime operationType:(BOOL)isOn deleteClock:(BOOL)isDelete{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)CallBackAddMediaServer:(NSArray *)nStr Size:(NSInteger)size{
|
|
-(void)CallBackAddMediaServer:(NSArray *)nStr Size:(NSInteger)size{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-(void)CallBackAddMediaRenderer:(NSArray *)nStr Size:(NSInteger)size{
|
|
-(void)CallBackAddMediaRenderer:(NSArray *)nStr Size:(NSInteger)size{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-(void)ReceivedChangeChannelCallBack:(NSString *)nUDN Channel:(NSString *)channel{
|
|
-(void)ReceivedChangeChannelCallBack:(NSString *)nUDN Channel:(NSString *)channel{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
- NSLog(@"收到频道改变回调%@",nUDN);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
|
|
+// NSLog(@"收到频道改变回调%@",nUDN);
|
|
wd_main_queue(^{
|
|
wd_main_queue(^{
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
if ([nUDN containsString:self.device.deviceUUID]) {
|
|
[self.listeners makeObjectsPerformSelectorWithObjects:@selector(didReceivePlayingChannelChange:),[channel integerValue]];
|
|
[self.listeners makeObjectsPerformSelectorWithObjects:@selector(didReceivePlayingChannelChange:),[channel integerValue]];
|
|
@@ -294,15 +293,15 @@ static inline void wd_playControl_queue(void (^block)(void)){
|
|
}
|
|
}
|
|
|
|
|
|
-(void)getLocalIp:(NSString *)Ip{
|
|
-(void)getLocalIp:(NSString *)Ip{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)AddLocalResource:(NSArray *)oneSongID3Info{
|
|
-(void)AddLocalResource:(NSArray *)oneSongID3Info{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
-(void)UpdateLocalResourceFinish{
|
|
-(void)UpdateLocalResourceFinish{
|
|
- NSLog(@"%s",__func__);
|
|
|
|
|
|
+// NSLog(@"%s",__func__);
|
|
}
|
|
}
|
|
|
|
|
|
- (void)addDevice:(NSArray *)array {
|
|
- (void)addDevice:(NSArray *)array {
|