Commit cea05b6b authored by Felix Paul Kühne's avatar Felix Paul Kühne

Enable libvlc's Bonjour discovery

This allows discovery of NFS shares among other things
parent 6ff1c58e
......@@ -26,6 +26,7 @@
#import "VLCLocalNetworkServiceBrowserSAP.h"
#endif
#import "VLCLocalNetworkServiceBrowserDSM.h"
#import "VLCLocalNetworkServiceBrowserBonjour.h"
#import "VLCLocalNetworkServiceBrowserHTTP.h"
#import "VLCRemoteBrowsingTVCell.h"
......@@ -85,6 +86,7 @@
[VLCLocalNetworkServiceBrowserDSM class],
[VLCLocalNetworkServiceBrowserPlex class],
[VLCLocalNetworkServiceBrowserFTP class],
[VLCLocalNetworkServiceBrowserBonjour class],
#ifndef NDEBUG
[VLCLocalNetworkServiceBrowserSAP class],
#endif
......
iOS 2.8.0:
----------
* Added support for NFS shares
* Added Bonjour discovery for SMB shares
iOS 2.7.3:
----------
* General stability improvements and bug fixes
......
/*****************************************************************************
* VLCLocalNetworkServiceBrowserBonjour.h
* VLC for iOS
*****************************************************************************
* Copyright (c) 2015-2016 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Tobias Conradi <videolan # tobias-conradi.de>
* Felix Paul Kühne <fkuehne # videolan.org>
*
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
#import "VLCLocalNetworkServiceVLCMedia.h"
#import "VLCNetworkServerBrowserVLCMedia.h"
#import "VLCLocalNetworkServiceBrowserMediaDiscoverer.h"
#import "VLCNetworkServerLoginInformation.h"
NS_ASSUME_NONNULL_BEGIN
@interface VLCLocalNetworkServiceBrowserBonjour : VLCLocalNetworkServiceBrowserMediaDiscoverer
- (instancetype)init;
@end
extern NSString *const VLCNetworkServerProtocolIdentifierBonjour;
@interface VLCLocalNetworkServiceBonjour: VLCLocalNetworkServiceVLCMedia
@end
@interface VLCNetworkServerBrowserVLCMedia (Bonjour)
@end
NS_ASSUME_NONNULL_END
/*****************************************************************************
* VLCLocalNetworkServiceBrowserBonjour.m
* VLC for iOS
*****************************************************************************
* Copyright (c) 2015 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Tobias Conradi <videolan # tobias-conradi.de>
* Felix Paul Kühne <fkuehne # videolan.org>
*
* Refer to the COPYING file of the official project for license.
*****************************************************************************/
#import "VLCLocalNetworkServiceBrowserBonjour.h"
#import "VLCNetworkServerLoginInformation.h"
@implementation VLCLocalNetworkServiceBrowserBonjour
- (instancetype)init
{
NSString *name = NSLocalizedString(@"BONJOUR_FILE_SERVERS", nil);
self.mediaDiscoverer.libraryInstance.debugLogging = YES;
return [super initWithName:name serviceServiceName:@"bonjour"];
}
- (id<VLCLocalNetworkService>)networkServiceForIndex:(NSUInteger)index
{
VLCMedia *media = [self.mediaDiscoverer.discoveredMedia mediaAtIndex:index];
if (media)
return [[VLCLocalNetworkServiceBonjour alloc] initWithMediaItem:media];
return nil;
}
@end
NSString *const VLCNetworkServerProtocolIdentifierBonjour = @"Bonjour";
@implementation VLCLocalNetworkServiceBonjour
- (UIImage *)icon
{
return [UIImage imageNamed:@"serverIcon"];
}
@end
......@@ -34,6 +34,7 @@
#import "VLCLocalNetworkServiceBrowserHTTP.h"
#import "VLCLocalNetworkServiceBrowserSAP.h"
#import "VLCLocalNetworkServiceBrowserDSM.h"
#import "VLCLocalNetworkServiceBrowserBonjour.h"
@interface VLCServerListViewController () <UITableViewDataSource, UITableViewDelegate, VLCLocalServerDiscoveryControllerDelegate>
{
......@@ -84,6 +85,7 @@
[VLCLocalNetworkServiceBrowserSAP class],
#endif
[VLCLocalNetworkServiceBrowserDSM class],
[VLCLocalNetworkServiceBrowserBonjour class],
];
_discoveryController = [[VLCLocalServerDiscoveryController alloc] initWithServiceBrowserClasses:browserClasses];
......
......@@ -136,7 +136,6 @@
}
if (mediaItems.count > 0) {
NSLog(@"%s: %@ %li", __PRETTY_FUNCTION__, mediaItems, firstIndex);
[vpc playMediaList:[[VLCMediaList alloc] initWithArray:mediaItems] firstIndex:firstIndex];
}
}
......
......@@ -104,6 +104,9 @@
7D3784C9183A9972009EE944 /* UIDevice+VLC.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784C7183A9972009EE944 /* UIDevice+VLC.m */; };
7D3784CC183A99BA009EE944 /* PAPasscodeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784CB183A99BA009EE944 /* PAPasscodeViewController.m */; };
7D3784E9183A9A15009EE944 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3784E8183A9A15009EE944 /* main.m */; };
7D398DC11CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D398DC01CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m */; };
7D398DC21CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D398DC01CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m */; };
7D398DC31CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D398DC01CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m */; };
7D3E528B1BD7B5E100309D15 /* VLCCloudServicesTVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D3E52891BD7B5E100309D15 /* VLCCloudServicesTVViewController.m */; };
7D3E528C1BD7B5E100309D15 /* VLCCloudServicesTVViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7D3E528A1BD7B5E100309D15 /* VLCCloudServicesTVViewController.xib */; };
7D3EB014174A353E002062C2 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D3EB013174A353E002062C2 /* SystemConfiguration.framework */; };
......@@ -964,6 +967,8 @@
7D3784E8183A9A15009EE944 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Sources/main.m; sourceTree = SOURCE_ROOT; };
7D3784EA183A9A1E009EE944 /* VLC for iOS-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "VLC for iOS-Info.plist"; path = "Sources/VLC for iOS-Info.plist"; sourceTree = SOURCE_ROOT; };
7D3784EB183A9A1E009EE944 /* VLC for iOS-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "VLC for iOS-Prefix.pch"; path = "Sources/VLC for iOS-Prefix.pch"; sourceTree = SOURCE_ROOT; };
7D398DBF1CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VLCLocalNetworkServiceBrowserBonjour.h; path = Bonjour/VLCLocalNetworkServiceBrowserBonjour.h; sourceTree = "<group>"; };
7D398DC01CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VLCLocalNetworkServiceBrowserBonjour.m; path = Bonjour/VLCLocalNetworkServiceBrowserBonjour.m; sourceTree = "<group>"; };
7D3E52881BD7B5E100309D15 /* VLCCloudServicesTVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VLCCloudServicesTVViewController.h; sourceTree = "<group>"; };
7D3E52891BD7B5E100309D15 /* VLCCloudServicesTVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VLCCloudServicesTVViewController.m; sourceTree = "<group>"; };
7D3E528A1BD7B5E100309D15 /* VLCCloudServicesTVViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VLCCloudServicesTVViewController.xib; sourceTree = "<group>"; };
......@@ -1722,6 +1727,15 @@
name = "UI Elements";
sourceTree = "<group>";
};
7D398DB11CC3DDDF002C999A /* Bonjour */ = {
isa = PBXGroup;
children = (
7D398DBF1CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.h */,
7D398DC01CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m */,
);
name = Bonjour;
sourceTree = "<group>";
};
7D3E528D1BD7B5E600309D15 /* Cloud */ = {
isa = PBXGroup;
children = (
......@@ -2495,6 +2509,7 @@
DD3EFEF71BDEBCE500B68579 /* General */,
DD3EFF021BDEBCE500B68579 /* HTTP */,
DD3EFF0B1BDEBCE500B68579 /* ManualConnect */,
7D398DB11CC3DDDF002C999A /* Bonjour */,
DD3EFF101BDEBCE500B68579 /* Plex */,
DD3EFF1B1BDEBCE500B68579 /* SAP */,
DD3EFF1E1BDEBCE500B68579 /* SMB/DSM */,
......@@ -3391,6 +3406,7 @@
7DC0B5701C0094370027BFAD /* VLCSettingsViewController.m in Sources */,
7DEC8BDA1BD67112006E1093 /* VLCFrostedGlasView.m in Sources */,
DD8095EB1BE4F04E0065D8E1 /* VLCPlaybackInfoRateTVViewController.m in Sources */,
7D398DC21CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */,
DD3EAC051BE153B4003668DA /* VLCNetworkImageView.m in Sources */,
7DF383B91BF21E4400D71A5C /* VLCPlayerControlWebSocket.m in Sources */,
7D0C35341BD97C7B0058CD19 /* VLCOneDriveObject.m in Sources */,
......@@ -3517,6 +3533,7 @@
DD1CB05A1BBAC549006EDDE6 /* VLCVolumeView.m in Sources */,
7D5CAA8C1A4AD8E5003F2CBC /* VLCTrackSelectorHeaderView.m in Sources */,
4171D35018A2C19000A16EF9 /* VLCFolderCollectionViewFlowLayout.m in Sources */,
7D398DC11CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */,
7D30F3CA183AB27A00FFC021 /* VLCDownloadViewController.m in Sources */,
DDEAECC61BDEC79D00756C83 /* VLCLocalNetworkServiceBrowserSAP.m in Sources */,
DD3EFF491BDEBCE500B68579 /* VLCLocalNetworkServiceBrowserPlex.m in Sources */,
......@@ -3638,6 +3655,7 @@
7DC550031C046615007B4E42 /* VLCVolumeView.m in Sources */,
7DC550041C046615007B4E42 /* VLCTrackSelectorHeaderView.m in Sources */,
7DC550051C046615007B4E42 /* VLCFolderCollectionViewFlowLayout.m in Sources */,
7D398DC31CC3E709002C999A /* VLCLocalNetworkServiceBrowserBonjour.m in Sources */,
7DC550061C046615007B4E42 /* VLCDownloadViewController.m in Sources */,
7DC550071C046615007B4E42 /* VLCLocalNetworkServiceBrowserSAP.m in Sources */,
7DC550081C046615007B4E42 /* VLCLocalNetworkServiceBrowserPlex.m in Sources */,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment