Commit d5a828a5 authored by Martin Finkel's avatar Martin Finkel
Browse files

record: exit program to save file to disk

parent 0b3253a8
......@@ -21,6 +21,11 @@ namespace RecordHLS
{
// Redirect log output to the console
libvlc.Log += (sender, e) => Console.WriteLine($"[{e.Level}] {e.Module}:{e.Message}");
mediaPlayer.EndReached += (sender, e) =>
{
Console.WriteLine("Recorded file is located at " + destination);
Environment.Exit(0);
};
// Create new media with HLS link
using (var media = new Media(libvlc, new Uri("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4"),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment