mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
matroska: Port to LibMain
This commit is contained in:
parent
b6e767f953
commit
dba23c55dd
2 changed files with 6 additions and 4 deletions
|
@ -137,7 +137,7 @@ target_link_libraries(lspci LibPCIDB LibMain)
|
|||
target_link_libraries(lsusb LibUSBDB LibMain)
|
||||
target_link_libraries(man LibMarkdown LibMain)
|
||||
target_link_libraries(markdown-check LibMarkdown)
|
||||
target_link_libraries(matroska LibVideo)
|
||||
target_link_libraries(matroska LibMain LibVideo)
|
||||
target_link_libraries(md LibMarkdown LibMain)
|
||||
target_link_libraries(mkdir LibMain)
|
||||
target_link_libraries(mkfifo LibMain)
|
||||
|
|
|
@ -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
Reference in a new issue