mirror of
https://github.com/RGBCube/serenity
synced 2025-05-29 17:35:06 +00: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(lsusb LibUSBDB LibMain)
|
||||||
target_link_libraries(man LibMarkdown LibMain)
|
target_link_libraries(man LibMarkdown LibMain)
|
||||||
target_link_libraries(markdown-check LibMarkdown)
|
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(md LibMarkdown LibMain)
|
||||||
target_link_libraries(mkdir LibMain)
|
target_link_libraries(mkdir LibMain)
|
||||||
target_link_libraries(mkfifo LibMain)
|
target_link_libraries(mkfifo LibMain)
|
||||||
|
|
|
@ -4,14 +4,14 @@
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <LibMain/Main.h>
|
||||||
#include <LibVideo/MatroskaReader.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");
|
auto document = Video::MatroskaReader::parse_matroska_from_file("/home/anon/Videos/test-webm.webm");
|
||||||
if (!document) {
|
if (!document) {
|
||||||
outln("Failed to parse :(");
|
return Error::from_string_literal("Failed to parse :("sv);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
outln("DocType is {}", document->header().doc_type.characters());
|
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()));
|
outln("\t\tBlock has lacing {}", static_cast<u8>(block.lacing()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue