mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 06:01:04 +00:00
registry: Use a toolchain-specific registry file on Windows
If we load a plugin registry for MinGW plugins when running with MSVC, we will have to write out the whole cache again, and vice-versa. Just use separate cache files so that the cache is actually useful. Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/427 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/542>
This commit is contained in:
parent
63c1945695
commit
43174bfe1d
1 changed files with 14 additions and 1 deletions
|
@ -122,6 +122,19 @@
|
|||
extern HMODULE _priv_gst_dll_handle;
|
||||
#endif
|
||||
|
||||
/* Use a toolchain-dependent suffix on Windows */
|
||||
#ifdef G_OS_WIN32
|
||||
# ifdef _MSC_VER
|
||||
# define GST_REGISTRY_FILE_SUFFIX TARGET_CPU "-msvc"
|
||||
# else
|
||||
# define GST_REGISTRY_FILE_SUFFIX TARGET_CPU "-mingw"
|
||||
# endif
|
||||
#else
|
||||
# define GST_REGISTRY_FILE_SUFFIX TARGET_CPU
|
||||
#endif
|
||||
#define GST_REGISTRY_FILE_NAME "registry." GST_REGISTRY_FILE_SUFFIX ".bin"
|
||||
|
||||
|
||||
#define GST_CAT_DEFAULT GST_CAT_REGISTRY
|
||||
|
||||
struct _GstRegistryPrivate
|
||||
|
@ -1735,7 +1748,7 @@ ensure_current_registry (GError ** error)
|
|||
registry_file = g_strdup (g_getenv ("GST_REGISTRY"));
|
||||
if (registry_file == NULL) {
|
||||
registry_file = g_build_filename (g_get_user_cache_dir (),
|
||||
"gstreamer-" GST_API_VERSION, "registry." TARGET_CPU ".bin", NULL);
|
||||
"gstreamer-" GST_API_VERSION, GST_REGISTRY_FILE_NAME, NULL);
|
||||
}
|
||||
|
||||
if (!_gst_disable_registry_cache) {
|
||||
|
|
Loading…
Reference in a new issue