Beispiel #1
0
        public static BufferConfigurationPacket Create(StreamConfig config)
        {
            var result = new BufferConfigurationPacket()
            {
                Config     = config,
                StreamType = config.StreamType(),
                Pts        = TimeSpan.MinValue
            };

            return(result);
        }
Beispiel #2
0
        public bool Compatible(BufferConfigurationPacket packet)
        {
            switch (packet.Config)
            {
            case AudioStreamConfig audioConfig:
                return((Config as AudioStreamConfig)?.Compatible(audioConfig) ?? false);

            case VideoStreamConfig videoConfig:
                return((Config as VideoStreamConfig)?.Compatible(videoConfig) ?? false);

            default:
                return(false);
            }
        }