private void ReaderFunc() { string ValFromStream = ""; while (true) { if (playerStream.Peek() >= 0) { ValFromStream = playerStream.ReadLine(); input = new InputData(ValFromStream); if (outPut != null) outPut(this, input); } } }
private void volHandler(object e, InputData args) { volRetval = args.Data; volResetEvent.Set(); }
private void OutputEventHandler(object e, InputData args) { var dataArray = InterpreterClass.DataToArray(args.Data); FireEvents(dataArray); }
private void posHandler(object e, InputData args) { timeRetVal = args.Data; timeResetEvent.Set(); }
private void FirePosEvent(InputData data) { if (TimePosEvent != null) TimePosEvent(this, data); }
private void FireVolEvent(InputData data) { if (VolGetEvent != null) VolGetEvent(this, data); }
private void FireFileGetEvent(InputData data) { if (FileGetEvent != null) FileGetEvent(this, data); }
private void FireEvents(string[] arr) { //Console.WriteLine(arr[0]); if (arr[0].Contains("EOF code: 1")) FireEOF_Event(); if (arr.Length > 1) { //This is the value from MPlayer var inputData = new InputData(arr[1]); switch (arr[0]) { case "ANS_TIME_POSITION": FirePosEvent(inputData); break; case "ANS_volume": FireVolEvent(inputData); break; case "ANS_path": FireFileGetEvent(inputData); break; } } }
private void fileGetHandler(object e, InputData args) { fileRetval = args.Data; fileResetEvent.Set(); }
private void pausedHandler(object e, InputData args) { pauseRetval = args.Data; pauseResetEvent.Set(); }
private void FirePauseEvent(InputData data) { if (PauseGetEvent != null) PauseGetEvent(this, data); }