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