PageRenderTime 12ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/indra/media_plugins/gstreamer010/llmediaimplgstreamer_syms.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 74 lines | 34 code | 9 blank | 31 comment | 0 complexity | f842fb5b00950b2ea5d43b5bee8c4d93 MD5 | raw file
 1/** 
 2 * @file llmediaimplgstreamer_syms.h
 3 * @brief dynamic GStreamer symbol-grabbing code
 4 *
 5 * @cond
 6 * $LicenseInfo:firstyear=2007&license=viewerlgpl$
 7 * Second Life Viewer Source Code
 8 * Copyright (C) 2010, Linden Research, Inc.
 9 * 
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation;
13 * version 2.1 of the License only.
14 * 
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 * Lesser General Public License for more details.
19 * 
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 * 
24 * Linden Research, Inc., 945 Battery Street, San Francisco, CA  94111  USA
25 * $/LicenseInfo$
26 * @endcond
27 */
28
29#include "linden_common.h"
30
31#if LL_GSTREAMER010_ENABLED
32
33extern "C" {
34#include <gst/gst.h>
35}
36
37bool grab_gst_syms(std::string gst_dso_name,
38		   std::string gst_dso_name_vid);
39void ungrab_gst_syms();
40
41#define LL_GST_SYM(REQ, GSTSYM, RTN, ...) extern RTN (*ll##GSTSYM)(__VA_ARGS__)
42#include "llmediaimplgstreamer_syms_raw.inc"
43#include "llmediaimplgstreamer_syms_rawv.inc"
44#undef LL_GST_SYM
45
46// regrettable hacks to give us better runtime compatibility with older systems
47#define llg_return_if_fail(COND) do{if (!(COND)) return;}while(0)
48#define llg_return_val_if_fail(COND,V) do{if (!(COND)) return V;}while(0)
49
50// regrettable hacks because GStreamer was not designed for runtime loading
51#undef GST_TYPE_MESSAGE
52#define GST_TYPE_MESSAGE (llgst_message_get_type())
53#undef GST_TYPE_OBJECT
54#define GST_TYPE_OBJECT (llgst_object_get_type())
55#undef GST_TYPE_PIPELINE
56#define GST_TYPE_PIPELINE (llgst_pipeline_get_type())
57#undef GST_TYPE_ELEMENT
58#define GST_TYPE_ELEMENT (llgst_element_get_type())
59#undef GST_TYPE_VIDEO_SINK
60#define GST_TYPE_VIDEO_SINK (llgst_video_sink_get_type())
61// more regrettable hacks to stub-out these .h-exposed GStreamer internals
62void ll_gst_debug_register_funcptr(GstDebugFuncPtr func, gchar* ptrname);
63#undef _gst_debug_register_funcptr
64#define _gst_debug_register_funcptr ll_gst_debug_register_funcptr
65GstDebugCategory* ll_gst_debug_category_new(gchar *name, guint color, gchar *description);
66#undef _gst_debug_category_new
67#define _gst_debug_category_new ll_gst_debug_category_new
68#undef __gst_debug_enabled
69#define __gst_debug_enabled (0)
70
71// more hacks
72#define LLGST_MESSAGE_TYPE_NAME(M) (llgst_message_type_get_name(GST_MESSAGE_TYPE(M)))
73
74#endif // LL_GSTREAMER010_ENABLED