Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Laurent Egbakou
libvlcsharp-samples
Commits
d5a828a5
Commit
d5a828a5
authored
Jul 26, 2021
by
Martin Finkel
Browse files
record: exit program to save file to disk
parent
0b3253a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
RecordHLS/Program.cs
View file @
d5a828a5
...
...
@@ -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"
),
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment