nsiproxy.sys: Implement change notifications for NSI_IP_UNICAST_TABLE.
[wine.git] / dlls / winegstreamer / unixlib.h
blob702bd7aa69bc79a77deb7904ae6714443fbbcd5d
1 /*
2 * winegstreamer Unix library interface
4 * Copyright 2020-2021 Zebediah Figura for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_WINEGSTREAMER_UNIXLIB_H
22 #define __WINE_WINEGSTREAMER_UNIXLIB_H
24 #include <stdint.h>
25 #include "windef.h"
26 #include "winternl.h"
27 #include "wtypes.h"
28 #include "mmreg.h"
30 #include "wine/unixlib.h"
32 typedef UINT32 wg_major_type;
33 enum wg_major_type
35 WG_MAJOR_TYPE_UNKNOWN = 0,
36 WG_MAJOR_TYPE_AUDIO,
37 WG_MAJOR_TYPE_AUDIO_MPEG1,
38 WG_MAJOR_TYPE_AUDIO_MPEG4,
39 WG_MAJOR_TYPE_AUDIO_WMA,
40 WG_MAJOR_TYPE_VIDEO,
41 WG_MAJOR_TYPE_VIDEO_CINEPAK,
42 WG_MAJOR_TYPE_VIDEO_H264,
43 WG_MAJOR_TYPE_VIDEO_WMV,
44 WG_MAJOR_TYPE_VIDEO_INDEO,
47 typedef UINT32 wg_audio_format;
48 enum wg_audio_format
50 WG_AUDIO_FORMAT_UNKNOWN,
52 WG_AUDIO_FORMAT_U8,
53 WG_AUDIO_FORMAT_S16LE,
54 WG_AUDIO_FORMAT_S24LE,
55 WG_AUDIO_FORMAT_S32LE,
56 WG_AUDIO_FORMAT_F32LE,
57 WG_AUDIO_FORMAT_F64LE,
60 typedef UINT32 wg_video_format;
61 enum wg_video_format
63 WG_VIDEO_FORMAT_UNKNOWN,
65 WG_VIDEO_FORMAT_BGRA,
66 WG_VIDEO_FORMAT_BGRx,
67 WG_VIDEO_FORMAT_BGR,
68 WG_VIDEO_FORMAT_RGB15,
69 WG_VIDEO_FORMAT_RGB16,
71 WG_VIDEO_FORMAT_AYUV,
72 WG_VIDEO_FORMAT_I420,
73 WG_VIDEO_FORMAT_NV12,
74 WG_VIDEO_FORMAT_UYVY,
75 WG_VIDEO_FORMAT_YUY2,
76 WG_VIDEO_FORMAT_YV12,
77 WG_VIDEO_FORMAT_YVYU,
80 typedef UINT32 wg_wmv_video_format;
81 enum wg_wmv_video_format
83 WG_WMV_VIDEO_FORMAT_UNKNOWN,
84 WG_WMV_VIDEO_FORMAT_WMV1,
85 WG_WMV_VIDEO_FORMAT_WMV2,
86 WG_WMV_VIDEO_FORMAT_WMV3,
87 WG_WMV_VIDEO_FORMAT_WMVA,
88 WG_WMV_VIDEO_FORMAT_WVC1,
91 struct wg_format
93 wg_major_type major_type;
95 union
97 struct
99 wg_audio_format format;
101 uint32_t channels;
102 uint32_t channel_mask; /* In WinMM format. */
103 uint32_t rate;
104 } audio;
105 struct
107 uint32_t layer;
108 uint32_t rate;
109 uint32_t channels;
110 } audio_mpeg1;
111 struct
113 uint32_t payload_type;
114 uint32_t codec_data_len;
115 unsigned char codec_data[64];
116 } audio_mpeg4;
117 struct
119 uint32_t version;
120 uint32_t bitrate;
121 uint32_t rate;
122 uint32_t depth;
123 uint32_t channels;
124 uint32_t block_align;
125 uint32_t codec_data_len;
126 unsigned char codec_data[64];
127 } audio_wma;
129 struct
131 wg_video_format format;
132 /* Positive height indicates top-down video; negative height
133 * indicates bottom-up video. */
134 int32_t width, height;
135 uint32_t fps_n, fps_d;
136 RECT padding;
137 } video;
138 struct
140 uint32_t width;
141 uint32_t height;
142 uint32_t fps_n;
143 uint32_t fps_d;
144 } video_cinepak;
145 struct
147 int32_t width, height;
148 uint32_t fps_n, fps_d;
149 uint32_t profile;
150 uint32_t level;
151 } video_h264;
152 struct
154 wg_wmv_video_format format;
155 int32_t width, height;
156 uint32_t fps_n, fps_d;
157 } video_wmv;
158 struct
160 int32_t width, height;
161 uint32_t fps_n, fps_d;
162 uint32_t version;
163 } video_indeo;
164 } u;
167 enum wg_sample_flag
169 WG_SAMPLE_FLAG_INCOMPLETE = 1,
170 WG_SAMPLE_FLAG_HAS_PTS = 2,
171 WG_SAMPLE_FLAG_HAS_DURATION = 4,
172 WG_SAMPLE_FLAG_SYNC_POINT = 8,
173 WG_SAMPLE_FLAG_DISCONTINUITY = 0x10,
176 struct wg_sample
178 /* timestamp and duration are in 100-nanosecond units. */
179 UINT64 pts;
180 UINT64 duration;
181 LONG refcount; /* unix refcount */
182 UINT32 flags;
183 UINT32 max_size;
184 UINT32 size;
185 UINT64 data; /* pointer to user memory */
188 struct wg_parser_buffer
190 /* pts and duration are in 100-nanosecond units. */
191 UINT64 pts, duration;
192 UINT32 size;
193 UINT32 stream;
194 UINT8 discontinuity, preroll, delta, has_pts, has_duration;
196 C_ASSERT(sizeof(struct wg_parser_buffer) == 32);
198 typedef UINT32 wg_parser_type;
199 enum wg_parser_type
201 WG_PARSER_DECODEBIN,
202 WG_PARSER_AVIDEMUX,
203 WG_PARSER_MPEGAUDIOPARSE,
204 WG_PARSER_WAVPARSE,
207 typedef UINT64 wg_parser_t;
208 typedef UINT64 wg_parser_stream_t;
209 typedef UINT64 wg_transform_t;
211 struct wg_parser_create_params
213 wg_parser_t parser;
214 wg_parser_type type;
215 UINT8 err_on;
216 UINT8 warn_on;
219 struct wg_parser_connect_params
221 wg_parser_t parser;
222 UINT64 file_size;
225 struct wg_parser_get_next_read_offset_params
227 wg_parser_t parser;
228 UINT32 size;
229 UINT64 offset;
232 struct wg_parser_push_data_params
234 wg_parser_t parser;
235 const void *data;
236 UINT32 size;
239 struct wg_parser_get_stream_count_params
241 wg_parser_t parser;
242 UINT32 count;
245 struct wg_parser_get_stream_params
247 wg_parser_t parser;
248 UINT32 index;
249 wg_parser_stream_t stream;
252 struct wg_parser_stream_get_preferred_format_params
254 wg_parser_stream_t stream;
255 struct wg_format *format;
258 struct wg_parser_stream_get_codec_format_params
260 wg_parser_stream_t stream;
261 struct wg_format *format;
264 struct wg_parser_stream_enable_params
266 wg_parser_stream_t stream;
267 const struct wg_format *format;
270 struct wg_parser_stream_get_buffer_params
272 wg_parser_t parser;
273 wg_parser_stream_t stream;
274 struct wg_parser_buffer *buffer;
277 struct wg_parser_stream_copy_buffer_params
279 wg_parser_stream_t stream;
280 void *data;
281 UINT32 offset;
282 UINT32 size;
285 struct wg_parser_stream_notify_qos_params
287 wg_parser_stream_t stream;
288 UINT8 underflow;
289 DOUBLE proportion;
290 INT64 diff;
291 UINT64 timestamp;
294 struct wg_parser_stream_get_duration_params
296 wg_parser_stream_t stream;
297 UINT64 duration;
300 typedef UINT64 wg_parser_tag;
301 enum wg_parser_tag
303 WG_PARSER_TAG_LANGUAGE,
304 WG_PARSER_TAG_NAME,
305 WG_PARSER_TAG_COUNT
308 struct wg_parser_stream_get_tag_params
310 wg_parser_stream_t stream;
311 wg_parser_tag tag;
312 char *buffer;
313 UINT32 *size;
316 struct wg_parser_stream_seek_params
318 wg_parser_stream_t stream;
319 DOUBLE rate;
320 UINT64 start_pos, stop_pos;
321 DWORD start_flags, stop_flags;
324 struct wg_transform_attrs
326 UINT32 output_plane_align;
327 UINT32 input_queue_length;
328 BOOL low_latency;
331 struct wg_transform_create_params
333 wg_transform_t transform;
334 const struct wg_format *input_format;
335 const struct wg_format *output_format;
336 const struct wg_transform_attrs *attrs;
339 struct wg_transform_push_data_params
341 wg_transform_t transform;
342 struct wg_sample *sample;
343 HRESULT result;
346 struct wg_transform_read_data_params
348 wg_transform_t transform;
349 struct wg_sample *sample;
350 struct wg_format *format;
351 HRESULT result;
354 struct wg_transform_set_output_format_params
356 wg_transform_t transform;
357 const struct wg_format *format;
360 struct wg_transform_get_status_params
362 wg_transform_t transform;
363 UINT32 accepts_input;
366 enum unix_funcs
368 unix_wg_init_gstreamer,
370 unix_wg_parser_create,
371 unix_wg_parser_destroy,
373 unix_wg_parser_connect,
374 unix_wg_parser_disconnect,
376 unix_wg_parser_get_next_read_offset,
377 unix_wg_parser_push_data,
379 unix_wg_parser_get_stream_count,
380 unix_wg_parser_get_stream,
382 unix_wg_parser_stream_get_preferred_format,
383 unix_wg_parser_stream_get_codec_format,
384 unix_wg_parser_stream_enable,
385 unix_wg_parser_stream_disable,
387 unix_wg_parser_stream_get_buffer,
388 unix_wg_parser_stream_copy_buffer,
389 unix_wg_parser_stream_release_buffer,
390 unix_wg_parser_stream_notify_qos,
392 unix_wg_parser_stream_get_duration,
393 unix_wg_parser_stream_get_tag,
394 unix_wg_parser_stream_seek,
396 unix_wg_transform_create,
397 unix_wg_transform_destroy,
398 unix_wg_transform_set_output_format,
400 unix_wg_transform_push_data,
401 unix_wg_transform_read_data,
402 unix_wg_transform_get_status,
403 unix_wg_transform_drain,
404 unix_wg_transform_flush,
407 #endif /* __WINE_WINEGSTREAMER_UNIXLIB_H */