msvcrt: Don't include MSVC 7.0+ exception functions in SOs for older DLLs.
[wine.git] / dlls / winegstreamer / gst_cbs.h
blobe52d1bae8a29ca141d877c379da3fecf3b5d78f9
1 /*
2 * Copyright 2015 Andrew Eikum for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef GST_CBS_H
20 #define GST_CBS_H
22 #include "wine/list.h"
23 #include "windef.h"
24 #include <pthread.h>
26 typedef enum {
27 GST_AUTOPLUG_SELECT_TRY,
28 GST_AUTOPLUG_SELECT_EXPOSE,
29 GST_AUTOPLUG_SELECT_SKIP
30 } GstAutoplugSelectResult;
32 enum CB_TYPE {
33 WATCH_BUS,
34 EXISTING_NEW_PAD,
35 QUERY_FUNCTION,
36 ACTIVATE_MODE,
37 NO_MORE_PADS,
38 REQUEST_BUFFER_SRC,
39 EVENT_SRC,
40 EVENT_SINK,
41 ACCEPT_CAPS_SINK,
42 SETCAPS_SINK,
43 GOT_DATA_SINK,
44 GOT_DATA,
45 REMOVED_DECODED_PAD,
46 AUTOPLUG_BLACKLIST,
47 UNKNOWN_TYPE,
48 RELEASE_SAMPLE,
49 TRANSFORM_PAD_ADDED,
50 QUERY_SINK
53 struct cb_data {
54 enum CB_TYPE type;
55 union {
56 struct watch_bus_data {
57 GstBus *bus;
58 GstMessage *msg;
59 gpointer user;
60 GstBusSyncReply ret;
61 } watch_bus_data;
62 struct existing_new_pad_data {
63 GstElement *bin;
64 GstPad *pad;
65 gpointer user;
66 } existing_new_pad_data;
67 struct query_function_data {
68 GstPad *pad;
69 GstObject *parent;
70 GstQuery *query;
71 gboolean ret;
72 } query_function_data;
73 struct activate_mode_data {
74 GstPad *pad;
75 GstObject *parent;
76 GstPadMode mode;
77 gboolean activate;
78 gboolean ret;
79 } activate_mode_data;
80 struct no_more_pads_data {
81 GstElement *decodebin;
82 gpointer user;
83 } no_more_pads_data;
84 struct request_buffer_src_data {
85 GstPad *pad;
86 GstObject *parent;
87 guint64 ofs;
88 guint len;
89 GstBuffer **buf;
90 GstFlowReturn ret;
91 } request_buffer_src_data;
92 struct event_src_data {
93 GstPad *pad;
94 GstObject *parent;
95 GstEvent *event;
96 gboolean ret;
97 } event_src_data;
98 struct event_sink_data {
99 GstPad *pad;
100 GstObject *parent;
101 GstEvent *event;
102 gboolean ret;
103 } event_sink_data;
104 struct accept_caps_sink_data {
105 GstPad *pad;
106 GstCaps *caps;
107 gboolean ret;
108 } accept_caps_sink_data;
109 struct setcaps_sink_data {
110 GstPad *pad;
111 GstCaps *caps;
112 gboolean ret;
113 } setcaps_sink_data;
114 struct got_data_sink_data {
115 GstPad *pad;
116 GstObject *parent;
117 GstBuffer *buf;
118 GstFlowReturn ret;
119 } got_data_sink_data;
120 struct got_data_data {
121 GstPad *pad;
122 GstObject *parent;
123 GstBuffer *buf;
124 GstFlowReturn ret;
125 } got_data_data;
126 struct removed_decoded_pad_data {
127 GstElement *bin;
128 GstPad *pad;
129 gpointer user;
130 } removed_decoded_pad_data;
131 struct autoplug_blacklist_data {
132 GstElement *bin;
133 GstPad *pad;
134 GstCaps *caps;
135 GstElementFactory *fact;
136 gpointer user;
137 GstAutoplugSelectResult ret;
138 } autoplug_blacklist_data;
139 struct unknown_type_data {
140 GstElement *bin;
141 GstPad *pad;
142 GstCaps *caps;
143 gpointer user;
144 } unknown_type_data;
145 struct release_sample_data {
146 gpointer data;
147 } release_sample_data;
148 struct transform_pad_added_data {
149 GstElement *filter;
150 GstPad *pad;
151 gpointer user;
152 } transform_pad_added_data;
153 struct query_sink_data {
154 GstPad *pad;
155 GstObject *parent;
156 GstQuery *query;
157 gboolean ret;
158 } query_sink_data;
159 } u;
161 int finished;
162 pthread_mutex_t lock;
163 pthread_cond_t cond;
164 struct list entry;
167 extern pthread_mutex_t cb_list_lock DECLSPEC_HIDDEN;
168 extern pthread_cond_t cb_list_cond DECLSPEC_HIDDEN;
169 extern struct list cb_list DECLSPEC_HIDDEN;
170 void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user) DECLSPEC_HIDDEN;
171 BOOL is_wine_thread(void) DECLSPEC_HIDDEN;
172 void mark_wine_thread(void) DECLSPEC_HIDDEN;
174 GstBusSyncReply watch_bus_wrapper(GstBus *bus, GstMessage *msg, gpointer user) DECLSPEC_HIDDEN;
175 void existing_new_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
176 gboolean query_function_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
177 gboolean activate_mode_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode, gboolean activate) DECLSPEC_HIDDEN;
178 void no_more_pads_wrapper(GstElement *decodebin, gpointer user) DECLSPEC_HIDDEN;
179 GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
180 gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
181 gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
182 gboolean accept_caps_sink_wrapper(GstPad *pad, GstCaps *caps) DECLSPEC_HIDDEN;
183 gboolean setcaps_sink_wrapper(GstPad *pad, GstCaps *caps) DECLSPEC_HIDDEN;
184 GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
185 GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
186 void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
187 GstAutoplugSelectResult autoplug_blacklist_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory *fact, gpointer user) DECLSPEC_HIDDEN;
188 void unknown_type_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer user) DECLSPEC_HIDDEN;
189 void release_sample_wrapper(gpointer data) DECLSPEC_HIDDEN;
190 void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
191 gboolean query_sink_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
193 #endif