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
;
77 WG_AUDIO_FORMAT_UNKNOWN
,
80 WG_AUDIO_FORMAT_S16LE
,
81 WG_AUDIO_FORMAT_S24LE
,
82 WG_AUDIO_FORMAT_S32LE
,
83 WG_AUDIO_FORMAT_F32LE
,
84 WG_AUDIO_FORMAT_F64LE
,
88 uint32_t channel_mask
; /* In WinMM format. */
104 uint32_t block_align
;
105 uint32_t codec_data_len
;
106 unsigned char codec_data
[64];
110 int32_t width
, height
;
111 uint32_t fps_n
, fps_d
;
120 WG_SAMPLE_FLAG_INCOMPLETE
= 1,
121 WG_SAMPLE_FLAG_HAS_PTS
= 2,
122 WG_SAMPLE_FLAG_HAS_DURATION
= 4,
123 WG_SAMPLE_FLAG_SYNC_POINT
= 8,
128 /* timestamp and duration are in 100-nanosecond units. */
131 LONG refcount
; /* unix refcount */
138 struct wg_parser_buffer
140 /* pts and duration are in 100-nanosecond units. */
141 UINT64 pts
, duration
;
143 bool discontinuity
, preroll
, delta
, has_pts
, has_duration
;
145 C_ASSERT(sizeof(struct wg_parser_buffer
) == 32);
151 WG_PARSER_MPEGAUDIOPARSE
,
155 struct wg_parser_create_params
157 struct wg_parser
*parser
;
158 enum wg_parser_type type
;
159 bool unlimited_buffering
;
162 struct wg_parser_connect_params
164 struct wg_parser
*parser
;
168 struct wg_parser_get_next_read_offset_params
170 struct wg_parser
*parser
;
175 struct wg_parser_push_data_params
177 struct wg_parser
*parser
;
182 struct wg_parser_get_stream_count_params
184 struct wg_parser
*parser
;
188 struct wg_parser_get_stream_params
190 struct wg_parser
*parser
;
192 struct wg_parser_stream
*stream
;
195 struct wg_parser_stream_get_preferred_format_params
197 struct wg_parser_stream
*stream
;
198 struct wg_format
*format
;
201 struct wg_parser_stream_enable_params
203 struct wg_parser_stream
*stream
;
204 const struct wg_format
*format
;
207 struct wg_parser_stream_get_buffer_params
209 struct wg_parser_stream
*stream
;
210 struct wg_parser_buffer
*buffer
;
213 struct wg_parser_stream_copy_buffer_params
215 struct wg_parser_stream
*stream
;
221 struct wg_parser_stream_notify_qos_params
223 struct wg_parser_stream
*stream
;
230 struct wg_parser_stream_get_duration_params
232 struct wg_parser_stream
*stream
;
236 struct wg_parser_stream_seek_params
238 struct wg_parser_stream
*stream
;
240 UINT64 start_pos
, stop_pos
;
241 DWORD start_flags
, stop_flags
;
244 struct wg_transform_create_params
246 struct wg_transform
*transform
;
247 const struct wg_format
*input_format
;
248 const struct wg_format
*output_format
;
251 struct wg_transform_push_data_params
253 struct wg_transform
*transform
;
254 struct wg_sample
*sample
;
258 struct wg_transform_read_data_params
260 struct wg_transform
*transform
;
261 struct wg_sample
*sample
;
262 struct wg_format
*format
;
266 struct wg_transform_set_output_format_params
268 struct wg_transform
*transform
;
269 const struct wg_format
*format
;
274 unix_wg_parser_create
,
275 unix_wg_parser_destroy
,
277 unix_wg_parser_connect
,
278 unix_wg_parser_disconnect
,
280 unix_wg_parser_get_next_read_offset
,
281 unix_wg_parser_push_data
,
283 unix_wg_parser_get_stream_count
,
284 unix_wg_parser_get_stream
,
286 unix_wg_parser_stream_get_preferred_format
,
287 unix_wg_parser_stream_enable
,
288 unix_wg_parser_stream_disable
,
290 unix_wg_parser_stream_get_buffer
,
291 unix_wg_parser_stream_copy_buffer
,
292 unix_wg_parser_stream_release_buffer
,
293 unix_wg_parser_stream_notify_qos
,
295 unix_wg_parser_stream_get_duration
,
296 unix_wg_parser_stream_seek
,
298 unix_wg_transform_create
,
299 unix_wg_transform_destroy
,
300 unix_wg_transform_set_output_format
,
302 unix_wg_transform_push_data
,
303 unix_wg_transform_read_data
,
306 #endif /* __WINE_WINEGSTREAMER_UNIXLIB_H */