content/media/gstreamer/GStreamerLoader.h

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* vim:set ts=2 sw=2 sts=2 et cindent: */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef GStreamerLoader_h_
michael@0 7 #define GStreamerLoader_h_
michael@0 8
michael@0 9 #include <gst/gst.h>
michael@0 10 #include <gst/gstbuffer.h>
michael@0 11 #include <gst/gstelementfactory.h>
michael@0 12 #include <gst/gststructure.h>
michael@0 13 #include <gst/app/gstappsrc.h>
michael@0 14 #include <gst/app/gstappsink.h>
michael@0 15 // This include trips -Wreserved-user-defined-literal on clang. Ignoring it
michael@0 16 // trips -Wpragmas on GCC (unknown warning), but ignoring that trips
michael@0 17 // -Wunknown-pragmas on clang (unknown pragma).
michael@0 18 #pragma GCC diagnostic push
michael@0 19 #pragma GCC diagnostic ignored "-Wunknown-pragmas"
michael@0 20 #pragma GCC diagnostic ignored "-Wpragmas"
michael@0 21 #pragma GCC diagnostic ignored "-Wreserved-user-defined-literal"
michael@0 22 #include <gst/video/video.h>
michael@0 23 #pragma GCC diagnostic pop
michael@0 24
michael@0 25 #if GST_VERSION_MAJOR == 1
michael@0 26 #include <gst/video/gstvideometa.h>
michael@0 27 #include <gst/video/gstvideopool.h>
michael@0 28 #endif
michael@0 29
michael@0 30 namespace mozilla {
michael@0 31
michael@0 32 /*
michael@0 33 * dlopens the required libraries and dlsyms the functions we need.
michael@0 34 * Returns true on success, false otherwise.
michael@0 35 */
michael@0 36 bool load_gstreamer();
michael@0 37
michael@0 38 /*
michael@0 39 * Declare our extern function pointers using the types from the global
michael@0 40 * gstreamer definitions.
michael@0 41 */
michael@0 42 #define GST_FUNC(_, func) extern typeof(::func)* func;
michael@0 43 #define REPLACE_FUNC(func) GST_FUNC(-1, func)
michael@0 44 #include "GStreamerFunctionList.h"
michael@0 45 #undef GST_FUNC
michael@0 46 #undef REPLACE_FUNC
michael@0 47
michael@0 48 }
michael@0 49
michael@0 50 #undef GST_CAPS_ANY
michael@0 51 #define GST_CAPS_ANY (*_gst_caps_any)
michael@0 52
michael@0 53 #endif // GStreamerLoader_h_

mercurial