From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winegstreamer/mfplat.c | 24 ++++++++--------- dlls/winegstreamer/quartz_parser.c | 4 +-- dlls/winegstreamer/unixlib.h | 4 +-- dlls/winegstreamer/wg_format.c | 42 +++++++++++++++--------------- dlls/winegstreamer/wg_transform.c | 4 +-- dlls/winegstreamer/wm_reader.c | 8 +++--- dlls/winegstreamer/wma_decoder.c | 2 +- 7 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c index 379f5dd77ee..1c8b2ebfc6d 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -488,8 +488,8 @@ IMFMediaType *mf_media_type_from_wg_format(const struct wg_format *format) switch (format->major_type) { case WG_MAJOR_TYPE_AUDIO_MPEG1: + case WG_MAJOR_TYPE_AUDIO_WMA: case WG_MAJOR_TYPE_H264: - case WG_MAJOR_TYPE_WMA: case WG_MAJOR_TYPE_VIDEO_CINEPAK: FIXME("Format %u not implemented!\n", format->major_type); /* fallthrough */ @@ -601,7 +601,7 @@ static void mf_media_type_to_wg_format_video(IMFMediaType *type, const GUID *sub FIXME("Unrecognized video subtype %s.\n", debugstr_guid(subtype)); }
-static void mf_media_type_to_wg_format_wma(IMFMediaType *type, const GUID *subtype, struct wg_format *format) +static void mf_media_type_to_wg_format_audio_wma(IMFMediaType *type, const GUID *subtype, struct wg_format *format) { UINT32 rate, depth, channels, block_align, bytes_per_second, codec_data_len; BYTE codec_data[64]; @@ -652,15 +652,15 @@ static void mf_media_type_to_wg_format_wma(IMFMediaType *type, const GUID *subty return; }
- format->major_type = WG_MAJOR_TYPE_WMA; - format->u.wma.version = version; - format->u.wma.bitrate = bytes_per_second * 8; - format->u.wma.rate = rate; - format->u.wma.depth = depth; - format->u.wma.channels = channels; - format->u.wma.block_align = block_align; - format->u.wma.codec_data_len = codec_data_len; - memcpy(format->u.wma.codec_data, codec_data, codec_data_len); + format->major_type = WG_MAJOR_TYPE_AUDIO_WMA; + format->u.audio_wma.version = version; + format->u.audio_wma.bitrate = bytes_per_second * 8; + format->u.audio_wma.rate = rate; + format->u.audio_wma.depth = depth; + format->u.audio_wma.channels = channels; + format->u.audio_wma.block_align = block_align; + format->u.audio_wma.codec_data_len = codec_data_len; + memcpy(format->u.audio_wma.codec_data, codec_data, codec_data_len); }
static void mf_media_type_to_wg_format_h264(IMFMediaType *type, struct wg_format *format) @@ -718,7 +718,7 @@ void mf_media_type_to_wg_format(IMFMediaType *type, struct wg_format *format) IsEqualGUID(&subtype, &MFAudioFormat_WMAudioV8) || IsEqualGUID(&subtype, &MFAudioFormat_WMAudioV9) || IsEqualGUID(&subtype, &MFAudioFormat_WMAudio_Lossless)) - mf_media_type_to_wg_format_wma(type, &subtype, format); + mf_media_type_to_wg_format_audio_wma(type, &subtype, format); else mf_media_type_to_wg_format_audio(type, &subtype, format); } diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index 322675a5e73..d9248f81d81 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -359,8 +359,8 @@ unsigned int wg_format_get_max_size(const struct wg_format *format) } break;
+ case WG_MAJOR_TYPE_AUDIO_WMA: case WG_MAJOR_TYPE_H264: - case WG_MAJOR_TYPE_WMA: FIXME("Format %u not implemented!\n", format->major_type); return 0;
@@ -528,8 +528,8 @@ bool amt_from_wg_format(AM_MEDIA_TYPE *mt, const struct wg_format *format, bool
switch (format->major_type) { + case WG_MAJOR_TYPE_AUDIO_WMA: case WG_MAJOR_TYPE_H264: - case WG_MAJOR_TYPE_WMA: FIXME("Format %u not implemented!\n", format->major_type); /* fallthrough */ case WG_MAJOR_TYPE_UNKNOWN: diff --git a/dlls/winegstreamer/unixlib.h b/dlls/winegstreamer/unixlib.h index 6c3843eb517..31e7d8359cd 100644 --- a/dlls/winegstreamer/unixlib.h +++ b/dlls/winegstreamer/unixlib.h @@ -39,7 +39,7 @@ struct wg_format WG_MAJOR_TYPE_VIDEO_CINEPAK, WG_MAJOR_TYPE_AUDIO, WG_MAJOR_TYPE_AUDIO_MPEG1, - WG_MAJOR_TYPE_WMA, + WG_MAJOR_TYPE_AUDIO_WMA, WG_MAJOR_TYPE_H264, } major_type;
@@ -103,7 +103,7 @@ struct wg_format uint32_t block_align; uint32_t codec_data_len; unsigned char codec_data[64]; - } wma; + } audio_wma; struct { uint32_t width; diff --git a/dlls/winegstreamer/wg_format.c b/dlls/winegstreamer/wg_format.c index 5ecb2f779d6..261dc9a03e8 100644 --- a/dlls/winegstreamer/wg_format.c +++ b/dlls/winegstreamer/wg_format.c @@ -423,36 +423,36 @@ static GstCaps *wg_format_to_caps_video_cinepak(const struct wg_format *format) return caps; }
-static GstCaps *wg_format_to_caps_wma(const struct wg_format *format) +static GstCaps *wg_format_to_caps_audio_wma(const struct wg_format *format) { GstBuffer *buffer; GstCaps *caps;
if (!(caps = gst_caps_new_empty_simple("audio/x-wma"))) return NULL; - if (format->u.wma.version) - gst_caps_set_simple(caps, "wmaversion", G_TYPE_INT, format->u.wma.version, NULL); - - if (format->u.wma.bitrate) - gst_caps_set_simple(caps, "bitrate", G_TYPE_INT, format->u.wma.bitrate, NULL); - if (format->u.wma.rate) - gst_caps_set_simple(caps, "rate", G_TYPE_INT, format->u.wma.rate, NULL); - if (format->u.wma.depth) - gst_caps_set_simple(caps, "depth", G_TYPE_INT, format->u.wma.depth, NULL); - if (format->u.wma.channels) - gst_caps_set_simple(caps, "channels", G_TYPE_INT, format->u.wma.channels, NULL); - if (format->u.wma.block_align) - gst_caps_set_simple(caps, "block_align", G_TYPE_INT, format->u.wma.block_align, NULL); - - if (format->u.wma.codec_data_len) + if (format->u.audio_wma.version) + gst_caps_set_simple(caps, "wmaversion", G_TYPE_INT, format->u.audio_wma.version, NULL); + + if (format->u.audio_wma.bitrate) + gst_caps_set_simple(caps, "bitrate", G_TYPE_INT, format->u.audio_wma.bitrate, NULL); + if (format->u.audio_wma.rate) + gst_caps_set_simple(caps, "rate", G_TYPE_INT, format->u.audio_wma.rate, NULL); + if (format->u.audio_wma.depth) + gst_caps_set_simple(caps, "depth", G_TYPE_INT, format->u.audio_wma.depth, NULL); + if (format->u.audio_wma.channels) + gst_caps_set_simple(caps, "channels", G_TYPE_INT, format->u.audio_wma.channels, NULL); + if (format->u.audio_wma.block_align) + gst_caps_set_simple(caps, "block_align", G_TYPE_INT, format->u.audio_wma.block_align, NULL); + + if (format->u.audio_wma.codec_data_len) { - if (!(buffer = gst_buffer_new_and_alloc(format->u.wma.codec_data_len))) + if (!(buffer = gst_buffer_new_and_alloc(format->u.audio_wma.codec_data_len))) { gst_caps_unref(caps); return NULL; }
- gst_buffer_fill(buffer, 0, format->u.wma.codec_data, format->u.wma.codec_data_len); + gst_buffer_fill(buffer, 0, format->u.audio_wma.codec_data, format->u.audio_wma.codec_data_len); gst_caps_set_simple(caps, "codec_data", GST_TYPE_BUFFER, buffer, NULL); gst_buffer_unref(buffer); } @@ -529,14 +529,14 @@ GstCaps *wg_format_to_caps(const struct wg_format *format) { case WG_MAJOR_TYPE_UNKNOWN: return gst_caps_new_any(); - case WG_MAJOR_TYPE_WMA: - return wg_format_to_caps_wma(format); case WG_MAJOR_TYPE_H264: return wg_format_to_caps_h264(format); case WG_MAJOR_TYPE_AUDIO: return wg_format_to_caps_audio(format); case WG_MAJOR_TYPE_AUDIO_MPEG1: return wg_format_to_caps_audio_mpeg1(format); + case WG_MAJOR_TYPE_AUDIO_WMA: + return wg_format_to_caps_audio_wma(format); case WG_MAJOR_TYPE_VIDEO: return wg_format_to_caps_video(format); case WG_MAJOR_TYPE_VIDEO_CINEPAK: @@ -554,7 +554,7 @@ bool wg_format_compare(const struct wg_format *a, const struct wg_format *b) switch (a->major_type) { case WG_MAJOR_TYPE_AUDIO_MPEG1: - case WG_MAJOR_TYPE_WMA: + case WG_MAJOR_TYPE_AUDIO_WMA: case WG_MAJOR_TYPE_H264: GST_FIXME("Format %u not implemented!", a->major_type); /* fallthrough */ diff --git a/dlls/winegstreamer/wg_transform.c b/dlls/winegstreamer/wg_transform.c index 6d07d884ada..8a590a042a0 100644 --- a/dlls/winegstreamer/wg_transform.c +++ b/dlls/winegstreamer/wg_transform.c @@ -424,7 +424,7 @@ NTSTATUS wg_transform_create(void *args) goto out; /* fallthrough */ case WG_MAJOR_TYPE_AUDIO_MPEG1: - case WG_MAJOR_TYPE_WMA: + case WG_MAJOR_TYPE_AUDIO_WMA: case WG_MAJOR_TYPE_VIDEO_CINEPAK: if (!(element = transform_find_element(GST_ELEMENT_FACTORY_TYPE_DECODER, src_caps, raw_caps)) || !transform_append_element(transform, element, &first, &last)) @@ -474,8 +474,8 @@ NTSTATUS wg_transform_create(void *args) break;
case WG_MAJOR_TYPE_AUDIO_MPEG1: + case WG_MAJOR_TYPE_AUDIO_WMA: case WG_MAJOR_TYPE_H264: - case WG_MAJOR_TYPE_WMA: case WG_MAJOR_TYPE_VIDEO_CINEPAK: case WG_MAJOR_TYPE_UNKNOWN: GST_FIXME("Format %u not implemented!", output_format.major_type); diff --git a/dlls/winegstreamer/wm_reader.c b/dlls/winegstreamer/wm_reader.c index ad0f6037c72..ba3bff79761 100644 --- a/dlls/winegstreamer/wm_reader.c +++ b/dlls/winegstreamer/wm_reader.c @@ -1511,14 +1511,14 @@ static const char *get_major_type_string(enum wg_major_type type) return "audio"; case WG_MAJOR_TYPE_AUDIO_MPEG1: return "mpeg1-audio"; + case WG_MAJOR_TYPE_AUDIO_WMA: + return "wma"; case WG_MAJOR_TYPE_VIDEO: return "video"; case WG_MAJOR_TYPE_VIDEO_CINEPAK: return "cinepak"; case WG_MAJOR_TYPE_UNKNOWN: return "unknown"; - case WG_MAJOR_TYPE_WMA: - return "wma"; case WG_MAJOR_TYPE_H264: return "h264"; } @@ -1975,7 +1975,7 @@ static HRESULT WINAPI reader_GetOutputFormat(IWMSyncReader2 *iface, break;
case WG_MAJOR_TYPE_AUDIO_MPEG1: - case WG_MAJOR_TYPE_WMA: + case WG_MAJOR_TYPE_AUDIO_WMA: case WG_MAJOR_TYPE_H264: case WG_MAJOR_TYPE_VIDEO_CINEPAK: FIXME("Format %u not implemented!\n", format.major_type); @@ -2014,7 +2014,7 @@ static HRESULT WINAPI reader_GetOutputFormatCount(IWMSyncReader2 *iface, DWORD o break;
case WG_MAJOR_TYPE_AUDIO_MPEG1: - case WG_MAJOR_TYPE_WMA: + case WG_MAJOR_TYPE_AUDIO_WMA: case WG_MAJOR_TYPE_H264: case WG_MAJOR_TYPE_VIDEO_CINEPAK: FIXME("Format %u not implemented!\n", format.major_type); diff --git a/dlls/winegstreamer/wma_decoder.c b/dlls/winegstreamer/wma_decoder.c index 6d8917c9c07..1391a7b60e1 100644 --- a/dlls/winegstreamer/wma_decoder.c +++ b/dlls/winegstreamer/wma_decoder.c @@ -870,7 +870,7 @@ HRESULT wma_decoder_create(IUnknown *outer, IUnknown **out) .rate = 44100, }, }; - static const struct wg_format input_format = {.major_type = WG_MAJOR_TYPE_WMA}; + static const struct wg_format input_format = {.major_type = WG_MAJOR_TYPE_AUDIO_WMA}; struct wg_transform *transform; struct wma_decoder *decoder; HRESULT hr;