From: Ziqing Hui zhui@codeweavers.com
--- dlls/winegstreamer/unixlib.h | 128 +++++++++++++++++------------------ 1 file changed, 62 insertions(+), 66 deletions(-)
diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 4ec9fce515e..7a8c07817f8 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -45,37 +45,37 @@ enum wg_major_type WG_MAJOR_TYPE_VIDEO_MPEG1, };
-typedef UINT32 wg_audio_format; -enum wg_audio_format +typedef UINT32 wg_audio_type; +enum wg_audio_type { - WG_AUDIO_FORMAT_UNKNOWN, + WG_AUDIO_TYPE_UNKNOWN,
- WG_AUDIO_FORMAT_U8, - WG_AUDIO_FORMAT_S16LE, - WG_AUDIO_FORMAT_S24LE, - WG_AUDIO_FORMAT_S32LE, - WG_AUDIO_FORMAT_F32LE, - WG_AUDIO_FORMAT_F64LE, + WG_AUDIO_TYPE_U8, + WG_AUDIO_TYPE_S16LE, + WG_AUDIO_TYPE_S24LE, + WG_AUDIO_TYPE_S32LE, + WG_AUDIO_TYPE_F32LE, + WG_AUDIO_TYPE_F64LE, };
-typedef UINT32 wg_video_format; -enum wg_video_format +typedef UINT32 wg_video_type; +enum wg_video_type { - WG_VIDEO_FORMAT_UNKNOWN, + WG_VIDEO_TYPE_UNKNOWN,
- WG_VIDEO_FORMAT_BGRA, - WG_VIDEO_FORMAT_BGRx, - WG_VIDEO_FORMAT_BGR, - WG_VIDEO_FORMAT_RGB15, - WG_VIDEO_FORMAT_RGB16, + WG_VIDEO_TYPE_BGRA, + WG_VIDEO_TYPE_BGRx, + WG_VIDEO_TYPE_BGR, + WG_VIDEO_TYPE_RGB15, + WG_VIDEO_TYPE_RGB16,
- WG_VIDEO_FORMAT_AYUV, - WG_VIDEO_FORMAT_I420, - WG_VIDEO_FORMAT_NV12, - WG_VIDEO_FORMAT_UYVY, - WG_VIDEO_FORMAT_YUY2, - WG_VIDEO_FORMAT_YV12, - WG_VIDEO_FORMAT_YVYU, + WG_VIDEO_TYPE_AYUV, + WG_VIDEO_TYPE_I420, + WG_VIDEO_TYPE_NV12, + WG_VIDEO_TYPE_UYVY, + WG_VIDEO_TYPE_YUY2, + WG_VIDEO_TYPE_YV12, + WG_VIDEO_TYPE_YVYU, };
typedef UINT32 wg_wmv_video_format; @@ -89,89 +89,85 @@ enum wg_wmv_video_format WG_WMV_VIDEO_FORMAT_WVC1, };
-struct wg_format +struct wg_audio_format { - wg_major_type major_type; + uint32_t channels; + uint32_t rate;
union { struct { - wg_audio_format format; - - uint32_t channels; + wg_audio_type type; uint32_t channel_mask; /* In WinMM format. */ - uint32_t rate; - } audio; + } uncompressed; struct { uint32_t layer; - uint32_t rate; - uint32_t channels; - } audio_mpeg1; + } mpeg1; struct { uint32_t payload_type; uint32_t codec_data_len; unsigned char codec_data[64]; - } audio_mpeg4; + } mpeg4; struct { uint32_t version; uint32_t bitrate; - uint32_t rate; uint32_t depth; - uint32_t channels; uint32_t block_align; uint32_t codec_data_len; unsigned char codec_data[64]; - } audio_wma; + } wma; + }; +}; + +struct wg_video_format +{ + /* Positive height indicates top-down video; negative height + * indicates bottom-up video. */ + int32_t width; + int32_t height; + uint32_t fps_n; + uint32_t fps_d;
+ union + { struct { - wg_video_format format; - /* Positive height indicates top-down video; negative height - * indicates bottom-up video. */ - int32_t width, height; - uint32_t fps_n, fps_d; + wg_video_type type; RECT padding; - } video; - struct - { - uint32_t width; - uint32_t height; - uint32_t fps_n; - uint32_t fps_d; - } video_cinepak; + } uncompressed; struct { - int32_t width, height; - uint32_t fps_n, fps_d; uint32_t profile; uint32_t level; uint32_t codec_data_len; unsigned char codec_data[64]; - } video_h264; + } h264; struct { wg_wmv_video_format format; - int32_t width, height; - uint32_t fps_n, fps_d; uint32_t codec_data_len; unsigned char codec_data[64]; - } video_wmv; + } wmv; struct { - int32_t width, height; - uint32_t fps_n, fps_d; uint32_t version; - } video_indeo; - struct - { - int32_t width, height; - uint32_t fps_n, fps_d; - } video_mpeg1; - } u; + } indeo; + }; +}; + +struct wg_format +{ + wg_major_type major_type; + + union + { + struct wg_audio_format audio; + struct wg_video_format video; + }; };
enum wg_sample_flag