diff --git a/src/frameworks/CMakeLists.txt b/src/frameworks/CMakeLists.txt index 44b601ae9..48d49505b 100644 --- a/src/frameworks/CMakeLists.txt +++ b/src/frameworks/CMakeLists.txt @@ -57,6 +57,7 @@ add_subdirectory(StoreKit) add_subdirectory(SyncServices) add_subdirectory(SystemConfiguration) add_subdirectory(VideoToolbox) +add_subdirectory(VideoDecodeAcceleration) add_subdirectory(WebKit) add_subdirectory(CFOpenDirectory) add_subdirectory(UserNotifications) diff --git a/src/frameworks/VideoDecodeAcceleration/CMakeLists.txt b/src/frameworks/VideoDecodeAcceleration/CMakeLists.txt new file mode 100644 index 000000000..9abaf3cdd --- /dev/null +++ b/src/frameworks/VideoDecodeAcceleration/CMakeLists.txt @@ -0,0 +1,16 @@ +project(VideoDecodeAcceleration) + +set(DYLIB_COMPAT_VERSION "1.0.0") +set(DYLIB_CURRENT_VERSION "1.0.0") + +add_framework(VideoDecodeAcceleration + FAT + CURRENT_VERSION + VERSION "A" + + SOURCES + src/VideoDecodeAcceleration.c + + DEPENDENCIES + system +) diff --git a/src/frameworks/VideoDecodeAcceleration/include/VideoDecodeAcceleration/VideoDecodeAcceleration.h b/src/frameworks/VideoDecodeAcceleration/include/VideoDecodeAcceleration/VideoDecodeAcceleration.h new file mode 100644 index 000000000..812df4596 --- /dev/null +++ b/src/frameworks/VideoDecodeAcceleration/include/VideoDecodeAcceleration/VideoDecodeAcceleration.h @@ -0,0 +1,30 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + + +#ifndef _VideoDecodeAcceleration_H_ +#define _VideoDecodeAcceleration_H_ + +void* VDADecoderCreate(void); +void* VDADecoderDecode(void); +void* VDADecoderDestroy(void); +void* VDADecoderFlush(void); +void* myVTOutputCallback(void); + +#endif diff --git a/src/frameworks/VideoDecodeAcceleration/src/VideoDecodeAcceleration.c b/src/frameworks/VideoDecodeAcceleration/src/VideoDecodeAcceleration.c new file mode 100644 index 000000000..e3861f3a3 --- /dev/null +++ b/src/frameworks/VideoDecodeAcceleration/src/VideoDecodeAcceleration.c @@ -0,0 +1,60 @@ +/* + This file is part of Darling. + + Copyright (C) 2019 Lubos Dolezel + + Darling is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Darling is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Darling. If not, see . +*/ + + +#include +#include +#include + +static int verbose = 0; + +__attribute__((constructor)) +static void initme(void) { + verbose = getenv("STUB_VERBOSE") != NULL; +} + +void* VDADecoderCreate(void) +{ + if (verbose) puts("STUB: VDADecoderCreate called"); + return NULL; +} + +void* VDADecoderDecode(void) +{ + if (verbose) puts("STUB: VDADecoderDecode called"); + return NULL; +} + +void* VDADecoderDestroy(void) +{ + if (verbose) puts("STUB: VDADecoderDestroy called"); + return NULL; +} + +void* VDADecoderFlush(void) +{ + if (verbose) puts("STUB: VDADecoderFlush called"); + return NULL; +} + +void* myVTOutputCallback(void) +{ + if (verbose) puts("STUB: myVTOutputCallback called"); + return NULL; +} diff --git a/src/frameworks/include/VideoDecodeAcceleration b/src/frameworks/include/VideoDecodeAcceleration new file mode 120000 index 000000000..c958682ff --- /dev/null +++ b/src/frameworks/include/VideoDecodeAcceleration @@ -0,0 +1 @@ +../VideoDecodeAcceleration/include/VideoDecodeAcceleration \ No newline at end of file