mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:14:58 +00:00
matroska: Port to LibMain
This commit is contained in:
parent
b6e767f953
commit
dba23c55dd
2 changed files with 6 additions and 4 deletions
|
@ -4,14 +4,14 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibMain/Main.h>
|
||||
#include <LibVideo/MatroskaReader.h>
|
||||
|
||||
int main(int, char**)
|
||||
ErrorOr<int> serenity_main(Main::Arguments)
|
||||
{
|
||||
auto document = Video::MatroskaReader::parse_matroska_from_file("/home/anon/Videos/test-webm.webm");
|
||||
if (!document) {
|
||||
outln("Failed to parse :(");
|
||||
return 1;
|
||||
return Error::from_string_literal("Failed to parse :("sv);
|
||||
}
|
||||
|
||||
outln("DocType is {}", document->header().doc_type.characters());
|
||||
|
@ -51,4 +51,6 @@ int main(int, char**)
|
|||
outln("\t\tBlock has lacing {}", static_cast<u8>(block.lacing()));
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue