public EsStream(Common.StreamType type, EsPlayerPacketStorage storage) { streamType = type; packetStorage = storage; switch (streamType) { case StreamType.Audio: PushStreamConfig = PushAudioConfig; break; case StreamType.Video: PushStreamConfig = PushVideoConfig; break; default: throw new ArgumentException($"Stream Type {streamType} is unsupported"); } wakeup = new ManualResetEventSlim(false); }
public EsStream(StreamType type, EsPlayerPacketStorage storage, Synchronizer synchronizer, PlayerClockProvider playerClock) { streamType = type; packetStorage = storage; _dataSynchronizer = synchronizer; _dataSynchronizer.Initialize(streamType); _playerClock = playerClock; switch (streamType) { case StreamType.Audio: PushStreamConfig = PushAudioConfig; break; case StreamType.Video: PushStreamConfig = PushVideoConfig; break; default: throw new ArgumentException($"Stream Type {streamType} is unsupported"); } }
public EsStream(Common.StreamType type, EsPlayerPacketStorage storage, StreamBufferController bufferController) { streamType = type; packetStorage = storage; streamBufferController = bufferController; switch (streamType) { case StreamType.Audio: PushStreamConfig = PushAudioConfig; break; case StreamType.Video: PushStreamConfig = PushVideoConfig; break; default: throw new ArgumentException($"Stream Type {streamType} is unsupported"); } wakeup = new ManualResetEventSlim(false); barrier = new PacketBarrier(TransferChunk); }
public EsStream(StreamType type, EsPlayerPacketStorage storage, Synchronizer synchronizer, SuspendResumeLogic suspendRedumeLogic) { streamType = type; packetStorage = storage; _dataSynchronizer = synchronizer; _dataSynchronizer.Initialize(streamType); _suspendResumeLogic = suspendRedumeLogic; switch (streamType) { case StreamType.Audio: PushStreamConfig = PushAudioConfig; break; case StreamType.Video: PushStreamConfig = PushVideoConfig; break; default: throw new ArgumentException($"Stream Type {streamType} is unsupported"); } _firstDataPacketTcs = new TaskCompletionSource <object>(); }