Use IPC:MakeHeader instead of hardcoded raw values for IPC command tables. (#6453)

* Use IPC:MakeHeader instead of hardcoded values for IPC command tables.

* Use u32 instead of unsigned int in MakeHeader function

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>

* Fix clang format

---------

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
This commit is contained in:
PabloMK7 2023-04-28 07:31:03 +02:00 committed by GitHub
parent 9bd8c9290b
commit 63bc0b59bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 1983 additions and 1896 deletions

View file

@ -13,18 +13,18 @@ namespace Service::MVD {
MVD_STD::MVD_STD() : ServiceFramework("mvd:std", 1) {
static const FunctionInfo functions[] = {
// clang-format off
{0x00010082, nullptr, "Initialize"},
{0x00020000, nullptr, "Shutdown"},
{0x00030300, nullptr, "CalculateWorkBufSize"},
{0x000400C0, nullptr, "CalculateImageSize"},
{0x00080142, nullptr, "ProcessNALUnit"},
{0x00090042, nullptr, "ControlFrameRendering"},
{0x000A0000, nullptr, "GetStatus"},
{0x000B0000, nullptr, "GetStatusOther"},
{0x001D0042, nullptr, "GetConfig"},
{0x001E0044, nullptr, "SetConfig"},
{0x001F0902, nullptr, "SetOutputBuffer"},
{0x00210100, nullptr, "OverrideOutputBuffers"}
{IPC::MakeHeader(0x0001, 2, 2), nullptr, "Initialize"},
{IPC::MakeHeader(0x0002, 0, 0), nullptr, "Shutdown"},
{IPC::MakeHeader(0x0003, 12, 0), nullptr, "CalculateWorkBufSize"},
{IPC::MakeHeader(0x0004, 3, 0), nullptr, "CalculateImageSize"},
{IPC::MakeHeader(0x0008, 5, 2), nullptr, "ProcessNALUnit"},
{IPC::MakeHeader(0x0009, 1, 2), nullptr, "ControlFrameRendering"},
{IPC::MakeHeader(0x000A, 0, 0), nullptr, "GetStatus"},
{IPC::MakeHeader(0x000B, 0, 0), nullptr, "GetStatusOther"},
{IPC::MakeHeader(0x001D, 1, 2), nullptr, "GetConfig"},
{IPC::MakeHeader(0x001E, 1, 4), nullptr, "SetConfig"},
{IPC::MakeHeader(0x001F, 36, 2), nullptr, "SetOutputBuffer"},
{IPC::MakeHeader(0x0021, 4, 0), nullptr, "OverrideOutputBuffers"}
// clang-format on
};