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
31 #include "wine/unixlib.h"
37 WG_MAJOR_TYPE_UNKNOWN
= 0,
39 WG_MAJOR_TYPE_AUDIO_MPEG1
,
40 WG_MAJOR_TYPE_AUDIO_MPEG4
,
41 WG_MAJOR_TYPE_AUDIO_WMA
,
43 WG_MAJOR_TYPE_VIDEO_CINEPAK
,
44 WG_MAJOR_TYPE_VIDEO_H264
,
45 WG_MAJOR_TYPE_VIDEO_WMV
,
46 WG_MAJOR_TYPE_VIDEO_INDEO
,
55 WG_AUDIO_FORMAT_UNKNOWN
,
58 WG_AUDIO_FORMAT_S16LE
,
59 WG_AUDIO_FORMAT_S24LE
,
60 WG_AUDIO_FORMAT_S32LE
,
61 WG_AUDIO_FORMAT_F32LE
,
62 WG_AUDIO_FORMAT_F64LE
,
66 uint32_t channel_mask
; /* In WinMM format. */
77 uint32_t payload_type
;
78 uint32_t codec_data_len
;
79 unsigned char codec_data
[64];
89 uint32_t codec_data_len
;
90 unsigned char codec_data
[64];
97 WG_VIDEO_FORMAT_UNKNOWN
,
100 WG_VIDEO_FORMAT_BGRx
,
102 WG_VIDEO_FORMAT_RGB15
,
103 WG_VIDEO_FORMAT_RGB16
,
105 WG_VIDEO_FORMAT_AYUV
,
106 WG_VIDEO_FORMAT_I420
,
107 WG_VIDEO_FORMAT_NV12
,
108 WG_VIDEO_FORMAT_UYVY
,
109 WG_VIDEO_FORMAT_YUY2
,
110 WG_VIDEO_FORMAT_YV12
,
111 WG_VIDEO_FORMAT_YVYU
,
113 /* Positive height indicates top-down video; negative height
114 * indicates bottom-up video. */
115 int32_t width
, height
;
116 uint32_t fps_n
, fps_d
;
128 int32_t width
, height
;
129 uint32_t fps_n
, fps_d
;
135 enum wg_wmv_video_format
137 WG_WMV_VIDEO_FORMAT_UNKNOWN
,
138 WG_WMV_VIDEO_FORMAT_WMV1
,
139 WG_WMV_VIDEO_FORMAT_WMV2
,
140 WG_WMV_VIDEO_FORMAT_WMV3
,
141 WG_WMV_VIDEO_FORMAT_WMVA
,
142 WG_WMV_VIDEO_FORMAT_WVC1
,
144 int32_t width
, height
;
145 uint32_t fps_n
, fps_d
;
149 int32_t width
, height
;
150 uint32_t fps_n
, fps_d
;
158 WG_SAMPLE_FLAG_INCOMPLETE
= 1,
159 WG_SAMPLE_FLAG_HAS_PTS
= 2,
160 WG_SAMPLE_FLAG_HAS_DURATION
= 4,
161 WG_SAMPLE_FLAG_SYNC_POINT
= 8,
162 WG_SAMPLE_FLAG_DISCONTINUITY
= 0x10,
167 /* timestamp and duration are in 100-nanosecond units. */
170 LONG refcount
; /* unix refcount */
177 struct wg_parser_buffer
179 /* pts and duration are in 100-nanosecond units. */
180 UINT64 pts
, duration
;
183 bool discontinuity
, preroll
, delta
, has_pts
, has_duration
;
185 C_ASSERT(sizeof(struct wg_parser_buffer
) == 32);
191 WG_PARSER_MPEGAUDIOPARSE
,
195 struct wg_parser_create_params
197 struct wg_parser
*parser
;
198 enum wg_parser_type type
;
199 bool unlimited_buffering
;
204 struct wg_parser_connect_params
206 struct wg_parser
*parser
;
210 struct wg_parser_get_next_read_offset_params
212 struct wg_parser
*parser
;
217 struct wg_parser_push_data_params
219 struct wg_parser
*parser
;
224 struct wg_parser_get_stream_count_params
226 struct wg_parser
*parser
;
230 struct wg_parser_get_stream_params
232 struct wg_parser
*parser
;
234 struct wg_parser_stream
*stream
;
237 struct wg_parser_stream_get_preferred_format_params
239 struct wg_parser_stream
*stream
;
240 struct wg_format
*format
;
243 struct wg_parser_stream_get_codec_format_params
245 struct wg_parser_stream
*stream
;
246 struct wg_format
*format
;
249 struct wg_parser_stream_enable_params
251 struct wg_parser_stream
*stream
;
252 const struct wg_format
*format
;
255 struct wg_parser_stream_get_buffer_params
257 struct wg_parser
*parser
;
258 struct wg_parser_stream
*stream
;
259 struct wg_parser_buffer
*buffer
;
262 struct wg_parser_stream_copy_buffer_params
264 struct wg_parser_stream
*stream
;
270 struct wg_parser_stream_notify_qos_params
272 struct wg_parser_stream
*stream
;
279 struct wg_parser_stream_get_duration_params
281 struct wg_parser_stream
*stream
;
287 WG_PARSER_TAG_LANGUAGE
,
292 struct wg_parser_stream_get_tag_params
294 struct wg_parser_stream
*stream
;
295 enum wg_parser_tag tag
;
300 struct wg_parser_stream_seek_params
302 struct wg_parser_stream
*stream
;
304 UINT64 start_pos
, stop_pos
;
305 DWORD start_flags
, stop_flags
;
308 struct wg_transform_attrs
310 UINT32 output_plane_align
;
311 UINT32 input_queue_length
;
315 struct wg_transform_create_params
317 struct wg_transform
*transform
;
318 const struct wg_format
*input_format
;
319 const struct wg_format
*output_format
;
320 const struct wg_transform_attrs
*attrs
;
323 struct wg_transform_push_data_params
325 struct wg_transform
*transform
;
326 struct wg_sample
*sample
;
330 struct wg_transform_read_data_params
332 struct wg_transform
*transform
;
333 struct wg_sample
*sample
;
334 struct wg_format
*format
;
338 struct wg_transform_set_output_format_params
340 struct wg_transform
*transform
;
341 const struct wg_format
*format
;
344 struct wg_transform_get_status_params
346 struct wg_transform
*transform
;
347 UINT32 accepts_input
;
352 unix_wg_init_gstreamer
,
354 unix_wg_parser_create
,
355 unix_wg_parser_destroy
,
357 unix_wg_parser_connect
,
358 unix_wg_parser_disconnect
,
360 unix_wg_parser_get_next_read_offset
,
361 unix_wg_parser_push_data
,
363 unix_wg_parser_get_stream_count
,
364 unix_wg_parser_get_stream
,
366 unix_wg_parser_stream_get_preferred_format
,
367 unix_wg_parser_stream_get_codec_format
,
368 unix_wg_parser_stream_enable
,
369 unix_wg_parser_stream_disable
,
371 unix_wg_parser_stream_get_buffer
,
372 unix_wg_parser_stream_copy_buffer
,
373 unix_wg_parser_stream_release_buffer
,
374 unix_wg_parser_stream_notify_qos
,
376 unix_wg_parser_stream_get_duration
,
377 unix_wg_parser_stream_get_tag
,
378 unix_wg_parser_stream_seek
,
380 unix_wg_transform_create
,
381 unix_wg_transform_destroy
,
382 unix_wg_transform_set_output_format
,
384 unix_wg_transform_push_data
,
385 unix_wg_transform_read_data
,
386 unix_wg_transform_get_status
,
387 unix_wg_transform_drain
,
388 unix_wg_transform_flush
,
391 #endif /* __WINE_WINEGSTREAMER_UNIXLIB_H */