libport: Remove support for PPC32.
[wine.git] / dlls / winegstreamer / gst_cbs.h
blob4725f23ad1ad7e97ad00330a88d8d6a839de8409
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
49 struct cb_data {
50 enum CB_TYPE type;
51 union {
52 struct watch_bus_data {
53 GstBus *bus;
54 GstMessage *msg;
55 gpointer user;
56 GstBusSyncReply ret;
57 } watch_bus_data;
58 struct pad_added_data {
59 GstElement *element;
60 GstPad *pad;
61 gpointer user;
62 } pad_added_data;
63 struct query_function_data {
64 GstPad *pad;
65 GstObject *parent;
66 GstQuery *query;
67 gboolean ret;
68 } query_function_data;
69 struct activate_mode_data {
70 GstPad *pad;
71 GstObject *parent;
72 GstPadMode mode;
73 gboolean activate;
74 gboolean ret;
75 } activate_mode_data;
76 struct no_more_pads_data {
77 GstElement *element;
78 gpointer user;
79 } no_more_pads_data;
80 struct getrange_data {
81 GstPad *pad;
82 GstObject *parent;
83 guint64 ofs;
84 guint len;
85 GstBuffer **buf;
86 GstFlowReturn ret;
87 } getrange_data;
88 struct event_src_data {
89 GstPad *pad;
90 GstObject *parent;
91 GstEvent *event;
92 gboolean ret;
93 } event_src_data;
94 struct event_sink_data {
95 GstPad *pad;
96 GstObject *parent;
97 GstEvent *event;
98 gboolean ret;
99 } event_sink_data;
100 struct got_data_sink_data {
101 GstPad *pad;
102 GstObject *parent;
103 GstBuffer *buf;
104 GstFlowReturn ret;
105 } got_data_sink_data;
106 struct pad_removed_data {
107 GstElement *element;
108 GstPad *pad;
109 gpointer user;
110 } pad_removed_data;
111 struct autoplug_blacklist_data {
112 GstElement *bin;
113 GstPad *pad;
114 GstCaps *caps;
115 GstElementFactory *fact;
116 gpointer user;
117 GstAutoplugSelectResult ret;
118 } autoplug_blacklist_data;
119 struct unknown_type_data {
120 GstElement *bin;
121 GstPad *pad;
122 GstCaps *caps;
123 gpointer user;
124 } unknown_type_data;
125 struct query_sink_data {
126 GstPad *pad;
127 GstObject *parent;
128 GstQuery *query;
129 gboolean ret;
130 } query_sink_data;
131 } u;
133 int finished;
134 pthread_mutex_t lock;
135 pthread_cond_t cond;
136 struct list entry;
139 void mark_wine_thread(void) DECLSPEC_HIDDEN;
140 void perform_cb_gstdemux(struct cb_data *data) DECLSPEC_HIDDEN;
142 GstBusSyncReply watch_bus_wrapper(GstBus *bus, GstMessage *msg, gpointer user) DECLSPEC_HIDDEN;
143 void existing_new_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
144 gboolean query_function_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
145 gboolean activate_mode_wrapper(GstPad *pad, GstObject *parent, GstPadMode mode, gboolean activate) DECLSPEC_HIDDEN;
146 void no_more_pads_wrapper(GstElement *decodebin, gpointer user) DECLSPEC_HIDDEN;
147 GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN;
148 gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
149 gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN;
150 GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
151 GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN;
152 void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
153 GstAutoplugSelectResult autoplug_blacklist_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory *fact, gpointer user) DECLSPEC_HIDDEN;
154 void unknown_type_wrapper(GstElement *bin, GstPad *pad, GstCaps *caps, gpointer user) DECLSPEC_HIDDEN;
155 void Gstreamer_transform_pad_added_wrapper(GstElement *filter, GstPad *pad, gpointer user) DECLSPEC_HIDDEN;
156 gboolean query_sink_wrapper(GstPad *pad, GstObject *parent, GstQuery *query) DECLSPEC_HIDDEN;
158 #endif