Fri, 16 Jan 2015 04:50:19 +0100
Replace accessor implementation with direct member state manipulation, by
request https://trac.torproject.org/projects/tor/ticket/9701#comment:32
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 __APPLE__
8 /*
9 * List of symbol names we need to dlsym from the gstreamer library.
10 */
11 GST_FUNC(LIBGSTAPP, gst_app_sink_get_type)
12 GST_FUNC(LIBGSTAPP, gst_app_sink_set_callbacks)
13 GST_FUNC(LIBGSTAPP, gst_app_src_end_of_stream)
14 GST_FUNC(LIBGSTAPP, gst_app_src_get_size)
15 GST_FUNC(LIBGSTAPP, gst_app_src_get_type)
16 GST_FUNC(LIBGSTAPP, gst_app_src_push_buffer)
17 GST_FUNC(LIBGSTAPP, gst_app_src_set_callbacks)
18 GST_FUNC(LIBGSTAPP, gst_app_src_set_caps)
19 GST_FUNC(LIBGSTAPP, gst_app_src_set_size)
20 GST_FUNC(LIBGSTAPP, gst_app_src_set_stream_type)
21 GST_FUNC(LIBGSTREAMER, gst_bin_get_by_name)
22 GST_FUNC(LIBGSTREAMER, gst_bin_get_type)
23 GST_FUNC(LIBGSTREAMER, gst_bin_iterate_recurse)
24 GST_FUNC(LIBGSTREAMER, gst_buffer_get_type)
25 GST_FUNC(LIBGSTREAMER, gst_buffer_new)
26 GST_FUNC(LIBGSTREAMER, gst_bus_set_sync_handler)
27 GST_FUNC(LIBGSTREAMER, gst_bus_timed_pop_filtered)
28 GST_FUNC(LIBGSTREAMER, gst_caps_append)
29 GST_FUNC(LIBGSTREAMER, gst_caps_can_intersect)
30 GST_FUNC(LIBGSTREAMER, gst_caps_from_string)
31 GST_FUNC(LIBGSTREAMER, gst_caps_get_size)
32 GST_FUNC(LIBGSTREAMER, gst_caps_get_structure)
33 GST_FUNC(LIBGSTREAMER, gst_caps_new_any)
34 GST_FUNC(LIBGSTREAMER, gst_caps_new_empty)
35 GST_FUNC(LIBGSTREAMER, gst_caps_new_full)
36 GST_FUNC(LIBGSTREAMER, gst_caps_new_simple)
37 GST_FUNC(LIBGSTREAMER, gst_caps_set_simple)
38 GST_FUNC(LIBGSTREAMER, gst_element_factory_get_static_pad_templates)
39 GST_FUNC(LIBGSTREAMER, gst_element_factory_get_type)
40 GST_FUNC(LIBGSTREAMER, gst_element_factory_make)
41 GST_FUNC(LIBGSTREAMER, gst_element_get_factory)
42 GST_FUNC(LIBGSTREAMER, gst_element_get_static_pad)
43 GST_FUNC(LIBGSTREAMER, gst_element_get_type)
44 GST_FUNC(LIBGSTREAMER, gst_element_query_convert)
45 GST_FUNC(LIBGSTREAMER, gst_element_query_duration)
46 GST_FUNC(LIBGSTREAMER, gst_element_seek_simple)
47 GST_FUNC(LIBGSTREAMER, gst_element_set_state)
48 GST_FUNC(LIBGSTREAMER, gst_flow_get_name)
49 GST_FUNC(LIBGSTREAMER, gst_init)
50 GST_FUNC(LIBGSTREAMER, gst_init_check)
51 GST_FUNC(LIBGSTREAMER, gst_iterator_next)
52 GST_FUNC(LIBGSTREAMER, gst_message_parse_error)
53 GST_FUNC(LIBGSTREAMER, gst_message_type_get_name)
54 GST_FUNC(LIBGSTREAMER, gst_mini_object_ref)
55 GST_FUNC(LIBGSTREAMER, gst_mini_object_unref)
56 GST_FUNC(LIBGSTREAMER, gst_object_get_name)
57 GST_FUNC(LIBGSTREAMER, gst_object_get_parent)
58 GST_FUNC(LIBGSTREAMER, gst_object_unref)
59 GST_FUNC(LIBGSTREAMER, gst_pad_get_element_private)
60 GST_FUNC(LIBGSTREAMER, gst_pad_set_element_private)
61 GST_FUNC(LIBGSTREAMER, gst_parse_bin_from_description)
62 GST_FUNC(LIBGSTREAMER, gst_pipeline_get_bus)
63 GST_FUNC(LIBGSTREAMER, gst_pipeline_get_type)
64 GST_FUNC(LIBGSTREAMER, gst_plugin_feature_get_rank)
65 GST_FUNC(LIBGSTREAMER, gst_registry_feature_filter)
66 GST_FUNC(LIBGSTREAMER, gst_registry_get_feature_list_cookie)
67 GST_FUNC(LIBGSTREAMER, gst_segment_init)
68 GST_FUNC(LIBGSTREAMER, gst_segment_to_stream_time)
69 GST_FUNC(LIBGSTREAMER, gst_static_caps_get)
70 GST_FUNC(LIBGSTREAMER, gst_structure_copy)
71 GST_FUNC(LIBGSTREAMER, gst_structure_get_fraction)
72 GST_FUNC(LIBGSTREAMER, gst_structure_get_int)
73 GST_FUNC(LIBGSTREAMER, gst_structure_get_value)
74 GST_FUNC(LIBGSTREAMER, gst_structure_new)
75 GST_FUNC(LIBGSTREAMER, gst_util_uint64_scale)
77 #if GST_VERSION_MAJOR == 0
78 GST_FUNC(LIBGSTAPP, gst_app_sink_pull_buffer)
79 GST_FUNC(LIBGSTREAMER, gst_buffer_copy_metadata)
80 GST_FUNC(LIBGSTREAMER, gst_buffer_new_and_alloc)
81 GST_FUNC(LIBGSTREAMER, gst_caps_unref)
82 GST_FUNC(LIBGSTREAMER, gst_element_factory_get_klass)
83 GST_FUNC(LIBGSTREAMER, gst_element_get_pad)
84 GST_FUNC(LIBGSTREAMER, gst_event_parse_new_segment)
85 GST_FUNC(LIBGSTREAMER, gst_mini_object_get_type)
86 GST_FUNC(LIBGSTREAMER, gst_mini_object_new)
87 GST_FUNC(LIBGSTREAMER, gst_pad_add_event_probe)
88 GST_FUNC(LIBGSTREAMER, gst_pad_alloc_buffer)
89 GST_FUNC(LIBGSTREAMER, gst_pad_get_negotiated_caps)
90 GST_FUNC(LIBGSTREAMER, gst_pad_set_bufferalloc_function)
91 GST_FUNC(LIBGSTREAMER, gst_registry_get_default)
92 GST_FUNC(LIBGSTREAMER, gst_segment_set_newsegment)
93 GST_FUNC(LIBGSTVIDEO, gst_video_format_get_component_height)
94 GST_FUNC(LIBGSTVIDEO, gst_video_format_get_component_offset)
95 GST_FUNC(LIBGSTVIDEO, gst_video_format_get_component_width)
96 GST_FUNC(LIBGSTVIDEO, gst_video_format_get_pixel_stride)
97 GST_FUNC(LIBGSTVIDEO, gst_video_format_get_row_stride)
98 GST_FUNC(LIBGSTVIDEO, gst_video_format_parse_caps)
99 GST_FUNC(LIBGSTVIDEO, gst_video_parse_caps_pixel_aspect_ratio)
100 #else
102 GST_FUNC(LIBGSTAPP, gst_app_sink_pull_sample)
103 GST_FUNC(LIBGSTREAMER, _gst_caps_any)
104 GST_FUNC(LIBGSTREAMER, gst_allocator_get_type)
105 GST_FUNC(LIBGSTREAMER, gst_buffer_copy_into)
106 GST_FUNC(LIBGSTREAMER, gst_buffer_extract)
107 GST_FUNC(LIBGSTREAMER, gst_buffer_get_meta)
108 GST_FUNC(LIBGSTREAMER, gst_buffer_get_size)
109 GST_FUNC(LIBGSTREAMER, gst_buffer_map)
110 GST_FUNC(LIBGSTREAMER, gst_buffer_new_allocate)
111 GST_FUNC(LIBGSTREAMER, gst_buffer_n_memory)
112 GST_FUNC(LIBGSTREAMER, gst_buffer_peek_memory)
113 GST_FUNC(LIBGSTREAMER, gst_buffer_pool_acquire_buffer)
114 GST_FUNC(LIBGSTREAMER, gst_buffer_pool_config_set_allocator)
115 GST_FUNC(LIBGSTREAMER, gst_buffer_pool_config_set_params)
116 GST_FUNC(LIBGSTREAMER, gst_buffer_pool_get_config)
117 GST_FUNC(LIBGSTREAMER, gst_buffer_pool_get_type)
118 GST_FUNC(LIBGSTREAMER, gst_buffer_pool_is_active)
119 GST_FUNC(LIBGSTREAMER, gst_buffer_pool_set_active)
120 GST_FUNC(LIBGSTREAMER, gst_buffer_pool_set_config)
121 GST_FUNC(LIBGSTREAMER, gst_buffer_set_size)
122 GST_FUNC(LIBGSTREAMER, gst_buffer_unmap)
123 GST_FUNC(LIBGSTREAMER, gst_element_factory_get_metadata)
124 GST_FUNC(LIBGSTREAMER, gst_event_parse_segment)
125 GST_FUNC(LIBGSTREAMER, gst_event_type_get_name)
126 GST_FUNC(LIBGSTREAMER, gst_memory_init)
127 GST_FUNC(LIBGSTREAMER, gst_memory_map)
128 GST_FUNC(LIBGSTREAMER, gst_memory_unmap)
129 GST_FUNC(LIBGSTREAMER, gst_object_get_type)
130 GST_FUNC(LIBGSTREAMER, gst_pad_add_probe)
131 GST_FUNC(LIBGSTREAMER, gst_pad_get_current_caps)
132 GST_FUNC(LIBGSTREAMER, gst_pad_probe_info_get_query)
133 GST_FUNC(LIBGSTREAMER, gst_query_add_allocation_meta)
134 GST_FUNC(LIBGSTREAMER, gst_query_add_allocation_param)
135 GST_FUNC(LIBGSTREAMER, gst_query_add_allocation_pool)
136 GST_FUNC(LIBGSTREAMER, gst_query_parse_allocation)
137 GST_FUNC(LIBGSTREAMER, gst_registry_get)
138 GST_FUNC(LIBGSTREAMER, gst_sample_get_buffer)
139 GST_FUNC(LIBGSTREAMER, gst_segment_copy_into)
140 GST_FUNC(LIBGSTREAMER, gst_structure_free)
141 GST_FUNC(LIBGSTVIDEO, gst_buffer_pool_config_get_video_alignment)
142 GST_FUNC(LIBGSTVIDEO, gst_buffer_pool_has_option)
143 GST_FUNC(LIBGSTVIDEO, gst_video_buffer_pool_get_type)
144 GST_FUNC(LIBGSTVIDEO, gst_video_frame_map)
145 GST_FUNC(LIBGSTVIDEO, gst_video_frame_unmap)
146 GST_FUNC(LIBGSTVIDEO, gst_video_info_align)
147 GST_FUNC(LIBGSTVIDEO, gst_video_info_from_caps)
148 GST_FUNC(LIBGSTVIDEO, gst_video_info_init)
149 GST_FUNC(LIBGSTVIDEO, gst_video_meta_api_get_type)
150 GST_FUNC(LIBGSTVIDEO, gst_video_meta_map)
151 GST_FUNC(LIBGSTVIDEO, gst_video_meta_unmap)
153 #endif
155 /*
156 * Functions that have been defined in the header file. We replace them so that
157 * they don't try to use the global gstreamer functions.
158 */
159 #ifdef REPLACE_FUNC
160 REPLACE_FUNC(gst_buffer_ref);
161 REPLACE_FUNC(gst_buffer_unref);
162 REPLACE_FUNC(gst_message_unref);
164 #if GST_VERSION_MAJOR == 1
165 REPLACE_FUNC(gst_caps_unref);
166 REPLACE_FUNC(gst_sample_unref);
167 #endif
168 #endif
170 #endif // !defined(__APPLE__)