mscms/tests: Inline a simple string.
[wine.git] / dlls / winegstreamer / gst_cbs.h
bloba48999bbf71969d31abeacbdebde2a3ff5dc9004
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 GOT_DATA_SINK,
42 REMOVED_DECODED_PAD,
43 AUTOPLUG_BLACKLIST,
44 UNKNOWN_TYPE,
45 QUERY_SINK,
46 GSTDEMUX_MAX,
47 BYTESTREAM_WRAPPER_PULL,
48 BYTESTREAM_QUERY,
49 BYTESTREAM_PAD_MODE_ACTIVATE,
50 BYTESTREAM_PAD_EVENT_PROCESS,
51 MF_SRC_BUS_WATCH,
52 MF_SRC_STREAM_ADDED,
53 MF_SRC_STREAM_REMOVED,
54 MF_SRC_NO_MORE_PADS,
55 MEDIA_SOURCE_MAX,
58 struct cb_data {
59 enum CB_TYPE type;
60 union {
61 struct watch_bus_data {
62 GstBus *bus;
63 GstMessage *msg;
64 gpointer user;
65 GstBusSyncReply ret;
66 } watch_bus_data;
67 struct pad_added_data {
68 GstElement *element;
69 GstPad *pad;
70 gpointer user;
71 } pad_added_data;
72 struct query_function_data {
73 GstPad *pad;
74 GstObject *parent;
75 GstQuery *query;
76 gboolean ret;
77 } query_function_data;
78 struct activate_mode_data {
79 GstPad *pad;
80 GstObject *parent;
81 GstPadMode mode;
82 gboolean activate;
83 gboolean ret;
84 } activate_mode_data;
85 struct no_more_pads_data {
86 GstElement *element;
87 gpointer user;
88 } no_more_pads_data;
89 struct getrange_data {
90 GstPad *pad;
91 GstObject *parent;
92 guint64 ofs;
93 guint len;
94 GstBuffer **buf;
95 GstFlowReturn ret;
96 } getrange_data;
97 struct event_src_data {
98 GstPad *pad;
99 GstObject *parent;
100 GstEvent *event;
101 gboolean ret;
102 } event_src_data;
103 struct event_sink_data {
104 GstPad *pad;
105 GstObject *parent;
106 GstEvent *event;
107 gboolean ret;
108 } event_sink_data;
109 struct got_data_sink_data {
110 GstPad *pad;
111 GstObject *parent;
112 GstBuffer *buf;
113 GstFlowReturn ret;
114 } got_data_sink_data;
115 struct pad_removed_data {
116 GstElement *element;
117 GstPad *pad;
118 gpointer user;
119 } pad_removed_data;
120 struct autoplug_blacklist_data {
121 GstElement *bin;
122 GstPad *pad;
123 GstCaps *caps;
124 GstElementFactory *fact;
125 gpointer user;
126 GstAutoplugSelectResult ret;
127 } autoplug_blacklist_data;
128 struct unknown_type_data {
129 GstElement *bin;
130 GstPad *pad;
131 GstCaps *caps;
132 gpointer user;
133 } unknown_type_data;
134 struct query_sink_data {
135 GstPad *pad;
136 GstObject *parent;
137 GstQuery *query;
138 gboolean ret;
139 } query_sink_data;
140 } u;
142 int finished;
143 pthread_mutex_t lock;
144 pthread_cond_t cond;
145 struct list entry;
148 void mark_wine_thread(void) DECLSPEC_HIDDEN;
149 void perform_cb_gstdemux(struct cb_data *data) DECLSPEC_HIDDEN;
150 void perform_cb_media_source(struct cb_data *data) DECLSPEC_HIDDEN;
152 GstBusSyncReply watch_bus_wrapper(GstBus *bus, GstMessage *msg, gpointer user) DECLSPEC_HIDDEN;
153 void existing_new_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
154 gboolean query_function_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
155 gboolean activate_mode_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode, gboolean activate) DECLSPEC_HIDDEN;
156 void no_more_pads_wrapper(GstElement *decodebin, gpointer user) DECLSPEC_HIDDEN;
157 GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
158 gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
159 gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
160 GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
161 GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
162 void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
163 GstAutoplugSelectResult autoplug_blacklist_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory *fact, gpointer user) DECLSPEC_HIDDEN;
164 void unknown_type_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer user) DECLSPEC_HIDDEN;
165 void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
166 gboolean query_sink_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
167 GstFlowReturn bytestream_wrapper_pull_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
168 gboolean bytestream_query_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
169 gboolean bytestream_pad_mode_activate_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode, gboolean activate) DECLSPEC_HIDDEN;
170 gboolean bytestream_pad_event_process_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
171 GstBusSyncReply mf_src_bus_watch_wrapper(GstBus *bus, GstMessage *message, gpointer user) DECLSPEC_HIDDEN;
172 void mf_src_stream_added_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
173 void mf_src_stream_removed_wrapper(GstElement *element, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
174 void mf_src_no_more_pads_wrapper(GstElement *element, gpointer user) DECLSPEC_HIDDEN;
176 #endif