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
30 #include "wine/unixlib.h"
32 typedef UINT32 wg_major_type
;
35 WG_MAJOR_TYPE_UNKNOWN
= 0,
37 WG_MAJOR_TYPE_AUDIO_MPEG1
,
38 WG_MAJOR_TYPE_AUDIO_MPEG4
,
39 WG_MAJOR_TYPE_AUDIO_WMA
,
41 WG_MAJOR_TYPE_VIDEO_CINEPAK
,
42 WG_MAJOR_TYPE_VIDEO_H264
,
43 WG_MAJOR_TYPE_VIDEO_WMV
,
44 WG_MAJOR_TYPE_VIDEO_INDEO
,
45 WG_MAJOR_TYPE_VIDEO_MPEG1
,
48 typedef UINT32 wg_audio_format
;
51 WG_AUDIO_FORMAT_UNKNOWN
,
54 WG_AUDIO_FORMAT_S16LE
,
55 WG_AUDIO_FORMAT_S24LE
,
56 WG_AUDIO_FORMAT_S32LE
,
57 WG_AUDIO_FORMAT_F32LE
,
58 WG_AUDIO_FORMAT_F64LE
,
61 typedef UINT32 wg_video_format
;
64 WG_VIDEO_FORMAT_UNKNOWN
,
69 WG_VIDEO_FORMAT_RGB15
,
70 WG_VIDEO_FORMAT_RGB16
,
81 typedef UINT32 wg_wmv_video_format
;
82 enum wg_wmv_video_format
84 WG_WMV_VIDEO_FORMAT_UNKNOWN
,
85 WG_WMV_VIDEO_FORMAT_WMV1
,
86 WG_WMV_VIDEO_FORMAT_WMV2
,
87 WG_WMV_VIDEO_FORMAT_WMV3
,
88 WG_WMV_VIDEO_FORMAT_WMVA
,
89 WG_WMV_VIDEO_FORMAT_WVC1
,
94 wg_major_type major_type
;
100 wg_audio_format format
;
103 uint32_t channel_mask
; /* In WinMM format. */
114 uint32_t payload_type
;
115 uint32_t codec_data_len
;
116 unsigned char codec_data
[64];
125 uint32_t block_align
;
126 uint32_t codec_data_len
;
127 unsigned char codec_data
[64];
132 wg_video_format format
;
133 /* Positive height indicates top-down video; negative height
134 * indicates bottom-up video. */
135 int32_t width
, height
;
136 uint32_t fps_n
, fps_d
;
148 int32_t width
, height
;
149 uint32_t fps_n
, fps_d
;
152 uint32_t codec_data_len
;
153 unsigned char codec_data
[64];
157 wg_wmv_video_format format
;
158 int32_t width
, height
;
159 uint32_t fps_n
, fps_d
;
163 int32_t width
, height
;
164 uint32_t fps_n
, fps_d
;
169 int32_t width
, height
;
170 uint32_t fps_n
, fps_d
;
177 WG_SAMPLE_FLAG_INCOMPLETE
= 1,
178 WG_SAMPLE_FLAG_HAS_PTS
= 2,
179 WG_SAMPLE_FLAG_HAS_DURATION
= 4,
180 WG_SAMPLE_FLAG_SYNC_POINT
= 8,
181 WG_SAMPLE_FLAG_DISCONTINUITY
= 0x10,
186 /* timestamp and duration are in 100-nanosecond units. */
189 LONG refcount
; /* unix refcount */
193 UINT64 data
; /* pointer to user memory */
196 struct wg_parser_buffer
198 /* pts and duration are in 100-nanosecond units. */
199 UINT64 pts
, duration
;
202 UINT8 discontinuity
, preroll
, delta
, has_pts
, has_duration
;
204 C_ASSERT(sizeof(struct wg_parser_buffer
) == 32);
206 typedef UINT32 wg_parser_type
;
214 typedef UINT64 wg_parser_t
;
215 typedef UINT64 wg_parser_stream_t
;
216 typedef UINT64 wg_transform_t
;
217 typedef UINT64 wg_muxer_t
;
219 struct wg_parser_create_params
223 UINT8 output_compressed
;
228 struct wg_parser_connect_params
234 struct wg_parser_get_next_read_offset_params
241 struct wg_parser_push_data_params
248 struct wg_parser_get_stream_count_params
254 struct wg_parser_get_stream_params
258 wg_parser_stream_t stream
;
261 struct wg_parser_stream_get_preferred_format_params
263 wg_parser_stream_t stream
;
264 struct wg_format
*format
;
267 struct wg_parser_stream_get_codec_format_params
269 wg_parser_stream_t stream
;
270 struct wg_format
*format
;
273 struct wg_parser_stream_enable_params
275 wg_parser_stream_t stream
;
276 const struct wg_format
*format
;
279 struct wg_parser_stream_get_buffer_params
282 wg_parser_stream_t stream
;
283 struct wg_parser_buffer
*buffer
;
286 struct wg_parser_stream_copy_buffer_params
288 wg_parser_stream_t stream
;
294 struct wg_parser_stream_notify_qos_params
296 wg_parser_stream_t stream
;
303 struct wg_parser_stream_get_duration_params
305 wg_parser_stream_t stream
;
309 typedef UINT64 wg_parser_tag
;
312 WG_PARSER_TAG_LANGUAGE
,
317 struct wg_parser_stream_get_tag_params
319 wg_parser_stream_t stream
;
325 struct wg_parser_stream_seek_params
327 wg_parser_stream_t stream
;
329 UINT64 start_pos
, stop_pos
;
330 DWORD start_flags
, stop_flags
;
333 struct wg_transform_attrs
335 UINT32 output_plane_align
;
336 UINT32 input_queue_length
;
340 struct wg_transform_create_params
342 wg_transform_t transform
;
343 const struct wg_format
*input_format
;
344 const struct wg_format
*output_format
;
345 const struct wg_transform_attrs
*attrs
;
348 struct wg_transform_push_data_params
350 wg_transform_t transform
;
351 struct wg_sample
*sample
;
355 struct wg_transform_read_data_params
357 wg_transform_t transform
;
358 struct wg_sample
*sample
;
359 struct wg_format
*format
;
363 struct wg_transform_set_output_format_params
365 wg_transform_t transform
;
366 const struct wg_format
*format
;
369 struct wg_transform_get_status_params
371 wg_transform_t transform
;
372 UINT32 accepts_input
;
375 struct wg_muxer_create_params
381 struct wg_muxer_add_stream_params
385 const struct wg_format
*format
;
390 unix_wg_init_gstreamer
,
392 unix_wg_parser_create
,
393 unix_wg_parser_destroy
,
395 unix_wg_parser_connect
,
396 unix_wg_parser_disconnect
,
398 unix_wg_parser_get_next_read_offset
,
399 unix_wg_parser_push_data
,
401 unix_wg_parser_get_stream_count
,
402 unix_wg_parser_get_stream
,
404 unix_wg_parser_stream_get_preferred_format
,
405 unix_wg_parser_stream_get_codec_format
,
406 unix_wg_parser_stream_enable
,
407 unix_wg_parser_stream_disable
,
409 unix_wg_parser_stream_get_buffer
,
410 unix_wg_parser_stream_copy_buffer
,
411 unix_wg_parser_stream_release_buffer
,
412 unix_wg_parser_stream_notify_qos
,
414 unix_wg_parser_stream_get_duration
,
415 unix_wg_parser_stream_get_tag
,
416 unix_wg_parser_stream_seek
,
418 unix_wg_transform_create
,
419 unix_wg_transform_destroy
,
420 unix_wg_transform_set_output_format
,
422 unix_wg_transform_push_data
,
423 unix_wg_transform_read_data
,
424 unix_wg_transform_get_status
,
425 unix_wg_transform_drain
,
426 unix_wg_transform_flush
,
428 unix_wg_muxer_create
,
429 unix_wg_muxer_destroy
,
430 unix_wg_muxer_add_stream
,
436 #endif /* __WINE_WINEGSTREAMER_UNIXLIB_H */