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
,
40 WG_MAJOR_TYPE_MPEG1_AUDIO
,
51 WG_VIDEO_FORMAT_UNKNOWN
,
56 WG_VIDEO_FORMAT_RGB15
,
57 WG_VIDEO_FORMAT_RGB16
,
67 WG_VIDEO_FORMAT_CINEPAK
,
69 int32_t width
, height
;
70 uint32_t fps_n
, fps_d
;
76 WG_AUDIO_FORMAT_UNKNOWN
,
79 WG_AUDIO_FORMAT_S16LE
,
80 WG_AUDIO_FORMAT_S24LE
,
81 WG_AUDIO_FORMAT_S32LE
,
82 WG_AUDIO_FORMAT_F32LE
,
83 WG_AUDIO_FORMAT_F64LE
,
87 uint32_t channel_mask
; /* In WinMM format. */
103 uint32_t block_align
;
104 uint32_t codec_data_len
;
105 unsigned char codec_data
[64];
109 int32_t width
, height
;
110 uint32_t fps_n
, fps_d
;
119 WG_SAMPLE_FLAG_INCOMPLETE
= 1,
120 WG_SAMPLE_FLAG_HAS_PTS
= 2,
121 WG_SAMPLE_FLAG_HAS_DURATION
= 4,
122 WG_SAMPLE_FLAG_SYNC_POINT
= 8,
127 /* timestamp and duration are in 100-nanosecond units. */
136 struct wg_parser_buffer
138 /* pts and duration are in 100-nanosecond units. */
139 UINT64 pts
, duration
;
141 bool discontinuity
, preroll
, delta
, has_pts
, has_duration
;
143 C_ASSERT(sizeof(struct wg_parser_buffer
) == 32);
149 WG_PARSER_MPEGAUDIOPARSE
,
153 struct wg_parser_create_params
155 struct wg_parser
*parser
;
156 enum wg_parser_type type
;
157 bool unlimited_buffering
;
160 struct wg_parser_connect_params
162 struct wg_parser
*parser
;
166 struct wg_parser_get_next_read_offset_params
168 struct wg_parser
*parser
;
173 struct wg_parser_push_data_params
175 struct wg_parser
*parser
;
180 struct wg_parser_get_stream_count_params
182 struct wg_parser
*parser
;
186 struct wg_parser_get_stream_params
188 struct wg_parser
*parser
;
190 struct wg_parser_stream
*stream
;
193 struct wg_parser_stream_get_preferred_format_params
195 struct wg_parser_stream
*stream
;
196 struct wg_format
*format
;
199 struct wg_parser_stream_enable_params
201 struct wg_parser_stream
*stream
;
202 const struct wg_format
*format
;
205 struct wg_parser_stream_get_buffer_params
207 struct wg_parser_stream
*stream
;
208 struct wg_parser_buffer
*buffer
;
211 struct wg_parser_stream_copy_buffer_params
213 struct wg_parser_stream
*stream
;
219 struct wg_parser_stream_notify_qos_params
221 struct wg_parser_stream
*stream
;
228 struct wg_parser_stream_get_duration_params
230 struct wg_parser_stream
*stream
;
234 struct wg_parser_stream_seek_params
236 struct wg_parser_stream
*stream
;
238 UINT64 start_pos
, stop_pos
;
239 DWORD start_flags
, stop_flags
;
242 struct wg_transform_create_params
244 struct wg_transform
*transform
;
245 const struct wg_format
*input_format
;
246 const struct wg_format
*output_format
;
249 struct wg_transform_push_data_params
251 struct wg_transform
*transform
;
252 struct wg_sample
*sample
;
256 struct wg_transform_read_data_params
258 struct wg_transform
*transform
;
259 struct wg_sample
*sample
;
265 unix_wg_parser_create
,
266 unix_wg_parser_destroy
,
268 unix_wg_parser_connect
,
269 unix_wg_parser_disconnect
,
271 unix_wg_parser_get_next_read_offset
,
272 unix_wg_parser_push_data
,
274 unix_wg_parser_get_stream_count
,
275 unix_wg_parser_get_stream
,
277 unix_wg_parser_stream_get_preferred_format
,
278 unix_wg_parser_stream_enable
,
279 unix_wg_parser_stream_disable
,
281 unix_wg_parser_stream_get_buffer
,
282 unix_wg_parser_stream_copy_buffer
,
283 unix_wg_parser_stream_release_buffer
,
284 unix_wg_parser_stream_notify_qos
,
286 unix_wg_parser_stream_get_duration
,
287 unix_wg_parser_stream_seek
,
289 unix_wg_transform_create
,
290 unix_wg_transform_destroy
,
292 unix_wg_transform_push_data
,
293 unix_wg_transform_read_data
,
296 #endif /* __WINE_WINEGSTREAMER_UNIXLIB_H */