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
,
47 typedef UINT32 wg_audio_format
;
50 WG_AUDIO_FORMAT_UNKNOWN
,
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
;
63 WG_VIDEO_FORMAT_UNKNOWN
,
68 WG_VIDEO_FORMAT_RGB15
,
69 WG_VIDEO_FORMAT_RGB16
,
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
,
93 wg_major_type major_type
;
99 wg_audio_format format
;
102 uint32_t channel_mask
; /* In WinMM format. */
113 uint32_t payload_type
;
114 uint32_t codec_data_len
;
115 unsigned char codec_data
[64];
124 uint32_t block_align
;
125 uint32_t codec_data_len
;
126 unsigned char codec_data
[64];
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
;
147 int32_t width
, height
;
148 uint32_t fps_n
, fps_d
;
154 wg_wmv_video_format format
;
155 int32_t width
, height
;
156 uint32_t fps_n
, fps_d
;
160 int32_t width
, height
;
161 uint32_t fps_n
, fps_d
;
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,
178 /* timestamp and duration are in 100-nanosecond units. */
181 LONG refcount
; /* unix refcount */
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
;
194 UINT8 discontinuity
, preroll
, delta
, has_pts
, has_duration
;
196 C_ASSERT(sizeof(struct wg_parser_buffer
) == 32);
198 typedef UINT32 wg_parser_type
;
203 WG_PARSER_MPEGAUDIOPARSE
,
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
219 struct wg_parser_connect_params
225 struct wg_parser_get_next_read_offset_params
232 struct wg_parser_push_data_params
239 struct wg_parser_get_stream_count_params
245 struct wg_parser_get_stream_params
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
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
;
285 struct wg_parser_stream_notify_qos_params
287 wg_parser_stream_t stream
;
294 struct wg_parser_stream_get_duration_params
296 wg_parser_stream_t stream
;
300 typedef UINT64 wg_parser_tag
;
303 WG_PARSER_TAG_LANGUAGE
,
308 struct wg_parser_stream_get_tag_params
310 wg_parser_stream_t stream
;
316 struct wg_parser_stream_seek_params
318 wg_parser_stream_t stream
;
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
;
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
;
346 struct wg_transform_read_data_params
348 wg_transform_t transform
;
349 struct wg_sample
*sample
;
350 struct wg_format
*format
;
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
;
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 */