Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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");
            }
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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>();
        }