Ejemplo n.º 1
0
 public DlnaEntryPoint(IServerConfigurationManager config, 
     ILogManager logManager, 
     IServerApplicationHost appHost, 
     INetworkManager network, 
     ISessionManager sessionManager, 
     IHttpClient httpClient, 
     ILibraryManager libraryManager, 
     IUserManager userManager, 
     IDlnaManager dlnaManager, 
     IImageProcessor imageProcessor, 
     IUserDataManager userDataManager, 
     ILocalizationManager localization, 
     IMediaSourceManager mediaSourceManager, 
     ISsdpHandler ssdpHandler)
 {
     _config = config;
     _appHost = appHost;
     _network = network;
     _sessionManager = sessionManager;
     _httpClient = httpClient;
     _libraryManager = libraryManager;
     _userManager = userManager;
     _dlnaManager = dlnaManager;
     _imageProcessor = imageProcessor;
     _userDataManager = userDataManager;
     _localization = localization;
     _mediaSourceManager = mediaSourceManager;
     _ssdpHandler = (SsdpHandler)ssdpHandler;
     _logger = logManager.GetLogger("Dlna");
 }
Ejemplo n.º 2
0
 public EncodingJobFactory(ILogger logger, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager, IConfigurationManager config)
 {
     _logger = logger;
     _libraryManager = libraryManager;
     _mediaSourceManager = mediaSourceManager;
     _config = config;
 }
Ejemplo n.º 3
0
 public SubtitleManager(ILogger logger, IFileSystem fileSystem, ILibraryMonitor monitor, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager)
 {
     _logger = logger;
     _fileSystem = fileSystem;
     _monitor = monitor;
     _libraryManager = libraryManager;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 4
0
 public SubtitleScheduledTask(ILibraryManager libraryManager, IServerConfigurationManager config, ISubtitleManager subtitleManager, ILogger logger, IMediaSourceManager mediaSourceManager)
 {
     _libraryManager = libraryManager;
     _config = config;
     _subtitleManager = subtitleManager;
     _logger = logger;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 5
0
 public DefaultIntroProvider(ISecurityManager security, ILocalizationManager localization, IConfigurationManager serverConfig, ILibraryManager libraryManager, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager)
 {
     _security = security;
     _localization = localization;
     _serverConfig = serverConfig;
     _libraryManager = libraryManager;
     _fileSystem = fileSystem;
     _mediaSourceManager = mediaSourceManager;
 }
 public LiveTvMediaSourceProvider(ILiveTvManager liveTvManager, IJsonSerializer jsonSerializer, ILogManager logManager, IMediaSourceManager mediaSourceManager, IMediaEncoder mediaEncoder, IServerApplicationHost appHost)
 {
     _liveTvManager = liveTvManager;
     _jsonSerializer = jsonSerializer;
     _mediaSourceManager = mediaSourceManager;
     _mediaEncoder = mediaEncoder;
     _appHost = appHost;
     _logger = logManager.GetLogger(GetType().Name);
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiEntryPoint" /> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="sessionManager">The session manager.</param>
        /// <param name="config">The configuration.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="mediaSourceManager">The media source manager.</param>
        public ApiEntryPoint(ILogger logger, ISessionManager sessionManager, IServerConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager)
        {
            Logger = logger;
            _sessionManager = sessionManager;
            _config = config;
            _fileSystem = fileSystem;
            _mediaSourceManager = mediaSourceManager;

            Instance = this;
        }
Ejemplo n.º 8
0
 public SubtitleEncoder(ILibraryManager libraryManager, ILogger logger, IApplicationPaths appPaths, IFileSystem fileSystem, IMediaEncoder mediaEncoder, IJsonSerializer json, IHttpClient httpClient, IMediaSourceManager mediaSourceManager)
 {
     _libraryManager = libraryManager;
     _logger = logger;
     _appPaths = appPaths;
     _fileSystem = fileSystem;
     _mediaEncoder = mediaEncoder;
     _json = json;
     _httpClient = httpClient;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 9
0
 public DidlBuilder(DeviceProfile profile, User user, IImageProcessor imageProcessor, string serverAddress, string accessToken, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, ILogger logger)
 {
     _profile = profile;
     _imageProcessor = imageProcessor;
     _serverAddress = serverAddress;
     _userDataManager = userDataManager;
     _localization = localization;
     _mediaSourceManager = mediaSourceManager;
     _logger = logger;
     _accessToken = accessToken;
     _user = user;
 }
Ejemplo n.º 10
0
        public ControlHandler(ILogger logger, ILibraryManager libraryManager, DeviceProfile profile, string serverAddress, string accessToken, IImageProcessor imageProcessor, IUserDataManager userDataManager, User user, int systemUpdateId, IServerConfigurationManager config, ILocalizationManager localization, IChannelManager channelManager, IMediaSourceManager mediaSourceManager)
            : base(config, logger)
        {
            _libraryManager = libraryManager;
            _userDataManager = userDataManager;
            _user = user;
            _systemUpdateId = systemUpdateId;
            _channelManager = channelManager;
            _profile = profile;
            _config = config;

            _didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager, Logger);
        }
Ejemplo n.º 11
0
        public EncodingJob(ILogger logger, IMediaSourceManager mediaSourceManager)
        {
            _logger = logger;
            _mediaSourceManager = mediaSourceManager;
            Id = Guid.NewGuid().ToString("N");

            RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
            _logger = logger;
            SupportedAudioCodecs = new List<string>();
            PlayableStreamFileNames = new List<string>();
            RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
            TaskCompletionSource = new TaskCompletionSource<bool>();
        }
Ejemplo n.º 12
0
 public SyncConvertScheduledTask(ILibraryManager libraryManager, ISyncRepository syncRepo, ISyncManager syncManager, ILogger logger, IUserManager userManager, ITVSeriesManager tvSeriesManager, IMediaEncoder mediaEncoder, ISubtitleEncoder subtitleEncoder, IConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager)
 {
     _libraryManager = libraryManager;
     _syncRepo = syncRepo;
     _syncManager = syncManager;
     _logger = logger;
     _userManager = userManager;
     _tvSeriesManager = tvSeriesManager;
     _mediaEncoder = mediaEncoder;
     _subtitleEncoder = subtitleEncoder;
     _config = config;
     _fileSystem = fileSystem;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseStreamingService" /> class.
 /// </summary>
 protected BaseStreamingService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer)
 {
     JsonSerializer = jsonSerializer;
     ZipClient = zipClient;
     MediaSourceManager = mediaSourceManager;
     DeviceManager = deviceManager;
     SubtitleEncoder = subtitleEncoder;
     DlnaManager = dlnaManager;
     FileSystem = fileSystem;
     ServerConfigurationManager = serverConfig;
     UserManager = userManager;
     LibraryManager = libraryManager;
     IsoManager = isoManager;
     MediaEncoder = mediaEncoder;
 }
Ejemplo n.º 14
0
 public PlayToManager(ILogger logger, ISessionManager sessionManager, ILibraryManager libraryManager, IUserManager userManager, IDlnaManager dlnaManager, IServerApplicationHost appHost, IImageProcessor imageProcessor, IDeviceDiscovery deviceDiscovery, IHttpClient httpClient, IServerConfigurationManager config, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager)
 {
     _logger = logger;
     _sessionManager = sessionManager;
     _libraryManager = libraryManager;
     _userManager = userManager;
     _dlnaManager = dlnaManager;
     _appHost = appHost;
     _imageProcessor = imageProcessor;
     _deviceDiscovery = deviceDiscovery;
     _httpClient = httpClient;
     _config = config;
     _userDataManager = userDataManager;
     _localization = localization;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 15
0
 public ContentDirectory(IDlnaManager dlna,
     IUserDataManager userDataManager,
     IImageProcessor imageProcessor,
     ILibraryManager libraryManager,
     IServerConfigurationManager config,
     IUserManager userManager,
     ILogger logger,
     IHttpClient httpClient, ILocalizationManager localization, IChannelManager channelManager, IMediaSourceManager mediaSourceManager)
     : base(logger, httpClient)
 {
     _dlna = dlna;
     _userDataManager = userDataManager;
     _imageProcessor = imageProcessor;
     _libraryManager = libraryManager;
     _config = config;
     _userManager = userManager;
     _localization = localization;
     _channelManager = channelManager;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 16
0
 protected BaseEncoder(MediaEncoder mediaEncoder,
     ILogger logger,
     IServerConfigurationManager configurationManager,
     IFileSystem fileSystem,
     IIsoManager isoManager,
     ILibraryManager libraryManager,
     ISessionManager sessionManager, 
     ISubtitleEncoder subtitleEncoder, 
     IMediaSourceManager mediaSourceManager)
 {
     MediaEncoder = mediaEncoder;
     Logger = logger;
     ConfigurationManager = configurationManager;
     FileSystem = fileSystem;
     IsoManager = isoManager;
     LibraryManager = libraryManager;
     SessionManager = sessionManager;
     SubtitleEncoder = subtitleEncoder;
     MediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiEntryPoint" /> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="sessionManager">The session manager.</param>
        /// <param name="config">The configuration.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="mediaSourceManager">The media source manager.</param>
        public ApiEntryPoint(ILogger logger, ISessionManager sessionManager, IServerConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager)
        {
            Logger              = logger;
            _sessionManager     = sessionManager;
            _config             = config;
            _fileSystem         = fileSystem;
            _mediaSourceManager = mediaSourceManager;

            Instance = this;
        }
Ejemplo n.º 18
0
        public DlnaEntryPoint(IServerConfigurationManager config,
                              ILoggerFactory loggerFactory,
                              IServerApplicationHost appHost,
                              ISessionManager sessionManager,
                              IHttpClient httpClient,
                              ILibraryManager libraryManager,
                              IUserManager userManager,
                              IDlnaManager dlnaManager,
                              IImageProcessor imageProcessor,
                              IUserDataManager userDataManager,
                              ILocalizationManager localizationManager,
                              IMediaSourceManager mediaSourceManager,
                              IDeviceDiscovery deviceDiscovery,
                              IMediaEncoder mediaEncoder,
                              ISocketFactory socketFactory,
                              ITimerFactory timerFactory,
                              IEnvironmentInfo environmentInfo,
                              INetworkManager networkManager,
                              IUserViewManager userViewManager,
                              IXmlReaderSettingsFactory xmlReaderSettingsFactory,
                              ITVSeriesManager tvSeriesManager)
        {
            _config             = config;
            _appHost            = appHost;
            _sessionManager     = sessionManager;
            _httpClient         = httpClient;
            _libraryManager     = libraryManager;
            _userManager        = userManager;
            _dlnaManager        = dlnaManager;
            _imageProcessor     = imageProcessor;
            _userDataManager    = userDataManager;
            _localization       = localizationManager;
            _mediaSourceManager = mediaSourceManager;
            _deviceDiscovery    = deviceDiscovery;
            _mediaEncoder       = mediaEncoder;
            _socketFactory      = socketFactory;
            _timerFactory       = timerFactory;
            _environmentInfo    = environmentInfo;
            _networkManager     = networkManager;
            _logger             = loggerFactory.CreateLogger("Dlna");

            ContentDirectory = new ContentDirectory.ContentDirectory(dlnaManager,
                                                                     userDataManager,
                                                                     imageProcessor,
                                                                     libraryManager,
                                                                     config,
                                                                     userManager,
                                                                     _logger,
                                                                     httpClient,
                                                                     localizationManager,
                                                                     mediaSourceManager,
                                                                     userViewManager,
                                                                     mediaEncoder,
                                                                     xmlReaderSettingsFactory,
                                                                     tvSeriesManager);

            ConnectionManager = new ConnectionManager.ConnectionManager(dlnaManager, config, _logger, httpClient, xmlReaderSettingsFactory);

            MediaReceiverRegistrar = new MediaReceiverRegistrar.MediaReceiverRegistrar(_logger, httpClient, config, xmlReaderSettingsFactory);
            Current = this;
        }
Ejemplo n.º 19
0
 public VideoService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IImageProcessor imageProcessor, IHttpClient httpClient) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer, imageProcessor, httpClient)
 {
 }
Ejemplo n.º 20
0
 public DidlBuilder(DeviceProfile profile, User user, IImageProcessor imageProcessor, string serverAddress, string accessToken, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, ILogger logger, ILibraryManager libraryManager, IMediaEncoder mediaEncoder)
 {
     _profile            = profile;
     _imageProcessor     = imageProcessor;
     _serverAddress      = serverAddress;
     _userDataManager    = userDataManager;
     _localization       = localization;
     _mediaSourceManager = mediaSourceManager;
     _logger             = logger;
     _libraryManager     = libraryManager;
     _mediaEncoder       = mediaEncoder;
     _accessToken        = accessToken;
     _user = user;
 }
Ejemplo n.º 21
0
 public LiveTvMediaSourceProvider(ILiveTvManager liveTvManager, IJsonSerializer jsonSerializer, ILogManager logManager, IMediaSourceManager mediaSourceManager, IMediaEncoder mediaEncoder, IServerApplicationHost appHost)
 {
     _liveTvManager      = liveTvManager;
     _jsonSerializer     = jsonSerializer;
     _mediaSourceManager = mediaSourceManager;
     _mediaEncoder       = mediaEncoder;
     _appHost            = appHost;
     _logger             = logManager.GetLogger(GetType().Name);
 }
Ejemplo n.º 22
0
 public SubtitleManager(ILogger logger, IFileSystem fileSystem, ILibraryMonitor monitor, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager)
 {
     _logger             = logger;
     _fileSystem         = fileSystem;
     _monitor            = monitor;
     _libraryManager     = libraryManager;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 23
0
        public DlnaEntryPoint(
            IServerConfigurationManager config,
            ILoggerFactory loggerFactory,
            IServerApplicationHost appHost,
            ISessionManager sessionManager,
            IHttpClientFactory httpClientFactory,
            ILibraryManager libraryManager,
            IUserManager userManager,
            IDlnaManager dlnaManager,
            IImageProcessor imageProcessor,
            IUserDataManager userDataManager,
            ILocalizationManager localizationManager,
            IMediaSourceManager mediaSourceManager,
            IDeviceDiscovery deviceDiscovery,
            IMediaEncoder mediaEncoder,
            ISocketFactory socketFactory,
            INetworkManager networkManager,
            IUserViewManager userViewManager,
            ITVSeriesManager tvSeriesManager)
        {
            _config             = config;
            _appHost            = appHost;
            _sessionManager     = sessionManager;
            _httpClientFactory  = httpClientFactory;
            _libraryManager     = libraryManager;
            _userManager        = userManager;
            _dlnaManager        = dlnaManager;
            _imageProcessor     = imageProcessor;
            _userDataManager    = userDataManager;
            _localization       = localizationManager;
            _mediaSourceManager = mediaSourceManager;
            _deviceDiscovery    = deviceDiscovery;
            _mediaEncoder       = mediaEncoder;
            _socketFactory      = socketFactory;
            _networkManager     = networkManager;
            _logger             = loggerFactory.CreateLogger <DlnaEntryPoint>();

            ContentDirectory = new ContentDirectory.ContentDirectoryService(
                dlnaManager,
                userDataManager,
                imageProcessor,
                libraryManager,
                config,
                userManager,
                loggerFactory.CreateLogger <ContentDirectory.ContentDirectoryService>(),
                httpClientFactory,
                localizationManager,
                mediaSourceManager,
                userViewManager,
                mediaEncoder,
                tvSeriesManager);

            ConnectionManager = new ConnectionManager.ConnectionManagerService(
                dlnaManager,
                config,
                loggerFactory.CreateLogger <ConnectionManager.ConnectionManagerService>(),
                httpClientFactory);

            MediaReceiverRegistrar = new MediaReceiverRegistrar.MediaReceiverRegistrarService(
                loggerFactory.CreateLogger <MediaReceiverRegistrar.MediaReceiverRegistrarService>(),
                httpClientFactory,
                config);
            Current = this;

            _netConfig = config.GetConfiguration <NetworkConfiguration>("network");
            _disabled  = appHost.ListenWithHttps && _netConfig.RequireHttps;
            if (_disabled)
            {
                _logger.LogError("The DLNA specification does not support HTTPS.");
            }
        }
Ejemplo n.º 24
0
        public ControlHandler(ILogger logger, ILibraryManager libraryManager, DeviceProfile profile, string serverAddress, string accessToken, IImageProcessor imageProcessor, IUserDataManager userDataManager, User user, int systemUpdateId, IServerConfigurationManager config, ILocalizationManager localization, IChannelManager channelManager, IMediaSourceManager mediaSourceManager, IUserViewManager userViewManager)
            : base(config, logger)
        {
            _libraryManager  = libraryManager;
            _userDataManager = userDataManager;
            _user            = user;
            _systemUpdateId  = systemUpdateId;
            _channelManager  = channelManager;
            _userViewManager = userViewManager;
            _profile         = profile;
            _config          = config;

            _didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager, Logger, libraryManager);
        }
Ejemplo n.º 25
0
 public SubtitleService(ILibraryManager libraryManager, ISubtitleManager subtitleManager, ISubtitleEncoder subtitleEncoder, IMediaSourceManager mediaSourceManager, IProviderManager providerManager, IFileSystem fileSystem)
 {
     _libraryManager     = libraryManager;
     _subtitleManager    = subtitleManager;
     _subtitleEncoder    = subtitleEncoder;
     _mediaSourceManager = mediaSourceManager;
     _providerManager    = providerManager;
     _fileSystem         = fileSystem;
 }
Ejemplo n.º 26
0
 public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger)
 {
     _mediaSourceManager = mediaSourceManager;
     _logger = logger;
     SupportedAudioCodecs = new List<string>();
     PlayableStreamFileNames = new List<string>();
     RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
 }
Ejemplo n.º 27
0
 public BaseHlsService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IAuthorizationContext authorizationContext) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer, authorizationContext)
 {
 }
Ejemplo n.º 28
0
 public SyncJobProcessor(ILibraryManager libraryManager, ISyncRepository syncRepo, SyncManager syncManager, ILogger logger, IUserManager userManager, ITVSeriesManager tvSeriesManager, IMediaEncoder mediaEncoder, ISubtitleEncoder subtitleEncoder, IConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager)
 {
     _libraryManager     = libraryManager;
     _syncRepo           = syncRepo;
     _syncManager        = syncManager;
     _logger             = logger;
     _userManager        = userManager;
     _tvSeriesManager    = tvSeriesManager;
     _mediaEncoder       = mediaEncoder;
     _subtitleEncoder    = subtitleEncoder;
     _config             = config;
     _fileSystem         = fileSystem;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 29
0
        public DlnaEntryPoint(
            IServerConfigurationManager config,
            ILoggerFactory loggerFactory,
            IServerApplicationHost appHost,
            ISessionManager sessionManager,
            IHttpClient httpClient,
            ILibraryManager libraryManager,
            IUserManager userManager,
            IDlnaManager dlnaManager,
            IImageProcessor imageProcessor,
            IUserDataManager userDataManager,
            ILocalizationManager localizationManager,
            IMediaSourceManager mediaSourceManager,
            IDeviceDiscovery deviceDiscovery,
            IMediaEncoder mediaEncoder,
            ISocketFactory socketFactory,
            INetworkManager networkManager,
            IUserViewManager userViewManager,
            ITVSeriesManager tvSeriesManager)
        {
            _config             = config;
            _appHost            = appHost;
            _sessionManager     = sessionManager;
            _httpClient         = httpClient;
            _libraryManager     = libraryManager;
            _userManager        = userManager;
            _dlnaManager        = dlnaManager;
            _imageProcessor     = imageProcessor;
            _userDataManager    = userDataManager;
            _localization       = localizationManager;
            _mediaSourceManager = mediaSourceManager;
            _deviceDiscovery    = deviceDiscovery;
            _mediaEncoder       = mediaEncoder;
            _socketFactory      = socketFactory;
            _networkManager     = networkManager;
            _logger             = loggerFactory.CreateLogger <DlnaEntryPoint>();

            ContentDirectory = new ContentDirectory.ContentDirectory(
                dlnaManager,
                userDataManager,
                imageProcessor,
                libraryManager,
                config,
                userManager,
                loggerFactory.CreateLogger <ContentDirectory.ContentDirectory>(),
                httpClient,
                localizationManager,
                mediaSourceManager,
                userViewManager,
                mediaEncoder,
                tvSeriesManager);

            ConnectionManager = new ConnectionManager.ConnectionManager(
                dlnaManager,
                config,
                loggerFactory.CreateLogger <ConnectionManager.ConnectionManager>(),
                httpClient);

            MediaReceiverRegistrar = new MediaReceiverRegistrar.MediaReceiverRegistrar(
                loggerFactory.CreateLogger <MediaReceiverRegistrar.MediaReceiverRegistrar>(),
                httpClient,
                config);
            Current = this;
        }
Ejemplo n.º 30
0
 public VideoEncoder(MediaEncoder mediaEncoder, ILogger logger, IServerConfigurationManager configurationManager, IFileSystem fileSystem, IIsoManager isoManager, ILibraryManager libraryManager, ISessionManager sessionManager, ISubtitleEncoder subtitleEncoder, IMediaSourceManager mediaSourceManager) : base(mediaEncoder, logger, configurationManager, fileSystem, isoManager, libraryManager, sessionManager, subtitleEncoder, mediaSourceManager)
 {
 }
 protected BaseProgressiveStreamingService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IImageProcessor imageProcessor, IHttpClient httpClient) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer)
 {
     ImageProcessor = imageProcessor;
     HttpClient     = httpClient;
 }
Ejemplo n.º 32
0
 public MpegDashService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, INetworkManager networkManager) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer)
 {
     NetworkManager = networkManager;
 }
Ejemplo n.º 33
0
            public static StreamParams ParseFromUrl(string url, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager)
            {
                if (string.IsNullOrEmpty(url))
                {
                    throw new ArgumentNullException(nameof(url));
                }

                var request = new StreamParams
                {
                    ItemId = GetItemId(url)
                };

                if (request.ItemId.Equals(Guid.Empty))
                {
                    return(request);
                }

                var index = url.IndexOf('?', StringComparison.Ordinal);

                if (index == -1)
                {
                    return(request);
                }

                var query = url.Substring(index + 1);
                Dictionary <string, string> values = QueryHelpers.ParseQuery(query).ToDictionary(kv => kv.Key, kv => kv.Value.ToString());

                request.DeviceProfileId     = values.GetValueOrDefault("DeviceProfileId");
                request.DeviceId            = values.GetValueOrDefault("DeviceId");
                request.MediaSourceId       = values.GetValueOrDefault("MediaSourceId");
                request.LiveStreamId        = values.GetValueOrDefault("LiveStreamId");
                request.IsDirectStream      = string.Equals("true", values.GetValueOrDefault("Static"), StringComparison.OrdinalIgnoreCase);
                request.AudioStreamIndex    = GetIntValue(values, "AudioStreamIndex");
                request.SubtitleStreamIndex = GetIntValue(values, "SubtitleStreamIndex");
                request.StartPositionTicks  = GetLongValue(values, "StartPositionTicks");

                request.Item = libraryManager.GetItemById(request.ItemId);

                request._mediaSourceManager = mediaSourceManager;

                return(request);
            }
Ejemplo n.º 34
0
 public SubtitleEncoder(ILibraryManager libraryManager, ILogger logger, IApplicationPaths appPaths, IFileSystem fileSystem, IMediaEncoder mediaEncoder, IJsonSerializer json, IHttpClient httpClient, IMediaSourceManager mediaSourceManager)
 {
     _libraryManager     = libraryManager;
     _logger             = logger;
     _appPaths           = appPaths;
     _fileSystem         = fileSystem;
     _mediaEncoder       = mediaEncoder;
     _json               = json;
     _httpClient         = httpClient;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 35
0
            public static StreamParams ParseFromUrl(string url, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager)
            {
                var request = new StreamParams
                {
                    ItemId = GetItemId(url)
                };

                Guid parsedId;

                if (string.IsNullOrWhiteSpace(request.ItemId) || !Guid.TryParse(request.ItemId, out parsedId))
                {
                    return(request);
                }

                const string srch  = "params=";
                var          index = url.IndexOf(srch, StringComparison.OrdinalIgnoreCase);

                if (index == -1)
                {
                    return(request);
                }

                var vals = url.Substring(index + srch.Length).Split(';');

                for (var i = 0; i < vals.Length; i++)
                {
                    var val = vals[i];

                    if (string.IsNullOrWhiteSpace(val))
                    {
                        continue;
                    }

                    if (i == 0)
                    {
                        request.DeviceProfileId = val;
                    }
                    else if (i == 1)
                    {
                        request.DeviceId = val;
                    }
                    else if (i == 2)
                    {
                        request.MediaSourceId = val;
                    }
                    else if (i == 3)
                    {
                        request.IsDirectStream = string.Equals("true", val, StringComparison.OrdinalIgnoreCase);
                    }
                    else if (i == 6)
                    {
                        request.AudioStreamIndex = int.Parse(val, CultureInfo.InvariantCulture);
                    }
                    else if (i == 7)
                    {
                        request.SubtitleStreamIndex = int.Parse(val, CultureInfo.InvariantCulture);
                    }
                    else if (i == 14)
                    {
                        request.StartPositionTicks = long.Parse(val, CultureInfo.InvariantCulture);
                    }
                }

                request.Item = string.IsNullOrWhiteSpace(request.ItemId)
                    ? null
                    : libraryManager.GetItemById(parsedId);

                var hasMediaSources = request.Item as IHasMediaSources;

                request.MediaSource = hasMediaSources == null ?
                                      null :
                                      mediaSourceManager.GetMediaSource(hasMediaSources, request.MediaSourceId, false).Result;



                return(request);
            }
Ejemplo n.º 36
0
            public static StreamParams ParseFromUrl(string url, ILibraryManager libraryManager, IMediaSourceManager mediaSourceManager)
            {
                if (string.IsNullOrEmpty(url))
                {
                    throw new ArgumentNullException("url");
                }

                var request = new StreamParams
                {
                    ItemId = GetItemId(url)
                };

                if (request.ItemId.Equals(Guid.Empty))
                {
                    return(request);
                }

                var index = url.IndexOf('?');

                if (index == -1)
                {
                    return(request);
                }

                var query = url.Substring(index + 1);
                QueryParamCollection values = MyHttpUtility.ParseQueryString(query);

                request.DeviceProfileId = values.Get("DeviceProfileId");
                request.DeviceId        = values.Get("DeviceId");
                request.MediaSourceId   = values.Get("MediaSourceId");
                request.LiveStreamId    = values.Get("LiveStreamId");
                request.IsDirectStream  = string.Equals("true", values.Get("Static"), StringComparison.OrdinalIgnoreCase);

                request.AudioStreamIndex    = GetIntValue(values, "AudioStreamIndex");
                request.SubtitleStreamIndex = GetIntValue(values, "SubtitleStreamIndex");
                request.StartPositionTicks  = GetLongValue(values, "StartPositionTicks");

                request.Item = libraryManager.GetItemById(request.ItemId);

                request._mediaSourceManager = mediaSourceManager;

                return(request);
            }
Ejemplo n.º 37
0
 public SubtitleScheduledTask(ILibraryManager libraryManager, IJsonSerializer json, IServerConfigurationManager config, ISubtitleManager subtitleManager, ILogger logger, IMediaSourceManager mediaSourceManager)
 {
     _libraryManager     = libraryManager;
     _config             = config;
     _subtitleManager    = subtitleManager;
     _logger             = logger;
     _mediaSourceManager = mediaSourceManager;
     _json = json;
 }
 public DefaultIntroProvider(ISecurityManager security, ILocalizationManager localization, IConfigurationManager serverConfig, ILibraryManager libraryManager, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager)
 {
     _security           = security;
     _localization       = localization;
     _serverConfig       = serverConfig;
     _libraryManager     = libraryManager;
     _fileSystem         = fileSystem;
     _mediaSourceManager = mediaSourceManager;
 }
Ejemplo n.º 39
0
 public SubtitleManager(ILogger logger, IFileSystem fileSystem, ILibraryMonitor monitor, IMediaSourceManager mediaSourceManager, IServerConfigurationManager config, ILocalizationManager localizationManager)
 {
     _logger             = logger;
     _fileSystem         = fileSystem;
     _monitor            = monitor;
     _mediaSourceManager = mediaSourceManager;
     _config             = config;
     _localization       = localizationManager;
 }
Ejemplo n.º 40
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BaseStreamingService" /> class.
 /// </summary>
 protected BaseStreamingService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IAuthorizationContext authorizationContext)
 {
     JsonSerializer             = jsonSerializer;
     AuthorizationContext       = authorizationContext;
     ZipClient                  = zipClient;
     MediaSourceManager         = mediaSourceManager;
     DeviceManager              = deviceManager;
     SubtitleEncoder            = subtitleEncoder;
     DlnaManager                = dlnaManager;
     FileSystem                 = fileSystem;
     ServerConfigurationManager = serverConfig;
     UserManager                = userManager;
     LibraryManager             = libraryManager;
     IsoManager                 = isoManager;
     MediaEncoder               = mediaEncoder;
     EncodingHelper             = new EncodingHelper(MediaEncoder, FileSystem, SubtitleEncoder);
 }
Ejemplo n.º 41
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ApiEntryPoint" /> class.
        /// </summary>
        /// <param name="logger">The logger.</param>
        /// <param name="sessionManager">The session manager.</param>
        /// <param name="config">The configuration.</param>
        /// <param name="fileSystem">The file system.</param>
        /// <param name="mediaSourceManager">The media source manager.</param>
        public ApiEntryPoint(ILogger logger, ISessionManager sessionManager, IServerConfigurationManager config, IFileSystem fileSystem, IMediaSourceManager mediaSourceManager, ITimerFactory timerFactory, IProcessFactory processFactory, IHttpResultFactory resultFactory)
        {
            Logger              = logger;
            _sessionManager     = sessionManager;
            _config             = config;
            _fileSystem         = fileSystem;
            _mediaSourceManager = mediaSourceManager;
            TimerFactory        = timerFactory;
            ProcessFactory      = processFactory;
            ResultFactory       = resultFactory;

            Instance = this;
            _sessionManager.PlaybackProgress += _sessionManager_PlaybackProgress;
            _sessionManager.PlaybackStart    += _sessionManager_PlaybackStart;
        }
Ejemplo n.º 42
0
 public VideoEncoder(MediaEncoder mediaEncoder, ILogger logger, IServerConfigurationManager configurationManager, IFileSystem fileSystem, IIsoManager isoManager, ILibraryManager libraryManager, ISessionManager sessionManager, ISubtitleEncoder subtitleEncoder, IMediaSourceManager mediaSourceManager) : base(mediaEncoder, logger, configurationManager, fileSystem, isoManager, libraryManager, sessionManager, subtitleEncoder, mediaSourceManager)
 {
 }
Ejemplo n.º 43
0
 public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger, TranscodingJobType transcodingType)
     : base(logger, mediaSourceManager, transcodingType)
 {
     _mediaSourceManager = mediaSourceManager;
     _logger             = logger;
 }
Ejemplo n.º 44
0
 public VideoService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IImageProcessor imageProcessor, IHttpClient httpClient) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer, imageProcessor, httpClient)
 {
 }
Ejemplo n.º 45
0
 public PlayToManager(ILogger logger, ISessionManager sessionManager, ILibraryManager libraryManager, IUserManager userManager, IDlnaManager dlnaManager, IServerApplicationHost appHost, IImageProcessor imageProcessor, IDeviceDiscovery deviceDiscovery, IHttpClientFactory httpClientFactory, IServerConfigurationManager config, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, IMediaEncoder mediaEncoder)
 {
     _logger             = logger;
     _sessionManager     = sessionManager;
     _libraryManager     = libraryManager;
     _userManager        = userManager;
     _dlnaManager        = dlnaManager;
     _appHost            = appHost;
     _imageProcessor     = imageProcessor;
     _deviceDiscovery    = deviceDiscovery;
     _httpClientFactory  = httpClientFactory;
     _config             = config;
     _userDataManager    = userDataManager;
     _localization       = localization;
     _mediaSourceManager = mediaSourceManager;
     _mediaEncoder       = mediaEncoder;
 }
Ejemplo n.º 46
0
 public AudioEncoder(MediaEncoder mediaEncoder, ILogger logger, IServerConfigurationManager configurationManager, IFileSystem fileSystem, IIsoManager isoManager, ILibraryManager libraryManager, ISessionManager sessionManager, ISubtitleEncoder subtitleEncoder, IMediaSourceManager mediaSourceManager, IProcessFactory processFactory) : base(mediaEncoder, logger, configurationManager, fileSystem, isoManager, libraryManager, sessionManager, subtitleEncoder, mediaSourceManager, processFactory)
 {
 }
Ejemplo n.º 47
0
 public SubtitleEncoder(ILibraryManager libraryManager, ILogger logger, IApplicationPaths appPaths, IFileSystem fileSystem, IMediaEncoder mediaEncoder, IJsonSerializer json, IHttpClient httpClient, IMediaSourceManager mediaSourceManager, IProcessFactory processFactory, ITextEncoding textEncoding)
 {
     _libraryManager = libraryManager;
     _logger         = logger;
     _appPaths       = appPaths;
     _fileSystem     = fileSystem;
     _mediaEncoder   = mediaEncoder;
     _json           = json;
     _httpClient     = httpClient;
     _processFactory = processFactory;
     _textEncoding   = textEncoding;
 }
 protected BaseProgressiveStreamingService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, IImageProcessor imageProcessor, IHttpClient httpClient) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer)
 {
     ImageProcessor = imageProcessor;
     HttpClient = httpClient;
 }
Ejemplo n.º 49
0
 public PlayToController(SessionInfo session, ISessionManager sessionManager, ILibraryManager libraryManager, ILogger logger, IDlnaManager dlnaManager, IUserManager userManager, IImageProcessor imageProcessor, string serverAddress, string accessToken, IDeviceDiscovery deviceDiscovery, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager)
 {
     _session            = session;
     _sessionManager     = sessionManager;
     _libraryManager     = libraryManager;
     _dlnaManager        = dlnaManager;
     _userManager        = userManager;
     _imageProcessor     = imageProcessor;
     _serverAddress      = serverAddress;
     _deviceDiscovery    = deviceDiscovery;
     _userDataManager    = userDataManager;
     _localization       = localization;
     _mediaSourceManager = mediaSourceManager;
     _accessToken        = accessToken;
     _logger             = logger;
     _creationTime       = DateTime.UtcNow;
 }
Ejemplo n.º 50
0
 public DynamicHlsService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient, IJsonSerializer jsonSerializer, INetworkManager networkManager)
     : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient, jsonSerializer)
 {
     NetworkManager = networkManager;
 }
Ejemplo n.º 51
0
 protected BaseHlsService(IServerConfigurationManager serverConfig, IUserManager userManager, ILibraryManager libraryManager, IIsoManager isoManager, IMediaEncoder mediaEncoder, IFileSystem fileSystem, IDlnaManager dlnaManager, ISubtitleEncoder subtitleEncoder, IDeviceManager deviceManager, IMediaSourceManager mediaSourceManager, IZipClient zipClient) : base(serverConfig, userManager, libraryManager, isoManager, mediaEncoder, fileSystem, dlnaManager, subtitleEncoder, deviceManager, mediaSourceManager, zipClient)
 {
 }