예제 #1
0
 public RtmpServer(RtmpContext context, IOptions <ServerConfiguration> configuration, ILoggerFactory loggerFactory)
 {
     RtmpLogging.Initialize(loggerFactory);
     _context       = context ?? throw new ArgumentNullException(nameof(context));
     _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     _logger        = loggerFactory.CreateLogger <RtmpServer>();
 }
예제 #2
0
 public TransMuxer(RtmpContext context, IOptions <ServerConfiguration> rtmpConfig, IOptions <TransMuxerConfiguration> muxConfig, ILogger <TransMuxer> logger)
 {
     _context    = context ?? throw new ArgumentNullException(nameof(context));
     _rtmpConfig = rtmpConfig ?? throw new ArgumentNullException(nameof(rtmpConfig));
     _muxConfig  = muxConfig ?? throw new ArgumentNullException(nameof(muxConfig));
     _logger     = logger ?? throw new ArgumentNullException(nameof(logger));
 }
예제 #3
0
 public ServerSession(RtmpContext context, IOptions <ServerConfiguration> configuration, TcpClient client) : base(client)
 {
     _context            = context ?? throw new ArgumentNullException(nameof(context));
     _configuration      = configuration ?? throw new ArgumentNullException(nameof(configuration));
     _commandProcessor   = new ServerCommandProcessor(context, this);
     _dataProcessor      = new ServerDataProcessor(context, this);
     _mediaProcessor     = new ServerMediaProcessor(context, this);
     OutgoingChunkLength = configuration.Value.ChunkLength;
     context.Sessions.Add(Id, this);
 }
 public ServerDataProcessor(RtmpContext context, ServerSession session)
 {
     _context = context ?? throw new ArgumentNullException(nameof(context));
     _session = session ?? throw new ArgumentNullException(nameof(session));
 }