├── DEMO ├── Podfile ├── Podfile.lock ├── Pods │ ├── CocoaAsyncSocket │ │ ├── LICENSE.txt │ │ ├── README.markdown │ │ └── Source │ │ │ └── GCD │ │ │ ├── GCDAsyncSocket.h │ │ │ ├── GCDAsyncSocket.m │ │ │ ├── GCDAsyncUdpSocket.h │ │ │ └── GCDAsyncUdpSocket.m │ ├── MRDLNA │ │ ├── LICENSE │ │ ├── MRDLNA │ │ │ └── Classes │ │ │ │ ├── ARC │ │ │ │ ├── DLNA │ │ │ │ │ ├── CLUPnP.h │ │ │ │ │ ├── CLUPnPAVPositionInfo.h │ │ │ │ │ ├── CLUPnPAVPositionInfo.m │ │ │ │ │ ├── CLUPnPAction.h │ │ │ │ │ ├── CLUPnPAction.m │ │ │ │ │ ├── CLUPnPDevice.h │ │ │ │ │ ├── CLUPnPDevice.m │ │ │ │ │ ├── CLUPnPRenderer.h │ │ │ │ │ ├── CLUPnPRenderer.m │ │ │ │ │ ├── CLUPnPResponseDelegate.h │ │ │ │ │ ├── CLUPnPServer.h │ │ │ │ │ ├── CLUPnPServer.m │ │ │ │ │ ├── Device.xml │ │ │ │ │ ├── SetUrl.xml │ │ │ │ │ ├── StopAction.h │ │ │ │ │ └── StopAction.m │ │ │ │ ├── MRDLNA.h │ │ │ │ └── MRDLNA.m │ │ │ │ └── MRC │ │ │ │ └── GData │ │ │ │ ├── GDataXMLNode.h │ │ │ │ └── GDataXMLNode.m │ │ └── README.md │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcuserdata │ │ │ └── mccree.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── CocoaAsyncSocket.xcscheme │ │ │ ├── MRDLNA.xcscheme │ │ │ └── Pods-dlnaDemo.xcscheme │ └── Target Support Files │ │ ├── CocoaAsyncSocket │ │ ├── CocoaAsyncSocket-Info.plist │ │ ├── CocoaAsyncSocket-dummy.m │ │ ├── CocoaAsyncSocket-prefix.pch │ │ ├── CocoaAsyncSocket-umbrella.h │ │ ├── CocoaAsyncSocket.debug.xcconfig │ │ ├── CocoaAsyncSocket.modulemap │ │ └── CocoaAsyncSocket.release.xcconfig │ │ ├── MRDLNA │ │ ├── MRDLNA-Info.plist │ │ ├── MRDLNA-dummy.m │ │ ├── MRDLNA-prefix.pch │ │ ├── MRDLNA-umbrella.h │ │ ├── MRDLNA.debug.xcconfig │ │ ├── MRDLNA.modulemap │ │ └── MRDLNA.release.xcconfig │ │ └── Pods-dlnaDemo │ │ ├── Pods-dlnaDemo-Info.plist │ │ ├── Pods-dlnaDemo-acknowledgements.markdown │ │ ├── Pods-dlnaDemo-acknowledgements.plist │ │ ├── Pods-dlnaDemo-dummy.m │ │ ├── Pods-dlnaDemo-frameworks-Debug-input-files.xcfilelist │ │ ├── Pods-dlnaDemo-frameworks-Debug-output-files.xcfilelist │ │ ├── Pods-dlnaDemo-frameworks-Release-input-files.xcfilelist │ │ ├── Pods-dlnaDemo-frameworks-Release-output-files.xcfilelist │ │ ├── Pods-dlnaDemo-frameworks.sh │ │ ├── Pods-dlnaDemo-umbrella.h │ │ ├── Pods-dlnaDemo.debug.xcconfig │ │ ├── Pods-dlnaDemo.modulemap │ │ └── Pods-dlnaDemo.release.xcconfig ├── dlnaDemo.xcodeproj │ └── project.pbxproj ├── dlnaDemo.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── dlnaDemo │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── DLNA_Play │ ├── DLNAControlVC.h │ ├── DLNAControlVC.m │ ├── DLNAControlVC.xib │ ├── DLNASearchVC.h │ └── DLNASearchVC.m │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── Example ├── MRDLNA.xcodeproj │ └── project.pbxproj ├── MRDLNA.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── MRDLNA │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── DLNA_Play │ │ ├── DLNAControlVC.h │ │ ├── DLNAControlVC.m │ │ ├── DLNAControlVC.xib │ │ ├── DLNASearchVC.h │ │ └── DLNASearchVC.m │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── MRAppDelegate.h │ ├── MRAppDelegate.m │ ├── MRDLNA-Info.plist │ ├── MRDLNA-Prefix.pch │ ├── MRViewController.h │ ├── MRViewController.m │ ├── en.lproj │ │ └── InfoPlist.strings │ └── main.m ├── Podfile ├── Podfile.lock ├── Pods │ ├── CocoaAsyncSocket │ │ ├── LICENSE.txt │ │ ├── README.markdown │ │ └── Source │ │ │ └── GCD │ │ │ ├── GCDAsyncSocket.h │ │ │ ├── GCDAsyncSocket.m │ │ │ ├── GCDAsyncUdpSocket.h │ │ │ └── GCDAsyncUdpSocket.m │ ├── Local Podspecs │ │ └── MRDLNA.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcuserdata │ │ │ └── mccree.xcuserdatad │ │ │ └── xcschemes │ │ │ ├── CocoaAsyncSocket.xcscheme │ │ │ ├── MRDLNA.xcscheme │ │ │ ├── Pods-MRDLNA_Example.xcscheme │ │ │ └── Pods-MRDLNA_Tests.xcscheme │ └── Target Support Files │ │ ├── CocoaAsyncSocket │ │ ├── CocoaAsyncSocket-Info.plist │ │ ├── CocoaAsyncSocket-dummy.m │ │ ├── CocoaAsyncSocket-prefix.pch │ │ ├── CocoaAsyncSocket-umbrella.h │ │ ├── CocoaAsyncSocket.debug.xcconfig │ │ ├── CocoaAsyncSocket.modulemap │ │ ├── CocoaAsyncSocket.release.xcconfig │ │ ├── CocoaAsyncSocket.xcconfig │ │ └── Info.plist │ │ ├── MRDLNA │ │ ├── Info.plist │ │ ├── MRDLNA-Info.plist │ │ ├── MRDLNA-dummy.m │ │ ├── MRDLNA-prefix.pch │ │ ├── MRDLNA-umbrella.h │ │ ├── MRDLNA.debug.xcconfig │ │ ├── MRDLNA.modulemap │ │ ├── MRDLNA.release.xcconfig │ │ └── MRDLNA.xcconfig │ │ ├── Pods-MRDLNA_Example │ │ ├── Info.plist │ │ ├── Pods-MRDLNA_Example-Info.plist │ │ ├── Pods-MRDLNA_Example-acknowledgements.markdown │ │ ├── Pods-MRDLNA_Example-acknowledgements.plist │ │ ├── Pods-MRDLNA_Example-dummy.m │ │ ├── Pods-MRDLNA_Example-frameworks.sh │ │ ├── Pods-MRDLNA_Example-resources.sh │ │ ├── Pods-MRDLNA_Example-umbrella.h │ │ ├── Pods-MRDLNA_Example.debug.xcconfig │ │ ├── Pods-MRDLNA_Example.modulemap │ │ └── Pods-MRDLNA_Example.release.xcconfig │ │ └── Pods-MRDLNA_Tests │ │ ├── Info.plist │ │ ├── Pods-MRDLNA_Tests-Info.plist │ │ ├── Pods-MRDLNA_Tests-acknowledgements.markdown │ │ ├── Pods-MRDLNA_Tests-acknowledgements.plist │ │ ├── Pods-MRDLNA_Tests-dummy.m │ │ ├── Pods-MRDLNA_Tests-frameworks.sh │ │ ├── Pods-MRDLNA_Tests-resources.sh │ │ ├── Pods-MRDLNA_Tests-umbrella.h │ │ ├── Pods-MRDLNA_Tests.debug.xcconfig │ │ ├── Pods-MRDLNA_Tests.modulemap │ │ └── Pods-MRDLNA_Tests.release.xcconfig └── Tests │ ├── Tests-Info.plist │ ├── Tests-Prefix.pch │ ├── Tests.m │ └── en.lproj │ └── InfoPlist.strings ├── LICENSE ├── MRDLNA.podspec ├── MRDLNA ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ └── ARC │ ├── DLNA │ ├── CLUPnP.h │ ├── CLUPnPAVPositionInfo.h │ ├── CLUPnPAVPositionInfo.m │ ├── CLUPnPAction.h │ ├── CLUPnPAction.m │ ├── CLUPnPDevice.h │ ├── CLUPnPDevice.m │ ├── CLUPnPRenderer.h │ ├── CLUPnPRenderer.m │ ├── CLUPnPResponseDelegate.h │ ├── CLUPnPServer.h │ ├── CLUPnPServer.m │ ├── CLXMLDocument.h │ ├── CLXMLDocument.m │ ├── CLXMLParser.h │ ├── CLXMLParser.m │ ├── Device.xml │ ├── SetUrl.xml │ ├── StopAction.h │ └── StopAction.m │ ├── MRDLNA.h │ └── MRDLNA.m ├── README.md └── _Pods.xcodeproj /DEMO/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | platform :ios, '12.0' 3 | 4 | target 'dlnaDemo' do 5 | pod 'MRDLNA' 6 | end 7 | -------------------------------------------------------------------------------- /DEMO/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaAsyncSocket (7.6.3) 3 | - MRDLNA (0.1.1): 4 | - CocoaAsyncSocket 5 | - MRDLNA/MRC (= 0.1.1) 6 | - MRDLNA/MRC (0.1.1): 7 | - CocoaAsyncSocket 8 | 9 | DEPENDENCIES: 10 | - MRDLNA 11 | 12 | SPEC REPOS: 13 | trunk: 14 | - CocoaAsyncSocket 15 | - MRDLNA 16 | 17 | SPEC CHECKSUMS: 18 | CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987 19 | MRDLNA: 3fe35c6ac57c946413d07896faeb9101c4d8853d 20 | 21 | PODFILE CHECKSUM: e2c01376debefbf03aeb90627ecae51503095505 22 | 23 | COCOAPODS: 1.15.2 24 | -------------------------------------------------------------------------------- /DEMO/Pods/CocoaAsyncSocket/LICENSE.txt: -------------------------------------------------------------------------------- 1 | This library is in the public domain. 2 | However, not all organizations are allowed to use such a license. 3 | For example, Germany doesn't recognize the Public Domain and one is not allowed to use libraries under such license (or similar). 4 | 5 | Thus, the library is now dual licensed, 6 | and one is allowed to choose which license they would like to use. 7 | 8 | ################################################## 9 | License Option #1 : 10 | ################################################## 11 | 12 | Public Domain 13 | 14 | ################################################## 15 | License Option #2 : 16 | ################################################## 17 | 18 | Software License Agreement (BSD License) 19 | 20 | Copyright (c) 2017, Deusty, LLC 21 | All rights reserved. 22 | 23 | Redistribution and use of this software in source and binary forms, 24 | with or without modification, are permitted provided that the following conditions are met: 25 | 26 | * Redistributions of source code must retain the above 27 | copyright notice, this list of conditions and the 28 | following disclaimer. 29 | 30 | * Neither the name of Deusty LLC nor the names of its 31 | contributors may be used to endorse or promote products 32 | derived from this software without specific prior 33 | written permission of Deusty LLC. 34 | 35 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 mccRee 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnP.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnP.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/9/29. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #ifndef CLUPnP_h 10 | #define CLUPnP_h 11 | 12 | #import "CLUPnPServer.h" 13 | #import "CLUPnPRenderer.h" 14 | #import "CLUPnPDevice.h" 15 | #import "CLUPnPAVPositionInfo.h" 16 | 17 | #ifdef DEBUG 18 | #define CLLog(s, ... ) NSLog( @"[%@ in line %d] => %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) 19 | #else 20 | #define CLLog(s, ... ) 21 | #endif 22 | 23 | //IPv4下的多播地址 24 | static NSString *ssdpAddres = @"239.255.255.250"; 25 | //IPv4下的SSDP端口 26 | static UInt16 ssdpPort = 1900; 27 | 28 | static NSString *serviceType_AVTransport = @"urn:schemas-upnp-org:service:AVTransport:1"; 29 | static NSString *serviceType_RenderingControl = @"urn:schemas-upnp-org:service:RenderingControl:1"; 30 | 31 | static NSString *serviceId_AVTransport = @"urn:upnp-org:serviceId:AVTransport"; 32 | static NSString *serviceId_RenderingControl = @"urn:upnp-org:serviceId:RenderingControl"; 33 | 34 | 35 | static NSString *unitREL_TIME = @"REL_TIME"; 36 | static NSString *unitTRACK_NR = @"TRACK_NR"; 37 | 38 | #endif /* CLUPnP_h */ 39 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnPAVPositionInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPAVPositionInfo.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/10/10. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CLUPnPAVPositionInfo : NSObject 12 | 13 | @property (nonatomic, assign) float trackDuration; 14 | @property (nonatomic, assign) float absTime; 15 | @property (nonatomic, assign) float relTime; 16 | 17 | - (void)setArray:(NSArray *)array; 18 | 19 | @end 20 | 21 | 22 | @interface CLUPnPTransportInfo : NSObject 23 | 24 | @property (nonatomic, copy) NSString *currentTransportState; 25 | @property (nonatomic, copy) NSString *currentTransportStatus; 26 | @property (nonatomic, copy) NSString *currentSpeed; 27 | 28 | - (void)setArray:(NSArray *)array; 29 | 30 | @end 31 | 32 | 33 | @interface NSString(UPnP) 34 | 35 | +(NSString *)stringWithDurationTime:(float)timeValue; 36 | - (float)durationTime; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnPAVPositionInfo.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPAVPositionInfo.m 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/10/10. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "CLUPnPAVPositionInfo.h" 10 | #import "GDataXMLNode.h" 11 | 12 | @implementation CLUPnPAVPositionInfo 13 | 14 | - (void)setArray:(NSArray *)array{ 15 | @autoreleasepool { 16 | for (int m = 0; m < array.count; m++) { 17 | GDataXMLElement *needEle = [array objectAtIndex:m]; 18 | if ([needEle.name isEqualToString:@"TrackDuration"]) { 19 | self.trackDuration = [[needEle stringValue] durationTime]; 20 | } 21 | if ([needEle.name isEqualToString:@"RelTime"]) { 22 | self.relTime = [[needEle stringValue] durationTime]; 23 | } 24 | if ([needEle.name isEqualToString:@"AbsTime"]) { 25 | self.absTime = [[needEle stringValue] durationTime]; 26 | } 27 | } 28 | } 29 | } 30 | 31 | @end 32 | 33 | @implementation CLUPnPTransportInfo 34 | 35 | - (void)setArray:(NSArray *)array{ 36 | @autoreleasepool { 37 | for (int m = 0; m < array.count; m++) { 38 | GDataXMLElement *needEle = [array objectAtIndex:m]; 39 | if ([needEle.name isEqualToString:@"CurrentTransportState"]) { 40 | self.currentTransportState = [needEle stringValue]; 41 | } 42 | if ([needEle.name isEqualToString:@"CurrentTransportStatus"]) { 43 | self.currentTransportStatus = [needEle stringValue]; 44 | } 45 | if ([needEle.name isEqualToString:@"CurrentSpeed"]) { 46 | self.currentSpeed = [needEle stringValue]; 47 | } 48 | } 49 | } 50 | } 51 | 52 | @end 53 | 54 | 55 | @implementation NSString(UPnP) 56 | /* 57 | H+:MM:SS[.F+] or H+:MM:SS[.F0/F1] 58 | where : 59 | • H+ means one or more digits to indicate elapsed hours 60 | • MM means exactly 2 digits to indicate minutes (00 to 59) 61 | • SS means exactly 2 digits to indicate seconds (00 to 59) 62 | • [.F+] means optionally a dot followed by one or more digits to indicate fractions of seconds 63 | • [.F0/F1] means optionally a dot followed by a fraction, with F0 and F1 at least one digit long, and F0 < F1 64 | */ 65 | +(NSString *)stringWithDurationTime:(float)timeValue 66 | { 67 | return [NSString stringWithFormat:@"%02d:%02d:%02d", 68 | (int)(timeValue / 3600.0), 69 | (int)(fmod(timeValue, 3600.0) / 60.0), 70 | (int)fmod(timeValue, 60.0)]; 71 | } 72 | 73 | - (float)durationTime 74 | { 75 | NSArray *timeStrings = [self componentsSeparatedByString:@":"]; 76 | int timeStringsCount = (int)[timeStrings count]; 77 | if (timeStringsCount < 3) 78 | return -1.0f; 79 | float durationTime = 0.0; 80 | for (int n = 0; n 10 | 11 | typedef NS_ENUM(NSInteger, CLUPnPServiceType) { 12 | CLUPnPServiceAVTransport, // @"urn:schemas-upnp-org:service:AVTransport:1" 13 | CLUPnPServiceRenderingControl, // @"urn:schemas-upnp-org:service:RenderingControl:1" 14 | }; 15 | 16 | @class CLUPnPDevice; 17 | @interface CLUPnPAction : NSObject 18 | 19 | // serviceType 默认 CLUPnPServiceAVTransport 20 | @property (nonatomic, assign) CLUPnPServiceType serviceType; 21 | 22 | - (instancetype)initWithAction:(NSString *)action; 23 | 24 | - (void)setArgumentValue:(NSString *)value forName:(NSString *)name; 25 | 26 | - (NSString *)getServiceType; 27 | 28 | - (NSString *)getSOAPAction; 29 | 30 | - (NSString *)getPostUrlStrWith:(CLUPnPDevice *)model; 31 | 32 | - (NSString *)getPostXMLFile; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnPAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPAction.m 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/10/10. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "CLUPnPAction.h" 10 | #import "GDataXMLNode.h" 11 | #import "CLUPnP.h" 12 | 13 | @interface CLUPnPAction (){ 14 | NSString *_action; 15 | } 16 | @property (nonatomic, strong) GDataXMLElement *XMLElement; 17 | 18 | @end 19 | 20 | @implementation CLUPnPAction 21 | 22 | - (instancetype)initWithAction:(NSString *)action{ 23 | self = [super init]; 24 | if (self) { 25 | _action = action; 26 | _serviceType = CLUPnPServiceAVTransport; 27 | NSString *name = [NSString stringWithFormat:@"u:%@", _action]; 28 | self.XMLElement = [GDataXMLElement elementWithName:name]; 29 | } 30 | return self; 31 | } 32 | 33 | - (void)setServiceType:(CLUPnPServiceType)serviceType{ 34 | _serviceType = serviceType; 35 | } 36 | 37 | - (void)setArgumentValue:(NSString *)value forName:(NSString *)name{ 38 | [self.XMLElement addChild:[GDataXMLElement elementWithName:name stringValue:value]]; 39 | } 40 | 41 | - (NSString *)getServiceType{ 42 | if (_serviceType == CLUPnPServiceAVTransport) { 43 | return serviceType_AVTransport; 44 | }else{ 45 | return serviceType_RenderingControl; 46 | } 47 | } 48 | 49 | - (NSString *)getSOAPAction{ 50 | if (_serviceType == CLUPnPServiceAVTransport) { 51 | return [NSString stringWithFormat:@"\"%@#%@\"", serviceType_AVTransport, _action]; 52 | }else{ 53 | return [NSString stringWithFormat:@"\"%@#%@\"", serviceType_RenderingControl, _action]; 54 | } 55 | } 56 | 57 | - (NSString *)getPostUrlStrWith:(CLUPnPDevice *)model{ 58 | if (_serviceType == CLUPnPServiceAVTransport) { 59 | return [self getUPnPURLWithUrlModel:model.AVTransport urlHeader:model.URLHeader]; 60 | }else{ 61 | return [self getUPnPURLWithUrlModel:model.RenderingControl urlHeader:model.URLHeader];; 62 | } 63 | } 64 | 65 | - (NSString *)getUPnPURLWithUrlModel:(CLServiceModel *)model urlHeader:(NSString *)urlHeader{ 66 | if ([[model.controlURL substringToIndex:1] isEqualToString:@"/"]) { 67 | return [NSString stringWithFormat:@"%@%@", urlHeader, model.controlURL]; 68 | }else{ 69 | return [NSString stringWithFormat:@"%@/%@", urlHeader, model.controlURL]; 70 | } 71 | } 72 | 73 | /* 74 | %sobject.item.videoItem%s 75 | */ 76 | 77 | - (NSString *)getPostXMLFile{ 78 | GDataXMLElement *xmlEle = [GDataXMLElement elementWithName:@"s:Envelope"]; 79 | [xmlEle addChild:[GDataXMLElement attributeWithName:@"s:encodingStyle" stringValue:@"http://schemas.xmlsoap.org/soap/encoding/"]]; 80 | [xmlEle addChild:[GDataXMLElement attributeWithName:@"xmlns:s" stringValue:@"http://schemas.xmlsoap.org/soap/envelope/"]]; 81 | [xmlEle addChild:[GDataXMLElement attributeWithName:@"xmlns:u" stringValue:[self getServiceType]]]; 82 | GDataXMLElement *command = [GDataXMLElement elementWithName:@"s:Body"]; 83 | 84 | // GDataXMLElement *CurrentURIMetaDataEle = [self.XMLElement elementsForName:@"CurrentURIMetaData"][0]; 85 | 86 | [command addChild:self.XMLElement]; 87 | [xmlEle addChild:command]; 88 | 89 | return xmlEle.XMLString; 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnPDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPDevice.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 2017/7/31. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CLServiceModel; 12 | 13 | @interface CLUPnPDevice : NSObject 14 | 15 | @property (nonatomic, copy) NSString *uuid; 16 | @property (nonatomic, strong) NSURL *loaction; 17 | @property (nonatomic, copy) NSString *URLHeader; 18 | 19 | @property (nonatomic, copy) NSString *friendlyName; 20 | @property (nonatomic, copy) NSString *modelName; 21 | 22 | @property (nonatomic, strong) CLServiceModel *AVTransport; 23 | @property (nonatomic, strong) CLServiceModel *RenderingControl; 24 | 25 | - (void)setArray:(NSArray *)array; 26 | 27 | @end 28 | 29 | @interface CLServiceModel : NSObject 30 | 31 | @property (nonatomic, copy) NSString *serviceType; 32 | @property (nonatomic, copy) NSString *serviceId; 33 | @property (nonatomic, copy) NSString *controlURL; 34 | @property (nonatomic, copy) NSString *eventSubURL; 35 | @property (nonatomic, copy) NSString *SCPDURL; 36 | 37 | - (void)setArray:(NSArray *)array; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnPDevice.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPDevice.m 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 2017/7/31. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "CLUPnP.h" 10 | #import "GDataXMLNode.h" 11 | 12 | @implementation CLUPnPDevice 13 | 14 | - (CLServiceModel *)AVTransport{ 15 | if (!_AVTransport) { 16 | _AVTransport = [[CLServiceModel alloc] init]; 17 | } 18 | return _AVTransport; 19 | } 20 | 21 | - (CLServiceModel *)RenderingControl{ 22 | if (!_RenderingControl) { 23 | _RenderingControl = [[CLServiceModel alloc] init]; 24 | } 25 | return _RenderingControl; 26 | } 27 | 28 | - (NSString *)URLHeader{ 29 | if (!_URLHeader) { 30 | _URLHeader = [NSString stringWithFormat:@"%@://%@:%@", [self.loaction scheme], [self.loaction host], [self.loaction port]]; 31 | } 32 | return _URLHeader; 33 | } 34 | 35 | - (void)setArray:(NSArray *)array{ 36 | @autoreleasepool { 37 | for (int j = 0; j < [array count]; j++) { 38 | GDataXMLElement *ele = [array objectAtIndex:j]; 39 | if ([ele.name isEqualToString:@"friendlyName"]) { 40 | self.friendlyName = [ele stringValue]; 41 | } 42 | if ([ele.name isEqualToString:@"modelName"]) { 43 | self.modelName = [ele stringValue]; 44 | } 45 | if ([ele.name isEqualToString:@"serviceList"]) { 46 | NSArray *serviceListArray = [ele children]; 47 | for (int k = 0; k < [serviceListArray count]; k++) { 48 | GDataXMLElement *listEle = [serviceListArray objectAtIndex:k]; 49 | if ([listEle.name isEqualToString:@"service"]) { 50 | NSString *serviceString = [listEle stringValue]; 51 | if ([serviceString rangeOfString:serviceType_AVTransport].location != NSNotFound || [serviceString rangeOfString:serviceId_AVTransport].location != NSNotFound) { 52 | 53 | [self.AVTransport setArray:[listEle children]]; 54 | 55 | }else if ([serviceString rangeOfString:serviceType_RenderingControl].location != NSNotFound || [serviceString rangeOfString:serviceId_RenderingControl].location != NSNotFound){ 56 | 57 | [self.RenderingControl setArray:[listEle children]]; 58 | } 59 | } 60 | } 61 | continue; 62 | } 63 | } 64 | } 65 | } 66 | 67 | - (NSString *)description{ 68 | NSString * string = [NSString stringWithFormat:@"\nuuid:%@\nlocation:%@\nURLHeader:%@\nfriendlyName:%@\nmodelName:%@\n",self.uuid,self.loaction,self.URLHeader,self.friendlyName,self.modelName]; 69 | return string; 70 | } 71 | 72 | @end 73 | 74 | @implementation CLServiceModel 75 | 76 | - (void)setArray:(NSArray *)array{ 77 | @autoreleasepool { 78 | for (int m = 0; m < array.count; m++) { 79 | GDataXMLElement *needEle = [array objectAtIndex:m]; 80 | if ([needEle.name isEqualToString:@"serviceType"]) { 81 | self.serviceType = [needEle stringValue]; 82 | } 83 | if ([needEle.name isEqualToString:@"serviceId"]) { 84 | self.serviceId = [needEle stringValue]; 85 | } 86 | if ([needEle.name isEqualToString:@"controlURL"]) { 87 | self.controlURL = [needEle stringValue]; 88 | } 89 | if ([needEle.name isEqualToString:@"eventSubURL"]) { 90 | self.eventSubURL = [needEle stringValue]; 91 | } 92 | if ([needEle.name isEqualToString:@"SCPDURL"]) { 93 | self.SCPDURL = [needEle stringValue]; 94 | } 95 | } 96 | } 97 | } 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnPRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPRenderer.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 16/9/29. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "CLUPnPResponseDelegate.h" 12 | 13 | @class CLUPnPDevice; 14 | @interface CLUPnPRenderer : NSObject 15 | 16 | @property (nonatomic, strong) CLUPnPDevice *model; 17 | 18 | @property (nonatomic, strong) iddelegate; 19 | 20 | /** 21 | 初始化 22 | @param model 搜索得到的UPnPModel 23 | @return self 24 | */ 25 | - (instancetype)initWithModel:(CLUPnPDevice *)model; 26 | 27 | /** 28 | 设置投屏地址 29 | @param urlStr 视频url 30 | */ 31 | - (void)setAVTransportURL:(NSString *)urlStr; 32 | 33 | /** 34 | 设置下一个播放地址 35 | @param urlStr 下一个视频url 36 | */ 37 | - (void)setNextAVTransportURI:(NSString *)urlStr; 38 | 39 | /** 40 | 播放 41 | */ 42 | - (void)play; 43 | 44 | /** 45 | 暂停 46 | */ 47 | - (void)pause; 48 | 49 | /** 50 | 结束 51 | */ 52 | - (void)stop; 53 | 54 | /** 55 | 下一个 56 | */ 57 | - (void)next; 58 | 59 | /** 60 | 前一个 61 | */ 62 | - (void)previous; 63 | 64 | /** 65 | 跳转进度 66 | @param relTime 进度时间(单位秒) 67 | */ 68 | - (void)seek:(float)relTime; 69 | 70 | /** 71 | 跳转至特定进度或视频 72 | @param target 目标值,可以是 00:02:21 格式的进度或者整数的 TRACK_NR。 73 | @param unit REL_TIME(跳转到某个进度)或 TRACK_NR(跳转到某个视频)。 74 | */ 75 | - (void)seekToTarget:(NSString *)target Unit:(NSString *)unit; 76 | 77 | /** 78 | 获取播放进度,可通过协议回调使用 79 | */ 80 | - (void)getPositionInfo; 81 | 82 | /** 83 | 获取播放状态,可通过协议回调使用 84 | */ 85 | - (void)getTransportInfo; 86 | 87 | /** 88 | 获取音频,可通过协议回调使用 89 | */ 90 | - (void)getVolume; 91 | 92 | /** 93 | 设置音频值 94 | @param value 值—>整数 95 | */ 96 | - (void)setVolumeWith:(NSString *)value; 97 | 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnPResponseDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPResponseDelegate.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/10/10. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CLUPnPAVPositionInfo; 12 | @class CLUPnPTransportInfo; 13 | 14 | // 响应解析回调协议 15 | @protocol CLUPnPResponseDelegate 16 | 17 | @required 18 | 19 | - (void)upnpSetAVTransportURIResponse; // 设置url响应 20 | - (void)upnpGetTransportInfoResponse:(CLUPnPTransportInfo *)info; // 获取播放状态 21 | 22 | @optional 23 | 24 | /** 25 | 未定义的响应/错误 26 | 27 | @param resXML 响应XML 28 | @param postXML 请求的动作 29 | */ 30 | - (void)upnpUndefinedResponse:(NSString *)resXML postXML:(NSString *)postXML; 31 | 32 | - (void)upnpPlayResponse; // 播放响应 33 | - (void)upnpPauseResponse; // 暂停响应 34 | - (void)upnpStopResponse; // 停止投屏 35 | - (void)upnpSeekResponse; // 跳转响应 36 | - (void)upnpPreviousResponse; // 以前的响应 37 | - (void)upnpNextResponse; // 下一个响应 38 | - (void)upnpSetVolumeResponse; // 设置音量响应 39 | - (void)upnpSetNextAVTransportURIResponse; // 设置下一个url响应 40 | - (void)upnpGetVolumeResponse:(NSString *)volume; // 获取音频信息 41 | - (void)upnpGetPositionInfoResponse:(CLUPnPAVPositionInfo *)info; // 获取播放进度 42 | 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/CLUPnPServer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPServer.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 2017/7/31. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CLUPnPDevice; 12 | @protocol CLUPnPServerDelegate 13 | @required 14 | /** 15 | 搜索结果 16 | 17 | @param devices 设备数组 18 | */ 19 | - (void)upnpSearchChangeWithResults:(NSArray *)devices; 20 | 21 | @optional 22 | /** 23 | 搜索失败 24 | 25 | @param error error 26 | */ 27 | - (void)upnpSearchErrorWithError:(NSError *)error; 28 | 29 | @end 30 | 31 | @interface CLUPnPServer : NSObject 32 | 33 | @property (nonatomic, weak) iddelegate; 34 | 35 | @property (nonatomic,assign) NSInteger searchTime; 36 | 37 | + (instancetype)shareServer; 38 | 39 | /** 40 | 启动Server并搜索 41 | */ 42 | - (void)start; 43 | 44 | /** 45 | 停止 46 | */ 47 | - (void)stop; 48 | 49 | /** 50 | 搜索 51 | */ 52 | - (void)search; 53 | 54 | /** 55 | 获取已经发现的设备 56 | 57 | @return Device Array 58 | */ 59 | - (NSArray *)getDeviceList; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/Device.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 0 5 | 6 | urn:schemas-upnp-org:device:MediaRenderer:1 7 | uuid:b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22 8 | 书房的小米电视 9 | QPlay:1 10 | Xiaomi 11 | http://www.xiaomi.com/ 12 | Xiaomi MediaRenderer 13 | Xiaomi MediaRenderer 14 | 1 15 | http://www.xiaomi.com/hezi 16 | 55MC5BF9J19620A 17 | device_presentation_page.html 18 | 123456789012 19 | DMR-1.50 20 | , 21 | 22 | 23 | image/jpeg 24 | 48 25 | 48 26 | 8 27 | icon/icon048x048.jpeg 28 | 29 | 30 | image/png 31 | 48 32 | 48 33 | 8 34 | icon/icon048x048.png 35 | 36 | 37 | image/jpeg 38 | 120 39 | 120 40 | 8 41 | icon/icon120x120.jpeg 42 | 43 | 44 | image/png 45 | 120 46 | 120 47 | 8 48 | icon/icon120x120.png 49 | 50 | 51 | 52 | urn:schemas-upnp-org:service:AVTransport:1 53 | urn:upnp-org:serviceId:AVTransport 54 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/AVTransport/action 55 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/AVTransport/event 56 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/AVTransport/desc.xml 57 | 58 | 59 | urn:schemas-upnp-org:service:RenderingControl:1 60 | urn:upnp-org:serviceId:RenderingControl 61 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/RenderingControl/action 62 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/RenderingControl/event 63 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/RenderingControl/desc.xml 64 | 65 | 66 | urn:schemas-upnp-org:service:ConnectionManager:1 67 | urn:upnp-org:serviceId:ConnectionManager 68 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/ConnectionManager/action 69 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/ConnectionManager/event 70 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/ConnectionManager/desc.xml 71 | 72 | 73 | 1.0controllerhttp://192.168.1.4:6095/datahttp://api.tv.duokanbox.com/bolt/3party/ 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/SetUrl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0 5 | http://222.73.132.145/vkphls.tc.qq.com/mp4/8/yZ_j6ME6N3hgRF2xg_m13zCxeLHcQzm9bVK0v_J-08OdcAVc0rmGCA/q4WgUBCu27O21hhzjGXkPCaHr1EkTFuUGbXKrNbjMACA-wleQI3oi3woUdjgP-BtBxW34UkmIxlQ_TkPGeqTLwghaijDM7oFlQwmCbieZPLUh33Q7f8eag/i0021mzabfm.p209.mp4/i0021mzabfm.p209.mp4.av.m3u8?fn=p209&bw=8000&st=0&et=0&iv=&ivfn=&ivfc=&ivt=&ivs=&ivd=&ivl=&ftype=mp4&fbw=93&type=m3u8&drm=0&sdtfrom=v3000&platform=10403&appver=5.1.1.14483&projection=dlna 6 | <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sec="http://www.sec.co.kr/"><item id="0" parentID="0" restricted="0"><res protocolInfo="http-get:*:video/mp4:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000">http://222.73.132.145/vkphls.tc.qq.com/mp4/8/yZ_j6ME6N3hgRF2xg_m13zCxeLHcQzm9bVK0v_J-08OdcAVc0rmGCA/q4WgUBCu27O21hhzjGXkPCaHr1EkTFuUGbXKrNbjMACA-wleQI3oi3woUdjgP-BtBxW34UkmIxlQ_TkPGeqTLwghaijDM7oFlQwmCbieZPLUh33Q7f8eag/i0021mzabfm.p209.mp4/i0021mzabfm.p209.mp4.av.m3u8?fn=p209&amp;bw=8000&amp;st=0&amp;et=0&amp;iv=&amp;ivfn=&amp;ivfc=&amp;ivt=&amp;ivs=&amp;ivd=&amp;ivl=&amp;ftype=mp4&amp;fbw=93&amp;type=m3u8&amp;drm=0&amp;sdtfrom=v3000&amp;platform=10403&amp;appver=5.1.1.14483&amp;projection=dlna</res><upnp:albumArtURI></upnp:albumArtURI><upnp:class>object.item.videoItem</upnp:class></item></DIDL-Lite> 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/StopAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // StopAction.h 3 | // YSTThirdSDK 4 | // 5 | // Created by Eric on 2018/3/15. 6 | // 7 | 8 | #import 9 | #import "CLUPnPDevice.h" 10 | 11 | @interface StopAction : NSObject 12 | @property(nonatomic, strong) CLUPnPDevice *device; 13 | 14 | - (instancetype)initWithDevice:(CLUPnPDevice *) device Success:(void(^)())successBlock failure:(void(^)())failureBlock; 15 | -(void)executeAction; 16 | @end 17 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/DLNA/StopAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // StopAction.m 3 | // YSTThirdSDK 4 | // 5 | // Created by Eric on 2018/3/15. 6 | // 7 | 8 | #import "StopAction.h" 9 | #import "CLUPnPRenderer.h" 10 | 11 | @interface StopAction () 12 | @property (nonatomic, copy) void(^successCallback)(); 13 | @property (nonatomic, copy) void(^failureCallback)(); 14 | 15 | @property(nonatomic,strong) CLUPnPRenderer *render; //MDR渲染器 16 | 17 | @end 18 | @implementation StopAction 19 | @synthesize successCallback = _successCallback; 20 | @synthesize failureCallback = _failureCallback; 21 | 22 | - (instancetype)initWithDevice:(CLUPnPDevice *) device Success:(void(^)())successBlock failure:(void(^)())failureBlock 23 | { 24 | self = [self init]; 25 | 26 | self.successCallback = successBlock; 27 | self.failureCallback = failureBlock; 28 | 29 | self.render = [[CLUPnPRenderer alloc] initWithModel:device]; 30 | self.render.delegate = self; 31 | 32 | return self; 33 | } 34 | -(void)executeAction{ 35 | [self.render stop]; 36 | } 37 | 38 | #pragma mark CLUPnPResponseDelegate 39 | - (void)upnpPlayResponse{ 40 | if (self.failureCallback) { 41 | self.failureCallback(); 42 | } 43 | } 44 | - (void)upnpStopResponse{ 45 | if (self.successCallback) { 46 | self.successCallback(); 47 | } 48 | } 49 | @end 50 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/MRDLNA.h: -------------------------------------------------------------------------------- 1 | // 2 | // MRDLNA.h 3 | // MRDLNA 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // 7 | 8 | #import 9 | #import "CLUPnP.h" 10 | #import "CLUPnPDevice.h" 11 | 12 | @protocol DLNADelegate 13 | 14 | @optional 15 | /** 16 | DLNA局域网搜索设备结果 17 | @param devicesArray 搜索到的设备 18 | */ 19 | - (void)searchDLNAResult:(NSArray *)devicesArray; 20 | 21 | 22 | /** 23 | 投屏成功开始播放 24 | */ 25 | - (void)dlnaStartPlay; 26 | 27 | @end 28 | 29 | @interface MRDLNA : NSObject 30 | 31 | @property(nonatomic,weak)id delegate; 32 | 33 | @property(nonatomic, strong) CLUPnPDevice *device; 34 | 35 | @property(nonatomic,copy) NSString *playUrl; 36 | 37 | @property(nonatomic,assign) NSInteger searchTime; 38 | 39 | /** 40 | 单例 41 | */ 42 | +(instancetype)sharedMRDLNAManager; 43 | 44 | /** 45 | 搜设备 46 | */ 47 | - (void)startSearch; 48 | 49 | /** 50 | DLNA投屏 51 | */ 52 | - (void)startDLNA; 53 | /** 54 | DLNA投屏(首先停止)---投屏不了可以使用这个方法 55 | ** 【流程: 停止 ->设置代理 ->设置Url -> 播放】 56 | */ 57 | - (void)startDLNAAfterStop; 58 | 59 | /** 60 | 退出DLNA 61 | */ 62 | - (void)endDLNA; 63 | 64 | /** 65 | 播放 66 | */ 67 | - (void)dlnaPlay; 68 | 69 | /** 70 | 暂停 71 | */ 72 | - (void)dlnaPause; 73 | 74 | /** 75 | 设置音量 volume建议传0-100之间字符串 76 | */ 77 | - (void)volumeChanged:(NSString *)volume; 78 | 79 | /** 80 | 设置播放进度 seek单位是秒 81 | */ 82 | - (void)seekChanged:(NSInteger)seek; 83 | 84 | /** 85 | 播放切集 86 | */ 87 | - (void)playTheURL:(NSString *)url; 88 | @end 89 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/MRDLNA/Classes/ARC/MRDLNA.m: -------------------------------------------------------------------------------- 1 | // 2 | // MRDLNA.m 3 | // MRDLNA 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // 7 | 8 | #import "MRDLNA.h" 9 | #import "StopAction.h" 10 | 11 | @interface MRDLNA() 12 | 13 | @property(nonatomic,strong) CLUPnPServer *upd; //MDS服务器 14 | @property(nonatomic,strong) NSMutableArray *dataArray; 15 | 16 | @property(nonatomic,strong) CLUPnPRenderer *render; //MDR渲染器 17 | @property(nonatomic,copy) NSString *volume; 18 | @property(nonatomic,assign) NSInteger seekTime; 19 | @property(nonatomic,assign) BOOL isPlaying; 20 | 21 | @end 22 | 23 | @implementation MRDLNA 24 | 25 | + (MRDLNA *)sharedMRDLNAManager{ 26 | static MRDLNA *instance = nil; 27 | static dispatch_once_t once; 28 | dispatch_once(&once, ^{ 29 | instance = [[self alloc] init]; 30 | }); 31 | return instance; 32 | } 33 | 34 | - (instancetype)init 35 | { 36 | self = [super init]; 37 | if (self) { 38 | self.upd = [CLUPnPServer shareServer]; 39 | self.upd.searchTime = 5; 40 | self.upd.delegate = self; 41 | self.dataArray = [NSMutableArray array]; 42 | } 43 | return self; 44 | } 45 | 46 | /** 47 | ** DLNA投屏 48 | */ 49 | - (void)startDLNA{ 50 | [self initCLUPnPRendererAndDlnaPlay]; 51 | } 52 | /** 53 | ** DLNA投屏 54 | ** 【流程: 停止 ->设置代理 ->设置Url -> 播放】 55 | */ 56 | - (void)startDLNAAfterStop{ 57 | StopAction *action = [[StopAction alloc]initWithDevice:self.device Success:^{ 58 | [self initCLUPnPRendererAndDlnaPlay]; 59 | 60 | } failure:^{ 61 | [self initCLUPnPRendererAndDlnaPlay]; 62 | }]; 63 | [action executeAction]; 64 | } 65 | /** 66 | 初始化CLUPnPRenderer 67 | */ 68 | -(void)initCLUPnPRendererAndDlnaPlay{ 69 | self.render = [[CLUPnPRenderer alloc] initWithModel:self.device]; 70 | self.render.delegate = self; 71 | [self.render setAVTransportURL:self.playUrl]; 72 | } 73 | /** 74 | 退出DLNA 75 | */ 76 | - (void)endDLNA{ 77 | [self.render stop]; 78 | } 79 | 80 | /** 81 | 播放 82 | */ 83 | - (void)dlnaPlay{ 84 | [self.render play]; 85 | } 86 | 87 | 88 | /** 89 | 暂停 90 | */ 91 | - (void)dlnaPause{ 92 | [self.render pause]; 93 | } 94 | 95 | /** 96 | 搜设备 97 | */ 98 | - (void)startSearch{ 99 | [self.upd start]; 100 | } 101 | 102 | 103 | /** 104 | 设置音量 105 | */ 106 | - (void)volumeChanged:(NSString *)volume{ 107 | self.volume = volume; 108 | [self.render setVolumeWith:volume]; 109 | } 110 | 111 | 112 | /** 113 | 播放进度条 114 | */ 115 | - (void)seekChanged:(NSInteger)seek{ 116 | self.seekTime = seek; 117 | NSString *seekStr = [self timeFormatted:seek]; 118 | [self.render seekToTarget:seekStr Unit:unitREL_TIME]; 119 | } 120 | 121 | 122 | /** 123 | 播放进度单位转换成string 124 | */ 125 | - (NSString *)timeFormatted:(NSInteger)totalSeconds 126 | { 127 | NSInteger seconds = totalSeconds % 60; 128 | NSInteger minutes = (totalSeconds / 60) % 60; 129 | NSInteger hours = totalSeconds / 3600; 130 | return [NSString stringWithFormat:@"%02ld:%02ld:%02ld",(long)hours, (long)minutes, (long)seconds]; 131 | } 132 | 133 | /** 134 | 播放切集 135 | */ 136 | - (void)playTheURL:(NSString *)url{ 137 | self.playUrl = url; 138 | [self.render setAVTransportURL:url]; 139 | } 140 | 141 | #pragma mark -- 搜索协议CLUPnPDeviceDelegate回调 142 | - (void)upnpSearchChangeWithResults:(NSArray *)devices{ 143 | NSMutableArray *deviceMarr = [NSMutableArray array]; 144 | for (CLUPnPDevice *device in devices) { 145 | // 只返回匹配到视频播放的设备 146 | if ([device.uuid containsString:serviceType_AVTransport]) { 147 | [deviceMarr addObject:device]; 148 | } 149 | } 150 | if ([self.delegate respondsToSelector:@selector(searchDLNAResult:)]) { 151 | [self.delegate searchDLNAResult:[deviceMarr copy]]; 152 | } 153 | self.dataArray = deviceMarr; 154 | } 155 | 156 | - (void)upnpSearchErrorWithError:(NSError *)error{ 157 | // NSLog(@"DLNA_Error======>%@", error); 158 | } 159 | 160 | #pragma mark - CLUPnPResponseDelegate 161 | - (void)upnpSetAVTransportURIResponse{ 162 | [self.render play]; 163 | } 164 | 165 | - (void)upnpGetTransportInfoResponse:(CLUPnPTransportInfo *)info{ 166 | // NSLog(@"%@ === %@", info.currentTransportState, info.currentTransportStatus); 167 | if (!([info.currentTransportState isEqualToString:@"PLAYING"] || [info.currentTransportState isEqualToString:@"TRANSITIONING"])) { 168 | [self.render play]; 169 | } 170 | } 171 | 172 | - (void)upnpPlayResponse{ 173 | if ([self.delegate respondsToSelector:@selector(dlnaStartPlay)]) { 174 | [self.delegate dlnaStartPlay]; 175 | } 176 | } 177 | 178 | #pragma mark Set&Get 179 | - (void)setSearchTime:(NSInteger)searchTime{ 180 | _searchTime = searchTime; 181 | self.upd.searchTime = searchTime; 182 | } 183 | @end 184 | -------------------------------------------------------------------------------- /DEMO/Pods/MRDLNA/README.md: -------------------------------------------------------------------------------- 1 | 2 | # MRDLNA 3 | ![](https://img.shields.io/badge/project-iOS-blue.svg) 4 | ![](https://img.shields.io/badge/install-CocoaPods-orange.svg) 5 | ![](https://img.shields.io/badge/LANG-ObjC-brightgreen.svg) 6 | # Dependencies 7 | 8 | - iOS DLNA Function 9 | - iOS DLNA 投屏功能, 支持各大主流电视盒子(小米,华为,乐视,移动魔百盒等), 可以播放,暂停,快进退,调音量,退出. 10 | 11 | # Usage 12 | 13 | ``` 14 | pod 'MRDLNA' 15 | ``` 16 | 17 | 18 | - Search Devices 19 | 20 | ``` 21 | 22 | 23 | - (void)searchDLNAResult:(NSArray *)devicesArray{ 24 | NSLog(@"Find devices"); 25 | //self.deviceArr = devicesArray; 26 | //[self.dlnaTable reloadData]; 27 | } 28 | 29 | - (void)dlnaStartPlay{ 30 | NSLog(@"DLNA Success Start Play"); 31 | } 32 | 33 | 34 | ``` 35 | 36 | - Play Control 37 | 38 | ``` 39 | @property(nonatomic,strong) MRDLNA *dlnaManager; 40 | 41 | #pragma mark -Play Control 42 | 43 | /** 44 | Quit 45 | */ 46 | - (IBAction)closeAction:(id)sender { 47 | [self.dlnaManager endDLNA]; 48 | } 49 | 50 | 51 | /** 52 | Play/Pause 53 | */ 54 | - (IBAction)playOrPause:(id)sender { 55 | if (_isPlaying) { 56 | [self.dlnaManager dlnaPause]; 57 | }else{ 58 | [self.dlnaManager dlnaPlay]; 59 | } 60 | _isPlaying = !_isPlaying; 61 | } 62 | 63 | 64 | /** 65 | SeekChange 66 | */ 67 | - (IBAction)seekChanged:(UISlider *)sender{ 68 | NSInteger sec = sender.value * 60 * 60; 69 | NSLog(@"播放进度条======>: %zd",sec); 70 | [self.dlnaManager seekChanged:sec]; 71 | } 72 | 73 | /** 74 | VolumeChange 75 | */ 76 | - (IBAction)volumeChange:(UISlider *)sender { 77 | NSString *vol = [NSString stringWithFormat:@"%.f",sender.value * 100]; 78 | NSLog(@"音量========>: %@",vol); 79 | [self.dlnaManager volumeChanged:vol]; 80 | } 81 | 82 | 83 | /** 84 | PlayNextMovie 85 | */ 86 | - (IBAction)playNext:(id)sender { 87 | NSString *testVideo = @"http://wvideo.spriteapp.cn/video/2016/0328/56f8ec01d9bfe_wpd.mp4"; 88 | [self.dlnaManager playTheURL:testVideo]; 89 | } 90 | ``` 91 | 92 | # For more information please see demo 93 | 94 | # License 95 | MIT 96 | 97 | 98 | -------------------------------------------------------------------------------- /DEMO/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaAsyncSocket (7.6.3) 3 | - MRDLNA (0.1.1): 4 | - CocoaAsyncSocket 5 | - MRDLNA/MRC (= 0.1.1) 6 | - MRDLNA/MRC (0.1.1): 7 | - CocoaAsyncSocket 8 | 9 | DEPENDENCIES: 10 | - MRDLNA 11 | 12 | SPEC REPOS: 13 | trunk: 14 | - CocoaAsyncSocket 15 | - MRDLNA 16 | 17 | SPEC CHECKSUMS: 18 | CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987 19 | MRDLNA: 3fe35c6ac57c946413d07896faeb9101c4d8853d 20 | 21 | PODFILE CHECKSUM: e2c01376debefbf03aeb90627ecae51503095505 22 | 23 | COCOAPODS: 1.15.2 24 | -------------------------------------------------------------------------------- /DEMO/Pods/Pods.xcodeproj/xcuserdata/mccree.xcuserdatad/xcschemes/CocoaAsyncSocket.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /DEMO/Pods/Pods.xcodeproj/xcuserdata/mccree.xcuserdatad/xcschemes/MRDLNA.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /DEMO/Pods/Pods.xcodeproj/xcuserdata/mccree.xcuserdatad/xcschemes/Pods-dlnaDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 7.6.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CocoaAsyncSocket : NSObject 3 | @end 4 | @implementation PodsDummy_CocoaAsyncSocket 5 | @end 6 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "GCDAsyncSocket.h" 14 | #import "GCDAsyncUdpSocket.h" 15 | 16 | FOUNDATION_EXPORT double CocoaAsyncSocketVersionNumber; 17 | FOUNDATION_EXPORT const unsigned char CocoaAsyncSocketVersionString[]; 18 | 19 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -framework "CFNetwork" -framework "Security" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CocoaAsyncSocket 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket.modulemap: -------------------------------------------------------------------------------- 1 | framework module CocoaAsyncSocket { 2 | umbrella header "CocoaAsyncSocket-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -framework "CFNetwork" -framework "Security" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CocoaAsyncSocket 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/MRDLNA/MRDLNA-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/MRDLNA/MRDLNA-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MRDLNA : NSObject 3 | @end 4 | @implementation PodsDummy_MRDLNA 5 | @end 6 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/MRDLNA/MRDLNA-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/MRDLNA/MRDLNA-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "CLUPnP.h" 14 | #import "CLUPnPAction.h" 15 | #import "CLUPnPAVPositionInfo.h" 16 | #import "CLUPnPDevice.h" 17 | #import "CLUPnPRenderer.h" 18 | #import "CLUPnPResponseDelegate.h" 19 | #import "CLUPnPServer.h" 20 | #import "StopAction.h" 21 | #import "MRDLNA.h" 22 | #import "GDataXMLNode.h" 23 | 24 | FOUNDATION_EXPORT double MRDLNAVersionNumber; 25 | FOUNDATION_EXPORT const unsigned char MRDLNAVersionString[]; 26 | 27 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/MRDLNA/MRDLNA.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA 4 | ENABLE_BITCODE = NO 5 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" 6 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 7 | HEADER_SEARCH_PATHS = $(inherited) ${SDKROOT}/usr/include/libxml2 8 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "Security" 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 12 | PODS_ROOT = ${SRCROOT} 13 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MRDLNA 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 16 | SKIP_INSTALL = YES 17 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 18 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/MRDLNA/MRDLNA.modulemap: -------------------------------------------------------------------------------- 1 | framework module MRDLNA { 2 | umbrella header "MRDLNA-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/MRDLNA/MRDLNA.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA 4 | ENABLE_BITCODE = NO 5 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" 6 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 7 | HEADER_SEARCH_PATHS = $(inherited) ${SDKROOT}/usr/include/libxml2 8 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "Security" 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 12 | PODS_ROOT = ${SRCROOT} 13 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/MRDLNA 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 16 | SKIP_INSTALL = YES 17 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 18 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## CocoaAsyncSocket 5 | 6 | Public Domain License 7 | 8 | The CocoaAsyncSocket project is in the public domain. 9 | 10 | The original TCP version (AsyncSocket) was created by Dustin Voss in January 2003. 11 | Updated and maintained by Deusty LLC and the Apple development community. 12 | 13 | 14 | ## MRDLNA 15 | 16 | MIT License 17 | 18 | Copyright (c) 2018 mccRee 19 | 20 | Permission is hereby granted, free of charge, to any person obtaining a copy 21 | of this software and associated documentation files (the "Software"), to deal 22 | in the Software without restriction, including without limitation the rights 23 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 24 | copies of the Software, and to permit persons to whom the Software is 25 | furnished to do so, subject to the following conditions: 26 | 27 | The above copyright notice and this permission notice shall be included in all 28 | copies or substantial portions of the Software. 29 | 30 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 31 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 32 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 33 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 34 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 35 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 36 | SOFTWARE. 37 | 38 | Generated by CocoaPods - https://cocoapods.org 39 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Public Domain License 18 | 19 | The CocoaAsyncSocket project is in the public domain. 20 | 21 | The original TCP version (AsyncSocket) was created by Dustin Voss in January 2003. 22 | Updated and maintained by Deusty LLC and the Apple development community. 23 | 24 | License 25 | public domain 26 | Title 27 | CocoaAsyncSocket 28 | Type 29 | PSGroupSpecifier 30 | 31 | 32 | FooterText 33 | MIT License 34 | 35 | Copyright (c) 2018 mccRee 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining a copy 38 | of this software and associated documentation files (the "Software"), to deal 39 | in the Software without restriction, including without limitation the rights 40 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 41 | copies of the Software, and to permit persons to whom the Software is 42 | furnished to do so, subject to the following conditions: 43 | 44 | The above copyright notice and this permission notice shall be included in all 45 | copies or substantial portions of the Software. 46 | 47 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 48 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 49 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 50 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 51 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 52 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 53 | SOFTWARE. 54 | 55 | License 56 | MIT 57 | Title 58 | MRDLNA 59 | Type 60 | PSGroupSpecifier 61 | 62 | 63 | FooterText 64 | Generated by CocoaPods - https://cocoapods.org 65 | Title 66 | 67 | Type 68 | PSGroupSpecifier 69 | 70 | 71 | StringsTable 72 | Acknowledgements 73 | Title 74 | Acknowledgements 75 | 76 | 77 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_dlnaDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_dlnaDemo 5 | @end 6 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-frameworks-Debug-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/CocoaAsyncSocket/CocoaAsyncSocket.framework 3 | ${BUILT_PRODUCTS_DIR}/MRDLNA/MRDLNA.framework -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-frameworks-Debug-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaAsyncSocket.framework 2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MRDLNA.framework -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-frameworks-Release-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/CocoaAsyncSocket/CocoaAsyncSocket.framework 3 | ${BUILT_PRODUCTS_DIR}/MRDLNA/MRDLNA.framework -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-frameworks-Release-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CocoaAsyncSocket.framework 2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MRDLNA.framework -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_dlnaDemoVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_dlnaDemoVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | ENABLE_BITCODE = NO 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket/CocoaAsyncSocket.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA/MRDLNA.framework/Headers" ${SDKROOT}/usr/include/libxml2 7 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 8 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "MRDLNA" -framework "Security" 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_dlnaDemo { 2 | umbrella header "Pods-dlnaDemo-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /DEMO/Pods/Target Support Files/Pods-dlnaDemo/Pods-dlnaDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | ENABLE_BITCODE = NO 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket/CocoaAsyncSocket.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA/MRDLNA.framework/Headers" ${SDKROOT}/usr/include/libxml2 7 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 8 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "MRDLNA" -framework "Security" 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // dlnaDemo 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // Copyright © 2018年 mccree. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // dlnaDemo 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // Copyright © 2018年 mccree. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /DEMO/dlnaDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /DEMO/dlnaDemo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/DLNA_Play/DLNAControlVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAControlVC.h 3 | // YSTThirdSDK_Example 4 | // 5 | // Created by MccRee on 2018/2/11. 6 | // Copyright © 2018年 MQL9011. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface DLNAControlVC : UIViewController 13 | 14 | @property (nonatomic, strong) CLUPnPDevice *model; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/DLNA_Play/DLNAControlVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAControlVC.m 3 | // YSTThirdSDK_Example 4 | // 5 | // Created by MccRee on 2018/2/11. 6 | // Copyright © 2018年 MQL9011. All rights reserved. 7 | // 8 | 9 | #import "DLNAControlVC.h" 10 | #import 11 | 12 | 13 | //屏幕高度 14 | #define H [UIScreen mainScreen].bounds.size.height 15 | #define W [UIScreen mainScreen].bounds.size.width 16 | 17 | 18 | @interface DLNAControlVC () 19 | { 20 | BOOL _isPlaying; 21 | } 22 | 23 | @property(nonatomic,strong) MRDLNA *dlnaManager; 24 | 25 | @end 26 | 27 | @implementation DLNAControlVC 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | 32 | self.dlnaManager = [MRDLNA sharedMRDLNAManager]; 33 | [self.dlnaManager startDLNA]; 34 | 35 | _isPlaying = YES; 36 | } 37 | 38 | #pragma mark -播放控制 39 | 40 | /** 41 | 退出 42 | */ 43 | - (IBAction)closeAction:(id)sender { 44 | [self.dlnaManager endDLNA]; 45 | } 46 | 47 | 48 | /** 49 | 播放/暂停 50 | */ 51 | - (IBAction)playOrPause:(id)sender { 52 | if (_isPlaying) { 53 | [self.dlnaManager dlnaPause]; 54 | }else{ 55 | [self.dlnaManager dlnaPlay]; 56 | } 57 | _isPlaying = !_isPlaying; 58 | } 59 | 60 | 61 | /** 62 | 进度条 63 | */ 64 | - (IBAction)seekChanged:(UISlider *)sender{ 65 | NSInteger sec = sender.value * 60 * 60; 66 | NSLog(@"播放进度条======>: %zd",sec); 67 | [self.dlnaManager seekChanged:sec]; 68 | } 69 | 70 | /** 71 | 音量 72 | */ 73 | - (IBAction)volumeChange:(UISlider *)sender { 74 | NSString *vol = [NSString stringWithFormat:@"%.f",sender.value * 100]; 75 | NSLog(@"音量========>: %@",vol); 76 | [self.dlnaManager volumeChanged:vol]; 77 | } 78 | 79 | 80 | /** 81 | 切集 82 | */ 83 | - (IBAction)playNext:(id)sender { 84 | NSString *testVideo = @"http://wvideo.spriteapp.cn/video/2016/0328/56f8ec01d9bfe_wpd.mp4"; 85 | [self.dlnaManager playTheURL:testVideo]; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/DLNA_Play/DLNASearchVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // dlnaTestVC.h 3 | // YSTThirdSDK_Example 4 | // 5 | // Created by MccRee on 2018/2/9. 6 | // Copyright © 2018年 MQL9011. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DLNASearchVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/DLNA_Play/DLNASearchVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // dlnaTestVC.m 3 | // YSTThirdSDK_Example 4 | // 5 | // Created by MccRee on 2018/2/9. 6 | // Copyright © 2018年 MQL9011. All rights reserved. 7 | // 8 | 9 | #import "DLNASearchVC.h" 10 | #import "DLNAControlVC.h" 11 | #import 12 | 13 | 14 | //屏幕高度 15 | #define H [UIScreen mainScreen].bounds.size.height 16 | #define W [UIScreen mainScreen].bounds.size.width 17 | 18 | @interface DLNASearchVC () 19 | 20 | @property(nonatomic,strong) MRDLNA *dlnaManager; 21 | 22 | @property(nonatomic,strong) UITableView *dlnaTable; 23 | 24 | @property(nonatomic,strong) NSArray *deviceArr; 25 | 26 | @end 27 | 28 | @implementation DLNASearchVC 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | self.view.backgroundColor = [UIColor whiteColor]; 33 | self.dlnaTable.frame = CGRectMake(0, 80, W, 300); 34 | [self.view addSubview:self.dlnaTable]; 35 | self.dlnaManager = [MRDLNA sharedMRDLNAManager]; 36 | self.dlnaManager.delegate = self; 37 | } 38 | 39 | 40 | - (void)viewWillAppear:(BOOL)animated{ 41 | [super viewWillAppear:animated]; 42 | [self.dlnaManager startSearch]; 43 | } 44 | 45 | - (void)searchDLNAResult:(NSArray *)devicesArray{ 46 | NSLog(@"发现设备"); 47 | self.deviceArr = devicesArray; 48 | [self.dlnaTable reloadData]; 49 | } 50 | 51 | - (void)dlnaStartPlay{ 52 | NSLog(@"投屏成功 开始播放"); 53 | } 54 | 55 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 56 | return self.deviceArr.count; 57 | } 58 | 59 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 60 | NSString *reuseID = [NSString stringWithFormat:@"cell%lu%lu",(long)indexPath.row,(long)indexPath.section]; 61 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseID]; 62 | if (cell == nil) { 63 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseID]; 64 | } 65 | CLUPnPDevice *device = self.deviceArr[indexPath.row]; 66 | cell.textLabel.text = device.friendlyName; 67 | return cell; 68 | } 69 | 70 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 71 | //测试视频如果太短,快进时会直接结束,建议找长一点的视频测试 72 | NSString *testUrl = @"http://223.110.239.40:6060/cntvmobile/vod/p_cntvmobile00000000000020150518/m_cntvmobile00000000000659727681"; 73 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 74 | if (indexPath.row < self.deviceArr.count) { 75 | CLUPnPDevice *model = self.deviceArr[indexPath.row]; 76 | self.dlnaManager.device = model; 77 | self.dlnaManager.playUrl = testUrl; 78 | DLNAControlVC *controlVC = [[DLNAControlVC alloc] init]; 79 | controlVC.model = model; 80 | [self.navigationController pushViewController:controlVC animated:YES]; 81 | } 82 | } 83 | 84 | 85 | - (UITableView *)dlnaTable{ 86 | if (!_dlnaTable) { 87 | _dlnaTable = [[UITableView alloc]init]; 88 | _dlnaTable.dataSource = self; 89 | _dlnaTable.delegate = self; 90 | } 91 | return _dlnaTable; 92 | } 93 | @end 94 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // dlnaDemo 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // Copyright © 2018年 mccree. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // dlnaDemo 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // Copyright © 2018年 mccree. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "DLNASearchVC.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | 22 | [self sendTestRequest]; 23 | } 24 | 25 | - (IBAction)gotoDlna:(id)sender { 26 | DLNASearchVC *dlna = [[DLNASearchVC alloc]init]; 27 | [self.navigationController pushViewController:dlna animated:YES]; 28 | 29 | } 30 | 31 | /** 32 | DLNA功能只有在用户允许了网络权限后才能使用 33 | */ 34 | -(void)sendTestRequest{ 35 | NSURL *url = [NSURL URLWithString:@"https://www.baidu.com"]; 36 | NSMutableURLRequest *requst = [[NSMutableURLRequest alloc]initWithURL:url]; 37 | requst.HTTPMethod = @"GET"; 38 | requst.timeoutInterval = 5; 39 | 40 | [NSURLConnection sendAsynchronousRequest:requst queue:[[NSOperationQueue alloc]init] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) { 41 | if (!connectionError.description) { 42 | NSLog(@"网络正常"); 43 | }else{ 44 | NSLog(@"=========>网络异常"); 45 | } 46 | }]; 47 | } 48 | 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /DEMO/dlnaDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // dlnaDemo 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // Copyright © 2018年 mccree. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Example/MRDLNA.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/MRDLNA.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/MRDLNA/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/MRDLNA/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/MRDLNA/DLNA_Play/DLNAControlVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAControlVC.h 3 | // YSTThirdSDK_Example 4 | // 5 | // Created by MccRee on 2018/2/11. 6 | // Copyright © 2018年 MQL9011. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface DLNAControlVC : UIViewController 13 | 14 | @property (nonatomic, strong) CLUPnPDevice *model; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Example/MRDLNA/DLNA_Play/DLNAControlVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // DLNAControlVC.m 3 | // YSTThirdSDK_Example 4 | // 5 | // Created by MccRee on 2018/2/11. 6 | // Copyright © 2018年 MQL9011. All rights reserved. 7 | // 8 | 9 | #import "DLNAControlVC.h" 10 | #import 11 | 12 | 13 | //屏幕高度 14 | #define H [UIScreen mainScreen].bounds.size.height 15 | #define W [UIScreen mainScreen].bounds.size.width 16 | 17 | 18 | @interface DLNAControlVC () 19 | { 20 | BOOL _isPlaying; 21 | } 22 | 23 | @property(nonatomic,strong) MRDLNA *dlnaManager; 24 | 25 | @end 26 | 27 | @implementation DLNAControlVC 28 | 29 | - (void)viewDidLoad { 30 | [super viewDidLoad]; 31 | 32 | self.dlnaManager = [MRDLNA sharedMRDLNAManager]; 33 | [self.dlnaManager startDLNA]; 34 | 35 | _isPlaying = YES; 36 | } 37 | 38 | #pragma mark -播放控制 39 | 40 | /** 41 | 退出 42 | */ 43 | - (IBAction)closeAction:(id)sender { 44 | [self.dlnaManager endDLNA]; 45 | } 46 | 47 | 48 | /** 49 | 播放/暂停 50 | */ 51 | - (IBAction)playOrPause:(id)sender { 52 | if (_isPlaying) { 53 | [self.dlnaManager dlnaPause]; 54 | }else{ 55 | [self.dlnaManager dlnaPlay]; 56 | } 57 | _isPlaying = !_isPlaying; 58 | } 59 | 60 | 61 | /** 62 | 进度条 63 | */ 64 | - (IBAction)seekChanged:(UISlider *)sender{ 65 | NSInteger sec = sender.value * 60 * 60; 66 | NSLog(@"播放进度条======>: %zd",sec); 67 | [self.dlnaManager seekChanged:sec]; 68 | } 69 | 70 | /** 71 | 音量 72 | */ 73 | - (IBAction)volumeChange:(UISlider *)sender { 74 | NSString *vol = [NSString stringWithFormat:@"%.f",sender.value * 100]; 75 | NSLog(@"音量========>: %@",vol); 76 | [self.dlnaManager volumeChanged:vol]; 77 | } 78 | 79 | 80 | /** 81 | 切集 82 | */ 83 | - (IBAction)playNext:(id)sender { 84 | NSString *testVideo = @"http://wvideo.spriteapp.cn/video/2016/0328/56f8ec01d9bfe_wpd.mp4"; 85 | [self.dlnaManager playTheURL:testVideo]; 86 | } 87 | 88 | @end 89 | -------------------------------------------------------------------------------- /Example/MRDLNA/DLNA_Play/DLNASearchVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // dlnaTestVC.h 3 | // YSTThirdSDK_Example 4 | // 5 | // Created by MccRee on 2018/2/9. 6 | // Copyright © 2018年 MQL9011. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface DLNASearchVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/MRDLNA/DLNA_Play/DLNASearchVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // dlnaTestVC.m 3 | // YSTThirdSDK_Example 4 | // 5 | // Created by MccRee on 2018/2/9. 6 | // Copyright © 2018年 MQL9011. All rights reserved. 7 | // 8 | 9 | #import "DLNASearchVC.h" 10 | #import "DLNAControlVC.h" 11 | #import 12 | 13 | 14 | //屏幕高度 15 | #define H [UIScreen mainScreen].bounds.size.height 16 | #define W [UIScreen mainScreen].bounds.size.width 17 | 18 | @interface DLNASearchVC () 19 | 20 | @property(nonatomic,strong) MRDLNA *dlnaManager; 21 | 22 | @property(nonatomic,strong) UITableView *dlnaTable; 23 | 24 | @property(nonatomic,strong) NSArray *deviceArr; 25 | 26 | @end 27 | 28 | @implementation DLNASearchVC 29 | 30 | - (void)viewDidLoad { 31 | [super viewDidLoad]; 32 | self.view.backgroundColor = [UIColor whiteColor]; 33 | self.dlnaTable.frame = CGRectMake(0, 80, W, 300); 34 | [self.view addSubview:self.dlnaTable]; 35 | self.dlnaManager = [MRDLNA sharedMRDLNAManager]; 36 | self.dlnaManager.delegate = self; 37 | } 38 | 39 | 40 | - (void)viewWillAppear:(BOOL)animated{ 41 | [super viewWillAppear:animated]; 42 | [self.dlnaManager startSearch]; 43 | } 44 | 45 | - (void)searchDLNAResult:(NSArray *)devicesArray{ 46 | NSLog(@"发现设备"); 47 | self.deviceArr = devicesArray; 48 | [self.dlnaTable reloadData]; 49 | } 50 | 51 | - (void)dlnaStartPlay{ 52 | NSLog(@"投屏成功 开始播放"); 53 | } 54 | 55 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 56 | return self.deviceArr.count; 57 | } 58 | 59 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 60 | NSString *reuseID = [NSString stringWithFormat:@"cell%lu%lu",(long)indexPath.row,(long)indexPath.section]; 61 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseID]; 62 | if (cell == nil) { 63 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseID]; 64 | } 65 | CLUPnPDevice *device = self.deviceArr[indexPath.row]; 66 | cell.textLabel.text = device.friendlyName; 67 | return cell; 68 | } 69 | 70 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 71 | NSString *testUrl = @"http://223.110.239.40:6060/cntvmobile/vod/p_cntvmobile00000000000020150518/m_cntvmobile00000000000659727681"; 72 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 73 | if (indexPath.row < self.deviceArr.count) { 74 | CLUPnPDevice *model = self.deviceArr[indexPath.row]; 75 | self.dlnaManager.device = model; 76 | self.dlnaManager.playUrl = testUrl; 77 | DLNAControlVC *controlVC = [[DLNAControlVC alloc] init]; 78 | controlVC.model = model; 79 | [self.navigationController pushViewController:controlVC animated:YES]; 80 | } 81 | } 82 | 83 | 84 | - (UITableView *)dlnaTable{ 85 | if (!_dlnaTable) { 86 | _dlnaTable = [[UITableView alloc]init]; 87 | _dlnaTable.dataSource = self; 88 | _dlnaTable.delegate = self; 89 | } 90 | return _dlnaTable; 91 | } 92 | @end 93 | -------------------------------------------------------------------------------- /Example/MRDLNA/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Example/MRDLNA/MRAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // MRAppDelegate.h 3 | // MRDLNA 4 | // 5 | // Created by MQL9011 on 05/04/2018. 6 | // Copyright (c) 2018 MQL9011. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface MRAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Example/MRDLNA/MRAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // MRAppDelegate.m 3 | // MRDLNA 4 | // 5 | // Created by MQL9011 on 05/04/2018. 6 | // Copyright (c) 2018 MQL9011. All rights reserved. 7 | // 8 | 9 | #import "MRAppDelegate.h" 10 | 11 | @implementation MRAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 22 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Example/MRDLNA/MRDLNA-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationLandscapeLeft 39 | UIInterfaceOrientationLandscapeRight 40 | 41 | UISupportedInterfaceOrientations~ipad 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationPortraitUpsideDown 45 | UIInterfaceOrientationLandscapeLeft 46 | UIInterfaceOrientationLandscapeRight 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Example/MRDLNA/MRDLNA-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | @import UIKit; 15 | @import Foundation; 16 | #endif 17 | -------------------------------------------------------------------------------- /Example/MRDLNA/MRViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MRViewController.h 3 | // MRDLNA 4 | // 5 | // Created by MQL9011 on 05/04/2018. 6 | // Copyright (c) 2018 MQL9011. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | 11 | @interface MRViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Example/MRDLNA/MRViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MRViewController.m 3 | // MRDLNA 4 | // 5 | // Created by MQL9011 on 05/04/2018. 6 | // Copyright (c) 2018 MQL9011. All rights reserved. 7 | // 8 | 9 | #import "MRViewController.h" 10 | #import "DLNASearchVC.h" 11 | 12 | 13 | @interface MRViewController () 14 | 15 | @end 16 | 17 | @implementation MRViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | 23 | [self sendTestRequest]; 24 | } 25 | 26 | - (IBAction)gotoDlna:(id)sender { 27 | DLNASearchVC *dlna = [[DLNASearchVC alloc]init]; 28 | [self.navigationController pushViewController:dlna animated:YES]; 29 | 30 | } 31 | 32 | /** 33 | DLNA功能只有在用户允许了网络权限后才能使用 34 | */ 35 | -(void)sendTestRequest{ 36 | NSURL *url = [NSURL URLWithString:@"https://www.baidu.com"]; 37 | NSMutableURLRequest *requst = [[NSMutableURLRequest alloc]initWithURL:url]; 38 | requst.HTTPMethod = @"GET"; 39 | requst.timeoutInterval = 5; 40 | 41 | [NSURLConnection sendAsynchronousRequest:requst queue:[[NSOperationQueue alloc]init] completionHandler:^(NSURLResponse * _Nullable response, NSData * _Nullable data, NSError * _Nullable connectionError) { 42 | if (!connectionError.description) { 43 | NSLog(@"网络正常"); 44 | }else{ 45 | NSLog(@"=========>网络异常"); 46 | } 47 | }]; 48 | } 49 | 50 | 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Example/MRDLNA/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Example/MRDLNA/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // MRDLNA 4 | // 5 | // Created by MQL9011 on 05/04/2018. 6 | // Copyright (c) 2018 MQL9011. All rights reserved. 7 | // 8 | 9 | @import UIKit; 10 | #import "MRAppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) 13 | { 14 | @autoreleasepool { 15 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([MRAppDelegate class])); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | platform :ios, '11.0' 3 | 4 | target 'MRDLNA_Example' do 5 | pod 'MRDLNA', :path => '../' 6 | 7 | target 'MRDLNA_Tests' do 8 | inherit! :search_paths 9 | 10 | 11 | end 12 | end 13 | 14 | post_install do |installer| 15 | # 解决xcode 15 报错 xcode SDK does not contain ‘libarclite‘ 16 | installer.pods_project.targets.each do |target| 17 | target.build_configurations.each do |config| 18 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' 19 | end 20 | end 21 | end 22 | 23 | 24 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaAsyncSocket (7.6.3) 3 | - MRDLNA (0.1.1): 4 | - CocoaAsyncSocket 5 | - MRDLNA/MRC (= 0.1.1) 6 | - MRDLNA/MRC (0.1.1): 7 | - CocoaAsyncSocket 8 | 9 | DEPENDENCIES: 10 | - MRDLNA (from `../`) 11 | 12 | SPEC REPOS: 13 | trunk: 14 | - CocoaAsyncSocket 15 | 16 | EXTERNAL SOURCES: 17 | MRDLNA: 18 | :path: "../" 19 | 20 | SPEC CHECKSUMS: 21 | CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987 22 | MRDLNA: 3fe35c6ac57c946413d07896faeb9101c4d8853d 23 | 24 | PODFILE CHECKSUM: 8cd9a1d5549782f7b2e8736969fed75746db1945 25 | 26 | COCOAPODS: 1.15.2 27 | -------------------------------------------------------------------------------- /Example/Pods/CocoaAsyncSocket/LICENSE.txt: -------------------------------------------------------------------------------- 1 | This library is in the public domain. 2 | However, not all organizations are allowed to use such a license. 3 | For example, Germany doesn't recognize the Public Domain and one is not allowed to use libraries under such license (or similar). 4 | 5 | Thus, the library is now dual licensed, 6 | and one is allowed to choose which license they would like to use. 7 | 8 | ################################################## 9 | License Option #1 : 10 | ################################################## 11 | 12 | Public Domain 13 | 14 | ################################################## 15 | License Option #2 : 16 | ################################################## 17 | 18 | Software License Agreement (BSD License) 19 | 20 | Copyright (c) 2017, Deusty, LLC 21 | All rights reserved. 22 | 23 | Redistribution and use of this software in source and binary forms, 24 | with or without modification, are permitted provided that the following conditions are met: 25 | 26 | * Redistributions of source code must retain the above 27 | copyright notice, this list of conditions and the 28 | following disclaimer. 29 | 30 | * Neither the name of Deusty LLC nor the names of its 31 | contributors may be used to endorse or promote products 32 | derived from this software without specific prior 33 | written permission of Deusty LLC. 34 | 35 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/MRDLNA.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "MRDLNA", 3 | "version": "0.1.1", 4 | "summary": "DLNA投屏", 5 | "description": "DLNA投屏,支持各大主流盒子互联网电视.", 6 | "homepage": "https://github.com/MQL9011/MRDLNA", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "MQL9011": "301063915@qq.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/MQL9011/MRDLNA.git", 16 | "tag": "0.1.1" 17 | }, 18 | "social_media_url": "http://cocomccree.cn/", 19 | "platforms": { 20 | "ios": "8.0" 21 | }, 22 | "source_files": "MRDLNA/Classes/ARC/**/*", 23 | "libraries": [ 24 | "icucore", 25 | "c++", 26 | "z", 27 | "xml2" 28 | ], 29 | "dependencies": { 30 | "CocoaAsyncSocket": [ 31 | 32 | ] 33 | }, 34 | "xcconfig": { 35 | "ENABLE_BITCODE": "NO", 36 | "HEADER_SEARCH_PATHS": "${SDKROOT}/usr/include/libxml2", 37 | "CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES": "YES" 38 | }, 39 | "subspecs": [ 40 | { 41 | "name": "MRC", 42 | "source_files": "MRDLNA/Classes/MRC/**/*", 43 | "requires_arc": false 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - CocoaAsyncSocket (7.6.3) 3 | - MRDLNA (0.1.1): 4 | - CocoaAsyncSocket 5 | - MRDLNA/MRC (= 0.1.1) 6 | - MRDLNA/MRC (0.1.1): 7 | - CocoaAsyncSocket 8 | 9 | DEPENDENCIES: 10 | - MRDLNA (from `../`) 11 | 12 | SPEC REPOS: 13 | trunk: 14 | - CocoaAsyncSocket 15 | 16 | EXTERNAL SOURCES: 17 | MRDLNA: 18 | :path: "../" 19 | 20 | SPEC CHECKSUMS: 21 | CocoaAsyncSocket: eafaa68a7e0ec99ead0a7b35015e0bf25d2c8987 22 | MRDLNA: 3fe35c6ac57c946413d07896faeb9101c4d8853d 23 | 24 | PODFILE CHECKSUM: 8cd9a1d5549782f7b2e8736969fed75746db1945 25 | 26 | COCOAPODS: 1.15.2 27 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/mccree.xcuserdatad/xcschemes/CocoaAsyncSocket.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/mccree.xcuserdatad/xcschemes/MRDLNA.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/mccree.xcuserdatad/xcschemes/Pods-MRDLNA_Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcuserdata/mccree.xcuserdatad/xcschemes/Pods-MRDLNA_Tests.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 7.6.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_CocoaAsyncSocket : NSObject 3 | @end 4 | @implementation PodsDummy_CocoaAsyncSocket 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "GCDAsyncSocket.h" 14 | #import "GCDAsyncUdpSocket.h" 15 | 16 | FOUNDATION_EXPORT double CocoaAsyncSocketVersionNumber; 17 | FOUNDATION_EXPORT const unsigned char CocoaAsyncSocketVersionString[]; 18 | 19 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -framework "CFNetwork" -framework "Security" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CocoaAsyncSocket 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket.modulemap: -------------------------------------------------------------------------------- 1 | framework module CocoaAsyncSocket { 2 | umbrella header "CocoaAsyncSocket-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -framework "CFNetwork" -framework "Security" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CocoaAsyncSocket 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/CocoaAsyncSocket.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "CFNetwork" -framework "Security" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/CocoaAsyncSocket 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/CocoaAsyncSocket/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 7.6.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/MRDLNA-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/MRDLNA-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_MRDLNA : NSObject 3 | @end 4 | @implementation PodsDummy_MRDLNA 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/MRDLNA-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/MRDLNA-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "CLUPnP.h" 14 | #import "CLUPnPAction.h" 15 | #import "CLUPnPAVPositionInfo.h" 16 | #import "CLUPnPDevice.h" 17 | #import "CLUPnPRenderer.h" 18 | #import "CLUPnPResponseDelegate.h" 19 | #import "CLUPnPServer.h" 20 | #import "CLXMLDocument.h" 21 | #import "CLXMLParser.h" 22 | #import "StopAction.h" 23 | #import "MRDLNA.h" 24 | 25 | FOUNDATION_EXPORT double MRDLNAVersionNumber; 26 | FOUNDATION_EXPORT const unsigned char MRDLNAVersionString[]; 27 | 28 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/MRDLNA.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA 4 | ENABLE_BITCODE = NO 5 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" 6 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 7 | HEADER_SEARCH_PATHS = $(inherited) ${SDKROOT}/usr/include/libxml2 8 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "Security" 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 12 | PODS_ROOT = ${SRCROOT} 13 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 16 | SKIP_INSTALL = YES 17 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 18 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/MRDLNA.modulemap: -------------------------------------------------------------------------------- 1 | framework module MRDLNA { 2 | umbrella header "MRDLNA-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/MRDLNA.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA 4 | ENABLE_BITCODE = NO 5 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" 6 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 7 | HEADER_SEARCH_PATHS = $(inherited) ${SDKROOT}/usr/include/libxml2 8 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "Security" 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} 12 | PODS_ROOT = ${SRCROOT} 13 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 16 | SKIP_INSTALL = YES 17 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 18 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/MRDLNA/MRDLNA.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA 3 | ENABLE_BITCODE = NO 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" ${SDKROOT}/usr/include/libxml2 7 | OTHER_LDFLAGS = -l"c++" -l"icucore" -l"xml2" -l"z" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT} 11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## CocoaAsyncSocket 5 | 6 | Public Domain License 7 | 8 | The CocoaAsyncSocket project is in the public domain. 9 | 10 | The original TCP version (AsyncSocket) was created by Dustin Voss in January 2003. 11 | Updated and maintained by Deusty LLC and the Apple development community. 12 | 13 | 14 | ## MRDLNA 15 | 16 | MIT License 17 | 18 | Copyright (c) 2018 mccRee 19 | 20 | Permission is hereby granted, free of charge, to any person obtaining a copy 21 | of this software and associated documentation files (the "Software"), to deal 22 | in the Software without restriction, including without limitation the rights 23 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 24 | copies of the Software, and to permit persons to whom the Software is 25 | furnished to do so, subject to the following conditions: 26 | 27 | The above copyright notice and this permission notice shall be included in all 28 | copies or substantial portions of the Software. 29 | 30 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 31 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 32 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 33 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 34 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 35 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 36 | SOFTWARE. 37 | 38 | Generated by CocoaPods - https://cocoapods.org 39 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Public Domain License 18 | 19 | The CocoaAsyncSocket project is in the public domain. 20 | 21 | The original TCP version (AsyncSocket) was created by Dustin Voss in January 2003. 22 | Updated and maintained by Deusty LLC and the Apple development community. 23 | 24 | License 25 | public domain 26 | Title 27 | CocoaAsyncSocket 28 | Type 29 | PSGroupSpecifier 30 | 31 | 32 | FooterText 33 | MIT License 34 | 35 | Copyright (c) 2018 mccRee 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining a copy 38 | of this software and associated documentation files (the "Software"), to deal 39 | in the Software without restriction, including without limitation the rights 40 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 41 | copies of the Software, and to permit persons to whom the Software is 42 | furnished to do so, subject to the following conditions: 43 | 44 | The above copyright notice and this permission notice shall be included in all 45 | copies or substantial portions of the Software. 46 | 47 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 48 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 49 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 50 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 51 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 52 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 53 | SOFTWARE. 54 | 55 | License 56 | MIT 57 | Title 58 | MRDLNA 59 | Type 60 | PSGroupSpecifier 61 | 62 | 63 | FooterText 64 | Generated by CocoaPods - https://cocoapods.org 65 | Title 66 | 67 | Type 68 | PSGroupSpecifier 69 | 70 | 71 | StringsTable 72 | Acknowledgements 73 | Title 74 | Acknowledgements 75 | 76 | 77 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MRDLNA_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MRDLNA_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 12 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 13 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 14 | 15 | case "${TARGETED_DEVICE_FAMILY}" in 16 | 1,2) 17 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 18 | ;; 19 | 1) 20 | TARGET_DEVICE_ARGS="--target-device iphone" 21 | ;; 22 | 2) 23 | TARGET_DEVICE_ARGS="--target-device ipad" 24 | ;; 25 | 3) 26 | TARGET_DEVICE_ARGS="--target-device tv" 27 | ;; 28 | 4) 29 | TARGET_DEVICE_ARGS="--target-device watch" 30 | ;; 31 | *) 32 | TARGET_DEVICE_ARGS="--target-device mac" 33 | ;; 34 | esac 35 | 36 | install_resource() 37 | { 38 | if [[ "$1" = /* ]] ; then 39 | RESOURCE_PATH="$1" 40 | else 41 | RESOURCE_PATH="${PODS_ROOT}/$1" 42 | fi 43 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 44 | cat << EOM 45 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 46 | EOM 47 | exit 1 48 | fi 49 | case $RESOURCE_PATH in 50 | *.storyboard) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.xib) 55 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 56 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 57 | ;; 58 | *.framework) 59 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 60 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 61 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 62 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 63 | ;; 64 | *.xcdatamodel) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 67 | ;; 68 | *.xcdatamodeld) 69 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 70 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 71 | ;; 72 | *.xcmappingmodel) 73 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 74 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 75 | ;; 76 | *.xcassets) 77 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 78 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 79 | ;; 80 | *) 81 | echo "$RESOURCE_PATH" || true 82 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 83 | ;; 84 | esac 85 | } 86 | 87 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 89 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 90 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 91 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 92 | fi 93 | rm -f "$RESOURCES_TO_COPY" 94 | 95 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 96 | then 97 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 98 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 99 | while read line; do 100 | if [[ $line != "${PODS_ROOT}*" ]]; then 101 | XCASSET_FILES+=("$line") 102 | fi 103 | done <<<"$OTHER_XCASSETS" 104 | 105 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 106 | fi 107 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_MRDLNA_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_MRDLNA_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | ENABLE_BITCODE = NO 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket/CocoaAsyncSocket.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA/MRDLNA.framework/Headers" ${SDKROOT}/usr/include/libxml2 7 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 8 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "MRDLNA" -framework "Security" 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_MRDLNA_Example { 2 | umbrella header "Pods-MRDLNA_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Example/Pods-MRDLNA_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | ENABLE_BITCODE = NO 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket/CocoaAsyncSocket.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA/MRDLNA.framework/Headers" ${SDKROOT}/usr/include/libxml2 7 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 8 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "MRDLNA" -framework "Security" 9 | PODS_BUILD_DIR = ${BUILD_DIR} 10 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 11 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 12 | PODS_ROOT = ${SRCROOT}/Pods 13 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | ${PODS_DEVELOPMENT_LANGUAGE} 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_MRDLNA_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_MRDLNA_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 12 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 13 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 14 | 15 | case "${TARGETED_DEVICE_FAMILY}" in 16 | 1,2) 17 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 18 | ;; 19 | 1) 20 | TARGET_DEVICE_ARGS="--target-device iphone" 21 | ;; 22 | 2) 23 | TARGET_DEVICE_ARGS="--target-device ipad" 24 | ;; 25 | 3) 26 | TARGET_DEVICE_ARGS="--target-device tv" 27 | ;; 28 | 4) 29 | TARGET_DEVICE_ARGS="--target-device watch" 30 | ;; 31 | *) 32 | TARGET_DEVICE_ARGS="--target-device mac" 33 | ;; 34 | esac 35 | 36 | install_resource() 37 | { 38 | if [[ "$1" = /* ]] ; then 39 | RESOURCE_PATH="$1" 40 | else 41 | RESOURCE_PATH="${PODS_ROOT}/$1" 42 | fi 43 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 44 | cat << EOM 45 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 46 | EOM 47 | exit 1 48 | fi 49 | case $RESOURCE_PATH in 50 | *.storyboard) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.xib) 55 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true 56 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 57 | ;; 58 | *.framework) 59 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 60 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 61 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true 62 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 63 | ;; 64 | *.xcdatamodel) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 67 | ;; 68 | *.xcdatamodeld) 69 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true 70 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 71 | ;; 72 | *.xcmappingmodel) 73 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true 74 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 75 | ;; 76 | *.xcassets) 77 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 78 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 79 | ;; 80 | *) 81 | echo "$RESOURCE_PATH" || true 82 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 83 | ;; 84 | esac 85 | } 86 | 87 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 89 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 90 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 91 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 92 | fi 93 | rm -f "$RESOURCES_TO_COPY" 94 | 95 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 96 | then 97 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 98 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 99 | while read line; do 100 | if [[ $line != "${PODS_ROOT}*" ]]; then 101 | XCASSET_FILES+=("$line") 102 | fi 103 | done <<<"$OTHER_XCASSETS" 104 | 105 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 106 | fi 107 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_MRDLNA_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_MRDLNA_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | ENABLE_BITCODE = NO 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket/CocoaAsyncSocket.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA/MRDLNA.framework/Headers" ${SDKROOT}/usr/include/libxml2 7 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "MRDLNA" -framework "Security" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_MRDLNA_Tests { 2 | umbrella header "Pods-MRDLNA_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-MRDLNA_Tests/Pods-MRDLNA_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | ENABLE_BITCODE = NO 4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA" 5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 6 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CocoaAsyncSocket/CocoaAsyncSocket.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/MRDLNA/MRDLNA.framework/Headers" ${SDKROOT}/usr/include/libxml2 7 | OTHER_LDFLAGS = $(inherited) -l"c++" -l"icucore" -l"xml2" -l"z" -framework "CFNetwork" -framework "CocoaAsyncSocket" -framework "MRDLNA" -framework "Security" 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Example/Tests/Tests-Prefix.pch: -------------------------------------------------------------------------------- 1 | // The contents of this file are implicitly included at the beginning of every test case source file. 2 | 3 | #ifdef __OBJC__ 4 | 5 | 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /Example/Tests/Tests.m: -------------------------------------------------------------------------------- 1 | // 2 | // MRDLNATests.m 3 | // MRDLNATests 4 | // 5 | // Created by MQL9011 on 05/04/2018. 6 | // Copyright (c) 2018 MQL9011. All rights reserved. 7 | // 8 | 9 | @import XCTest; 10 | 11 | @interface Tests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation Tests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | 36 | -------------------------------------------------------------------------------- /Example/Tests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 mccRee 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /MRDLNA.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint MRDLNA.podspec' to ensure this is a 3 | # valid spec before submitting. 4 | # 5 | # Any lines starting with a # are optional, but their use is encouraged 6 | # To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html 7 | # 8 | 9 | Pod::Spec.new do |s| 10 | s.name = 'MRDLNA' 11 | s.version = '0.2.0' 12 | s.summary = 'DLNA投屏' 13 | 14 | 15 | s.description = <<-DESC 16 | DLNA投屏,支持各大主流盒子互联网电视. 17 | DESC 18 | 19 | s.homepage = 'https://github.com/MQL9011/MRDLNA' 20 | 21 | s.license = { :type => 'MIT', :file => 'LICENSE' } 22 | s.author = { 'MQL9011' => '301063915@qq.com' } 23 | s.source = { :git => 'https://github.com/MQL9011/MRDLNA.git', :tag => s.version.to_s } 24 | s.social_media_url = 'https://github.com/MQL9011' 25 | 26 | s.ios.deployment_target = '12.0' 27 | 28 | s.source_files = 'MRDLNA/Classes/ARC/**/*' 29 | 30 | s.public_header_files = 'MRDLNA/Classes/ARC/**/*.h' 31 | 32 | # s.resource_bundles = { 33 | # 'MRDLNA' => ['MRDLNA/Assets/*.png'] 34 | # } 35 | # s.public_header_files = 'Pod/Classes/**/*.h' 36 | 37 | s.libraries = 'icucore', 'c++', 'z', 'xml2' 38 | 39 | s.dependency 'CocoaAsyncSocket' 40 | 41 | s.xcconfig = {'ENABLE_BITCODE' => 'NO', 42 | 'HEADER_SEARCH_PATHS' => '${SDKROOT}/usr/include/libxml2', 43 | 'CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES' => 'YES' 44 | } 45 | end 46 | -------------------------------------------------------------------------------- /MRDLNA/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MQL9011/MRDLNA/c6143d4c8894104615c92ab057a40081e37fde6f/MRDLNA/Assets/.gitkeep -------------------------------------------------------------------------------- /MRDLNA/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MQL9011/MRDLNA/c6143d4c8894104615c92ab057a40081e37fde6f/MRDLNA/Classes/.gitkeep -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnP.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnP.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/9/29. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #ifndef CLUPnP_h 10 | #define CLUPnP_h 11 | 12 | #import "CLUPnPServer.h" 13 | #import "CLUPnPRenderer.h" 14 | #import "CLUPnPDevice.h" 15 | #import "CLUPnPAVPositionInfo.h" 16 | 17 | #ifdef DEBUG 18 | #define CLLog(s, ... ) NSLog( @"[%@ in line %d] => %@", [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] ) 19 | #else 20 | #define CLLog(s, ... ) 21 | #endif 22 | 23 | //IPv4下的多播地址 24 | static NSString *ssdpAddres = @"239.255.255.250"; 25 | //IPv4下的SSDP端口 26 | static UInt16 ssdpPort = 1900; 27 | 28 | static NSString *serviceType_AVTransport = @"urn:schemas-upnp-org:service:AVTransport:1"; 29 | static NSString *serviceType_RenderingControl = @"urn:schemas-upnp-org:service:RenderingControl:1"; 30 | 31 | static NSString *serviceId_AVTransport = @"urn:upnp-org:serviceId:AVTransport"; 32 | static NSString *serviceId_RenderingControl = @"urn:upnp-org:serviceId:RenderingControl"; 33 | 34 | 35 | static NSString *unitREL_TIME = @"REL_TIME"; 36 | static NSString *unitTRACK_NR = @"TRACK_NR"; 37 | 38 | #endif /* CLUPnP_h */ 39 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnPAVPositionInfo.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPAVPositionInfo.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/10/10. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CLUPnPAVPositionInfo : NSObject 12 | 13 | @property (nonatomic, assign) float trackDuration; 14 | @property (nonatomic, assign) float relTime; 15 | @property (nonatomic, assign) float absTime; 16 | 17 | - (void)setDictionary:(NSDictionary *)dict; 18 | 19 | @end 20 | 21 | 22 | @interface CLUPnPTransportInfo : NSObject 23 | 24 | @property (nonatomic, strong) NSString *currentTransportState; 25 | @property (nonatomic, strong) NSString *currentTransportStatus; 26 | @property (nonatomic, strong) NSString *currentSpeed; 27 | 28 | - (void)setDictionary:(NSDictionary *)dict; 29 | 30 | @end 31 | 32 | 33 | @interface NSString(UPnP) 34 | 35 | +(NSString *)stringWithDurationTime:(float)timeValue; 36 | - (float)durationTime; 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnPAVPositionInfo.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPAVPositionInfo.m 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/10/10. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "CLUPnPAVPositionInfo.h" 10 | #import "CLXMLParser.h" 11 | 12 | @implementation CLUPnPAVPositionInfo 13 | 14 | - (void)setArray:(NSArray *)array { 15 | @autoreleasepool { 16 | for (NSDictionary *dict in array) { 17 | if ([dict[@"TrackDuration"] isKindOfClass:[NSString class]]) { 18 | self.trackDuration = [dict[@"TrackDuration"] durationTime]; 19 | } 20 | if ([dict[@"RelTime"] isKindOfClass:[NSString class]]) { 21 | self.relTime = [dict[@"RelTime"] durationTime]; 22 | } 23 | if ([dict[@"AbsTime"] isKindOfClass:[NSString class]]) { 24 | self.absTime = [dict[@"AbsTime"] durationTime]; 25 | } 26 | } 27 | } 28 | } 29 | 30 | @end 31 | 32 | @implementation CLUPnPTransportInfo 33 | 34 | - (void)setArray:(NSArray *)array { 35 | @autoreleasepool { 36 | for (NSDictionary *dict in array) { 37 | if ([dict[@"CurrentTransportState"] isKindOfClass:[NSString class]]) { 38 | self.currentTransportState = dict[@"CurrentTransportState"]; 39 | } 40 | if ([dict[@"CurrentTransportStatus"] isKindOfClass:[NSString class]]) { 41 | self.currentTransportStatus = dict[@"CurrentTransportStatus"]; 42 | } 43 | if ([dict[@"CurrentSpeed"] isKindOfClass:[NSString class]]) { 44 | self.currentSpeed = dict[@"CurrentSpeed"]; 45 | } 46 | } 47 | } 48 | } 49 | 50 | @end 51 | 52 | @implementation NSString(UPnP) 53 | 54 | +(NSString *)stringWithDurationTime:(float)timeValue { 55 | return [NSString stringWithFormat:@"%02d:%02d:%02d", 56 | (int)(timeValue / 3600.0), 57 | (int)(fmod(timeValue, 3600.0) / 60.0), 58 | (int)fmod(timeValue, 60.0)]; 59 | } 60 | 61 | - (float)durationTime { 62 | NSArray *timeStrings = [self componentsSeparatedByString:@":"]; 63 | int timeStringsCount = (int)[timeStrings count]; 64 | if (timeStringsCount < 3) 65 | return -1.0f; 66 | float durationTime = 0.0; 67 | for (int n = 0; n 10 | 11 | typedef NS_ENUM(NSInteger, CLUPnPServiceType) { 12 | CLUPnPServiceAVTransport, // @"urn:schemas-upnp-org:service:AVTransport:1" 13 | CLUPnPServiceRenderingControl, // @"urn:schemas-upnp-org:service:RenderingControl:1" 14 | }; 15 | 16 | @class CLUPnPDevice; 17 | @interface CLUPnPAction : NSObject 18 | 19 | // serviceType 默认 CLUPnPServiceAVTransport 20 | @property (nonatomic, assign) CLUPnPServiceType serviceType; 21 | 22 | - (instancetype)initWithAction:(NSString *)action; 23 | 24 | - (void)setArgumentValue:(NSString *)value forName:(NSString *)name; 25 | 26 | - (NSString *)getServiceType; 27 | 28 | - (NSString *)getSOAPAction; 29 | 30 | - (NSString *)getPostUrlStrWith:(CLUPnPDevice *)model; 31 | 32 | - (NSString *)getPostXMLFile; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnPAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPAction.m 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/10/10. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "CLUPnPAction.h" 10 | #import "CLXMLDocument.h" 11 | #import "CLUPnP.h" 12 | 13 | @interface CLUPnPAction (){ 14 | NSString *_action; 15 | } 16 | @property (nonatomic, strong) CLXMLDocument *XMLElement; 17 | 18 | @end 19 | 20 | @implementation CLUPnPAction 21 | 22 | - (instancetype)initWithAction:(NSString *)action{ 23 | self = [super init]; 24 | if (self) { 25 | _action = action; 26 | _serviceType = CLUPnPServiceAVTransport; 27 | NSString *name = [NSString stringWithFormat:@"u:%@", _action]; 28 | self.XMLElement = [CLXMLDocument elementWithName:name]; 29 | } 30 | return self; 31 | } 32 | 33 | - (void)setServiceType:(CLUPnPServiceType)serviceType{ 34 | _serviceType = serviceType; 35 | } 36 | 37 | - (void)setArgumentValue:(NSString *)value forName:(NSString *)name{ 38 | CLXMLDocument *element = [CLXMLDocument elementWithName:name]; 39 | [element setStringValue:value]; 40 | [self.XMLElement addChild:element]; 41 | } 42 | 43 | - (NSString *)getServiceType{ 44 | if (_serviceType == CLUPnPServiceAVTransport) { 45 | return serviceType_AVTransport; 46 | }else{ 47 | return serviceType_RenderingControl; 48 | } 49 | } 50 | 51 | - (NSString *)getSOAPAction{ 52 | if (_serviceType == CLUPnPServiceAVTransport) { 53 | return [NSString stringWithFormat:@"\"%@#%@\"", serviceType_AVTransport, _action]; 54 | }else{ 55 | return [NSString stringWithFormat:@"\"%@#%@\"", serviceType_RenderingControl, _action]; 56 | } 57 | } 58 | 59 | - (NSString *)getPostUrlStrWith:(CLUPnPDevice *)model{ 60 | if (_serviceType == CLUPnPServiceAVTransport) { 61 | return [self getUPnPURLWithUrlModel:model.AVTransport urlHeader:model.URLHeader]; 62 | }else{ 63 | return [self getUPnPURLWithUrlModel:model.RenderingControl urlHeader:model.URLHeader];; 64 | } 65 | } 66 | 67 | - (NSString *)getUPnPURLWithUrlModel:(CLServiceModel *)model urlHeader:(NSString *)urlHeader{ 68 | if ([[model.controlURL substringToIndex:1] isEqualToString:@"/"]) { 69 | return [NSString stringWithFormat:@"%@%@", urlHeader, model.controlURL]; 70 | }else{ 71 | return [NSString stringWithFormat:@"%@/%@", urlHeader, model.controlURL]; 72 | } 73 | } 74 | 75 | /* 76 | %sobject.item.videoItem%s 77 | */ 78 | 79 | - (NSString *)getPostXMLFile{ 80 | CLXMLDocument *xmlEle = [CLXMLDocument elementWithName:@"s:Envelope"]; 81 | [xmlEle addAttribute:[CLXMLDocument attributeWithName:@"s:encodingStyle" stringValue:@"http://schemas.xmlsoap.org/soap/encoding/"]]; 82 | [xmlEle addAttribute:[CLXMLDocument attributeWithName:@"xmlns:s" stringValue:@"http://schemas.xmlsoap.org/soap/envelope/"]]; 83 | [xmlEle addAttribute:[CLXMLDocument attributeWithName:@"xmlns:u" stringValue:[self getServiceType]]]; 84 | 85 | CLXMLDocument *command = [CLXMLDocument elementWithName:@"s:Body"]; 86 | [command addChild:self.XMLElement]; 87 | [xmlEle addChild:command]; 88 | 89 | return xmlEle.XMLString; 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnPDevice.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPDevice.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 2017/7/31. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CLServiceModel; 12 | 13 | @interface CLUPnPDevice : NSObject 14 | 15 | @property (nonatomic, copy) NSString *uuid; 16 | @property (nonatomic, strong) NSURL *loaction; 17 | @property (nonatomic, copy) NSString *URLHeader; 18 | 19 | @property (nonatomic, copy) NSString *friendlyName; 20 | @property (nonatomic, copy) NSString *modelName; 21 | 22 | @property (nonatomic, strong) CLServiceModel *AVTransport; 23 | @property (nonatomic, strong) CLServiceModel *RenderingControl; 24 | 25 | - (void)setArray:(NSArray *)array; 26 | 27 | @end 28 | 29 | @interface CLServiceModel : NSObject 30 | 31 | @property (nonatomic, copy) NSString *serviceType; 32 | @property (nonatomic, copy) NSString *serviceId; 33 | @property (nonatomic, copy) NSString *controlURL; 34 | @property (nonatomic, copy) NSString *eventSubURL; 35 | @property (nonatomic, copy) NSString *SCPDURL; 36 | 37 | - (void)setArray:(NSArray *)array; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnPDevice.m: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPDevice.m 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 2017/7/31. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import "CLUPnP.h" 10 | #import "CLXMLParser.h" 11 | 12 | @implementation CLUPnPDevice 13 | 14 | - (CLServiceModel *)AVTransport{ 15 | if (!_AVTransport) { 16 | _AVTransport = [[CLServiceModel alloc] init]; 17 | } 18 | return _AVTransport; 19 | } 20 | 21 | - (CLServiceModel *)RenderingControl{ 22 | if (!_RenderingControl) { 23 | _RenderingControl = [[CLServiceModel alloc] init]; 24 | } 25 | return _RenderingControl; 26 | } 27 | 28 | - (NSString *)URLHeader{ 29 | if (!_URLHeader) { 30 | _URLHeader = [NSString stringWithFormat:@"%@://%@:%@", [self.loaction scheme], [self.loaction host], [self.loaction port]]; 31 | } 32 | return _URLHeader; 33 | } 34 | 35 | - (void)setArray:(NSArray *)array{ 36 | @autoreleasepool { 37 | for (NSDictionary *dict in array) { 38 | if ([dict[@"friendlyName"] isKindOfClass:[NSString class]]) { 39 | self.friendlyName = dict[@"friendlyName"]; 40 | } 41 | if ([dict[@"modelName"] isKindOfClass:[NSString class]]) { 42 | self.modelName = dict[@"modelName"]; 43 | } 44 | if ([dict[@"serviceList"] isKindOfClass:[NSArray class]]) { 45 | NSArray *serviceListArray = dict[@"serviceList"]; 46 | for (NSDictionary *serviceDict in serviceListArray) { 47 | if ([serviceDict[@"service"] isKindOfClass:[NSString class]]) { 48 | NSString *serviceString = serviceDict[@"service"]; 49 | if ([serviceString rangeOfString:serviceType_AVTransport].location != NSNotFound || 50 | [serviceString rangeOfString:serviceId_AVTransport].location != NSNotFound) { 51 | [self.AVTransport setArray:serviceDict[@"children"]]; 52 | } else if ([serviceString rangeOfString:serviceType_RenderingControl].location != NSNotFound || 53 | [serviceString rangeOfString:serviceId_RenderingControl].location != NSNotFound) { 54 | [self.RenderingControl setArray:serviceDict[@"children"]]; 55 | } 56 | } 57 | } 58 | continue; 59 | } 60 | } 61 | } 62 | } 63 | 64 | - (NSString *)description{ 65 | NSString * string = [NSString stringWithFormat:@"\nuuid:%@\nlocation:%@\nURLHeader:%@\nfriendlyName:%@\nmodelName:%@\n",self.uuid,self.loaction,self.URLHeader,self.friendlyName,self.modelName]; 66 | return string; 67 | } 68 | 69 | @end 70 | 71 | @implementation CLServiceModel 72 | 73 | - (void)setArray:(NSArray *)array{ 74 | @autoreleasepool { 75 | for (NSDictionary *dict in array) { 76 | if ([dict[@"serviceType"] isKindOfClass:[NSString class]]) { 77 | self.serviceType = dict[@"serviceType"]; 78 | } 79 | if ([dict[@"serviceId"] isKindOfClass:[NSString class]]) { 80 | self.serviceId = dict[@"serviceId"]; 81 | } 82 | if ([dict[@"controlURL"] isKindOfClass:[NSString class]]) { 83 | self.controlURL = dict[@"controlURL"]; 84 | } 85 | if ([dict[@"eventSubURL"] isKindOfClass:[NSString class]]) { 86 | self.eventSubURL = dict[@"eventSubURL"]; 87 | } 88 | if ([dict[@"SCPDURL"] isKindOfClass:[NSString class]]) { 89 | self.SCPDURL = dict[@"SCPDURL"]; 90 | } 91 | } 92 | } 93 | } 94 | 95 | @end 96 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnPRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPRenderer.h 3 | // Tiaooo 4 | // 5 | // Created by ClaudeLi on 16/9/29. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import "CLUPnPResponseDelegate.h" 12 | 13 | @class CLUPnPDevice; 14 | @interface CLUPnPRenderer : NSObject 15 | 16 | @property (nonatomic, strong) CLUPnPDevice *model; 17 | 18 | @property (nonatomic, strong) iddelegate; 19 | 20 | /** 21 | 初始化 22 | @param model 搜索得到的UPnPModel 23 | @return self 24 | */ 25 | - (instancetype)initWithModel:(CLUPnPDevice *)model; 26 | 27 | /** 28 | 设置投屏地址 29 | @param urlStr 视频url 30 | */ 31 | - (void)setAVTransportURL:(NSString *)urlStr; 32 | 33 | /** 34 | 设置下一个播放地址 35 | @param urlStr 下一个视频url 36 | */ 37 | - (void)setNextAVTransportURI:(NSString *)urlStr; 38 | 39 | /** 40 | 播放 41 | */ 42 | - (void)play; 43 | 44 | /** 45 | 暂停 46 | */ 47 | - (void)pause; 48 | 49 | /** 50 | 结束 51 | */ 52 | - (void)stop; 53 | 54 | /** 55 | 下一个 56 | */ 57 | - (void)next; 58 | 59 | /** 60 | 前一个 61 | */ 62 | - (void)previous; 63 | 64 | /** 65 | 跳转进度 66 | @param relTime 进度时间(单位秒) 67 | */ 68 | - (void)seek:(float)relTime; 69 | 70 | /** 71 | 跳转至特定进度或视频 72 | @param target 目标值,可以是 00:02:21 格式的进度或者整数的 TRACK_NR。 73 | @param unit REL_TIME(跳转到某个进度)或 TRACK_NR(跳转到某个视频)。 74 | */ 75 | - (void)seekToTarget:(NSString *)target Unit:(NSString *)unit; 76 | 77 | /** 78 | 获取播放进度,可通过协议回调使用 79 | */ 80 | - (void)getPositionInfo; 81 | 82 | /** 83 | 获取播放状态,可通过协议回调使用 84 | */ 85 | - (void)getTransportInfo; 86 | 87 | /** 88 | 获取音频,可通过协议回调使用 89 | */ 90 | - (void)getVolume; 91 | 92 | /** 93 | 设置音频值 94 | @param value 值—>整数 95 | */ 96 | - (void)setVolumeWith:(NSString *)value; 97 | 98 | 99 | @end 100 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnPResponseDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPResponseDelegate.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 16/10/10. 6 | // Copyright © 2016年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CLUPnPAVPositionInfo; 12 | @class CLUPnPTransportInfo; 13 | 14 | // 响应解析回调协议 15 | @protocol CLUPnPResponseDelegate 16 | 17 | @required 18 | 19 | - (void)upnpSetAVTransportURIResponse; // 设置url响应 20 | - (void)upnpGetTransportInfoResponse:(CLUPnPTransportInfo *)info; // 获取播放状态 21 | 22 | @optional 23 | 24 | /** 25 | 未定义的响应/错误 26 | 27 | @param resXML 响应XML 28 | @param postXML 请求的动作 29 | */ 30 | - (void)upnpUndefinedResponse:(NSString *)resXML postXML:(NSString *)postXML; 31 | 32 | - (void)upnpPlayResponse; // 播放响应 33 | - (void)upnpPauseResponse; // 暂停响应 34 | - (void)upnpStopResponse; // 停止投屏 35 | - (void)upnpSeekResponse; // 跳转响应 36 | - (void)upnpPreviousResponse; // 以前的响应 37 | - (void)upnpNextResponse; // 下一个响应 38 | - (void)upnpSetVolumeResponse; // 设置音量响应 39 | - (void)upnpSetNextAVTransportURIResponse; // 设置下一个url响应 40 | - (void)upnpGetVolumeResponse:(NSString *)volume; // 获取音频信息 41 | - (void)upnpGetPositionInfoResponse:(CLUPnPAVPositionInfo *)info; // 获取播放进度 42 | 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLUPnPServer.h: -------------------------------------------------------------------------------- 1 | // 2 | // CLUPnPServer.h 3 | // DLNA_UPnP 4 | // 5 | // Created by ClaudeLi on 2017/7/31. 6 | // Copyright © 2017年 ClaudeLi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class CLUPnPDevice; 12 | @protocol CLUPnPServerDelegate 13 | @required 14 | /** 15 | 搜索结果 16 | 17 | @param devices 设备数组 18 | */ 19 | - (void)upnpSearchChangeWithResults:(NSArray *)devices; 20 | 21 | @optional 22 | /** 23 | 搜索失败 24 | 25 | @param error error 26 | */ 27 | - (void)upnpSearchErrorWithError:(NSError *)error; 28 | 29 | @end 30 | 31 | @interface CLUPnPServer : NSObject 32 | 33 | @property (nonatomic, weak) iddelegate; 34 | 35 | @property (nonatomic,assign) NSInteger searchTime; 36 | 37 | + (instancetype)shareServer; 38 | 39 | /** 40 | 启动Server并搜索 41 | */ 42 | - (void)start; 43 | 44 | /** 45 | 停止 46 | */ 47 | - (void)stop; 48 | 49 | /** 50 | 搜索 51 | */ 52 | - (void)search; 53 | 54 | /** 55 | 获取已经发现的设备 56 | 57 | @return Device Array 58 | */ 59 | - (NSArray *)getDeviceList; 60 | 61 | @end 62 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLXMLDocument.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface CLXMLDocument : NSObject 6 | 7 | @property (nonatomic, strong, readonly) NSString *XMLString; 8 | 9 | + (instancetype)elementWithName:(NSString *)name; 10 | + (instancetype)attributeWithName:(NSString *)name stringValue:(NSString *)value; 11 | - (void)addChild:(CLXMLDocument *)child; 12 | - (void)addAttribute:(CLXMLDocument *)attribute; 13 | - (void)setStringValue:(NSString *)value; 14 | 15 | @end 16 | 17 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLXMLDocument.m: -------------------------------------------------------------------------------- 1 | #import "CLXMLDocument.h" 2 | 3 | @interface CLXMLDocument () 4 | 5 | @property (nonatomic, strong) NSString *name; 6 | @property (nonatomic, strong) NSMutableArray *children; 7 | @property (nonatomic, strong) NSMutableArray *attributes; 8 | @property (nonatomic, strong) NSString *value; 9 | 10 | @end 11 | 12 | @implementation CLXMLDocument 13 | 14 | - (instancetype)init { 15 | self = [super init]; 16 | if (self) { 17 | _children = [NSMutableArray array]; 18 | _attributes = [NSMutableArray array]; 19 | } 20 | return self; 21 | } 22 | 23 | + (instancetype)elementWithName:(NSString *)name { 24 | CLXMLDocument *element = [[CLXMLDocument alloc] init]; 25 | element.name = name; 26 | return element; 27 | } 28 | 29 | + (instancetype)attributeWithName:(NSString *)name stringValue:(NSString *)value { 30 | CLXMLDocument *attribute = [[CLXMLDocument alloc] init]; 31 | attribute.name = name; 32 | attribute.value = value; 33 | return attribute; 34 | } 35 | 36 | - (void)addChild:(CLXMLDocument *)child { 37 | [self.children addObject:child]; 38 | } 39 | 40 | - (void)addAttribute:(CLXMLDocument *)attribute { 41 | [self.attributes addObject:attribute]; 42 | } 43 | 44 | - (void)setStringValue:(NSString *)value { 45 | self.value = value; 46 | } 47 | 48 | - (NSString *)XMLString { 49 | NSMutableString *xmlString = [NSMutableString string]; 50 | 51 | // Add attributes 52 | NSMutableString *attributeString = [NSMutableString string]; 53 | for (CLXMLDocument *attribute in self.attributes) { 54 | [attributeString appendFormat:@" %@=\"%@\"", attribute.name, attribute.value]; 55 | } 56 | 57 | // Start element 58 | [xmlString appendFormat:@"<%@%@>", self.name, attributeString]; 59 | 60 | // Add children 61 | for (CLXMLDocument *child in self.children) { 62 | [xmlString appendString:child.XMLString]; 63 | } 64 | 65 | // Add value if exists 66 | if (self.value) { 67 | [xmlString appendString:self.value]; 68 | } 69 | 70 | // End element 71 | [xmlString appendFormat:@"", self.name]; 72 | 73 | return xmlString; 74 | } 75 | 76 | @end -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLXMLParser.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface CLXMLParser : NSObject 6 | 7 | + (NSDictionary *)parseXMLString:(NSString *)xmlString; 8 | + (NSArray *)parseXMLArray:(NSString *)xmlString; 9 | 10 | @end 11 | 12 | NS_ASSUME_NONNULL_END -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/CLXMLParser.m: -------------------------------------------------------------------------------- 1 | #import "CLXMLParser.h" 2 | 3 | @interface CLXMLParser () 4 | 5 | @property (nonatomic, strong) NSMutableDictionary *currentDictionary; 6 | @property (nonatomic, strong) NSMutableArray *currentArray; 7 | @property (nonatomic, strong) NSMutableString *currentString; 8 | @property (nonatomic, strong) NSString *currentElement; 9 | 10 | @end 11 | 12 | @implementation CLXMLParser 13 | 14 | + (NSDictionary *)parseXMLString:(NSString *)xmlString { 15 | CLXMLParser *parser = [[CLXMLParser alloc] init]; 16 | parser.currentDictionary = [NSMutableDictionary dictionary]; 17 | parser.currentString = [NSMutableString string]; 18 | 19 | NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:[xmlString dataUsingEncoding:NSUTF8StringEncoding]]; 20 | xmlParser.delegate = parser; 21 | [xmlParser parse]; 22 | 23 | return parser.currentDictionary; 24 | } 25 | 26 | + (NSArray *)parseXMLArray:(NSString *)xmlString { 27 | CLXMLParser *parser = [[CLXMLParser alloc] init]; 28 | parser.currentArray = [NSMutableArray array]; 29 | parser.currentDictionary = [NSMutableDictionary dictionary]; 30 | parser.currentString = [NSMutableString string]; 31 | 32 | NSXMLParser *xmlParser = [[NSXMLParser alloc] initWithData:[xmlString dataUsingEncoding:NSUTF8StringEncoding]]; 33 | xmlParser.delegate = parser; 34 | [xmlParser parse]; 35 | 36 | return parser.currentArray; 37 | } 38 | 39 | #pragma mark - NSXMLParserDelegate 40 | 41 | - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict { 42 | self.currentElement = elementName; 43 | [self.currentString setString:@""]; 44 | } 45 | 46 | - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string { 47 | [self.currentString appendString:string]; 48 | } 49 | 50 | - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { 51 | NSString *value = [self.currentString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; 52 | if (value.length > 0) { 53 | [self.currentDictionary setObject:value forKey:elementName]; 54 | } 55 | } 56 | 57 | @end -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/Device.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 0 5 | 6 | urn:schemas-upnp-org:device:MediaRenderer:1 7 | uuid:b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22 8 | 书房的小米电视 9 | QPlay:1 10 | Xiaomi 11 | http://www.xiaomi.com/ 12 | Xiaomi MediaRenderer 13 | Xiaomi MediaRenderer 14 | 1 15 | http://www.xiaomi.com/hezi 16 | 55MC5BF9J19620A 17 | device_presentation_page.html 18 | 123456789012 19 | DMR-1.50 20 | , 21 | 22 | 23 | image/jpeg 24 | 48 25 | 48 26 | 8 27 | icon/icon048x048.jpeg 28 | 29 | 30 | image/png 31 | 48 32 | 48 33 | 8 34 | icon/icon048x048.png 35 | 36 | 37 | image/jpeg 38 | 120 39 | 120 40 | 8 41 | icon/icon120x120.jpeg 42 | 43 | 44 | image/png 45 | 120 46 | 120 47 | 8 48 | icon/icon120x120.png 49 | 50 | 51 | 52 | urn:schemas-upnp-org:service:AVTransport:1 53 | urn:upnp-org:serviceId:AVTransport 54 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/AVTransport/action 55 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/AVTransport/event 56 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/AVTransport/desc.xml 57 | 58 | 59 | urn:schemas-upnp-org:service:RenderingControl:1 60 | urn:upnp-org:serviceId:RenderingControl 61 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/RenderingControl/action 62 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/RenderingControl/event 63 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/RenderingControl/desc.xml 64 | 65 | 66 | urn:schemas-upnp-org:service:ConnectionManager:1 67 | urn:upnp-org:serviceId:ConnectionManager 68 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/ConnectionManager/action 69 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/ConnectionManager/event 70 | /dev/b8c9ae9e-fb7f-2f09-ffff-ffffc7831a22/svc/upnp-org/ConnectionManager/desc.xml 71 | 72 | 73 | 1.0controllerhttp://192.168.1.4:6095/datahttp://api.tv.duokanbox.com/bolt/3party/ 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/SetUrl.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 0 5 | http://222.73.132.145/vkphls.tc.qq.com/mp4/8/yZ_j6ME6N3hgRF2xg_m13zCxeLHcQzm9bVK0v_J-08OdcAVc0rmGCA/q4WgUBCu27O21hhzjGXkPCaHr1EkTFuUGbXKrNbjMACA-wleQI3oi3woUdjgP-BtBxW34UkmIxlQ_TkPGeqTLwghaijDM7oFlQwmCbieZPLUh33Q7f8eag/i0021mzabfm.p209.mp4/i0021mzabfm.p209.mp4.av.m3u8?fn=p209&bw=8000&st=0&et=0&iv=&ivfn=&ivfc=&ivt=&ivs=&ivd=&ivl=&ftype=mp4&fbw=93&type=m3u8&drm=0&sdtfrom=v3000&platform=10403&appver=5.1.1.14483&projection=dlna 6 | <DIDL-Lite xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sec="http://www.sec.co.kr/"><item id="0" parentID="0" restricted="0"><res protocolInfo="http-get:*:video/mp4:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=01500000000000000000000000000000">http://222.73.132.145/vkphls.tc.qq.com/mp4/8/yZ_j6ME6N3hgRF2xg_m13zCxeLHcQzm9bVK0v_J-08OdcAVc0rmGCA/q4WgUBCu27O21hhzjGXkPCaHr1EkTFuUGbXKrNbjMACA-wleQI3oi3woUdjgP-BtBxW34UkmIxlQ_TkPGeqTLwghaijDM7oFlQwmCbieZPLUh33Q7f8eag/i0021mzabfm.p209.mp4/i0021mzabfm.p209.mp4.av.m3u8?fn=p209&amp;bw=8000&amp;st=0&amp;et=0&amp;iv=&amp;ivfn=&amp;ivfc=&amp;ivt=&amp;ivs=&amp;ivd=&amp;ivl=&amp;ftype=mp4&amp;fbw=93&amp;type=m3u8&amp;drm=0&amp;sdtfrom=v3000&amp;platform=10403&amp;appver=5.1.1.14483&amp;projection=dlna</res><upnp:albumArtURI></upnp:albumArtURI><upnp:class>object.item.videoItem</upnp:class></item></DIDL-Lite> 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/StopAction.h: -------------------------------------------------------------------------------- 1 | // 2 | // StopAction.h 3 | // YSTThirdSDK 4 | // 5 | // Created by Eric on 2018/3/15. 6 | // 7 | 8 | #import 9 | #import "CLUPnPDevice.h" 10 | 11 | @interface StopAction : NSObject 12 | @property(nonatomic, strong) CLUPnPDevice *device; 13 | 14 | - (instancetype)initWithDevice:(CLUPnPDevice *) device Success:(void(^)())successBlock failure:(void(^)())failureBlock; 15 | -(void)executeAction; 16 | @end 17 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/DLNA/StopAction.m: -------------------------------------------------------------------------------- 1 | // 2 | // StopAction.m 3 | // YSTThirdSDK 4 | // 5 | // Created by Eric on 2018/3/15. 6 | // 7 | 8 | #import "StopAction.h" 9 | #import "CLUPnPRenderer.h" 10 | 11 | @interface StopAction () 12 | @property (nonatomic, copy) void(^successCallback)(); 13 | @property (nonatomic, copy) void(^failureCallback)(); 14 | 15 | @property(nonatomic,strong) CLUPnPRenderer *render; //MDR渲染器 16 | 17 | @end 18 | @implementation StopAction 19 | @synthesize successCallback = _successCallback; 20 | @synthesize failureCallback = _failureCallback; 21 | 22 | - (instancetype)initWithDevice:(CLUPnPDevice *) device Success:(void(^)())successBlock failure:(void(^)())failureBlock 23 | { 24 | self = [self init]; 25 | 26 | self.successCallback = successBlock; 27 | self.failureCallback = failureBlock; 28 | 29 | self.render = [[CLUPnPRenderer alloc] initWithModel:device]; 30 | self.render.delegate = self; 31 | 32 | return self; 33 | } 34 | -(void)executeAction{ 35 | [self.render stop]; 36 | } 37 | 38 | #pragma mark CLUPnPResponseDelegate 39 | - (void)upnpPlayResponse{ 40 | if (self.failureCallback) { 41 | self.failureCallback(); 42 | } 43 | } 44 | - (void)upnpStopResponse{ 45 | if (self.successCallback) { 46 | self.successCallback(); 47 | } 48 | } 49 | @end 50 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/MRDLNA.h: -------------------------------------------------------------------------------- 1 | // 2 | // MRDLNA.h 3 | // MRDLNA 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // 7 | 8 | #import 9 | #import "CLUPnP.h" 10 | #import "CLUPnPDevice.h" 11 | 12 | @protocol DLNADelegate 13 | 14 | @optional 15 | /** 16 | DLNA局域网搜索设备结果 17 | @param devicesArray 搜索到的设备 18 | */ 19 | - (void)searchDLNAResult:(NSArray *)devicesArray; 20 | 21 | 22 | /** 23 | 投屏成功开始播放 24 | */ 25 | - (void)dlnaStartPlay; 26 | 27 | @end 28 | 29 | @interface MRDLNA : NSObject 30 | 31 | @property(nonatomic,weak)id delegate; 32 | 33 | @property(nonatomic, strong) CLUPnPDevice *device; 34 | 35 | @property(nonatomic,copy) NSString *playUrl; 36 | 37 | @property(nonatomic,assign) NSInteger searchTime; 38 | 39 | /** 40 | 单例 41 | */ 42 | +(instancetype)sharedMRDLNAManager; 43 | 44 | /** 45 | 搜设备 46 | */ 47 | - (void)startSearch; 48 | 49 | /** 50 | DLNA投屏 51 | */ 52 | - (void)startDLNA; 53 | /** 54 | DLNA投屏(首先停止)---投屏不了可以使用这个方法 55 | ** 【流程: 停止 ->设置代理 ->设置Url -> 播放】 56 | */ 57 | - (void)startDLNAAfterStop; 58 | 59 | /** 60 | 退出DLNA 61 | */ 62 | - (void)endDLNA; 63 | 64 | /** 65 | 播放 66 | */ 67 | - (void)dlnaPlay; 68 | 69 | /** 70 | 暂停 71 | */ 72 | - (void)dlnaPause; 73 | 74 | /** 75 | 设置音量 volume建议传0-100之间字符串 76 | */ 77 | - (void)volumeChanged:(NSString *)volume; 78 | 79 | /** 80 | 设置播放进度 seek单位是秒 81 | */ 82 | - (void)seekChanged:(NSInteger)seek; 83 | 84 | /** 85 | 播放切集 86 | */ 87 | - (void)playTheURL:(NSString *)url; 88 | @end 89 | -------------------------------------------------------------------------------- /MRDLNA/Classes/ARC/MRDLNA.m: -------------------------------------------------------------------------------- 1 | // 2 | // MRDLNA.m 3 | // MRDLNA 4 | // 5 | // Created by MccRee on 2018/5/4. 6 | // 7 | 8 | #import "MRDLNA.h" 9 | #import "StopAction.h" 10 | 11 | @interface MRDLNA() 12 | 13 | @property(nonatomic,strong) CLUPnPServer *upd; //MDS服务器 14 | @property(nonatomic,strong) NSMutableArray *dataArray; 15 | 16 | @property(nonatomic,strong) CLUPnPRenderer *render; //MDR渲染器 17 | @property(nonatomic,copy) NSString *volume; 18 | @property(nonatomic,assign) NSInteger seekTime; 19 | @property(nonatomic,assign) BOOL isPlaying; 20 | 21 | @end 22 | 23 | @implementation MRDLNA 24 | 25 | + (MRDLNA *)sharedMRDLNAManager{ 26 | static MRDLNA *instance = nil; 27 | static dispatch_once_t once; 28 | dispatch_once(&once, ^{ 29 | instance = [[self alloc] init]; 30 | }); 31 | return instance; 32 | } 33 | 34 | - (instancetype)init 35 | { 36 | self = [super init]; 37 | if (self) { 38 | self.upd = [CLUPnPServer shareServer]; 39 | self.upd.searchTime = 5; 40 | self.upd.delegate = self; 41 | self.dataArray = [NSMutableArray array]; 42 | } 43 | return self; 44 | } 45 | 46 | /** 47 | ** DLNA投屏 48 | */ 49 | - (void)startDLNA{ 50 | [self initCLUPnPRendererAndDlnaPlay]; 51 | } 52 | /** 53 | ** DLNA投屏 54 | ** 【流程: 停止 ->设置代理 ->设置Url -> 播放】 55 | */ 56 | - (void)startDLNAAfterStop{ 57 | StopAction *action = [[StopAction alloc]initWithDevice:self.device Success:^{ 58 | [self initCLUPnPRendererAndDlnaPlay]; 59 | 60 | } failure:^{ 61 | [self initCLUPnPRendererAndDlnaPlay]; 62 | }]; 63 | [action executeAction]; 64 | } 65 | /** 66 | 初始化CLUPnPRenderer 67 | */ 68 | -(void)initCLUPnPRendererAndDlnaPlay{ 69 | self.render = [[CLUPnPRenderer alloc] initWithModel:self.device]; 70 | self.render.delegate = self; 71 | [self.render setAVTransportURL:self.playUrl]; 72 | } 73 | /** 74 | 退出DLNA 75 | */ 76 | - (void)endDLNA{ 77 | [self.render stop]; 78 | } 79 | 80 | /** 81 | 播放 82 | */ 83 | - (void)dlnaPlay{ 84 | [self.render play]; 85 | } 86 | 87 | 88 | /** 89 | 暂停 90 | */ 91 | - (void)dlnaPause{ 92 | [self.render pause]; 93 | } 94 | 95 | /** 96 | 搜设备 97 | */ 98 | - (void)startSearch{ 99 | [self.upd start]; 100 | } 101 | 102 | 103 | /** 104 | 设置音量 105 | */ 106 | - (void)volumeChanged:(NSString *)volume{ 107 | self.volume = volume; 108 | [self.render setVolumeWith:volume]; 109 | } 110 | 111 | 112 | /** 113 | 播放进度条 114 | */ 115 | - (void)seekChanged:(NSInteger)seek{ 116 | self.seekTime = seek; 117 | NSString *seekStr = [self timeFormatted:seek]; 118 | [self.render seekToTarget:seekStr Unit:unitREL_TIME]; 119 | } 120 | 121 | 122 | /** 123 | 播放进度单位转换成string 124 | */ 125 | - (NSString *)timeFormatted:(NSInteger)totalSeconds 126 | { 127 | NSInteger seconds = totalSeconds % 60; 128 | NSInteger minutes = (totalSeconds / 60) % 60; 129 | NSInteger hours = totalSeconds / 3600; 130 | return [NSString stringWithFormat:@"%02ld:%02ld:%02ld",(long)hours, (long)minutes, (long)seconds]; 131 | } 132 | 133 | /** 134 | 播放切集 135 | */ 136 | - (void)playTheURL:(NSString *)url{ 137 | self.playUrl = url; 138 | [self.render setAVTransportURL:url]; 139 | } 140 | 141 | #pragma mark -- 搜索协议CLUPnPDeviceDelegate回调 142 | - (void)upnpSearchChangeWithResults:(NSArray *)devices{ 143 | NSMutableArray *deviceMarr = [NSMutableArray array]; 144 | for (CLUPnPDevice *device in devices) { 145 | // 只返回匹配到视频播放的设备 146 | if ([device.uuid containsString:serviceType_AVTransport]) { 147 | [deviceMarr addObject:device]; 148 | } 149 | } 150 | if ([self.delegate respondsToSelector:@selector(searchDLNAResult:)]) { 151 | [self.delegate searchDLNAResult:[deviceMarr copy]]; 152 | } 153 | self.dataArray = deviceMarr; 154 | } 155 | 156 | - (void)upnpSearchErrorWithError:(NSError *)error{ 157 | // NSLog(@"DLNA_Error======>%@", error); 158 | } 159 | 160 | #pragma mark - CLUPnPResponseDelegate 161 | - (void)upnpSetAVTransportURIResponse{ 162 | [self.render play]; 163 | } 164 | 165 | - (void)upnpGetTransportInfoResponse:(CLUPnPTransportInfo *)info{ 166 | // NSLog(@"%@ === %@", info.currentTransportState, info.currentTransportStatus); 167 | if (!([info.currentTransportState isEqualToString:@"PLAYING"] || [info.currentTransportState isEqualToString:@"TRANSITIONING"])) { 168 | [self.render play]; 169 | } 170 | } 171 | 172 | - (void)upnpPlayResponse{ 173 | if ([self.delegate respondsToSelector:@selector(dlnaStartPlay)]) { 174 | [self.delegate dlnaStartPlay]; 175 | } 176 | } 177 | 178 | #pragma mark Set&Get 179 | - (void)setSearchTime:(NSInteger)searchTime{ 180 | _searchTime = searchTime; 181 | self.upd.searchTime = searchTime; 182 | } 183 | @end 184 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # MRDLNA 3 | ![](https://img.shields.io/badge/project-iOS-blue.svg) 4 | ![](https://img.shields.io/badge/install-CocoaPods-orange.svg) 5 | ![](https://img.shields.io/badge/LANG-ObjC-brightgreen.svg) 6 | # Dependencies 7 | 8 | - iOS DLNA Function 9 | - iOS DLNA 投屏功能, 支持各大主流电视盒子(小米,华为,乐视,移动魔百盒等), 可以播放,暂停,快进退,调音量,退出. 10 | 11 | # Usage 12 | 13 | ``` 14 | pod 'MRDLNA' 15 | ``` 16 | 17 | 18 | - Search Devices 19 | 20 | ``` 21 | 22 | 23 | - (void)searchDLNAResult:(NSArray *)devicesArray{ 24 | NSLog(@"Find devices"); 25 | //self.deviceArr = devicesArray; 26 | //[self.dlnaTable reloadData]; 27 | } 28 | 29 | - (void)dlnaStartPlay{ 30 | NSLog(@"DLNA Success Start Play"); 31 | } 32 | 33 | 34 | ``` 35 | 36 | - Play Control 37 | 38 | ``` 39 | @property(nonatomic,strong) MRDLNA *dlnaManager; 40 | 41 | #pragma mark -Play Control 42 | 43 | /** 44 | Quit 45 | */ 46 | - (IBAction)closeAction:(id)sender { 47 | [self.dlnaManager endDLNA]; 48 | } 49 | 50 | 51 | /** 52 | Play/Pause 53 | */ 54 | - (IBAction)playOrPause:(id)sender { 55 | if (_isPlaying) { 56 | [self.dlnaManager dlnaPause]; 57 | }else{ 58 | [self.dlnaManager dlnaPlay]; 59 | } 60 | _isPlaying = !_isPlaying; 61 | } 62 | 63 | 64 | /** 65 | SeekChange 66 | */ 67 | - (IBAction)seekChanged:(UISlider *)sender{ 68 | NSInteger sec = sender.value * 60 * 60; 69 | NSLog(@"播放进度条======>: %zd",sec); 70 | [self.dlnaManager seekChanged:sec]; 71 | } 72 | 73 | /** 74 | VolumeChange 75 | */ 76 | - (IBAction)volumeChange:(UISlider *)sender { 77 | NSString *vol = [NSString stringWithFormat:@"%.f",sender.value * 100]; 78 | NSLog(@"音量========>: %@",vol); 79 | [self.dlnaManager volumeChanged:vol]; 80 | } 81 | 82 | 83 | /** 84 | PlayNextMovie 85 | */ 86 | - (IBAction)playNext:(id)sender { 87 | NSString *testVideo = @"http://wvideo.spriteapp.cn/video/2016/0328/56f8ec01d9bfe_wpd.mp4"; 88 | [self.dlnaManager playTheURL:testVideo]; 89 | } 90 | ``` 91 | 92 | # For more information please see demo 93 | 94 | ## License 95 | 96 | WTFPL – Do What the Fuck You Want to Public License 97 | 98 | 99 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------