Exemple #1
0
        private static void _tsAnalyserApi_StreamCommand(object sender, StreamCommandEventArgs e)
        {
            switch (e.Command)
            {
                case (StreamCommandType.ResetMetrics):
                    SetupMetricsAndDecoders();

                    _tsAnalyserApi.NetworkMetric = _networkMetric;
                    _tsAnalyserApi.TsMetrics = _pidMetrics;
                    _tsAnalyserApi.RtpMetric = _rtpMetric;
                    Console.Clear();

                    break;
                case (StreamCommandType.StopStream):
                    //todo: implement
                    break;
                case (StreamCommandType.StartStream):
                    //todo: implement
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }
        }
Exemple #2
0
 protected virtual void OnStreamCommand(StreamCommandType command)
 {
     var handler = StreamCommand;
     if (handler == null) return;
     var args = new StreamCommandEventArgs {Command = command};
     handler(this, args);
 }