michael@0: /* vim:set ts=2 sw=2 sts=2 et cindent: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef GStreamerLoader_h_ michael@0: #define GStreamerLoader_h_ michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: #include michael@0: // This include trips -Wreserved-user-defined-literal on clang. Ignoring it michael@0: // trips -Wpragmas on GCC (unknown warning), but ignoring that trips michael@0: // -Wunknown-pragmas on clang (unknown pragma). michael@0: #pragma GCC diagnostic push michael@0: #pragma GCC diagnostic ignored "-Wunknown-pragmas" michael@0: #pragma GCC diagnostic ignored "-Wpragmas" michael@0: #pragma GCC diagnostic ignored "-Wreserved-user-defined-literal" michael@0: #include michael@0: #pragma GCC diagnostic pop michael@0: michael@0: #if GST_VERSION_MAJOR == 1 michael@0: #include michael@0: #include michael@0: #endif michael@0: michael@0: namespace mozilla { michael@0: michael@0: /* michael@0: * dlopens the required libraries and dlsyms the functions we need. michael@0: * Returns true on success, false otherwise. michael@0: */ michael@0: bool load_gstreamer(); michael@0: michael@0: /* michael@0: * Declare our extern function pointers using the types from the global michael@0: * gstreamer definitions. michael@0: */ michael@0: #define GST_FUNC(_, func) extern typeof(::func)* func; michael@0: #define REPLACE_FUNC(func) GST_FUNC(-1, func) michael@0: #include "GStreamerFunctionList.h" michael@0: #undef GST_FUNC michael@0: #undef REPLACE_FUNC michael@0: michael@0: } michael@0: michael@0: #undef GST_CAPS_ANY michael@0: #define GST_CAPS_ANY (*_gst_caps_any) michael@0: michael@0: #endif // GStreamerLoader_h_