From e002d94a8b5f616c49fb6dc0c7c71fce5a1f0af9 Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Fri, 4 Dec 2020 10:53:09 +1100 Subject: [PATCH] Rebase against 727168a9e116a43f851df2673a9169ad280a9ec8. Includes an updated mfplat patchset. --- ...t-Allow-multiple-backends-to-coexist.patch | 24 +- ...-BCryptSecretAgreement-with-libgcryp.patch | 52 +- ...plement-SetInputType-for-audio-conve.patch | 131 +++ ...plement-SetOutputType-for-audio-conv.patch | 106 +++ ...lement-Process-Input-Output-for-aud.patch} | 290 +++--- ...lement-Get-Input-Output-StreamInfo-.patch} | 28 +- ...lement-Get-Attributes-functions-for.patch} | 46 +- ...Introduce-audio-conversion-transform.patch | 543 ----------- ...lement-Get-Input-Output-CurrentType.patch} | 18 +- ...plement-Set-Input-Output-Type-for-au.patch | 256 ------ ...Introduce-color-conversion-transform.patch | 386 ++++++++ ...gister-the-color-conversion-transfor.patch | 71 ++ ...plement-GetInputAvailableType-for-co.patch | 81 ++ ...plement-SetInputType-for-color-conve.patch | 123 +++ ...reamer-Implement-Color-Converter-MFT.patch | 842 ------------------ ...plement-GetOutputAvailableType-for-c.patch | 77 ++ ...plement-SetOutputType-for-color-conv.patch | 103 +++ ...plement-Process-Input-Output-for-col.patch | 267 ++++++ ...plement-ProcessMessage-for-color-con.patch | 37 + ...plement-Get-Input-Output-StreamInfo-.patch | 54 ++ ...plement-Get-Attributes-functions-for.patch | 99 ++ ...plement-Get-Input-Output-CurrentType.patch | 89 ++ ...eamer-Implement-IMFMediaSource-Stop.patch} | 18 +- ...-MF_MT_ALL_SAMPLES_INDEPENDENT-attr.patch} | 10 +- ...0-mf-Add-invalid-connect-method-test.patch | 54 ++ .../0021-Allow-for-compressed-types.patch | 71 ++ ...ditionally-deliver-NULL-EOS-samples.patch} | 2 +- ...t-more-samples-when-a-transform-nee.patch} | 2 +- ...K-Flush-decoder-when-changing-times.patch} | 6 +- ...-IMFSeekInfo-GetNearestKeyFrames-st.patch} | 10 +- ...up-raw-audio-caps-to-be-compatible-.patch} | 16 +- ...-MF_PD_MIME_TYPE-on-source-s-presen.patch} | 8 +- ...ert-parser-into-pipeline-to-rectify.patch} | 12 +- ...-Translate-H.264-caps-to-attributes.patch} | 8 +- ...er-Translate-WMV-caps-to-attributes.patch} | 8 +- ...er-Translate-AAC-caps-to-attributes.patch} | 8 +- ...nslate-MPEG-4-Section-2-caps-to-att.patch} | 6 +- ...er-Translate-WMA-caps-to-attributes.patch} | 6 +- ...-Translate-H.264-attributes-to-caps.patch} | 8 +- ...er-Translate-WMV-attributes-to-caps.patch} | 8 +- ...er-Translate-AAC-attributes-to-caps.patch} | 6 +- ...nslate-MPEG-4-Section-2-attributes-.patch} | 6 +- ...er-Translate-WMA-attributes-to-caps.patch} | 6 +- ...ort-for-multiple-parent-directories.patch} | 12 +- ...=> 0040-mf-Introduce-handler-helper.patch} | 16 +- ...-Implement-decoder-MFT-on-gstreamer.patch} | 45 +- ...t-all-streams-when-creating-a-sourc.patch} | 2 +- ...laneous.patch => 0043-Miscellaneous.patch} | 10 +- .../{0037-WMV.patch => 0044-WMV.patch} | 16 +- ...pose-PCM-output-type-on-AAC-decoder.patch} | 2 +- ...e-tests.patch => 0046-Improve-tests.patch} | 6 +- ....patch => 0047-Revert-Improve-tests.patch} | 6 +- ...ckwards-and-only-select-one-of-each.patch} | 8 +- ...roduce-MPEG-4-Section-2-video-decod.patch} | 14 +- ...treamer-Introduce-WMA-audio-decoder.patch} | 14 +- ...egstreamer-Implement-MF_SD_LANGUAGE.patch} | 8 +- patches/patchinstall.sh | 100 ++- staging/upstream-commit | 2 +- 58 files changed, 2185 insertions(+), 2078 deletions(-) create mode 100644 patches/mfplat-streaming-support/0001-winegstreamer-Implement-SetInputType-for-audio-conve.patch create mode 100644 patches/mfplat-streaming-support/0002-winegstreamer-Implement-SetOutputType-for-audio-conv.patch rename patches/mfplat-streaming-support/{0007-winegstreamer-Implement-Process-Input-Output-for-aud.patch => 0003-winegstreamer-Implement-Process-Input-Output-for-aud.patch} (52%) rename patches/mfplat-streaming-support/{0008-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch => 0004-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch} (63%) rename patches/mfplat-streaming-support/{0009-winegstreamer-Implement-Get-Attributes-functions-for.patch => 0005-winegstreamer-Implement-Get-Attributes-functions-for.patch} (63%) delete mode 100644 patches/mfplat-streaming-support/0005-winegstreamer-Introduce-audio-conversion-transform.patch rename patches/mfplat-streaming-support/{0010-Implement-Get-Input-Output-CurrentType-functions-for.patch => 0006-winegstreamer-Implement-Get-Input-Output-CurrentType.patch} (81%) delete mode 100644 patches/mfplat-streaming-support/0006-winegstreamer-Implement-Set-Input-Output-Type-for-au.patch create mode 100644 patches/mfplat-streaming-support/0007-winegstreamer-Introduce-color-conversion-transform.patch create mode 100644 patches/mfplat-streaming-support/0008-winegstreamer-Register-the-color-conversion-transfor.patch create mode 100644 patches/mfplat-streaming-support/0009-winegstreamer-Implement-GetInputAvailableType-for-co.patch create mode 100644 patches/mfplat-streaming-support/0010-winegstreamer-Implement-SetInputType-for-color-conve.patch delete mode 100644 patches/mfplat-streaming-support/0011-winegstreamer-Implement-Color-Converter-MFT.patch create mode 100644 patches/mfplat-streaming-support/0011-winegstreamer-Implement-GetOutputAvailableType-for-c.patch create mode 100644 patches/mfplat-streaming-support/0012-winegstreamer-Implement-SetOutputType-for-color-conv.patch create mode 100644 patches/mfplat-streaming-support/0013-winegstreamer-Implement-Process-Input-Output-for-col.patch create mode 100644 patches/mfplat-streaming-support/0014-winegstreamer-Implement-ProcessMessage-for-color-con.patch create mode 100644 patches/mfplat-streaming-support/0015-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch create mode 100644 patches/mfplat-streaming-support/0016-winegstreamer-Implement-Get-Attributes-functions-for.patch create mode 100644 patches/mfplat-streaming-support/0017-winegstreamer-Implement-Get-Input-Output-CurrentType.patch rename patches/mfplat-streaming-support/{0015-winegstreamer-Implement-IMFMediaSource-Stop.patch => 0018-winegstreamer-Implement-IMFMediaSource-Stop.patch} (82%) rename patches/mfplat-streaming-support/{0016-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-on-raw-video-types.patch => 0019-winegstreamer-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-attr.patch} (67%) create mode 100644 patches/mfplat-streaming-support/0020-mf-Add-invalid-connect-method-test.patch create mode 100644 patches/mfplat-streaming-support/0021-Allow-for-compressed-types.patch rename patches/mfplat-streaming-support/{0012-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch => 0022-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch} (95%) rename patches/mfplat-streaming-support/{0013-mf-session-Request-more-samples-when-a-transform-nee.patch => 0023-mf-session-Request-more-samples-when-a-transform-nee.patch} (96%) rename patches/mfplat-streaming-support/{0017-HACK-Flush-decoder-when-changing-times.patch => 0024-HACK-Flush-decoder-when-changing-times.patch} (83%) rename patches/mfplat-streaming-support/{0018-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch => 0025-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch} (94%) rename patches/mfplat-streaming-support/{0019-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch => 0026-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch} (89%) rename patches/mfplat-streaming-support/{0020-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch => 0027-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch} (87%) rename patches/mfplat-streaming-support/{0021-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch => 0028-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch} (93%) rename patches/mfplat-streaming-support/{0022-winegstreamer-Translate-H.264-caps-to-attributes.patch => 0029-winegstreamer-Translate-H.264-caps-to-attributes.patch} (94%) rename patches/mfplat-streaming-support/{0023-winegstreamer-Translate-WMV-caps-to-attributes.patch => 0030-winegstreamer-Translate-WMV-caps-to-attributes.patch} (92%) rename patches/mfplat-streaming-support/{0024-winegstreamer-Translate-AAC-caps-to-attributes.patch => 0031-winegstreamer-Translate-AAC-caps-to-attributes.patch} (96%) rename patches/mfplat-streaming-support/{0025-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch => 0032-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch} (88%) rename patches/mfplat-streaming-support/{0026-winegstreamer-Translate-WMA-caps-to-attributes.patch => 0033-winegstreamer-Translate-WMA-caps-to-attributes.patch} (90%) rename patches/mfplat-streaming-support/{0027-winegstreamer-Translate-H.264-attributes-to-caps.patch => 0034-winegstreamer-Translate-H.264-attributes-to-caps.patch} (95%) rename patches/mfplat-streaming-support/{0028-winegstreamer-Translate-WMV-attributes-to-caps.patch => 0035-winegstreamer-Translate-WMV-attributes-to-caps.patch} (92%) rename patches/mfplat-streaming-support/{0029-winegstreamer-Translate-AAC-attributes-to-caps.patch => 0036-winegstreamer-Translate-AAC-attributes-to-caps.patch} (95%) rename patches/mfplat-streaming-support/{0030-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch => 0037-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch} (85%) rename patches/mfplat-streaming-support/{0031-winegstreamer-Translate-WMA-attributes-to-caps.patch => 0038-winegstreamer-Translate-WMA-attributes-to-caps.patch} (88%) rename patches/mfplat-streaming-support/{0032-tools-Add-support-for-multiple-parent-directories.patch => 0039-tools-Add-support-for-multiple-parent-directories.patch} (95%) rename patches/mfplat-streaming-support/{0033-mf-Introduce-handler-helper.patch => 0040-mf-Introduce-handler-helper.patch} (98%) rename patches/mfplat-streaming-support/{0034-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch => 0041-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch} (97%) rename patches/mfplat-streaming-support/{0035-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch => 0042-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch} (92%) rename patches/mfplat-streaming-support/{0036-Miscellaneous.patch => 0043-Miscellaneous.patch} (94%) rename patches/mfplat-streaming-support/{0037-WMV.patch => 0044-WMV.patch} (93%) rename patches/mfplat-streaming-support/{0038-Expose-PCM-output-type-on-AAC-decoder.patch => 0045-Expose-PCM-output-type-on-AAC-decoder.patch} (94%) rename patches/mfplat-streaming-support/{0039-Improve-tests.patch => 0046-Improve-tests.patch} (99%) rename patches/mfplat-streaming-support/{0040-Revert-Improve-tests.patch => 0047-Revert-Improve-tests.patch} (99%) rename patches/mfplat-streaming-support/{0041-Report-streams-backwards-and-only-select-one-of-each.patch => 0048-Report-streams-backwards-and-only-select-one-of-each.patch} (91%) rename patches/mfplat-streaming-support/{0042-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch => 0049-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch} (94%) rename patches/mfplat-streaming-support/{0043-winegstreamer-Introduce-WMA-audio-decoder.patch => 0050-winegstreamer-Introduce-WMA-audio-decoder.patch} (94%) rename patches/mfplat-streaming-support/{0044-winegstreamer-Implement-MF_SD_LANGUAGE.patch => 0051-winegstreamer-Implement-MF_SD_LANGUAGE.patch} (91%) diff --git a/patches/bcrypt-ECDHSecretAgreement/0001-bcrypt-Allow-multiple-backends-to-coexist.patch b/patches/bcrypt-ECDHSecretAgreement/0001-bcrypt-Allow-multiple-backends-to-coexist.patch index eb7a5bdb..d54aeaf3 100644 --- a/patches/bcrypt-ECDHSecretAgreement/0001-bcrypt-Allow-multiple-backends-to-coexist.patch +++ b/patches/bcrypt-ECDHSecretAgreement/0001-bcrypt-Allow-multiple-backends-to-coexist.patch @@ -1,4 +1,4 @@ -From ef218059ebea8a860dea6b12a7b28984c51d2777 Mon Sep 17 00:00:00 2001 +From eaab7eaeb7533445473bc19d947c34bdc360566e Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Fri, 2 Oct 2020 11:29:24 -0500 Subject: [PATCH] bcrypt: Allow multiple backends to coexist. @@ -27,11 +27,11 @@ index 24803fb2d7c..46a20d473dd 100644 RC_SRCS = version.rc diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h -index 463672db470..90551868cf0 100644 +index e1777ed130b..86b1e3d28c3 100644 --- a/dlls/bcrypt/bcrypt_internal.h +++ b/dlls/bcrypt/bcrypt_internal.h -@@ -215,4 +215,7 @@ struct key_funcs - NTSTATUS (CDECL *key_import_ecc)( struct key *, UCHAR *, ULONG ); +@@ -217,4 +217,7 @@ struct key_funcs + NTSTATUS (CDECL *key_import_rsa)( struct key *, UCHAR *, ULONG ); }; +struct key_funcs *gnutls_lib_init(DWORD reason); @@ -39,10 +39,10 @@ index 463672db470..90551868cf0 100644 + #endif /* __BCRYPT_INTERNAL_H */ diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c -index 5ed51e8704c..7a1eada329c 100644 +index 162ac9ea732..a7fd8428dec 100644 --- a/dlls/bcrypt/gnutls.c +++ b/dlls/bcrypt/gnutls.c -@@ -347,9 +347,12 @@ fail: +@@ -358,9 +358,12 @@ fail: static void gnutls_uninitialize(void) { @@ -58,8 +58,8 @@ index 5ed51e8704c..7a1eada329c 100644 } struct buffer -@@ -1848,19 +1851,28 @@ static const struct key_funcs key_funcs = - key_import_ecc +@@ -1906,19 +1909,28 @@ static const struct key_funcs key_funcs = + key_import_rsa }; -NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out ) @@ -95,11 +95,11 @@ index 5ed51e8704c..7a1eada329c 100644 +} +#endif diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c -index d8bba46ad5c..8df5ca8645f 100644 +index 57edc3e262b..55dca5dde34 100644 --- a/dlls/bcrypt/macos.c +++ b/dlls/bcrypt/macos.c -@@ -287,11 +287,21 @@ static const struct key_funcs key_funcs = - key_import_ecc +@@ -294,11 +294,21 @@ static const struct key_funcs key_funcs = + key_import_rsa }; -NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *ptr_in, void *ptr_out ) @@ -325,5 +325,5 @@ index 00000000000..a158ec1630a + +#endif -- -2.28.0 +2.29.2 diff --git a/patches/bcrypt-ECDHSecretAgreement/0002-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch b/patches/bcrypt-ECDHSecretAgreement/0002-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch index 6dcaf780..eaa13ad9 100644 --- a/patches/bcrypt-ECDHSecretAgreement/0002-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch +++ b/patches/bcrypt-ECDHSecretAgreement/0002-bcrypt-Implement-BCryptSecretAgreement-with-libgcryp.patch @@ -1,4 +1,4 @@ -From 6f2d3fa75e7fd783816d52af0ca9b3c16f2a947e Mon Sep 17 00:00:00 2001 +From 6a38df1250c4bab1fab1a72e06fc347586a7c535 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Fri, 2 Oct 2020 12:11:49 -0500 Subject: [PATCH] bcrypt: Implement BCryptSecretAgreement with libgcrypt. @@ -18,7 +18,7 @@ Signed-off-by: Derek Lesho create mode 100644 dlls/bcrypt/gcrypt.c diff --git a/configure.ac b/configure.ac -index 372785ee0fd..68fff9bf6d8 100644 +index 029dcd45187..a18e271dd4c 100644 --- a/configure.ac +++ b/configure.ac @@ -45,6 +45,7 @@ AC_ARG_WITH(faudio, AS_HELP_STRING([--without-faudio],[do not use FAudio (XAu @@ -29,7 +29,7 @@ index 372785ee0fd..68fff9bf6d8 100644 AC_ARG_WITH(gettext, AS_HELP_STRING([--without-gettext],[do not use gettext])) AC_ARG_WITH(gettextpo, AS_HELP_STRING([--with-gettextpo],[use the GetTextPO library to rebuild po files]), [if test "x$withval" = "xno"; then ac_cv_header_gettext_po_h=no; fi]) -@@ -2000,6 +2001,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"], +@@ -1988,6 +1989,19 @@ WINE_NOTICE_WITH(vkd3d,[test "x$ac_cv_lib_soname_vkd3d" = "x"], [vkd3d ${notice_platform}development files not found (or too old), Direct3D 12 won't be supported.]) test "x$ac_cv_lib_soname_vkd3d" != "x" || enable_d3d12=${enable_d3d12:-no} @@ -62,10 +62,10 @@ index 46a20d473dd..4a3016784af 100644 macos.c \ md2.c \ diff --git a/dlls/bcrypt/bcrypt_internal.h b/dlls/bcrypt/bcrypt_internal.h -index 90551868cf0..03254f72d92 100644 +index 86b1e3d28c3..5d969b13dc3 100644 --- a/dlls/bcrypt/bcrypt_internal.h +++ b/dlls/bcrypt/bcrypt_internal.h -@@ -191,6 +191,8 @@ struct key +@@ -192,6 +192,8 @@ struct key struct secret { struct object hdr; @@ -74,10 +74,10 @@ index 90551868cf0..03254f72d92 100644 }; struct key_funcs -@@ -213,9 +215,11 @@ struct key_funcs - NTSTATUS (CDECL *key_export_ecc)( struct key *, UCHAR *, ULONG, ULONG * ); +@@ -215,9 +217,11 @@ struct key_funcs NTSTATUS (CDECL *key_import_dsa_capi)( struct key *, UCHAR *, ULONG ); NTSTATUS (CDECL *key_import_ecc)( struct key *, UCHAR *, ULONG ); + NTSTATUS (CDECL *key_import_rsa)( struct key *, UCHAR *, ULONG ); + NTSTATUS (CDECL *key_compute_secret_ecc)( unsigned char *privkey_in, struct key *pubkey_in, struct secret *secret ); }; @@ -87,10 +87,10 @@ index 90551868cf0..03254f72d92 100644 #endif /* __BCRYPT_INTERNAL_H */ diff --git a/dlls/bcrypt/bcrypt_main.c b/dlls/bcrypt/bcrypt_main.c -index 85d06f6001e..0f023d02076 100644 +index 591c01c710c..f2c344f3275 100644 --- a/dlls/bcrypt/bcrypt_main.c +++ b/dlls/bcrypt/bcrypt_main.c -@@ -1828,9 +1828,12 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H +@@ -1914,9 +1914,12 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H { struct key *privkey = privatekey; struct key *pubkey = publickey; @@ -104,7 +104,7 @@ index 85d06f6001e..0f023d02076 100644 if (!privkey || privkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE; if (!pubkey || pubkey->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE; -@@ -1839,18 +1842,39 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H +@@ -1925,18 +1928,39 @@ NTSTATUS WINAPI BCryptSecretAgreement(BCRYPT_KEY_HANDLE privatekey, BCRYPT_KEY_H if (!(secret = heap_alloc_zero( sizeof(*secret) ))) return STATUS_NO_MEMORY; secret->hdr.magic = MAGIC_SECRET; @@ -146,7 +146,7 @@ index 85d06f6001e..0f023d02076 100644 heap_free( secret ); return STATUS_SUCCESS; } -@@ -1860,12 +1884,33 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt +@@ -1946,12 +1970,33 @@ NTSTATUS WINAPI BCryptDeriveKey(BCRYPT_SECRET_HANDLE handle, LPCWSTR kdf, BCrypt { struct secret *secret = handle; @@ -479,38 +479,38 @@ index 00000000000..00849358c68 +} +#endif diff --git a/dlls/bcrypt/gnutls.c b/dlls/bcrypt/gnutls.c -index 7a1eada329c..4505a8d965c 100644 +index a7fd8428dec..575aaa21309 100644 --- a/dlls/bcrypt/gnutls.c +++ b/dlls/bcrypt/gnutls.c -@@ -1848,7 +1848,8 @@ static const struct key_funcs key_funcs = - key_export_dsa_capi, +@@ -1906,7 +1906,8 @@ static const struct key_funcs key_funcs = key_export_ecc, key_import_dsa_capi, -- key_import_ecc -+ key_import_ecc, + key_import_ecc, +- key_import_rsa ++ key_import_rsa, + NULL }; struct key_funcs * gnutls_lib_init( DWORD reason ) diff --git a/dlls/bcrypt/macos.c b/dlls/bcrypt/macos.c -index 8df5ca8645f..e44436a73fb 100644 +index 55dca5dde34..fd7aeae9ec2 100644 --- a/dlls/bcrypt/macos.c +++ b/dlls/bcrypt/macos.c -@@ -284,7 +284,8 @@ static const struct key_funcs key_funcs = - key_export_dsa_capi, +@@ -291,7 +291,8 @@ static const struct key_funcs key_funcs = key_export_ecc, key_import_dsa_capi, -- key_import_ecc -+ key_import_ecc, + key_import_ecc, +- key_import_rsa ++ key_import_rsa, + NULL }; struct key_funcs * macos_lib_init( DWORD reason ) diff --git a/dlls/bcrypt/tests/bcrypt.c b/dlls/bcrypt/tests/bcrypt.c -index 0ae4b5dad53..559f49ec78c 100644 +index 456727d04a9..6be406dee21 100644 --- a/dlls/bcrypt/tests/bcrypt.c +++ b/dlls/bcrypt/tests/bcrypt.c -@@ -2102,7 +2102,7 @@ static void test_ECDH(void) +@@ -2163,7 +2163,7 @@ static void test_ECDH(void) goto raw_secret_end; } @@ -520,7 +520,7 @@ index 0ae4b5dad53..559f49ec78c 100644 if (status != STATUS_SUCCESS) { diff --git a/dlls/bcrypt/unixlib.c b/dlls/bcrypt/unixlib.c -index c122df63f0b..fabb0ea40aa 100644 +index a158ec1630a..a01e2ad02ed 100644 --- a/dlls/bcrypt/unixlib.c +++ b/dlls/bcrypt/unixlib.c @@ -129,6 +129,12 @@ static void CDECL key_asymmetric_destroy( struct key *key ) @@ -564,7 +564,7 @@ index c122df63f0b..fabb0ea40aa 100644 RESOLVE_FUNC(set_property) RESOLVE_FUNC(symmetric_init) -@@ -181,6 +191,7 @@ NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *p +@@ -182,6 +192,7 @@ NTSTATUS CDECL __wine_init_unix_lib( HMODULE module, DWORD reason, const void *p RESOLVE_FUNC(export_ecc) RESOLVE_FUNC(import_dsa_capi) RESOLVE_FUNC(import_ecc) @@ -573,5 +573,5 @@ index c122df63f0b..fabb0ea40aa 100644 #undef RESOLVE_FUNC -- -2.28.0 +2.29.2 diff --git a/patches/mfplat-streaming-support/0001-winegstreamer-Implement-SetInputType-for-audio-conve.patch b/patches/mfplat-streaming-support/0001-winegstreamer-Implement-SetInputType-for-audio-conve.patch new file mode 100644 index 00000000..faacbb3b --- /dev/null +++ b/patches/mfplat-streaming-support/0001-winegstreamer-Implement-SetInputType-for-audio-conve.patch @@ -0,0 +1,131 @@ +From 600fb937ace942db4325c268d71f799f7c058286 Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Wed, 18 Nov 2020 13:48:23 -0600 +Subject: [PATCH] winegstreamer: Implement ::SetInputType for audio conversion + transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/audioconvert.c | 77 ++++++++++++++++++++++++++++++- + 1 file changed, 75 insertions(+), 2 deletions(-) + +diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c +index 9499920347f..8bfd28b1ef2 100644 +--- a/dlls/winegstreamer/audioconvert.c ++++ b/dlls/winegstreamer/audioconvert.c +@@ -18,6 +18,7 @@ + */ + + #include "config.h" ++#include + + #include "gst_private.h" + +@@ -36,6 +37,8 @@ struct audio_converter + { + IMFTransform IMFTransform_iface; + LONG refcount; ++ IMFMediaType *input_type; ++ CRITICAL_SECTION cs; + }; + + static struct audio_converter *impl_audio_converter_from_IMFTransform(IMFTransform *iface) +@@ -79,6 +82,8 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface) + + if (!refcount) + { ++ transform->cs.DebugInfo->Spare[0] = 0; ++ DeleteCriticalSection(&transform->cs); + heap_free(transform); + } + +@@ -270,9 +275,74 @@ fail: + + static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) + { +- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ GstCaps *input_caps; ++ HRESULT hr; + +- return E_NOTIMPL; ++ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); ++ ++ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (type) ++ { ++ GUID major_type, subtype; ++ DWORD unused; ++ ++ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type))) ++ return MF_E_INVALIDTYPE; ++ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) ++ return MF_E_INVALIDTYPE; ++ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused))) ++ return MF_E_INVALIDTYPE; ++ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused))) ++ return MF_E_INVALIDTYPE; ++ if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused))) ++ return MF_E_INVALIDTYPE; ++ ++ if (!(IsEqualGUID(&major_type, &MFMediaType_Audio))) ++ return MF_E_INVALIDTYPE; ++ ++ if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float)) ++ return MF_E_INVALIDTYPE; ++ ++ if (!(input_caps = caps_from_mf_media_type(type))) ++ return MF_E_INVALIDTYPE; ++ ++ gst_caps_unref(input_caps); ++ } ++ ++ if (flags & MFT_SET_TYPE_TEST_ONLY) ++ return S_OK; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ hr = S_OK; ++ ++ if (type) ++ { ++ if (!converter->input_type) ++ hr = MFCreateMediaType(&converter->input_type); ++ ++ if (SUCCEEDED(hr)) ++ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type); ++ ++ if (FAILED(hr)) ++ { ++ IMFMediaType_Release(converter->input_type); ++ converter->input_type = NULL; ++ } ++ } ++ else if (converter->input_type) ++ { ++ IMFMediaType_Release(converter->input_type); ++ converter->input_type = NULL; ++ } ++ ++ LeaveCriticalSection(&converter->cs); ++ ++ return hr; + } + + static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) +@@ -395,6 +465,9 @@ HRESULT audio_converter_create(REFIID riid, void **ret) + object->IMFTransform_iface.lpVtbl = &audio_converter_vtbl; + object->refcount = 1; + ++ InitializeCriticalSection(&object->cs); ++ object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock"); ++ + *ret = &object->IMFTransform_iface; + return S_OK; + } +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0002-winegstreamer-Implement-SetOutputType-for-audio-conv.patch b/patches/mfplat-streaming-support/0002-winegstreamer-Implement-SetOutputType-for-audio-conv.patch new file mode 100644 index 00000000..bbfd9298 --- /dev/null +++ b/patches/mfplat-streaming-support/0002-winegstreamer-Implement-SetOutputType-for-audio-conv.patch @@ -0,0 +1,106 @@ +From 661099668f972a9bb0a9194c2691ab034e1ebe9e Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Wed, 2 Dec 2020 14:36:17 -0500 +Subject: [PATCH] winegstreamer: Implement ::SetOutputType for audio conversion + transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/audioconvert.c | 73 ++++++++++++++++++++++++++++++- + 1 file changed, 71 insertions(+), 2 deletions(-) + +diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c +index 8bfd28b1ef2..7fb0dee99f6 100644 +--- a/dlls/winegstreamer/audioconvert.c ++++ b/dlls/winegstreamer/audioconvert.c +@@ -38,6 +38,7 @@ struct audio_converter + IMFTransform IMFTransform_iface; + LONG refcount; + IMFMediaType *input_type; ++ IMFMediaType *output_type; + CRITICAL_SECTION cs; + }; + +@@ -347,9 +348,77 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id + + static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) + { +- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); ++ GUID major_type, subtype; ++ GstCaps *output_caps; ++ DWORD unused; ++ HRESULT hr; + +- return E_NOTIMPL; ++ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (!converter->input_type) ++ return MF_E_TRANSFORM_TYPE_NOT_SET; ++ ++ if (type) ++ { ++ /* validate the type */ ++ ++ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type))) ++ return MF_E_INVALIDTYPE; ++ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) ++ return MF_E_INVALIDTYPE; ++ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused))) ++ return MF_E_INVALIDTYPE; ++ if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused))) ++ return MF_E_INVALIDTYPE; ++ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused))) ++ return MF_E_INVALIDTYPE; ++ ++ if (!(IsEqualGUID(&major_type, &MFMediaType_Audio))) ++ return MF_E_INVALIDTYPE; ++ ++ if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float)) ++ return MF_E_INVALIDTYPE; ++ ++ if (!(output_caps = caps_from_mf_media_type(type))) ++ return MF_E_INVALIDTYPE; ++ ++ gst_caps_unref(output_caps); ++ } ++ ++ if (flags & MFT_SET_TYPE_TEST_ONLY) ++ return S_OK; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ hr = S_OK; ++ ++ if (type) ++ { ++ if (!converter->output_type) ++ hr = MFCreateMediaType(&converter->output_type); ++ ++ if (SUCCEEDED(hr)) ++ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type); ++ ++ if (FAILED(hr)) ++ { ++ IMFMediaType_Release(converter->output_type); ++ converter->output_type = NULL; ++ } ++ } ++ else if (converter->output_type) ++ { ++ IMFMediaType_Release(converter->output_type); ++ converter->output_type = NULL; ++ } ++ ++ LeaveCriticalSection(&converter->cs); ++ ++ return hr; + } + + static HRESULT WINAPI audio_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0007-winegstreamer-Implement-Process-Input-Output-for-aud.patch b/patches/mfplat-streaming-support/0003-winegstreamer-Implement-Process-Input-Output-for-aud.patch similarity index 52% rename from patches/mfplat-streaming-support/0007-winegstreamer-Implement-Process-Input-Output-for-aud.patch rename to patches/mfplat-streaming-support/0003-winegstreamer-Implement-Process-Input-Output-for-aud.patch index 6c1a77cd..087cabca 100644 --- a/patches/mfplat-streaming-support/0007-winegstreamer-Implement-Process-Input-Output-for-aud.patch +++ b/patches/mfplat-streaming-support/0003-winegstreamer-Implement-Process-Input-Output-for-aud.patch @@ -1,4 +1,4 @@ -From db7e26f933c7f275c13c3c9d42066b9524cc703c Mon Sep 17 00:00:00 2001 +From 0c493f7590ba2d7b90cf44c389378aacae8f6fe0 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 18 Nov 2020 14:31:00 -0600 Subject: [PATCH] winegstreamer: Implement ::Process(Input/Output) for audio @@ -6,107 +6,119 @@ Subject: [PATCH] winegstreamer: Implement ::Process(Input/Output) for audio Signed-off-by: Derek Lesho --- - dlls/winegstreamer/audioconvert.c | 202 +++++++++++++++++++++++++++++- + dlls/winegstreamer/audioconvert.c | 175 +++++++++++++++++++++++++++++- dlls/winegstreamer/gst_private.h | 1 + - dlls/winegstreamer/mfplat.c | 75 +++++++++++ - 3 files changed, 273 insertions(+), 5 deletions(-) + dlls/winegstreamer/mfplat.c | 69 ++++++++++++ + 3 files changed, 239 insertions(+), 6 deletions(-) diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c -index 04227d168ae..deb5ceb2f7c 100644 +index 7fb0dee99f6..631c57d6d55 100644 --- a/dlls/winegstreamer/audioconvert.c +++ b/dlls/winegstreamer/audioconvert.c -@@ -24,7 +24,8 @@ struct audio_converter +@@ -40,6 +40,8 @@ struct audio_converter IMFMediaType *input_type; IMFMediaType *output_type; CRITICAL_SECTION cs; -- BOOL valid_state; -+ BOOL valid_state, inflight; ++ BOOL inflight; + GstElement *container, *appsrc, *audioconvert, *resampler, *appsink; }; static struct audio_converter *impl_audio_converter_from_IMFTransform(IMFTransform *iface) -@@ -69,6 +70,7 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface) - if (!refcount) +@@ -85,6 +87,7 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface) { + transform->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&transform->cs); + gst_object_unref(transform->container); heap_free(transform); } -@@ -261,22 +263,54 @@ static HRESULT WINAPI audio_converter_GetOutputAvailableType(IMFTransform *iface - static void audio_converter_update_pipeline_state(struct audio_converter *converter) - { - GstCaps *input_caps, *output_caps; -+ GstStructure *input_structure, *output_structure; -+ guint64 channels_in, channels_out, channel_mask = 0; +@@ -311,7 +314,8 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id + if (!(input_caps = caps_from_mf_media_type(type))) + return MF_E_INVALIDTYPE; - if (!(converter->valid_state = converter->input_type && converter->output_type)) -+ { -+ gst_element_set_state(converter->container, GST_STATE_READY); - return; -+ } - - if (!(input_caps = caps_from_mf_media_type(converter->input_type))) - { - converter->valid_state = FALSE; -+ gst_element_set_state(converter->container, GST_STATE_READY); - return; +- gst_caps_unref(input_caps); ++ if (flags & MFT_SET_TYPE_TEST_ONLY) ++ gst_caps_unref(input_caps); } - if (!(output_caps = caps_from_mf_media_type(converter->output_type))) + + if (flags & MFT_SET_TYPE_TEST_ONLY) +@@ -320,6 +324,7 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id + EnterCriticalSection(&converter->cs); + + hr = S_OK; ++ gst_element_set_state(converter->container, GST_STATE_READY); + + if (type) { - converter->valid_state = FALSE; -+ gst_element_set_state(converter->container, GST_STATE_READY); +@@ -329,6 +334,9 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id + if (SUCCEEDED(hr)) + hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type); + ++ g_object_set(converter->appsrc, "caps", input_caps, NULL); + gst_caps_unref(input_caps); -+ return; -+ } + -+ /* audioconvert needs a valid channel-mask */ -+ input_structure = gst_caps_get_structure(input_caps, 0); -+ output_structure = gst_caps_get_structure(output_caps, 0); -+ -+ if (!gst_structure_get(input_structure, "channels", G_TYPE_INT, &channels_in, NULL) || -+ !gst_structure_get(output_structure, "channels", G_TYPE_INT, &channels_out, NULL)) -+ { -+ converter->valid_state = FALSE; -+ gst_element_set_state(converter->container, GST_STATE_READY); - gst_caps_unref(input_caps); -+ gst_caps_unref(output_caps); - return; + if (FAILED(hr)) + { + IMFMediaType_Release(converter->input_type); +@@ -341,6 +349,9 @@ static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id + converter->input_type = NULL; } -+ gst_structure_get(input_structure, "channel-mask", GST_TYPE_BITMASK, &channel_mask, NULL); -+ if (channel_mask == 0) -+ gst_caps_set_simple(input_caps, "channel-mask", GST_TYPE_BITMASK, (guint64) (1 << channels_in) - 1, NULL); ++ if (converter->input_type && converter->output_type) ++ gst_element_set_state(converter->container, GST_STATE_PLAYING); + -+ gst_structure_get(output_structure, "channel-mask", GST_TYPE_BITMASK, &channel_mask, NULL); -+ if (channel_mask == 0) -+ gst_caps_set_simple(output_caps, "channel-mask", GST_TYPE_BITMASK, (guint64) (1 << channels_out) - 1, NULL); -+ -+ g_object_set(converter->appsrc, "caps", input_caps, NULL); -+ g_object_set(converter->appsink, "caps", output_caps, NULL); -+ - if (TRACE_ON(mfplat)) + LeaveCriticalSection(&converter->cs); + + return hr; +@@ -386,7 +397,8 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i + if (!(output_caps = caps_from_mf_media_type(type))) + return MF_E_INVALIDTYPE; + +- gst_caps_unref(output_caps); ++ if (flags & MFT_SET_TYPE_TEST_ONLY) ++ gst_caps_unref(output_caps); + } + + if (flags & MFT_SET_TYPE_TEST_ONLY) +@@ -395,6 +407,7 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i + EnterCriticalSection(&converter->cs); + + hr = S_OK; ++ gst_element_set_state(converter->container, GST_STATE_READY); + + if (type) { - gchar *input_caps_str, *output_caps_str; -@@ -293,6 +327,7 @@ static void audio_converter_update_pipeline_state(struct audio_converter *conver +@@ -404,6 +417,9 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i + if (SUCCEEDED(hr)) + hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type); - gst_caps_unref(input_caps); - gst_caps_unref(output_caps); -+ gst_element_set_state(converter->container, GST_STATE_PLAYING); ++ g_object_set(converter->appsink, "caps", output_caps, NULL); ++ gst_caps_unref(output_caps); ++ + if (FAILED(hr)) + { + IMFMediaType_Release(converter->output_type); +@@ -416,6 +432,9 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i + converter->output_type = NULL; + } - return; - } -@@ -496,17 +531,114 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME ++ if (converter->input_type && converter->output_type) ++ gst_element_set_state(converter->container, GST_STATE_PLAYING); ++ + LeaveCriticalSection(&converter->cs); + + return hr; +@@ -479,17 +498,102 @@ static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_ME static HRESULT WINAPI audio_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags) { - FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags); -+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); + GstBuffer *gst_buffer; -+ HRESULT hr = S_OK; + int ret; - return E_NOTIMPL; ++ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); ++ + TRACE("%p, %u, %p, %#x.\n", iface, id, sample, flags); + + if (flags) @@ -117,183 +129,163 @@ index 04227d168ae..deb5ceb2f7c 100644 + + EnterCriticalSection(&converter->cs); + -+ if (!converter->valid_state) ++ if (!converter->input_type || !converter->output_type) + { -+ hr = MF_E_TRANSFORM_TYPE_NOT_SET; -+ goto done; ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_TRANSFORM_TYPE_NOT_SET; + } + + if (converter->inflight) + { -+ hr = MF_E_NOTACCEPTING; -+ goto done; ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_NOTACCEPTING; + } + + if (!(gst_buffer = gst_buffer_from_mf_sample(sample))) + { -+ hr = E_FAIL; -+ goto done; ++ LeaveCriticalSection(&converter->cs); ++ return E_FAIL; + } + + g_signal_emit_by_name(converter->appsrc, "push-buffer", gst_buffer, &ret); + gst_buffer_unref(gst_buffer); + if (ret != GST_FLOW_OK) + { -+ ERR("Couldn't push buffer ret = %d\n", ret); -+ hr = E_FAIL; -+ goto done; ++ ERR("Couldn't push buffer ret = %d (%s)\n", ret, gst_flow_get_name(ret)); ++ LeaveCriticalSection(&converter->cs); ++ return E_FAIL; + } + + converter->inflight = TRUE; -+ -+ done: + LeaveCriticalSection(&converter->cs); + -+ return hr; ++ return S_OK; } static HRESULT WINAPI audio_converter_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count, MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status) { - FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status); -+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); -+ MFT_OUTPUT_DATA_BUFFER *relevant_buffer = NULL; + GstSample *sample; -+ HRESULT hr = S_OK; -+ unsigned int i; - return E_NOTIMPL; ++ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); ++ + TRACE("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status); + + if (flags) + WARN("Unsupported flags %#x\n", flags); + -+ for (i = 0; i < count; i++) -+ { -+ MFT_OUTPUT_DATA_BUFFER *out_buffer = &samples[i]; -+ -+ if (out_buffer->dwStreamID != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (relevant_buffer) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ relevant_buffer = out_buffer; -+ } -+ -+ if (!relevant_buffer) ++ if (!count) + return S_OK; + ++ if (count != 1) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (samples[0].dwStreamID != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ + EnterCriticalSection(&converter->cs); + -+ if (!converter->valid_state) ++ if (!converter->input_type || !converter->output_type) + { -+ hr = MF_E_TRANSFORM_TYPE_NOT_SET; -+ goto done; ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_TRANSFORM_TYPE_NOT_SET; + } + + if (!converter->inflight) + { -+ hr = MF_E_TRANSFORM_NEED_MORE_INPUT; -+ goto done; ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_TRANSFORM_NEED_MORE_INPUT; + } + + g_signal_emit_by_name(converter->appsink, "pull-sample", &sample); + + converter->inflight = FALSE; + -+ relevant_buffer->pSample = mf_sample_from_gst_buffer(gst_sample_get_buffer(sample)); ++ samples[0].pSample = mf_sample_from_gst_buffer(gst_sample_get_buffer(sample)); + gst_sample_unref(sample); -+ relevant_buffer->dwStatus = S_OK; -+ relevant_buffer->pEvents = NULL; ++ samples[0].dwStatus = S_OK; ++ samples[0].pEvents = NULL; + *status = 0; + -+ done: + LeaveCriticalSection(&converter->cs); + -+ return hr; ++ return S_OK; } static const IMFTransformVtbl audio_converter_vtbl = -@@ -542,6 +674,7 @@ static const IMFTransformVtbl audio_converter_vtbl = - HRESULT audio_converter_create(REFIID riid, void **ret) - { - struct audio_converter *object; -+ HRESULT hr; - - TRACE("%s %p\n", debugstr_guid(riid), ret); - -@@ -553,6 +686,65 @@ HRESULT audio_converter_create(REFIID riid, void **ret) - +@@ -537,6 +641,65 @@ HRESULT audio_converter_create(REFIID riid, void **ret) InitializeCriticalSection(&object->cs); + object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock"); + object->container = gst_bin_new(NULL); + + if (!(object->appsrc = gst_element_factory_make("appsrc", NULL))) + { -+ ERR("Failed to create appsrc"); -+ hr = E_FAIL; -+ goto failed; ++ ERR("Failed to create appsrc, are %u-bit Gstreamer \"base\" plugins installed?\n", ++ 8 * (int)sizeof(void *)); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; + } + gst_bin_add(GST_BIN(object->container), object->appsrc); + + if (!(object->audioconvert = gst_element_factory_make("audioconvert", NULL))) + { -+ ERR("Failed to create converter\n"); -+ hr = E_FAIL; -+ goto failed; ++ ERR("Failed to create audioconvert, are %u-bit Gstreamer \"base\" plugins installed?\n", ++ 8 * (int)sizeof(void *)); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; + } + gst_bin_add(GST_BIN(object->container), object->audioconvert); + + if (!(object->resampler = gst_element_factory_make("audioresample", NULL))) + { -+ ERR("Failed to create resampler\n"); -+ hr = E_FAIL; -+ goto failed; ++ ERR("Failed to create audioresample, are %u-bit Gstreamer \"base\" plugins installed?\n", ++ 8 * (int)sizeof(void *)); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; + } + gst_bin_add(GST_BIN(object->container), object->resampler); + + if (!(object->appsink = gst_element_factory_make("appsink", NULL))) + { -+ ERR("Failed to create appsink\n"); -+ hr = E_FAIL; -+ goto failed; ++ ERR("Failed to create appsink, are %u-bit Gstreamer \"base\" plugins installed?\n", ++ 8 * (int)sizeof(void *)); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; + } + gst_bin_add(GST_BIN(object->container), object->appsink); + -+ if (!(gst_element_link(object->appsrc, object->audioconvert))) ++ if (!gst_element_link(object->appsrc, object->audioconvert)) + { + ERR("Failed to link appsrc to audioconvert\n"); -+ hr = E_FAIL; -+ goto failed; ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; + } + -+ if (!(gst_element_link(object->audioconvert, object->resampler))) ++ if (!gst_element_link(object->audioconvert, object->resampler)) + { + ERR("Failed to link audioconvert to resampler\n"); -+ hr = E_FAIL; -+ goto failed; ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; + } + -+ if (!(gst_element_link(object->resampler, object->appsink))) ++ if (!gst_element_link(object->resampler, object->appsink)) + { + ERR("Failed to link resampler to appsink\n"); -+ hr = E_FAIL; -+ goto failed; ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; + } + *ret = &object->IMFTransform_iface; return S_OK; -+failed: -+ -+ IMFTransform_Release(&object->IMFTransform_iface); -+ return hr; } diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 7889c996204..7f96c06dfaf 100644 +index 9518f721504..14b6a011ac2 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h -@@ -81,6 +81,7 @@ HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HI +@@ -82,6 +82,7 @@ HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HI IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) DECLSPEC_HIDDEN; GstCaps *caps_from_mf_media_type(IMFMediaType *type) DECLSPEC_HIDDEN; IMFSample *mf_sample_from_gst_buffer(GstBuffer *in) DECLSPEC_HIDDEN; @@ -302,10 +294,10 @@ index 7889c996204..7f96c06dfaf 100644 HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN; diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 909fb8b3572..7fdf722ec2e 100644 +index f300988fc5c..883084b2d89 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -877,3 +877,78 @@ done: +@@ -865,3 +865,72 @@ done: return out; } @@ -333,7 +325,7 @@ index 909fb8b3572..7fdf722ec2e 100644 + + for (i = 0; i < buffer_count; i++) + { -+ DWORD buffer_max_size, buffer_size; ++ DWORD buffer_size; + GstMapInfo map_info; + GstMemory *memory; + BYTE *buf_data; @@ -341,9 +333,6 @@ index 909fb8b3572..7fdf722ec2e 100644 + if (FAILED(hr = IMFSample_GetBufferByIndex(mf_sample, i, &mf_buffer))) + goto fail; + -+ if (FAILED(hr = IMFMediaBuffer_GetMaxLength(mf_buffer, &buffer_max_size))) -+ goto fail; -+ + if (FAILED(hr = IMFMediaBuffer_GetCurrentLength(mf_buffer, &buffer_size))) + goto fail; + @@ -364,9 +353,6 @@ index 909fb8b3572..7fdf722ec2e 100644 + if (FAILED(hr = IMFMediaBuffer_Unlock(mf_buffer))) + goto fail; + -+ if (FAILED(hr = IMFMediaBuffer_SetCurrentLength(mf_buffer, buffer_size))) -+ goto fail; -+ + gst_memory_unmap(memory, &map_info); + + gst_buffer_append_memory(out, memory); diff --git a/patches/mfplat-streaming-support/0008-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch b/patches/mfplat-streaming-support/0004-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch similarity index 63% rename from patches/mfplat-streaming-support/0008-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch rename to patches/mfplat-streaming-support/0004-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch index 601c0d6c..82449920 100644 --- a/patches/mfplat-streaming-support/0008-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch +++ b/patches/mfplat-streaming-support/0004-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch @@ -1,4 +1,4 @@ -From 0a944954888cbe4ea094a7e97c9f19db2aa358d6 Mon Sep 17 00:00:00 2001 +From 13e0d5671caaeae69bde747e547a5bd4524dd2ff Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 18 Nov 2020 14:32:27 -0600 Subject: [PATCH] winegstreamer: Implement ::Get(Input/Output)StreamInfo for @@ -6,23 +6,21 @@ Subject: [PATCH] winegstreamer: Implement ::Get(Input/Output)StreamInfo for Signed-off-by: Derek Lesho --- - dlls/winegstreamer/audioconvert.c | 29 +++++++++++++++++++++++++---- - 1 file changed, 25 insertions(+), 4 deletions(-) + dlls/winegstreamer/audioconvert.c | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c -index deb5ceb2f7c..cb7d4a15bf8 100644 +index 631c57d6d55..d204d9582ba 100644 --- a/dlls/winegstreamer/audioconvert.c +++ b/dlls/winegstreamer/audioconvert.c -@@ -106,16 +106,37 @@ static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD in +@@ -123,16 +123,31 @@ static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD in static HRESULT WINAPI audio_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) { - FIXME("%p %u %p.\n", iface, id, info); -+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); ++ TRACE("%p %u %p.\n", iface, id, info); - return E_NOTIMPL; -+ TRACE("%p %u %p\n", converter, id, info); -+ + if (id != 0) + return MF_E_INVALIDSTREAMNUMBER; + @@ -30,26 +28,22 @@ index deb5ceb2f7c..cb7d4a15bf8 100644 + info->cbMaxLookahead = 0; + info->cbAlignment = 0; + info->hnsMaxLatency = 0; ++ + return S_OK; } static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) { - FIXME("%p %u %p.\n", iface, id, info); -+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); -+ MFT_OUTPUT_STREAM_INFO stream_info = {}; ++ TRACE("%p %u %p.\n", iface, id, info); - return E_NOTIMPL; -+ TRACE("%p %u %p\n", converter, id, info); -+ + if (id != 0) + return MF_E_INVALIDSTREAMNUMBER; + -+ stream_info.dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES; -+ stream_info.cbSize = 0; -+ stream_info.cbAlignment = 0; -+ -+ *info = stream_info; ++ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES; ++ info->cbSize = 0; ++ info->cbAlignment = 0; + + return S_OK; } diff --git a/patches/mfplat-streaming-support/0009-winegstreamer-Implement-Get-Attributes-functions-for.patch b/patches/mfplat-streaming-support/0005-winegstreamer-Implement-Get-Attributes-functions-for.patch similarity index 63% rename from patches/mfplat-streaming-support/0009-winegstreamer-Implement-Get-Attributes-functions-for.patch rename to patches/mfplat-streaming-support/0005-winegstreamer-Implement-Get-Attributes-functions-for.patch index 0683c86b..8942d826 100644 --- a/patches/mfplat-streaming-support/0009-winegstreamer-Implement-Get-Attributes-functions-for.patch +++ b/patches/mfplat-streaming-support/0005-winegstreamer-Implement-Get-Attributes-functions-for.patch @@ -1,4 +1,4 @@ -From a84dafe62e44de78320b121fb45dae042e6b3099 Mon Sep 17 00:00:00 2001 +From 91a772eb1cb4ec9e86b4ab007743a99a8bd75265 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 18 Nov 2020 14:34:56 -0600 Subject: [PATCH] winegstreamer: Implement Get*Attributes functions for audio @@ -6,14 +6,14 @@ Subject: [PATCH] winegstreamer: Implement Get*Attributes functions for audio Signed-off-by: Derek Lesho --- - dlls/winegstreamer/audioconvert.c | 30 ++++++++++++++++++++++++++---- - 1 file changed, 26 insertions(+), 4 deletions(-) + dlls/winegstreamer/audioconvert.c | 37 +++++++++++++++++++++++++++---- + 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c -index cb7d4a15bf8..7d19b561dd1 100644 +index d204d9582ba..556aba44fc9 100644 --- a/dlls/winegstreamer/audioconvert.c +++ b/dlls/winegstreamer/audioconvert.c -@@ -21,6 +21,8 @@ struct audio_converter +@@ -37,6 +37,8 @@ struct audio_converter { IMFTransform IMFTransform_iface; LONG refcount; @@ -22,9 +22,9 @@ index cb7d4a15bf8..7d19b561dd1 100644 IMFMediaType *input_type; IMFMediaType *output_type; CRITICAL_SECTION cs; -@@ -70,6 +72,10 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface) - if (!refcount) +@@ -87,6 +89,10 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface) { + transform->cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&transform->cs); + if (transform->attributes) + IMFAttributes_Release(transform->attributes); @@ -33,49 +33,63 @@ index cb7d4a15bf8..7d19b561dd1 100644 gst_object_unref(transform->container); heap_free(transform); } -@@ -141,9 +147,14 @@ static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, D +@@ -152,9 +158,14 @@ static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, D static HRESULT WINAPI audio_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes) { - FIXME("%p, %p.\n", iface, attributes); -+ struct audio_converter *transform = impl_audio_converter_from_IMFTransform(iface); ++ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); - return E_NOTIMPL; + TRACE("%p, %p.\n", iface, attributes); + -+ *attributes = transform->attributes; ++ *attributes = converter->attributes; + IMFAttributes_AddRef(*attributes); + + return S_OK; } static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id, -@@ -157,9 +168,14 @@ static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *ifa +@@ -168,9 +179,14 @@ static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *ifa static HRESULT WINAPI audio_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, IMFAttributes **attributes) { - FIXME("%p, %u, %p.\n", iface, id, attributes); -+ struct audio_converter *transform = impl_audio_converter_from_IMFTransform(iface); ++ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); - return E_NOTIMPL; + TRACE("%p, %u, %p.\n", iface, id, attributes); + -+ *attributes = transform->output_attributes; ++ *attributes = converter->output_attributes; + IMFAttributes_AddRef(*attributes); + + return S_OK; } static HRESULT WINAPI audio_converter_DeleteInputStream(IMFTransform *iface, DWORD id) -@@ -707,6 +723,12 @@ HRESULT audio_converter_create(REFIID riid, void **ret) +@@ -644,6 +660,7 @@ static const IMFTransformVtbl audio_converter_vtbl = + HRESULT audio_converter_create(REFIID riid, void **ret) + { + struct audio_converter *object; ++ HRESULT hr; + TRACE("%s %p\n", debugstr_guid(riid), ret); + +@@ -656,6 +673,18 @@ HRESULT audio_converter_create(REFIID riid, void **ret) InitializeCriticalSection(&object->cs); + object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": audio_converter_lock"); + if (FAILED(hr = MFCreateAttributes(&object->attributes, 0))) -+ goto failed; ++ { ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return hr; ++ } + + if (FAILED(hr = MFCreateAttributes(&object->output_attributes, 0))) -+ goto failed; ++ { ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return hr; ++ } + object->container = gst_bin_new(NULL); diff --git a/patches/mfplat-streaming-support/0005-winegstreamer-Introduce-audio-conversion-transform.patch b/patches/mfplat-streaming-support/0005-winegstreamer-Introduce-audio-conversion-transform.patch deleted file mode 100644 index 13d00ab5..00000000 --- a/patches/mfplat-streaming-support/0005-winegstreamer-Introduce-audio-conversion-transform.patch +++ /dev/null @@ -1,543 +0,0 @@ -From fa85a328dc4d091777bdc3f8d388c6e70fbd6ed3 Mon Sep 17 00:00:00 2001 -From: Derek Lesho -Date: Wed, 18 Nov 2020 11:26:29 -0600 -Subject: [PATCH] winegstreamer: Introduce audio conversion transform. - -Serves as a wrapper of audioconvert, and roughly fills the roll of Windows' CLSID_CResamplerMediaObject to convert audio to the format accepted by the streaming audio renderer. - -Signed-off-by: Derek Lesho ---- - dlls/winegstreamer/Makefile.in | 1 + - dlls/winegstreamer/audioconvert.c | 378 +++++++++++++++++++ - dlls/winegstreamer/gst_private.h | 2 + - dlls/winegstreamer/mfplat.c | 77 ++++ - dlls/winegstreamer/winegstreamer_classes.idl | 6 + - 5 files changed, 464 insertions(+) - create mode 100644 dlls/winegstreamer/audioconvert.c - -diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in -index e578d194f7f..0b3229160b9 100644 ---- a/dlls/winegstreamer/Makefile.in -+++ b/dlls/winegstreamer/Makefile.in -@@ -6,6 +6,7 @@ EXTRALIBS = $(GSTREAMER_LIBS) $(PTHREAD_LIBS) - PARENTSRC = ../strmbase - - C_SRCS = \ -+ audioconvert.c \ - filter.c \ - gst_cbs.c \ - gstdemux.c \ -diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c -new file mode 100644 -index 00000000000..91fa556cb88 ---- /dev/null -+++ b/dlls/winegstreamer/audioconvert.c -@@ -0,0 +1,378 @@ -+#include "config.h" -+ -+#include "gst_private.h" -+ -+#include "mfapi.h" -+#include "mferror.h" -+#include "mfidl.h" -+ -+#include "wine/debug.h" -+#include "wine/heap.h" -+ -+WINE_DEFAULT_DEBUG_CHANNEL(mfplat); -+ -+static const GUID *raw_types[] = { -+ &MFAudioFormat_PCM, -+ &MFAudioFormat_Float, -+}; -+ -+struct audio_converter -+{ -+ IMFTransform IMFTransform_iface; -+ LONG refcount; -+}; -+ -+static struct audio_converter *impl_audio_converter_from_IMFTransform(IMFTransform *iface) -+{ -+ return CONTAINING_RECORD(iface, struct audio_converter, IMFTransform_iface); -+} -+ -+static HRESULT WINAPI audio_converter_QueryInterface(IMFTransform *iface, REFIID riid, void **obj) -+{ -+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj); -+ -+ if (IsEqualIID(riid, &IID_IMFTransform) || -+ IsEqualIID(riid, &IID_IUnknown)) -+ { -+ *obj = iface; -+ IMFTransform_AddRef(iface); -+ return S_OK; -+ } -+ -+ WARN("Unsupported %s.\n", debugstr_guid(riid)); -+ *obj = NULL; -+ return E_NOINTERFACE; -+} -+ -+static ULONG WINAPI audio_converter_AddRef(IMFTransform *iface) -+{ -+ struct audio_converter *transform = impl_audio_converter_from_IMFTransform(iface); -+ ULONG refcount = InterlockedIncrement(&transform->refcount); -+ -+ TRACE("%p, refcount %u.\n", iface, refcount); -+ -+ return refcount; -+} -+ -+static ULONG WINAPI audio_converter_Release(IMFTransform *iface) -+{ -+ struct audio_converter *transform = impl_audio_converter_from_IMFTransform(iface); -+ ULONG refcount = InterlockedDecrement(&transform->refcount); -+ -+ TRACE("%p, refcount %u.\n", iface, refcount); -+ -+ if (!refcount) -+ { -+ heap_free(transform); -+ } -+ -+ return refcount; -+} -+ -+static HRESULT WINAPI audio_converter_GetStreamLimits(IMFTransform *iface, DWORD *input_minimum, DWORD *input_maximum, -+ DWORD *output_minimum, DWORD *output_maximum) -+{ -+ TRACE("%p, %p, %p, %p, %p.\n", iface, input_minimum, input_maximum, output_minimum, output_maximum); -+ -+ *input_minimum = *input_maximum = *output_minimum = *output_maximum = 1; -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI audio_converter_GetStreamCount(IMFTransform *iface, DWORD *inputs, DWORD *outputs) -+{ -+ TRACE("%p, %p, %p.\n", iface, inputs, outputs); -+ -+ *inputs = *outputs = 1; -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI audio_converter_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs, -+ DWORD output_size, DWORD *outputs) -+{ -+ TRACE("%p %u %p %u %p.\n", iface, input_size, inputs, output_size, outputs); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) -+{ -+ FIXME("%p %u %p.\n", iface, id, info); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) -+{ -+ FIXME("%p %u %p.\n", iface, id, info); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes) -+{ -+ FIXME("%p, %p.\n", iface, attributes); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id, -+ IMFAttributes **attributes) -+{ -+ FIXME("%p, %u, %p.\n", iface, id, attributes); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, -+ IMFAttributes **attributes) -+{ -+ FIXME("%p, %u, %p.\n", iface, id, attributes); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_DeleteInputStream(IMFTransform *iface, DWORD id) -+{ -+ TRACE("%p, %u.\n", iface, id); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids) -+{ -+ TRACE("%p, %u, %p.\n", iface, streams, ids); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index, -+ IMFMediaType **type) -+{ -+ IMFMediaType *ret; -+ HRESULT hr; -+ -+ TRACE("%p, %u, %u, %p.\n", iface, id, index, type); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (index >= ARRAY_SIZE(raw_types)) -+ return MF_E_NO_MORE_TYPES; -+ -+ if (FAILED(hr = MFCreateMediaType(&ret))) -+ return hr; -+ -+ if (FAILED(hr = IMFMediaType_SetGUID(ret, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio))) -+ { -+ IMFMediaType_Release(ret); -+ return hr; -+ } -+ -+ if (FAILED(hr = IMFMediaType_SetGUID(ret, &MF_MT_SUBTYPE, raw_types[index]))) -+ { -+ IMFMediaType_Release(ret); -+ return hr; -+ } -+ -+ *type = ret; -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI audio_converter_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index, -+ IMFMediaType **type) -+{ -+ IMFMediaType *output_type; -+ HRESULT hr; -+ -+ static const DWORD rates[] = {44100, 48000}; -+ static const DWORD channel_cnts[] = {1, 2, 6}; -+ static const DWORD sizes[] = {16, 24, 32}; -+ const GUID *subtype; -+ DWORD rate, channels, bps; -+ -+ TRACE("%p, %u, %u, %p.\n", iface, id, index, type); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (index >= (2/*rates*/ * 3/*layouts*/ * 3/*bps PCM*/) + (2 * 3)) -+ return MF_E_NO_MORE_TYPES; -+ -+ if (FAILED(hr = MFCreateMediaType(&output_type))) -+ return hr; -+ -+ if (index < 2 * 3 * 3) -+ { -+ subtype = &MFAudioFormat_PCM; -+ rate = rates[index % 2]; -+ channels = channel_cnts[(index / 2) % 3]; -+ bps = sizes[(index / (2*3)) % 3]; -+ } -+ else -+ { -+ index -= (2 * 3 * 3); -+ subtype = &MFAudioFormat_Float; -+ bps = 32; -+ rate = rates[index % 2]; -+ channels = channel_cnts[(index / 2) % 3]; -+ } -+ -+ -+ if (FAILED(hr = IMFMediaType_SetGUID(output_type, &MF_MT_MAJOR_TYPE, &MFMediaType_Audio))) -+ goto fail; -+ if (FAILED(hr = IMFMediaType_SetGUID(output_type, &MF_MT_SUBTYPE, subtype))) -+ goto fail; -+ if (FAILED(hr = IMFMediaType_SetUINT32(output_type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, rate))) -+ goto fail; -+ if (FAILED(hr = IMFMediaType_SetUINT32(output_type, &MF_MT_AUDIO_NUM_CHANNELS, channels))) -+ goto fail; -+ if (FAILED(hr = IMFMediaType_SetUINT32(output_type, &MF_MT_AUDIO_BITS_PER_SAMPLE, bps))) -+ goto fail; -+ -+ if (FAILED(hr = IMFMediaType_SetUINT32(output_type, &MF_MT_AUDIO_BLOCK_ALIGNMENT, channels * bps / 8))) -+ goto fail; -+ if (FAILED(hr = IMFMediaType_SetUINT32(output_type, &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, rate * channels * bps / 8))) -+ goto fail; -+ if (FAILED(hr = IMFMediaType_SetUINT32(output_type, &MF_MT_AUDIO_CHANNEL_MASK, -+ channels == 1 ? SPEAKER_FRONT_CENTER : -+ channels == 2 ? SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT : -+ /*channels == 6*/ 0x3F))) -+ goto fail; -+ if (FAILED(hr = IMFMediaType_SetUINT32(output_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE))) -+ goto fail; -+ -+ *type = output_type; -+ -+ return S_OK; -+ fail: -+ IMFMediaType_Release(output_type); -+ return hr; -+} -+ -+static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) -+{ -+ FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) -+{ -+ FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) -+{ -+ FIXME("%p, %u, %p.\n", iface, id, type); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) -+{ -+ FIXME("%p, %u, %p.\n", iface, id, type); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags) -+{ -+ FIXME("%p, %u, %p.\n", iface, id, flags); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_GetOutputStatus(IMFTransform *iface, DWORD *flags) -+{ -+ FIXME("%p, %p.\n", iface, flags); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper) -+{ -+ FIXME("%p, %s, %s.\n", iface, wine_dbgstr_longlong(lower), wine_dbgstr_longlong(upper)); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event) -+{ -+ TRACE("%p, %u, %p.\n", iface, id, event); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param) -+{ -+ FIXME("%p, %u.\n", iface, message); -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI audio_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags) -+{ -+ FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI audio_converter_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count, -+ MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status) -+{ -+ FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status); -+ -+ return E_NOTIMPL; -+} -+ -+static const IMFTransformVtbl audio_converter_vtbl = -+{ -+ audio_converter_QueryInterface, -+ audio_converter_AddRef, -+ audio_converter_Release, -+ audio_converter_GetStreamLimits, -+ audio_converter_GetStreamCount, -+ audio_converter_GetStreamIDs, -+ audio_converter_GetInputStreamInfo, -+ audio_converter_GetOutputStreamInfo, -+ audio_converter_GetAttributes, -+ audio_converter_GetInputStreamAttributes, -+ audio_converter_GetOutputStreamAttributes, -+ audio_converter_DeleteInputStream, -+ audio_converter_AddInputStreams, -+ audio_converter_GetInputAvailableType, -+ audio_converter_GetOutputAvailableType, -+ audio_converter_SetInputType, -+ audio_converter_SetOutputType, -+ audio_converter_GetInputCurrentType, -+ audio_converter_GetOutputCurrentType, -+ audio_converter_GetInputStatus, -+ audio_converter_GetOutputStatus, -+ audio_converter_SetOutputBounds, -+ audio_converter_ProcessEvent, -+ audio_converter_ProcessMessage, -+ audio_converter_ProcessInput, -+ audio_converter_ProcessOutput, -+}; -+ -+HRESULT audio_converter_create(REFIID riid, void **ret) -+{ -+ struct audio_converter *object; -+ HRESULT hr; -+ -+ TRACE("%s %p\n", debugstr_guid(riid), ret); -+ -+ if (!(object = heap_alloc_zero(sizeof(*object)))) -+ return E_OUTOFMEMORY; -+ -+ object->IMFTransform_iface.lpVtbl = &audio_converter_vtbl; -+ object->refcount = 1; -+ -+ *ret = &object->IMFTransform_iface; -+ return S_OK; -+} -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 28e424439d8..7889c996204 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -84,4 +84,6 @@ IMFSample *mf_sample_from_gst_buffer(GstBuffer *in) DECLSPEC_HIDDEN; - - HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN; - -+HRESULT audio_converter_create(REFIID riid, void **ret) DECLSPEC_HIDDEN; -+ - #endif /* __GST_PRIVATE_INCLUDED__ */ -diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 3d224a5accc..909fb8b3572 100644 ---- a/dlls/winegstreamer/mfplat.c -+++ b/dlls/winegstreamer/mfplat.c -@@ -405,6 +405,8 @@ failed: - - static const GUID CLSID_GStreamerByteStreamHandler = {0x317df618, 0x5e5a, 0x468a, {0x9f, 0x15, 0xd8, 0x27, 0xa9, 0xa0, 0x81, 0x62}}; - -+static GUID CLSID_WINEAudioConverter = {0x6a170414,0xaad9,0x4693,{0xb8,0x06,0x3a,0x0c,0x47,0xc5,0x70,0xd6}}; -+ - static const struct class_object - { - const GUID *clsid; -@@ -414,6 +416,7 @@ class_objects[] = - { - { &CLSID_VideoProcessorMFT, &video_processor_create }, - { &CLSID_GStreamerByteStreamHandler, &winegstreamer_stream_handler_create }, -+ { &CLSID_WINEAudioConverter, &audio_converter_create }, - }; - - HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) -@@ -442,6 +445,80 @@ HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) - return CLASS_E_CLASSNOTAVAILABLE; - } - -+static WCHAR audio_converterW[] = {'A','u','d','i','o',' ','C','o','n','v','e','r','t','e','r',0}; -+const GUID *audio_converter_supported_types[] = -+{ -+ &MFAudioFormat_PCM, -+ &MFAudioFormat_Float, -+}; -+ -+static const struct mft -+{ -+ const GUID *clsid; -+ const GUID *category; -+ LPWSTR name; -+ const UINT32 flags; -+ const GUID *major_type; -+ const UINT32 input_types_count; -+ const GUID **input_types; -+ const UINT32 output_types_count; -+ const GUID **output_types; -+ IMFAttributes *attributes; -+} -+mfts[] = -+{ -+ { -+ &CLSID_WINEAudioConverter, -+ &MFT_CATEGORY_AUDIO_EFFECT, -+ audio_converterW, -+ MFT_ENUM_FLAG_SYNCMFT, -+ &MFMediaType_Audio, -+ ARRAY_SIZE(audio_converter_supported_types), -+ audio_converter_supported_types, -+ ARRAY_SIZE(audio_converter_supported_types), -+ audio_converter_supported_types, -+ NULL -+ }, -+}; -+ -+HRESULT mfplat_DllRegisterServer(void) -+{ -+ unsigned int i, j; -+ HRESULT hr; -+ -+ for (i = 0; i < ARRAY_SIZE(mfts); i++) -+ { -+ const struct mft *cur = &mfts[i]; -+ -+ MFT_REGISTER_TYPE_INFO *input_types, *output_types; -+ input_types = heap_alloc(cur->input_types_count * sizeof(input_types[0])); -+ output_types = heap_alloc(cur->output_types_count * sizeof(output_types[0])); -+ for (j = 0; j < cur->input_types_count; j++) -+ { -+ input_types[j].guidMajorType = *(cur->major_type); -+ input_types[j].guidSubtype = *(cur->input_types[j]); -+ } -+ for (j = 0; j < cur->output_types_count; j++) -+ { -+ output_types[j].guidMajorType = *(cur->major_type); -+ output_types[j].guidSubtype = *(cur->output_types[j]); -+ } -+ -+ hr = MFTRegister(*(cur->clsid), *(cur->category), cur->name, cur->flags, cur->input_types_count, -+ input_types, cur->output_types_count, output_types, cur->attributes); -+ -+ heap_free(input_types); -+ heap_free(output_types); -+ -+ if (FAILED(hr)) -+ { -+ FIXME("Failed to register MFT, hr %#x\n", hr); -+ return hr; -+ } -+ } -+ return S_OK; -+} -+ - static const struct - { - const GUID *subtype; -diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl -index 1dc4ba9a10b..cf1fc69f38a 100644 ---- a/dlls/winegstreamer/winegstreamer_classes.idl -+++ b/dlls/winegstreamer/winegstreamer_classes.idl -@@ -61,3 +61,9 @@ coclass VideoProcessorMFT {} - uuid(317df618-5e5a-468a-9f15-d827a9a08162) - ] - coclass GStreamerByteStreamHandler {} -+ -+[ -+ threading(both), -+ uuid(6a170414-aad9-4693-b806-3a0c47c570d6) -+] -+coclass WINEAudioConverter { } --- -2.29.2 - diff --git a/patches/mfplat-streaming-support/0010-Implement-Get-Input-Output-CurrentType-functions-for.patch b/patches/mfplat-streaming-support/0006-winegstreamer-Implement-Get-Input-Output-CurrentType.patch similarity index 81% rename from patches/mfplat-streaming-support/0010-Implement-Get-Input-Output-CurrentType-functions-for.patch rename to patches/mfplat-streaming-support/0006-winegstreamer-Implement-Get-Input-Output-CurrentType.patch index 50cfd8af..44b945e6 100644 --- a/patches/mfplat-streaming-support/0010-Implement-Get-Input-Output-CurrentType-functions-for.patch +++ b/patches/mfplat-streaming-support/0006-winegstreamer-Implement-Get-Input-Output-CurrentType.patch @@ -1,19 +1,19 @@ -From e95595f362fd016cfbba18a88837660efcc75b85 Mon Sep 17 00:00:00 2001 +From 617386fb620e7751e926046f5cf785ebde436aa4 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 24 Nov 2020 15:25:48 -0500 -Subject: [PATCH] Implement Get(Input/Output)CurrentType functions for audio - converter transform. +Subject: [PATCH] winegstreamer: Implement Get(Input/Output)CurrentType + functions for audio converter transform. Signed-off-by: Derek Lesho --- - dlls/winegstreamer/audioconvert.c | 52 ++++++++++++++++++++++++++++--- - 1 file changed, 48 insertions(+), 4 deletions(-) + dlls/winegstreamer/audioconvert.c | 56 ++++++++++++++++++++++++++++--- + 1 file changed, 52 insertions(+), 4 deletions(-) diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c -index 7d19b561dd1..5e714fed638 100644 +index 556aba44fc9..e709c43ed5c 100644 --- a/dlls/winegstreamer/audioconvert.c +++ b/dlls/winegstreamer/audioconvert.c -@@ -519,16 +519,60 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i +@@ -473,16 +473,64 @@ static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD i static HRESULT WINAPI audio_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) { @@ -42,6 +42,8 @@ index 7d19b561dd1..5e714fed638 100644 + + if (SUCCEEDED(hr)) + *type = ret; ++ else ++ IMFMediaType_Release(ret); + + return hr; } @@ -73,6 +75,8 @@ index 7d19b561dd1..5e714fed638 100644 + + if (SUCCEEDED(hr)) + *type = ret; ++ else ++ IMFMediaType_Release(ret); + + return hr; } diff --git a/patches/mfplat-streaming-support/0006-winegstreamer-Implement-Set-Input-Output-Type-for-au.patch b/patches/mfplat-streaming-support/0006-winegstreamer-Implement-Set-Input-Output-Type-for-au.patch deleted file mode 100644 index 3e397a83..00000000 --- a/patches/mfplat-streaming-support/0006-winegstreamer-Implement-Set-Input-Output-Type-for-au.patch +++ /dev/null @@ -1,256 +0,0 @@ -From 83cca2566e290fa035cc3efcfafaeefc55022b67 Mon Sep 17 00:00:00 2001 -From: Derek Lesho -Date: Wed, 18 Nov 2020 13:48:23 -0600 -Subject: [PATCH] winegstreamer: Implement ::Set(Input/Output)Type for audio - conversion transform. - -Signed-off-by: Derek Lesho ---- - dlls/winegstreamer/audioconvert.c | 190 +++++++++++++++++++++++++++++- - 1 file changed, 185 insertions(+), 5 deletions(-) - -diff --git a/dlls/winegstreamer/audioconvert.c b/dlls/winegstreamer/audioconvert.c -index 91fa556cb88..04227d168ae 100644 ---- a/dlls/winegstreamer/audioconvert.c -+++ b/dlls/winegstreamer/audioconvert.c -@@ -1,4 +1,5 @@ - #include "config.h" -+#include - - #include "gst_private.h" - -@@ -20,6 +21,10 @@ struct audio_converter - { - IMFTransform IMFTransform_iface; - LONG refcount; -+ IMFMediaType *input_type; -+ IMFMediaType *output_type; -+ CRITICAL_SECTION cs; -+ BOOL valid_state; - }; - - static struct audio_converter *impl_audio_converter_from_IMFTransform(IMFTransform *iface) -@@ -63,6 +68,7 @@ static ULONG WINAPI audio_converter_Release(IMFTransform *iface) - - if (!refcount) - { -+ DeleteCriticalSection(&transform->cs); - heap_free(transform); - } - -@@ -252,18 +258,191 @@ static HRESULT WINAPI audio_converter_GetOutputAvailableType(IMFTransform *iface - return hr; - } - -+static void audio_converter_update_pipeline_state(struct audio_converter *converter) -+{ -+ GstCaps *input_caps, *output_caps; -+ -+ if (!(converter->valid_state = converter->input_type && converter->output_type)) -+ return; -+ -+ if (!(input_caps = caps_from_mf_media_type(converter->input_type))) -+ { -+ converter->valid_state = FALSE; -+ return; -+ } -+ if (!(output_caps = caps_from_mf_media_type(converter->output_type))) -+ { -+ converter->valid_state = FALSE; -+ gst_caps_unref(input_caps); -+ return; -+ } -+ -+ if (TRACE_ON(mfplat)) -+ { -+ gchar *input_caps_str, *output_caps_str; -+ -+ input_caps_str = gst_caps_to_string(input_caps); -+ output_caps_str = gst_caps_to_string(output_caps); -+ -+ TRACE("Audio converter MFT configured to transform caps %s to caps %s\n", -+ debugstr_a(input_caps_str), debugstr_a(output_caps_str)); -+ -+ g_free(input_caps_str); -+ g_free(output_caps_str); -+ } -+ -+ gst_caps_unref(input_caps); -+ gst_caps_unref(output_caps); -+ -+ return; -+} -+ - static HRESULT WINAPI audio_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) - { -- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); -+ unsigned int i; -+ HRESULT hr; - -- return E_NOTIMPL; -+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); -+ -+ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (type) -+ { -+ GUID major_type, subtype; -+ BOOL found = FALSE; -+ DWORD unused; -+ -+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused))) -+ return MF_E_INVALIDTYPE; -+ if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused))) -+ return MF_E_INVALIDTYPE; -+ -+ if (!(IsEqualGUID(&major_type, &MFMediaType_Audio))) -+ return MF_E_INVALIDTYPE; -+ -+ for (i = 0; i < ARRAY_SIZE(raw_types); i++) -+ { -+ if (IsEqualGUID(&subtype, raw_types[i])) -+ { -+ found = TRUE; -+ break; -+ } -+ } -+ -+ if (!found) -+ return MF_E_INVALIDTYPE; -+ } -+ -+ if (flags & MFT_SET_TYPE_TEST_ONLY) -+ return S_OK; -+ -+ hr = S_OK; -+ -+ EnterCriticalSection(&converter->cs); -+ -+ if (type) -+ { -+ if (!converter->input_type) -+ if (FAILED(hr = MFCreateMediaType(&converter->input_type))) -+ goto done; -+ -+ if (FAILED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type))) -+ goto done; -+ } -+ else if (converter->input_type) -+ { -+ IMFMediaType_Release(converter->input_type); -+ converter->input_type = NULL; -+ } -+ -+ done: -+ if (hr == S_OK) -+ audio_converter_update_pipeline_state(converter); -+ LeaveCriticalSection(&converter->cs); -+ -+ return S_OK; - } - - static HRESULT WINAPI audio_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) - { -- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); -+ struct audio_converter *converter = impl_audio_converter_from_IMFTransform(iface); -+ GUID major_type, subtype; -+ unsigned int i; -+ DWORD unused; -+ HRESULT hr; - -- return E_NOTIMPL; -+ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (!converter->input_type) -+ return MF_E_TRANSFORM_TYPE_NOT_SET; -+ -+ if (type) -+ { -+ /* validate the type */ -+ -+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &unused))) -+ return MF_E_INVALIDTYPE; -+ if (IsEqualGUID(&subtype, &MFAudioFormat_PCM) && FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &unused))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &unused))) -+ return MF_E_INVALIDTYPE; -+ -+ if (!(IsEqualGUID(&major_type, &MFMediaType_Audio))) -+ return MF_E_INVALIDTYPE; -+ -+ for (i = 0; i < ARRAY_SIZE(raw_types); i++) -+ { -+ if (IsEqualGUID(&subtype, raw_types[i])) -+ break; -+ if (i == ARRAY_SIZE(raw_types)) -+ return MF_E_INVALIDTYPE; -+ } -+ } -+ -+ if (flags & MFT_SET_TYPE_TEST_ONLY) -+ return S_OK; -+ -+ EnterCriticalSection(&converter->cs); -+ -+ hr = S_OK; -+ -+ if (type) -+ { -+ if (!converter->output_type) -+ if (FAILED(hr = MFCreateMediaType(&converter->output_type))) -+ goto done; -+ -+ if (FAILED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type))) -+ goto done; -+ } -+ else if (converter->output_type) -+ { -+ IMFMediaType_Release(converter->output_type); -+ converter->output_type = NULL; -+ } -+ -+ done: -+ if (hr == S_OK) -+ audio_converter_update_pipeline_state(converter); -+ LeaveCriticalSection(&converter->cs); -+ -+ return hr; - } - - static HRESULT WINAPI audio_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) -@@ -363,7 +542,6 @@ static const IMFTransformVtbl audio_converter_vtbl = - HRESULT audio_converter_create(REFIID riid, void **ret) - { - struct audio_converter *object; -- HRESULT hr; - - TRACE("%s %p\n", debugstr_guid(riid), ret); - -@@ -373,6 +551,8 @@ HRESULT audio_converter_create(REFIID riid, void **ret) - object->IMFTransform_iface.lpVtbl = &audio_converter_vtbl; - object->refcount = 1; - -+ InitializeCriticalSection(&object->cs); -+ - *ret = &object->IMFTransform_iface; - return S_OK; - } --- -2.29.2 - diff --git a/patches/mfplat-streaming-support/0007-winegstreamer-Introduce-color-conversion-transform.patch b/patches/mfplat-streaming-support/0007-winegstreamer-Introduce-color-conversion-transform.patch new file mode 100644 index 00000000..4faf6ba3 --- /dev/null +++ b/patches/mfplat-streaming-support/0007-winegstreamer-Introduce-color-conversion-transform.patch @@ -0,0 +1,386 @@ +From b5316e74275511a63372473cb6bb10b8f2f8d2e1 Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Tue, 1 Dec 2020 13:16:27 -0500 +Subject: [PATCH] winegstreamer: Introduce color conversion transform. + +Serves as a wrapper of videoconvert, and roughly fills the roll of Windows' CColorConverterDMO. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/Makefile.in | 1 + + dlls/winegstreamer/colorconvert.c | 302 +++++++++++++++++++ + dlls/winegstreamer/gst_private.h | 1 + + dlls/winegstreamer/mfplat.c | 3 + + dlls/winegstreamer/winegstreamer_classes.idl | 6 + + 5 files changed, 313 insertions(+) + create mode 100644 dlls/winegstreamer/colorconvert.c + +diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in +index 0b3229160b9..5395d6fd501 100644 +--- a/dlls/winegstreamer/Makefile.in ++++ b/dlls/winegstreamer/Makefile.in +@@ -7,6 +7,7 @@ PARENTSRC = ../strmbase + + C_SRCS = \ + audioconvert.c \ ++ colorconvert.c \ + filter.c \ + gst_cbs.c \ + gstdemux.c \ +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +new file mode 100644 +index 00000000000..8d0823fc0dc +--- /dev/null ++++ b/dlls/winegstreamer/colorconvert.c +@@ -0,0 +1,302 @@ ++/* GStreamer Color Converter ++ * ++ * Copyright 2020 Derek Lesho ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA ++ */ ++ ++#include "config.h" ++ ++#include "gst_private.h" ++ ++#include "mfapi.h" ++#include "mferror.h" ++#include "mfidl.h" ++ ++#include "wine/debug.h" ++#include "wine/heap.h" ++ ++WINE_DEFAULT_DEBUG_CHANNEL(mfplat); ++ ++struct color_converter ++{ ++ IMFTransform IMFTransform_iface; ++ LONG refcount; ++}; ++ ++static struct color_converter *impl_color_converter_from_IMFTransform(IMFTransform *iface) ++{ ++ return CONTAINING_RECORD(iface, struct color_converter, IMFTransform_iface); ++} ++ ++static HRESULT WINAPI color_converter_QueryInterface(IMFTransform *iface, REFIID riid, void **obj) ++{ ++ TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj); ++ ++ if (IsEqualIID(riid, &IID_IMFTransform) || ++ IsEqualIID(riid, &IID_IUnknown)) ++ { ++ *obj = iface; ++ IMFTransform_AddRef(iface); ++ return S_OK; ++ } ++ ++ WARN("Unsupported %s.\n", debugstr_guid(riid)); ++ *obj = NULL; ++ return E_NOINTERFACE; ++} ++ ++static ULONG WINAPI color_converter_AddRef(IMFTransform *iface) ++{ ++ struct color_converter *transform = impl_color_converter_from_IMFTransform(iface); ++ ULONG refcount = InterlockedIncrement(&transform->refcount); ++ ++ TRACE("%p, refcount %u.\n", iface, refcount); ++ ++ return refcount; ++} ++ ++static ULONG WINAPI color_converter_Release(IMFTransform *iface) ++{ ++ struct color_converter *transform = impl_color_converter_from_IMFTransform(iface); ++ ULONG refcount = InterlockedDecrement(&transform->refcount); ++ ++ TRACE("%p, refcount %u.\n", iface, refcount); ++ ++ if (!refcount) ++ { ++ heap_free(transform); ++ } ++ ++ return refcount; ++} ++ ++static HRESULT WINAPI color_converter_GetStreamLimits(IMFTransform *iface, DWORD *input_minimum, DWORD *input_maximum, ++ DWORD *output_minimum, DWORD *output_maximum) ++{ ++ TRACE("%p, %p, %p, %p, %p.\n", iface, input_minimum, input_maximum, output_minimum, output_maximum); ++ ++ *input_minimum = *input_maximum = *output_minimum = *output_maximum = 1; ++ ++ return S_OK; ++} ++ ++static HRESULT WINAPI color_converter_GetStreamCount(IMFTransform *iface, DWORD *inputs, DWORD *outputs) ++{ ++ TRACE("%p, %p, %p.\n", iface, inputs, outputs); ++ ++ *inputs = *outputs = 1; ++ ++ return S_OK; ++} ++ ++static HRESULT WINAPI color_converter_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs, ++ DWORD output_size, DWORD *outputs) ++{ ++ TRACE("%p %u %p %u %p.\n", iface, input_size, inputs, output_size, outputs); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) ++{ ++ FIXME("%p %u %p.\n", iface, id, info); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) ++{ ++ FIXME("%p %u %p.\n", iface, id, info); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes) ++{ ++ FIXME("%p, %p.\n", iface, attributes); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id, ++ IMFAttributes **attributes) ++{ ++ FIXME("%p, %u, %p.\n", iface, id, attributes); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, ++ IMFAttributes **attributes) ++{ ++ FIXME("%p, %u, %p.\n", iface, id, attributes); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_DeleteInputStream(IMFTransform *iface, DWORD id) ++{ ++ TRACE("%p, %u.\n", iface, id); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids) ++{ ++ TRACE("%p, %u, %p.\n", iface, streams, ids); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index, ++ IMFMediaType **type) ++{ ++ FIXME("%p, %u, %u, %p.\n", iface, id, index, type); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index, ++ IMFMediaType **type) ++{ ++ FIXME("%p, %u, %u, %p.\n", iface, id, index, type); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) ++{ ++ FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) ++{ ++ FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) ++{ ++ FIXME("%p, %u, %p.\n", iface, id, type); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) ++{ ++ FIXME("%p, %u, %p.\n", iface, id, type); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags) ++{ ++ FIXME("%p, %u, %p.\n", iface, id, flags); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_GetOutputStatus(IMFTransform *iface, DWORD *flags) ++{ ++ FIXME("%p, %p.\n", iface, flags); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper) ++{ ++ FIXME("%p, %s, %s.\n", iface, wine_dbgstr_longlong(lower), wine_dbgstr_longlong(upper)); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event) ++{ ++ TRACE("%p, %u, %p.\n", iface, id, event); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param) ++{ ++ FIXME("%p, %u %lu.\n", iface, message, param); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags) ++{ ++ FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags); ++ ++ return E_NOTIMPL; ++} ++ ++static HRESULT WINAPI color_converter_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count, ++ MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status) ++{ ++ FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status); ++ ++ return E_NOTIMPL; ++} ++ ++static const IMFTransformVtbl color_converter_vtbl = ++{ ++ color_converter_QueryInterface, ++ color_converter_AddRef, ++ color_converter_Release, ++ color_converter_GetStreamLimits, ++ color_converter_GetStreamCount, ++ color_converter_GetStreamIDs, ++ color_converter_GetInputStreamInfo, ++ color_converter_GetOutputStreamInfo, ++ color_converter_GetAttributes, ++ color_converter_GetInputStreamAttributes, ++ color_converter_GetOutputStreamAttributes, ++ color_converter_DeleteInputStream, ++ color_converter_AddInputStreams, ++ color_converter_GetInputAvailableType, ++ color_converter_GetOutputAvailableType, ++ color_converter_SetInputType, ++ color_converter_SetOutputType, ++ color_converter_GetInputCurrentType, ++ color_converter_GetOutputCurrentType, ++ color_converter_GetInputStatus, ++ color_converter_GetOutputStatus, ++ color_converter_SetOutputBounds, ++ color_converter_ProcessEvent, ++ color_converter_ProcessMessage, ++ color_converter_ProcessInput, ++ color_converter_ProcessOutput, ++}; ++ ++HRESULT color_converter_create(REFIID riid, void **ret) ++{ ++ struct color_converter *object; ++ ++ TRACE("%s %p\n", debugstr_guid(riid), ret); ++ ++ if (!(object = heap_alloc_zero(sizeof(*object)))) ++ return E_OUTOFMEMORY; ++ ++ object->IMFTransform_iface.lpVtbl = &color_converter_vtbl; ++ object->refcount = 1; ++ ++ *ret = &object->IMFTransform_iface; ++ return S_OK; ++} +diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h +index 14b6a011ac2..075e0ce1f0f 100644 +--- a/dlls/winegstreamer/gst_private.h ++++ b/dlls/winegstreamer/gst_private.h +@@ -87,5 +87,6 @@ GstBuffer *gst_buffer_from_mf_sample(IMFSample *in) DECLSPEC_HIDDEN; + HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN; + + HRESULT audio_converter_create(REFIID riid, void **ret) DECLSPEC_HIDDEN; ++HRESULT color_converter_create(REFIID riid, void **ret) DECLSPEC_HIDDEN; + + #endif /* __GST_PRIVATE_INCLUDED__ */ +diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c +index 883084b2d89..288b79997cd 100644 +--- a/dlls/winegstreamer/mfplat.c ++++ b/dlls/winegstreamer/mfplat.c +@@ -407,6 +407,8 @@ static const GUID CLSID_GStreamerByteStreamHandler = {0x317df618, 0x5e5a, 0x468a + + static const GUID CLSID_WINEAudioConverter = {0x6a170414,0xaad9,0x4693,{0xb8,0x06,0x3a,0x0c,0x47,0xc5,0x70,0xd6}}; + ++static GUID CLSID_WINEColorConverter = {0x2be8b27f,0xcd60,0x4b8a,{0x95,0xae,0xd1,0x74,0xcc,0x5c,0xba,0xa7}}; ++ + static const struct class_object + { + const GUID *clsid; +@@ -417,6 +419,7 @@ class_objects[] = + { &CLSID_VideoProcessorMFT, &video_processor_create }, + { &CLSID_GStreamerByteStreamHandler, &winegstreamer_stream_handler_create }, + { &CLSID_WINEAudioConverter, &audio_converter_create }, ++ { &CLSID_WINEColorConverter, &color_converter_create }, + }; + + HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) +diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl +index cf1fc69f38a..47c10a09cf0 100644 +--- a/dlls/winegstreamer/winegstreamer_classes.idl ++++ b/dlls/winegstreamer/winegstreamer_classes.idl +@@ -67,3 +67,9 @@ coclass GStreamerByteStreamHandler {} + uuid(6a170414-aad9-4693-b806-3a0c47c570d6) + ] + coclass WINEAudioConverter { } ++ ++[ ++ threading(both), ++ uuid(2be8b27f-cd60-4b8a-95ae-d174cc5cbaa7) ++] ++coclass WINEColorConverter { } +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0008-winegstreamer-Register-the-color-conversion-transfor.patch b/patches/mfplat-streaming-support/0008-winegstreamer-Register-the-color-conversion-transfor.patch new file mode 100644 index 00000000..4b485b2a --- /dev/null +++ b/patches/mfplat-streaming-support/0008-winegstreamer-Register-the-color-conversion-transfor.patch @@ -0,0 +1,71 @@ +From 18799e737ff065a62ea1c92c9a684940053d9dfb Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 12:45:48 -0500 +Subject: [PATCH] winegstreamer: Register the color conversion transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/mfplat.c | 34 +++++++++++++++++++++++++++++++++- + 1 file changed, 33 insertions(+), 1 deletion(-) + +diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c +index 288b79997cd..1b19c43d991 100644 +--- a/dlls/winegstreamer/mfplat.c ++++ b/dlls/winegstreamer/mfplat.c +@@ -455,6 +455,26 @@ static const GUID *audio_converter_supported_types[] = + &MFAudioFormat_Float, + }; + ++static WCHAR color_converterW[] = {'C','o','l','o','r',' ','C','o','n','v','e','r','t','e','r',0}; ++const GUID *color_converter_supported_types[] = ++{ ++ &MFVideoFormat_RGB24, ++ &MFVideoFormat_RGB32, ++ &MFVideoFormat_RGB555, ++ &MFVideoFormat_RGB8, ++ &MFVideoFormat_AYUV, ++ &MFVideoFormat_I420, ++ &MFVideoFormat_IYUV, ++ &MFVideoFormat_NV11, ++ &MFVideoFormat_NV12, ++ &MFVideoFormat_UYVY, ++ &MFVideoFormat_v216, ++ &MFVideoFormat_v410, ++ &MFVideoFormat_YUY2, ++ &MFVideoFormat_YVYU, ++ &MFVideoFormat_YVYU, ++}; ++ + static const struct mft + { + const GUID *clsid; +@@ -482,13 +502,25 @@ mfts[] = + audio_converter_supported_types, + NULL + }, ++ { ++ &CLSID_WINEColorConverter, ++ &MFT_CATEGORY_VIDEO_EFFECT, ++ color_converterW, ++ MFT_ENUM_FLAG_SYNCMFT, ++ &MFMediaType_Video, ++ ARRAY_SIZE(color_converter_supported_types), ++ color_converter_supported_types, ++ ARRAY_SIZE(color_converter_supported_types), ++ color_converter_supported_types, ++ NULL ++ }, + }; + + HRESULT mfplat_DllRegisterServer(void) + { + unsigned int i, j; + HRESULT hr; +- MFT_REGISTER_TYPE_INFO input_types[2], output_types[2]; ++ MFT_REGISTER_TYPE_INFO input_types[15], output_types[15]; + + for (i = 0; i < ARRAY_SIZE(mfts); i++) + { +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0009-winegstreamer-Implement-GetInputAvailableType-for-co.patch b/patches/mfplat-streaming-support/0009-winegstreamer-Implement-GetInputAvailableType-for-co.patch new file mode 100644 index 00000000..672cdc62 --- /dev/null +++ b/patches/mfplat-streaming-support/0009-winegstreamer-Implement-GetInputAvailableType-for-co.patch @@ -0,0 +1,81 @@ +From 15b54cf08d296483e6d4c211eeae50db62f70804 Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 12:55:14 -0500 +Subject: [PATCH] winegstreamer: Implement ::GetInputAvailableType for color + conversion transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 48 +++++++++++++++++++++++++++++-- + 1 file changed, 46 insertions(+), 2 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index 8d0823fc0dc..9a1d2880234 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -30,6 +30,24 @@ + + WINE_DEFAULT_DEBUG_CHANNEL(mfplat); + ++static const GUID *raw_types[] = { ++ &MFVideoFormat_RGB24, ++ &MFVideoFormat_RGB32, ++ &MFVideoFormat_RGB555, ++ &MFVideoFormat_RGB8, ++ &MFVideoFormat_AYUV, ++ &MFVideoFormat_I420, ++ &MFVideoFormat_IYUV, ++ &MFVideoFormat_NV11, ++ &MFVideoFormat_NV12, ++ &MFVideoFormat_UYVY, ++ &MFVideoFormat_v216, ++ &MFVideoFormat_v410, ++ &MFVideoFormat_YUY2, ++ &MFVideoFormat_YVYU, ++ &MFVideoFormat_YVYU, ++}; ++ + struct color_converter + { + IMFTransform IMFTransform_iface; +@@ -164,9 +182,35 @@ static HRESULT WINAPI color_converter_AddInputStreams(IMFTransform *iface, DWORD + static HRESULT WINAPI color_converter_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index, + IMFMediaType **type) + { +- FIXME("%p, %u, %u, %p.\n", iface, id, index, type); ++ IMFMediaType *ret; ++ HRESULT hr; + +- return E_NOTIMPL; ++ TRACE("%p, %u, %u, %p.\n", iface, id, index, type); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (index >= ARRAY_SIZE(raw_types)) ++ return MF_E_NO_MORE_TYPES; ++ ++ if (FAILED(hr = MFCreateMediaType(&ret))) ++ return hr; ++ ++ if (FAILED(hr = IMFMediaType_SetGUID(ret, &MF_MT_MAJOR_TYPE, &MFMediaType_Video))) ++ { ++ IMFMediaType_Release(ret); ++ return hr; ++ } ++ ++ if (FAILED(hr = IMFMediaType_SetGUID(ret, &MF_MT_SUBTYPE, raw_types[index]))) ++ { ++ IMFMediaType_Release(ret); ++ return hr; ++ } ++ ++ *type = ret; ++ ++ return S_OK; + } + + static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index, +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0010-winegstreamer-Implement-SetInputType-for-color-conve.patch b/patches/mfplat-streaming-support/0010-winegstreamer-Implement-SetInputType-for-color-conve.patch new file mode 100644 index 00000000..cdcde8a6 --- /dev/null +++ b/patches/mfplat-streaming-support/0010-winegstreamer-Implement-SetInputType-for-color-conve.patch @@ -0,0 +1,123 @@ +From 096a5070ac3ce917e6c8ae010e8e80c8ffbde3c4 Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 14:34:07 -0500 +Subject: [PATCH] winegstreamer: Implement ::SetInputType for color conversion + transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 76 ++++++++++++++++++++++++++++++- + 1 file changed, 74 insertions(+), 2 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index 9a1d2880234..5dd48188147 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -52,6 +52,8 @@ struct color_converter + { + IMFTransform IMFTransform_iface; + LONG refcount; ++ IMFMediaType *input_type; ++ CRITICAL_SECTION cs; + }; + + static struct color_converter *impl_color_converter_from_IMFTransform(IMFTransform *iface) +@@ -95,6 +97,8 @@ static ULONG WINAPI color_converter_Release(IMFTransform *iface) + + if (!refcount) + { ++ transform->cs.DebugInfo->Spare[0] = 0; ++ DeleteCriticalSection(&transform->cs); + heap_free(transform); + } + +@@ -223,9 +227,74 @@ static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface + + static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) + { +- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ GstCaps *input_caps; ++ unsigned int i; ++ HRESULT hr; + +- return E_NOTIMPL; ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); ++ ++ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (type) ++ { ++ GUID major_type, subtype; ++ ++ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type))) ++ return MF_E_INVALIDTYPE; ++ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) ++ return MF_E_INVALIDTYPE; ++ ++ if (!(IsEqualGUID(&major_type, &MFMediaType_Video))) ++ return MF_E_INVALIDTYPE; ++ ++ for (i = 0; i < ARRAY_SIZE(raw_types); i++) ++ { ++ if (IsEqualGUID(&subtype, raw_types[i])) ++ break; ++ } ++ ++ if (i == ARRAY_SIZE(raw_types)) ++ return MF_E_INVALIDTYPE; ++ ++ if (!(input_caps = caps_from_mf_media_type(type))) ++ return MF_E_INVALIDTYPE; ++ ++ gst_caps_unref(input_caps); ++ } ++ ++ if (flags & MFT_SET_TYPE_TEST_ONLY) ++ return S_OK; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ hr = S_OK; ++ ++ if (type) ++ { ++ if (!converter->input_type) ++ hr = MFCreateMediaType(&converter->input_type); ++ ++ if (SUCCEEDED(hr)) ++ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type); ++ ++ if (FAILED(hr)) ++ { ++ IMFMediaType_Release(converter->input_type); ++ converter->input_type = NULL; ++ } ++ } ++ else ++ { ++ IMFMediaType_Release(converter->input_type); ++ converter->input_type = NULL; ++ } ++ ++ LeaveCriticalSection(&converter->cs); ++ ++ return hr; + } + + static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) +@@ -341,6 +410,9 @@ HRESULT color_converter_create(REFIID riid, void **ret) + object->IMFTransform_iface.lpVtbl = &color_converter_vtbl; + object->refcount = 1; + ++ InitializeCriticalSection(&object->cs); ++ object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": color_converter_lock"); ++ + *ret = &object->IMFTransform_iface; + return S_OK; + } +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0011-winegstreamer-Implement-Color-Converter-MFT.patch b/patches/mfplat-streaming-support/0011-winegstreamer-Implement-Color-Converter-MFT.patch deleted file mode 100644 index d99acfb3..00000000 --- a/patches/mfplat-streaming-support/0011-winegstreamer-Implement-Color-Converter-MFT.patch +++ /dev/null @@ -1,842 +0,0 @@ -From 421665f7dc9a8f305b63ac13a994fb2198e71714 Mon Sep 17 00:00:00 2001 -From: Derek Lesho -Date: Fri, 1 May 2020 13:20:49 -0500 -Subject: [PATCH] winegstreamer: Implement Color Converter MFT. - -Signed-off-by: Derek Lesho ---- - dlls/winegstreamer/Makefile.in | 1 + - dlls/winegstreamer/colorconvert.c | 706 +++++++++++++++++++ - dlls/winegstreamer/gst_private.h | 1 + - dlls/winegstreamer/mfplat.c | 36 + - dlls/winegstreamer/winegstreamer_classes.idl | 6 + - 5 files changed, 750 insertions(+) - create mode 100644 dlls/winegstreamer/colorconvert.c - -diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in -index 0b3229160b9..5395d6fd501 100644 ---- a/dlls/winegstreamer/Makefile.in -+++ b/dlls/winegstreamer/Makefile.in -@@ -7,6 +7,7 @@ PARENTSRC = ../strmbase - - C_SRCS = \ - audioconvert.c \ -+ colorconvert.c \ - filter.c \ - gst_cbs.c \ - gstdemux.c \ -diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c -new file mode 100644 -index 00000000000..da2189d85e4 ---- /dev/null -+++ b/dlls/winegstreamer/colorconvert.c -@@ -0,0 +1,706 @@ -+#include "config.h" -+#include -+ -+#include "gst_private.h" -+#include "gst_cbs.h" -+ -+#include "mfapi.h" -+#include "mferror.h" -+#include "mfidl.h" -+ -+#include "wine/debug.h" -+#include "wine/heap.h" -+ -+WINE_DEFAULT_DEBUG_CHANNEL(mfplat); -+ -+static const GUID *raw_types[] = { -+ &MFVideoFormat_RGB24, -+ &MFVideoFormat_RGB32, -+ &MFVideoFormat_RGB555, -+ &MFVideoFormat_RGB8, -+ &MFVideoFormat_AYUV, -+ &MFVideoFormat_I420, -+ &MFVideoFormat_IYUV, -+ &MFVideoFormat_NV11, -+ &MFVideoFormat_NV12, -+ &MFVideoFormat_UYVY, -+ &MFVideoFormat_v216, -+ &MFVideoFormat_v410, -+ &MFVideoFormat_YUY2, -+ &MFVideoFormat_YVYU, -+ &MFVideoFormat_YVYU, -+}; -+ -+struct color_converter -+{ -+ IMFTransform IMFTransform_iface; -+ LONG refcount; -+ IMFAttributes *attributes; -+ IMFAttributes *output_attributes; -+ IMFMediaType *input_type; -+ IMFMediaType *output_type; -+ BOOL valid_state, inflight; -+ GstElement *container, *appsrc, *videoconvert, *appsink; -+ GstBus *bus; -+ CRITICAL_SECTION cs; -+}; -+ -+static struct color_converter *impl_color_converter_from_IMFTransform(IMFTransform *iface) -+{ -+ return CONTAINING_RECORD(iface, struct color_converter, IMFTransform_iface); -+} -+ -+static HRESULT WINAPI color_converter_QueryInterface(IMFTransform *iface, REFIID riid, void **obj) -+{ -+ TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj); -+ -+ if (IsEqualIID(riid, &IID_IMFTransform) || -+ IsEqualIID(riid, &IID_IUnknown)) -+ { -+ *obj = iface; -+ IMFTransform_AddRef(iface); -+ return S_OK; -+ } -+ -+ WARN("Unsupported %s.\n", debugstr_guid(riid)); -+ *obj = NULL; -+ return E_NOINTERFACE; -+} -+ -+static ULONG WINAPI color_converter_AddRef(IMFTransform *iface) -+{ -+ struct color_converter *transform = impl_color_converter_from_IMFTransform(iface); -+ ULONG refcount = InterlockedIncrement(&transform->refcount); -+ -+ TRACE("%p, refcount %u.\n", iface, refcount); -+ -+ return refcount; -+} -+ -+static ULONG WINAPI color_converter_Release(IMFTransform *iface) -+{ -+ struct color_converter *transform = impl_color_converter_from_IMFTransform(iface); -+ ULONG refcount = InterlockedDecrement(&transform->refcount); -+ -+ TRACE("%p, refcount %u.\n", iface, refcount); -+ -+ if (!refcount) -+ { -+ if (transform->attributes) -+ IMFAttributes_Release(transform->attributes); -+ if (transform->output_attributes) -+ IMFAttributes_Release(transform->output_attributes); -+ heap_free(transform); -+ } -+ -+ return refcount; -+} -+ -+static HRESULT WINAPI color_converter_GetStreamLimits(IMFTransform *iface, DWORD *input_minimum, DWORD *input_maximum, -+ DWORD *output_minimum, DWORD *output_maximum) -+{ -+ TRACE("%p, %p, %p, %p, %p.\n", iface, input_minimum, input_maximum, output_minimum, output_maximum); -+ -+ *input_minimum = *input_maximum = *output_minimum = *output_maximum = 1; -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI color_converter_GetStreamCount(IMFTransform *iface, DWORD *inputs, DWORD *outputs) -+{ -+ TRACE("%p, %p, %p.\n", iface, inputs, outputs); -+ -+ *inputs = *outputs = 1; -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI color_converter_GetStreamIDs(IMFTransform *iface, DWORD input_size, DWORD *inputs, -+ DWORD output_size, DWORD *outputs) -+{ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) -+{ -+ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); -+ -+ TRACE("%p %u %p\n", converter, id, info); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ /* If we create a wrapped GstBuffer, remove MFT_INPUT_STREAM_DOES_NOT_ADDREF */ -+ info->dwFlags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_DOES_NOT_ADDREF; -+ info->cbMaxLookahead = 0; -+ info->cbAlignment = 0; -+ /* this is incorrect */ -+ info->hnsMaxLatency = 0; -+ return S_OK; -+} -+ -+static HRESULT WINAPI color_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) -+{ -+ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); -+ -+ MFT_OUTPUT_STREAM_INFO stream_info = {}; -+ -+ TRACE("%p %u %p\n", converter, id, info); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ stream_info.dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES; -+ stream_info.cbSize = 0; -+ stream_info.cbAlignment = 0; -+ -+ *info = stream_info; -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI color_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes) -+{ -+ struct color_converter *transform = impl_color_converter_from_IMFTransform(iface); -+ -+ TRACE("%p, %p.\n", iface, attributes); -+ -+ *attributes = transform->attributes; -+ IMFAttributes_AddRef(*attributes); -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id, -+ IMFAttributes **attributes) -+{ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, -+ IMFAttributes **attributes) -+{ -+ struct color_converter *transform = impl_color_converter_from_IMFTransform(iface); -+ -+ TRACE("%p, %u, %p.\n", iface, id, attributes); -+ -+ *attributes = transform->output_attributes; -+ IMFAttributes_AddRef(*attributes); -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI color_converter_DeleteInputStream(IMFTransform *iface, DWORD id) -+{ -+ TRACE("%p, %u.\n", iface, id); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_AddInputStreams(IMFTransform *iface, DWORD streams, DWORD *ids) -+{ -+ TRACE("%p, %u, %p.\n", iface, streams, ids); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_GetInputAvailableType(IMFTransform *iface, DWORD id, DWORD index, -+ IMFMediaType **type) -+{ -+ IMFMediaType *ret; -+ HRESULT hr; -+ -+ TRACE("%p, %u, %u, %p.\n", iface, id, index, type); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (index >= ARRAY_SIZE(raw_types)) -+ return MF_E_NO_MORE_TYPES; -+ -+ if (FAILED(hr = MFCreateMediaType(&ret))) -+ return hr; -+ -+ if (FAILED(hr = IMFMediaType_SetGUID(ret, &MF_MT_MAJOR_TYPE, &MFMediaType_Video))) -+ { -+ IMFMediaType_Release(ret); -+ return hr; -+ } -+ -+ if (FAILED(hr = IMFMediaType_SetGUID(ret, &MF_MT_SUBTYPE, raw_types[index]))) -+ { -+ IMFMediaType_Release(ret); -+ return hr; -+ } -+ -+ *type = ret; -+ -+ return S_OK; -+} -+ -+static void copy_attr(IMFMediaType *target, IMFMediaType *source, const GUID *key) -+{ -+ PROPVARIANT val; -+ -+ if (SUCCEEDED(IMFAttributes_GetItem((IMFAttributes *)source, key, &val))) -+ { -+ IMFAttributes_SetItem((IMFAttributes* )target, key, &val); -+ } -+} -+ -+static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index, -+ IMFMediaType **type) -+{ -+ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); -+ IMFMediaType *output_type; -+ HRESULT hr; -+ -+ TRACE("%p, %u, %u, %p.\n", iface, id, index, type); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (!(converter->input_type)) -+ return MF_E_TRANSFORM_TYPE_NOT_SET; -+ -+ if (index >= ARRAY_SIZE(raw_types)) -+ return MF_E_NO_MORE_TYPES; -+ -+ if (FAILED(hr = MFCreateMediaType(&output_type))) -+ return hr; -+ -+ copy_attr(output_type, converter->input_type, &MF_MT_MAJOR_TYPE); -+ copy_attr(output_type, converter->input_type, &MF_MT_FRAME_SIZE); -+ copy_attr(output_type, converter->input_type, &MF_MT_FRAME_RATE); -+ copy_attr(output_type, converter->input_type, &MF_MT_COMPRESSED); -+ copy_attr(output_type, converter->input_type, &MF_MT_ALL_SAMPLES_INDEPENDENT); -+ -+ if (FAILED(hr = IMFMediaType_SetGUID(output_type, &MF_MT_SUBTYPE, raw_types[index]))) -+ { -+ IMFMediaType_Release(output_type); -+ return hr; -+ } -+ -+ *type = output_type; -+ -+ return S_OK; -+} -+ -+static void color_converter_update_pipeline_state(struct color_converter *converter) -+{ -+ converter->valid_state = converter->input_type && converter->output_type; -+ -+ if (!converter->valid_state) -+ { -+ gst_element_set_state(converter->container, GST_STATE_READY); -+ return; -+ } -+ -+ g_object_set(converter->appsrc, "caps", caps_from_mf_media_type(converter->input_type), NULL); -+ g_object_set(converter->appsink, "caps", caps_from_mf_media_type(converter->output_type), NULL); -+ -+ gst_element_set_state(converter->container, GST_STATE_PLAYING); -+ return; -+} -+ -+static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) -+{ -+ HRESULT hr; -+ -+ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); -+ -+ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (type) -+ { -+ GUID major_type, subtype; -+ BOOL found = FALSE; -+ -+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) -+ return MF_E_INVALIDTYPE; -+ -+ if (!(IsEqualGUID(&major_type, &MFMediaType_Video))) -+ return MF_E_INVALIDTYPE; -+ -+ for (unsigned int i = 0; i < ARRAY_SIZE(raw_types); i++) -+ { -+ UINT64 unused; -+ -+ if (IsEqualGUID(&subtype, raw_types[i])) -+ { -+ if (FAILED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &unused))) -+ return MF_E_INVALIDTYPE; -+ found = TRUE; -+ break; -+ } -+ } -+ -+ if (!found) -+ return MF_E_INVALIDTYPE; -+ } -+ -+ if (flags & MFT_SET_TYPE_TEST_ONLY) -+ { -+ return S_OK; -+ } -+ -+ hr = S_OK; -+ -+ EnterCriticalSection(&converter->cs); -+ -+ if (type) -+ { -+ if (!converter->input_type) -+ if (FAILED(hr = MFCreateMediaType(&converter->input_type))) -+ goto done; -+ -+ if (FAILED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type))) -+ goto done; -+ } -+ else if (converter->input_type) -+ { -+ IMFMediaType_Release(converter->input_type); -+ converter->input_type = NULL; -+ } -+ -+ done: -+ if (hr == S_OK) -+ color_converter_update_pipeline_state(converter); -+ LeaveCriticalSection(&converter->cs); -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) -+{ -+ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); -+ HRESULT hr; -+ GUID major_type, subtype; -+ UINT64 unused; -+ -+ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (type) -+ { -+ /* validate the type */ -+ -+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) -+ return MF_E_INVALIDTYPE; -+ if (FAILED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &unused))) -+ return MF_E_INVALIDTYPE; -+ -+ if (!(IsEqualGUID(&major_type, &MFMediaType_Video))) -+ return MF_E_INVALIDTYPE; -+ -+ for (unsigned int i = 0; i < ARRAY_SIZE(raw_types); i++) -+ { -+ if (IsEqualGUID(&subtype, raw_types[i])) -+ break; -+ if (i == ARRAY_SIZE(raw_types)) -+ return MF_E_INVALIDTYPE; -+ } -+ } -+ -+ if (flags & MFT_SET_TYPE_TEST_ONLY) -+ { -+ return S_OK; -+ } -+ -+ EnterCriticalSection(&converter->cs); -+ -+ hr = S_OK; -+ -+ if (type) -+ { -+ if (!converter->output_type) -+ if (FAILED(hr = MFCreateMediaType(&converter->output_type))) -+ goto done; -+ -+ if (FAILED(hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type))) -+ goto done; -+ } -+ else if (converter->output_type) -+ { -+ IMFMediaType_Release(converter->output_type); -+ converter->output_type = NULL; -+ } -+ -+ done: -+ if (hr == S_OK) -+ color_converter_update_pipeline_state(converter); -+ LeaveCriticalSection(&converter->cs); -+ -+ return hr; -+} -+ -+static HRESULT WINAPI color_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) -+{ -+ FIXME("%p, %u, %p.\n", iface, id, type); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) -+{ -+ FIXME("%p, %u, %p.\n", iface, id, type); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags) -+{ -+ FIXME("%p, %u, %p.\n", iface, id, flags); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_GetOutputStatus(IMFTransform *iface, DWORD *flags) -+{ -+ FIXME("%p, %p.\n", iface, flags); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_SetOutputBounds(IMFTransform *iface, LONGLONG lower, LONGLONG upper) -+{ -+ FIXME("%p, %s, %s.\n", iface, wine_dbgstr_longlong(lower), wine_dbgstr_longlong(upper)); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_ProcessEvent(IMFTransform *iface, DWORD id, IMFMediaEvent *event) -+{ -+ TRACE("%p, %u, %p.\n", iface, id, event); -+ -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param) -+{ -+ FIXME("%p, %u.\n", iface, message); -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI color_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags) -+{ -+ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); -+ GstBuffer *gst_buffer; -+ HRESULT hr = S_OK; -+ int ret; -+ -+ TRACE("%p, %u, %p, %#x.\n", iface, id, sample, flags); -+ -+ if (flags) -+ WARN("Unsupported flags %#x\n", flags); -+ -+ if (id != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ EnterCriticalSection(&converter->cs); -+ -+ if (!converter->valid_state) -+ { -+ hr = MF_E_TRANSFORM_TYPE_NOT_SET; -+ goto done; -+ } -+ -+ if (converter->inflight) -+ { -+ hr = MF_E_NOTACCEPTING; -+ goto done; -+ } -+ -+ if (!(gst_buffer = gst_buffer_from_mf_sample(sample))) -+ { -+ hr = E_FAIL; -+ goto done; -+ } -+ -+ g_signal_emit_by_name(converter->appsrc, "push-buffer", gst_buffer, &ret); -+ gst_buffer_unref(gst_buffer); -+ if (ret != GST_FLOW_OK) -+ { -+ ERR("Couldn't push buffer ret = %d\n", ret); -+ hr = E_FAIL; -+ goto done; -+ } -+ -+ converter->inflight = TRUE; -+ -+ done: -+ LeaveCriticalSection(&converter->cs); -+ -+ return hr; -+} -+ -+static HRESULT WINAPI color_converter_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count, -+ MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status) -+{ -+ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); -+ MFT_OUTPUT_DATA_BUFFER *relevant_buffer = NULL; -+ GstSample *sample; -+ HRESULT hr = S_OK; -+ -+ TRACE("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status); -+ -+ if (flags) -+ WARN("Unsupported flags %#x\n", flags); -+ -+ for (unsigned int i = 0; i < count; i++) -+ { -+ MFT_OUTPUT_DATA_BUFFER *out_buffer = &samples[i]; -+ -+ if (out_buffer->dwStreamID != 0) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ if (relevant_buffer) -+ return MF_E_INVALIDSTREAMNUMBER; -+ -+ relevant_buffer = out_buffer; -+ } -+ -+ if (!relevant_buffer) -+ return S_OK; -+ -+ EnterCriticalSection(&converter->cs); -+ -+ if (!converter->valid_state) -+ { -+ hr = MF_E_TRANSFORM_TYPE_NOT_SET; -+ goto done; -+ } -+ -+ if (!converter->inflight) -+ { -+ hr = MF_E_TRANSFORM_NEED_MORE_INPUT; -+ goto done; -+ } -+ -+ g_signal_emit_by_name(converter->appsink, "pull-sample", &sample); -+ -+ converter->inflight = FALSE; -+ -+ relevant_buffer->pSample = mf_sample_from_gst_buffer(gst_sample_get_buffer(sample)); -+ gst_sample_unref(sample); -+ relevant_buffer->dwStatus = S_OK; -+ relevant_buffer->pEvents = NULL; -+ *status = 0; -+ -+ done: -+ LeaveCriticalSection(&converter->cs); -+ -+ return hr; -+} -+ -+static const IMFTransformVtbl color_converter_vtbl = -+{ -+ color_converter_QueryInterface, -+ color_converter_AddRef, -+ color_converter_Release, -+ color_converter_GetStreamLimits, -+ color_converter_GetStreamCount, -+ color_converter_GetStreamIDs, -+ color_converter_GetInputStreamInfo, -+ color_converter_GetOutputStreamInfo, -+ color_converter_GetAttributes, -+ color_converter_GetInputStreamAttributes, -+ color_converter_GetOutputStreamAttributes, -+ color_converter_DeleteInputStream, -+ color_converter_AddInputStreams, -+ color_converter_GetInputAvailableType, -+ color_converter_GetOutputAvailableType, -+ color_converter_SetInputType, -+ color_converter_SetOutputType, -+ color_converter_GetInputCurrentType, -+ color_converter_GetOutputCurrentType, -+ color_converter_GetInputStatus, -+ color_converter_GetOutputStatus, -+ color_converter_SetOutputBounds, -+ color_converter_ProcessEvent, -+ color_converter_ProcessMessage, -+ color_converter_ProcessInput, -+ color_converter_ProcessOutput, -+}; -+ -+HRESULT color_converter_create(REFIID riid, void **ret) -+{ -+ struct color_converter *object; -+ HRESULT hr; -+ -+ TRACE("%s %p\n", debugstr_guid(riid), ret); -+ -+ if (!(object = heap_alloc_zero(sizeof(*object)))) -+ return E_OUTOFMEMORY; -+ -+ object->IMFTransform_iface.lpVtbl = &color_converter_vtbl; -+ object->refcount = 1; -+ -+ InitializeCriticalSection(&object->cs); -+ -+ if (FAILED(hr = MFCreateAttributes(&object->attributes, 0))) -+ goto failed; -+ -+ if (FAILED(hr = MFCreateAttributes(&object->output_attributes, 0))) -+ goto failed; -+ -+ object->container = gst_bin_new(NULL); -+ object->bus = gst_bus_new(); -+ gst_element_set_bus(object->container, object->bus); -+ -+ if (!(object->appsrc = gst_element_factory_make("appsrc", NULL))) -+ { -+ ERR("Failed to create appsrc"); -+ hr = E_FAIL; -+ goto failed; -+ } -+ gst_bin_add(GST_BIN(object->container), object->appsrc); -+ -+ if (!(object->videoconvert = gst_element_factory_make("videoconvert", NULL))) -+ { -+ ERR("Failed to create converter\n"); -+ hr = E_FAIL; -+ goto failed; -+ } -+ gst_bin_add(GST_BIN(object->container), object->videoconvert); -+ -+ if (!(object->appsink = gst_element_factory_make("appsink", NULL))) -+ { -+ ERR("Failed to create appsink\n"); -+ hr = E_FAIL; -+ goto failed; -+ } -+ gst_bin_add(GST_BIN(object->container), object->appsink); -+ -+ if (!(gst_element_link(object->appsrc, object->videoconvert))) -+ { -+ ERR("Failed to link appsrc to videoconvert\n"); -+ hr = E_FAIL; -+ goto failed; -+ } -+ -+ if (!(gst_element_link(object->videoconvert, object->appsink))) -+ { -+ ERR("Failed to link videoconvert to appsink\n"); -+ hr = E_FAIL; -+ goto failed; -+ } -+ -+ *ret = &object->IMFTransform_iface; -+ return S_OK; -+ -+failed: -+ -+ IMFTransform_Release(&object->IMFTransform_iface); -+ return hr; -+} -diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 7f96c06dfaf..1fa13560e8a 100644 ---- a/dlls/winegstreamer/gst_private.h -+++ b/dlls/winegstreamer/gst_private.h -@@ -86,5 +86,6 @@ GstBuffer *gst_buffer_from_mf_sample(IMFSample *in) DECLSPEC_HIDDEN; - HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN; - - HRESULT audio_converter_create(REFIID riid, void **ret) DECLSPEC_HIDDEN; -+HRESULT color_converter_create(REFIID riid, void **ret) DECLSPEC_HIDDEN; - - #endif /* __GST_PRIVATE_INCLUDED__ */ -diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 7fdf722ec2e..e5255937387 100644 ---- a/dlls/winegstreamer/mfplat.c -+++ b/dlls/winegstreamer/mfplat.c -@@ -407,6 +407,8 @@ static const GUID CLSID_GStreamerByteStreamHandler = {0x317df618, 0x5e5a, 0x468a - - static GUID CLSID_WINEAudioConverter = {0x6a170414,0xaad9,0x4693,{0xb8,0x06,0x3a,0x0c,0x47,0xc5,0x70,0xd6}}; - -+static GUID CLSID_CColorConvertDMO = {0x98230571,0x0087,0x4204,{0xb0,0x20,0x32,0x82,0x53,0x8e,0x57,0xd3}}; -+ - static const struct class_object - { - const GUID *clsid; -@@ -417,6 +419,7 @@ class_objects[] = - { &CLSID_VideoProcessorMFT, &video_processor_create }, - { &CLSID_GStreamerByteStreamHandler, &winegstreamer_stream_handler_create }, - { &CLSID_WINEAudioConverter, &audio_converter_create }, -+ { &CLSID_CColorConvertDMO, &color_converter_create }, - }; - - HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) -@@ -445,6 +448,7 @@ HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) - return CLASS_E_CLASSNOTAVAILABLE; - } - -+ - static WCHAR audio_converterW[] = {'A','u','d','i','o',' ','C','o','n','v','e','r','t','e','r',0}; - const GUID *audio_converter_supported_types[] = - { -@@ -452,6 +456,26 @@ const GUID *audio_converter_supported_types[] = - &MFAudioFormat_Float, - }; - -+static WCHAR color_converterW[] = {'C','o','l','o','r',' ','C','o','n','v','e','r','t','e','r',0}; -+const GUID *color_converter_supported_types[] = -+{ -+ &MFVideoFormat_RGB24, -+ &MFVideoFormat_RGB32, -+ &MFVideoFormat_RGB555, -+ &MFVideoFormat_RGB8, -+ &MFVideoFormat_AYUV, -+ &MFVideoFormat_I420, -+ &MFVideoFormat_IYUV, -+ &MFVideoFormat_NV11, -+ &MFVideoFormat_NV12, -+ &MFVideoFormat_UYVY, -+ &MFVideoFormat_v216, -+ &MFVideoFormat_v410, -+ &MFVideoFormat_YUY2, -+ &MFVideoFormat_YVYU, -+ &MFVideoFormat_YVYU, -+}; -+ - static const struct mft - { - const GUID *clsid; -@@ -479,6 +503,18 @@ mfts[] = - audio_converter_supported_types, - NULL - }, -+ { -+ &CLSID_CColorConvertDMO, -+ &MFT_CATEGORY_VIDEO_EFFECT, -+ color_converterW, -+ MFT_ENUM_FLAG_SYNCMFT, -+ &MFMediaType_Video, -+ ARRAY_SIZE(color_converter_supported_types), -+ color_converter_supported_types, -+ ARRAY_SIZE(color_converter_supported_types), -+ color_converter_supported_types, -+ NULL -+ }, - }; - - HRESULT mfplat_DllRegisterServer(void) -diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl -index cf1fc69f38a..9788fd45d36 100644 ---- a/dlls/winegstreamer/winegstreamer_classes.idl -+++ b/dlls/winegstreamer/winegstreamer_classes.idl -@@ -67,3 +67,9 @@ coclass GStreamerByteStreamHandler {} - uuid(6a170414-aad9-4693-b806-3a0c47c570d6) - ] - coclass WINEAudioConverter { } -+ -+[ -+ threading(both), -+ uuid(98230571-0087-4204-b020-3282538e57d3) -+] -+coclass CColorConvertDMO { } --- -2.29.2 - diff --git a/patches/mfplat-streaming-support/0011-winegstreamer-Implement-GetOutputAvailableType-for-c.patch b/patches/mfplat-streaming-support/0011-winegstreamer-Implement-GetOutputAvailableType-for-c.patch new file mode 100644 index 00000000..83326c06 --- /dev/null +++ b/patches/mfplat-streaming-support/0011-winegstreamer-Implement-GetOutputAvailableType-for-c.patch @@ -0,0 +1,77 @@ +From 64cfb2a80d7ebc22b12d8b6c1e41cf7a74e15d88 Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 14:45:32 -0500 +Subject: [PATCH] winegstreamer: Implement ::GetOutputAvailableType for color + conversion transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 48 +++++++++++++++++++++++++++++-- + 1 file changed, 46 insertions(+), 2 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index 5dd48188147..b80232e195b 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -217,12 +217,56 @@ static HRESULT WINAPI color_converter_GetInputAvailableType(IMFTransform *iface, + return S_OK; + } + ++static void copy_attr(IMFMediaType *target, IMFMediaType *source, const GUID *key) ++{ ++ PROPVARIANT val; ++ ++ if (SUCCEEDED(IMFAttributes_GetItem((IMFAttributes *)source, key, &val))) ++ { ++ IMFAttributes_SetItem((IMFAttributes* )target, key, &val); ++ } ++} ++ + static HRESULT WINAPI color_converter_GetOutputAvailableType(IMFTransform *iface, DWORD id, DWORD index, + IMFMediaType **type) + { +- FIXME("%p, %u, %u, %p.\n", iface, id, index, type); ++ IMFMediaType *output_type; ++ HRESULT hr; + +- return E_NOTIMPL; ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); ++ ++ TRACE("%p, %u, %u, %p.\n", iface, id, index, type); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (index >= ARRAY_SIZE(raw_types)) ++ return MF_E_NO_MORE_TYPES; ++ ++ if (FAILED(hr = MFCreateMediaType(&output_type))) ++ return hr; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ if (!(converter->input_type)) ++ { ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_TRANSFORM_TYPE_NOT_SET; ++ } ++ ++ IMFMediaType_CopyAllItems(converter->input_type, (IMFAttributes *)output_type); ++ ++ LeaveCriticalSection(&converter->cs); ++ ++ if (FAILED(hr = IMFMediaType_SetGUID(output_type, &MF_MT_SUBTYPE, raw_types[index]))) ++ { ++ IMFMediaType_Release(output_type); ++ return hr; ++ } ++ ++ *type = output_type; ++ ++ return S_OK; + } + + static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0012-winegstreamer-Implement-SetOutputType-for-color-conv.patch b/patches/mfplat-streaming-support/0012-winegstreamer-Implement-SetOutputType-for-color-conv.patch new file mode 100644 index 00000000..cbf09d6c --- /dev/null +++ b/patches/mfplat-streaming-support/0012-winegstreamer-Implement-SetOutputType-for-color-conv.patch @@ -0,0 +1,103 @@ +From f1714a949175290e9f01bd32fde1dacecfed7946 Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 14:55:41 -0500 +Subject: [PATCH] winegstreamer: Implement ::SetOutputType for color conversion + transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 70 ++++++++++++++++++++++++++++++- + 1 file changed, 68 insertions(+), 2 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index b80232e195b..e7e84690738 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -53,6 +53,7 @@ struct color_converter + IMFTransform IMFTransform_iface; + LONG refcount; + IMFMediaType *input_type; ++ IMFMediaType *output_type; + CRITICAL_SECTION cs; + }; + +@@ -343,9 +344,74 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id + + static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD id, IMFMediaType *type, DWORD flags) + { +- FIXME("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ GstCaps *output_caps; ++ unsigned int i; ++ HRESULT hr; + +- return E_NOTIMPL; ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); ++ ++ TRACE("%p, %u, %p, %#x.\n", iface, id, type, flags); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (type) ++ { ++ GUID major_type, subtype; ++ ++ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_MAJOR_TYPE, &major_type))) ++ return MF_E_INVALIDTYPE; ++ if (FAILED(IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &subtype))) ++ return MF_E_INVALIDTYPE; ++ ++ if (!(IsEqualGUID(&major_type, &MFMediaType_Video))) ++ return MF_E_INVALIDTYPE; ++ ++ for (i = 0; i < ARRAY_SIZE(raw_types); i++) ++ { ++ if (IsEqualGUID(&subtype, raw_types[i])) ++ break; ++ } ++ ++ if (i == ARRAY_SIZE(raw_types)) ++ return MF_E_INVALIDTYPE; ++ ++ if (!(output_caps = caps_from_mf_media_type(type))) ++ return MF_E_INVALIDTYPE; ++ ++ gst_caps_unref(output_caps); ++ } ++ ++ if (flags & MFT_SET_TYPE_TEST_ONLY) ++ return S_OK; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ hr = S_OK; ++ ++ if (type) ++ { ++ if (!converter->output_type) ++ hr = MFCreateMediaType(&converter->output_type); ++ ++ if (SUCCEEDED(hr)) ++ hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type); ++ ++ if (FAILED(hr)) ++ { ++ IMFMediaType_Release(converter->output_type); ++ converter->output_type = NULL; ++ } ++ } ++ else ++ { ++ IMFMediaType_Release(converter->output_type); ++ converter->output_type = NULL; ++ } ++ ++ LeaveCriticalSection(&converter->cs); ++ ++ return hr; + } + + static HRESULT WINAPI color_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0013-winegstreamer-Implement-Process-Input-Output-for-col.patch b/patches/mfplat-streaming-support/0013-winegstreamer-Implement-Process-Input-Output-for-col.patch new file mode 100644 index 00000000..53a010ee --- /dev/null +++ b/patches/mfplat-streaming-support/0013-winegstreamer-Implement-Process-Input-Output-for-col.patch @@ -0,0 +1,267 @@ +From c94cfbf0ec1c10452c2cf1496f32eeefe5794cea Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 15:22:20 -0500 +Subject: [PATCH] winegstreamer: Implement ::Process(Input/Output) for color + conversion transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 159 +++++++++++++++++++++++++++++- + 1 file changed, 154 insertions(+), 5 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index e7e84690738..b77f3358c52 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -55,6 +55,8 @@ struct color_converter + IMFMediaType *input_type; + IMFMediaType *output_type; + CRITICAL_SECTION cs; ++ BOOL inflight; ++ GstElement *container, *appsrc, *videoconvert, *appsink; + }; + + static struct color_converter *impl_color_converter_from_IMFTransform(IMFTransform *iface) +@@ -100,6 +102,7 @@ static ULONG WINAPI color_converter_Release(IMFTransform *iface) + { + transform->cs.DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&transform->cs); ++ gst_object_unref(transform->container); + heap_free(transform); + } + +@@ -307,7 +310,8 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id + if (!(input_caps = caps_from_mf_media_type(type))) + return MF_E_INVALIDTYPE; + +- gst_caps_unref(input_caps); ++ if (flags & MFT_SET_TYPE_TEST_ONLY) ++ gst_caps_unref(input_caps); + } + + if (flags & MFT_SET_TYPE_TEST_ONLY) +@@ -316,6 +320,7 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id + EnterCriticalSection(&converter->cs); + + hr = S_OK; ++ gst_element_set_state(converter->container, GST_STATE_READY); + + if (type) + { +@@ -325,6 +330,9 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id + if (SUCCEEDED(hr)) + hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->input_type); + ++ g_object_set(converter->appsrc, "caps", input_caps, NULL); ++ gst_caps_unref(input_caps); ++ + if (FAILED(hr)) + { + IMFMediaType_Release(converter->input_type); +@@ -337,6 +345,9 @@ static HRESULT WINAPI color_converter_SetInputType(IMFTransform *iface, DWORD id + converter->input_type = NULL; + } + ++ if (converter->input_type && converter->output_type) ++ gst_element_set_state(converter->container, GST_STATE_PLAYING); ++ + LeaveCriticalSection(&converter->cs); + + return hr; +@@ -379,7 +390,8 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i + if (!(output_caps = caps_from_mf_media_type(type))) + return MF_E_INVALIDTYPE; + +- gst_caps_unref(output_caps); ++ if (flags & MFT_SET_TYPE_TEST_ONLY) ++ gst_caps_unref(output_caps); + } + + if (flags & MFT_SET_TYPE_TEST_ONLY) +@@ -388,6 +400,7 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i + EnterCriticalSection(&converter->cs); + + hr = S_OK; ++ gst_element_set_state(converter->container, GST_STATE_READY); + + if (type) + { +@@ -397,6 +410,9 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i + if (SUCCEEDED(hr)) + hr = IMFMediaType_CopyAllItems(type, (IMFAttributes *) converter->output_type); + ++ g_object_set(converter->appsink, "caps", output_caps, NULL); ++ gst_caps_unref(output_caps); ++ + if (FAILED(hr)) + { + IMFMediaType_Release(converter->output_type); +@@ -409,6 +425,9 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i + converter->output_type = NULL; + } + ++ if (converter->input_type && converter->output_type) ++ gst_element_set_state(converter->container, GST_STATE_PLAYING); ++ + LeaveCriticalSection(&converter->cs); + + return hr; +@@ -465,15 +484,102 @@ static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_ME + + static HRESULT WINAPI color_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags) + { +- FIXME("%p, %u, %p, %#x.\n", iface, id, sample, flags); ++ GstBuffer *gst_buffer; ++ int ret; + +- return E_NOTIMPL; ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); ++ ++ TRACE("%p, %u, %p, %#x.\n", iface, id, sample, flags); ++ ++ if (flags) ++ WARN("Unsupported flags %#x\n", flags); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ if (!converter->input_type || !converter->output_type) ++ { ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_TRANSFORM_TYPE_NOT_SET; ++ } ++ ++ if (converter->inflight) ++ { ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_NOTACCEPTING; ++ } ++ ++ if (!(gst_buffer = gst_buffer_from_mf_sample(sample))) ++ { ++ LeaveCriticalSection(&converter->cs); ++ return E_FAIL; ++ } ++ ++ g_signal_emit_by_name(converter->appsrc, "push-buffer", gst_buffer, &ret); ++ gst_buffer_unref(gst_buffer); ++ if (ret != GST_FLOW_OK) ++ { ++ ERR("Couldn't push buffer ret = %d (%s)\n", ret, gst_flow_get_name(ret)); ++ LeaveCriticalSection(&converter->cs); ++ return E_FAIL; ++ } ++ ++ converter->inflight = TRUE; ++ LeaveCriticalSection(&converter->cs); ++ ++ return S_OK; + } + + static HRESULT WINAPI color_converter_ProcessOutput(IMFTransform *iface, DWORD flags, DWORD count, + MFT_OUTPUT_DATA_BUFFER *samples, DWORD *status) + { +- FIXME("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status); ++ GstSample *sample; ++ ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); ++ ++ TRACE("%p, %#x, %u, %p, %p.\n", iface, flags, count, samples, status); ++ ++ if (flags) ++ WARN("Unsupported flags %#x\n", flags); ++ ++ if (!count) ++ return S_OK; ++ ++ if (count != 1) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (samples[0].dwStreamID != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ if (!converter->input_type || !converter->output_type) ++ { ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_TRANSFORM_TYPE_NOT_SET; ++ } ++ ++ if (!converter->inflight) ++ { ++ LeaveCriticalSection(&converter->cs); ++ return MF_E_TRANSFORM_NEED_MORE_INPUT; ++ } ++ ++ g_signal_emit_by_name(converter->appsink, "pull-sample", &sample); ++ ++ converter->inflight = FALSE; ++ ++ samples[0].pSample = mf_sample_from_gst_buffer(gst_sample_get_buffer(sample)); ++ gst_sample_unref(sample); ++ samples[0].dwStatus = S_OK; ++ samples[0].pEvents = NULL; ++ *status = 0; ++ ++ LeaveCriticalSection(&converter->cs); ++ ++ return S_OK; + + return E_NOTIMPL; + } +@@ -523,6 +629,49 @@ HRESULT color_converter_create(REFIID riid, void **ret) + InitializeCriticalSection(&object->cs); + object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": color_converter_lock"); + ++ object->container = gst_bin_new(NULL); ++ ++ if (!(object->appsrc = gst_element_factory_make("appsrc", NULL))) ++ { ++ ERR("Failed to create appsrc, are %u-bit Gstreamer \"base\" plugins installed?\n", ++ 8 * (int)sizeof(void *)); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; ++ } ++ gst_bin_add(GST_BIN(object->container), object->appsrc); ++ ++ if (!(object->videoconvert = gst_element_factory_make("videoconvert", NULL))) ++ { ++ ERR("Failed to create videoconvert, are %u-bit Gstreamer \"base\" plugins installed?\n", ++ 8 * (int)sizeof(void *)); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; ++ } ++ gst_bin_add(GST_BIN(object->container), object->videoconvert); ++ ++ if (!(object->appsink = gst_element_factory_make("appsink", NULL))) ++ { ++ ERR("Failed to create appsink, are %u-bit Gstreamer \"base\" plugins installed?\n", ++ 8 * (int)sizeof(void *)); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; ++ } ++ gst_bin_add(GST_BIN(object->container), object->appsink); ++ ++ if (!gst_element_link(object->appsrc, object->videoconvert)) ++ { ++ ERR("Failed to link appsrc to videoconvert\n"); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; ++ } ++ ++ if (!gst_element_link(object->videoconvert, object->appsink)) ++ { ++ ERR("Failed to link videoconvert to appsink\n"); ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return E_FAIL; ++ } ++ + *ret = &object->IMFTransform_iface; + return S_OK; + } +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0014-winegstreamer-Implement-ProcessMessage-for-color-con.patch b/patches/mfplat-streaming-support/0014-winegstreamer-Implement-ProcessMessage-for-color-con.patch new file mode 100644 index 00000000..8ea4f294 --- /dev/null +++ b/patches/mfplat-streaming-support/0014-winegstreamer-Implement-ProcessMessage-for-color-con.patch @@ -0,0 +1,37 @@ +From d68df1b4131caa500cea5c4241be3c55b2728d4c Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 16:02:20 -0500 +Subject: [PATCH] winegstreamer: Implement ::ProcessMessage for color + conversion MFT. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index b77f3358c52..c07ef22acc3 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -477,9 +477,16 @@ static HRESULT WINAPI color_converter_ProcessEvent(IMFTransform *iface, DWORD id + + static HRESULT WINAPI color_converter_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_TYPE message, ULONG_PTR param) + { +- FIXME("%p, %u %lu.\n", iface, message, param); ++ TRACE("%p, %u %lu.\n", iface, message, param); + +- return E_NOTIMPL; ++ switch(message) ++ { ++ case MFT_MESSAGE_NOTIFY_START_OF_STREAM: ++ return S_OK; ++ default: ++ FIXME("Unhandled message type %x.\n", message); ++ return E_NOTIMPL; ++ } + } + + static HRESULT WINAPI color_converter_ProcessInput(IMFTransform *iface, DWORD id, IMFSample *sample, DWORD flags) +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0015-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch b/patches/mfplat-streaming-support/0015-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch new file mode 100644 index 00000000..34bafb06 --- /dev/null +++ b/patches/mfplat-streaming-support/0015-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch @@ -0,0 +1,54 @@ +From e8eef3f90da399a077f5853e2a399c7e27a6418e Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 15:28:42 -0500 +Subject: [PATCH] winegstreamer: Implement ::Get(Input/Output)StreamInfo for + color conversion transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index c07ef22acc3..43b8dddeee7 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -138,16 +138,31 @@ static HRESULT WINAPI color_converter_GetStreamIDs(IMFTransform *iface, DWORD in + + static HRESULT WINAPI color_converter_GetInputStreamInfo(IMFTransform *iface, DWORD id, MFT_INPUT_STREAM_INFO *info) + { +- FIXME("%p %u %p.\n", iface, id, info); ++ TRACE("%p %u %p.\n", iface, id, info); + +- return E_NOTIMPL; ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ info->dwFlags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_DOES_NOT_ADDREF; ++ info->cbMaxLookahead = 0; ++ info->cbAlignment = 0; ++ info->hnsMaxLatency = 0; ++ ++ return S_OK; + } + + static HRESULT WINAPI color_converter_GetOutputStreamInfo(IMFTransform *iface, DWORD id, MFT_OUTPUT_STREAM_INFO *info) + { +- FIXME("%p %u %p.\n", iface, id, info); ++ TRACE("%p %u %p.\n", iface, id, info); + +- return E_NOTIMPL; ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ info->dwFlags = MFT_OUTPUT_STREAM_PROVIDES_SAMPLES; ++ info->cbSize = 0; ++ info->cbAlignment = 0; ++ ++ return S_OK; + } + + static HRESULT WINAPI color_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes) +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0016-winegstreamer-Implement-Get-Attributes-functions-for.patch b/patches/mfplat-streaming-support/0016-winegstreamer-Implement-Get-Attributes-functions-for.patch new file mode 100644 index 00000000..136edb41 --- /dev/null +++ b/patches/mfplat-streaming-support/0016-winegstreamer-Implement-Get-Attributes-functions-for.patch @@ -0,0 +1,99 @@ +From 7bc3f13dd779e7b998a877012c83a8ca9e7aba4f Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 15:37:10 -0500 +Subject: [PATCH] winegstreamer: Implement Get*Attributes functions for color + converter transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 37 +++++++++++++++++++++++++++---- + 1 file changed, 33 insertions(+), 4 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index 43b8dddeee7..9e6ece796f3 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -52,6 +52,8 @@ struct color_converter + { + IMFTransform IMFTransform_iface; + LONG refcount; ++ IMFAttributes *attributes; ++ IMFAttributes *output_attributes; + IMFMediaType *input_type; + IMFMediaType *output_type; + CRITICAL_SECTION cs; +@@ -102,6 +104,10 @@ static ULONG WINAPI color_converter_Release(IMFTransform *iface) + { + transform->cs.DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&transform->cs); ++ if (transform->attributes) ++ IMFAttributes_Release(transform->attributes); ++ if (transform->output_attributes) ++ IMFAttributes_Release(transform->output_attributes); + gst_object_unref(transform->container); + heap_free(transform); + } +@@ -167,9 +173,14 @@ static HRESULT WINAPI color_converter_GetOutputStreamInfo(IMFTransform *iface, D + + static HRESULT WINAPI color_converter_GetAttributes(IMFTransform *iface, IMFAttributes **attributes) + { +- FIXME("%p, %p.\n", iface, attributes); ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); + +- return E_NOTIMPL; ++ TRACE("%p, %p.\n", iface, attributes); ++ ++ *attributes = converter->attributes; ++ IMFAttributes_AddRef(*attributes); ++ ++ return S_OK; + } + + static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *iface, DWORD id, +@@ -183,9 +194,14 @@ static HRESULT WINAPI color_converter_GetInputStreamAttributes(IMFTransform *ifa + static HRESULT WINAPI color_converter_GetOutputStreamAttributes(IMFTransform *iface, DWORD id, + IMFAttributes **attributes) + { +- FIXME("%p, %u, %p.\n", iface, id, attributes); ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); + +- return E_NOTIMPL; ++ TRACE("%p, %u, %p.\n", iface, id, attributes); ++ ++ *attributes = converter->output_attributes; ++ IMFAttributes_AddRef(*attributes); ++ ++ return S_OK; + } + + static HRESULT WINAPI color_converter_DeleteInputStream(IMFTransform *iface, DWORD id) +@@ -639,6 +655,7 @@ static const IMFTransformVtbl color_converter_vtbl = + HRESULT color_converter_create(REFIID riid, void **ret) + { + struct color_converter *object; ++ HRESULT hr; + + TRACE("%s %p\n", debugstr_guid(riid), ret); + +@@ -651,6 +668,18 @@ HRESULT color_converter_create(REFIID riid, void **ret) + InitializeCriticalSection(&object->cs); + object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": color_converter_lock"); + ++ if (FAILED(hr = MFCreateAttributes(&object->attributes, 0))) ++ { ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return hr; ++ } ++ ++ if (FAILED(hr = MFCreateAttributes(&object->output_attributes, 0))) ++ { ++ IMFTransform_Release(&object->IMFTransform_iface); ++ return hr; ++ } ++ + object->container = gst_bin_new(NULL); + + if (!(object->appsrc = gst_element_factory_make("appsrc", NULL))) +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0017-winegstreamer-Implement-Get-Input-Output-CurrentType.patch b/patches/mfplat-streaming-support/0017-winegstreamer-Implement-Get-Input-Output-CurrentType.patch new file mode 100644 index 00000000..bd74691c --- /dev/null +++ b/patches/mfplat-streaming-support/0017-winegstreamer-Implement-Get-Input-Output-CurrentType.patch @@ -0,0 +1,89 @@ +From 54919766d0ad2cf17e8cc6a8783794312964677c Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Thu, 3 Dec 2020 15:43:21 -0500 +Subject: [PATCH] winegstreamer: Implement Get(Input/Output)CurrentType + functions for color converter transform. + +Signed-off-by: Derek Lesho +--- + dlls/winegstreamer/colorconvert.c | 58 ++++++++++++++++++++++++++++--- + 1 file changed, 54 insertions(+), 4 deletions(-) + +diff --git a/dlls/winegstreamer/colorconvert.c b/dlls/winegstreamer/colorconvert.c +index 9e6ece796f3..c7b1fae393f 100644 +--- a/dlls/winegstreamer/colorconvert.c ++++ b/dlls/winegstreamer/colorconvert.c +@@ -466,16 +466,66 @@ static HRESULT WINAPI color_converter_SetOutputType(IMFTransform *iface, DWORD i + + static HRESULT WINAPI color_converter_GetInputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) + { +- FIXME("%p, %u, %p.\n", iface, id, type); ++ IMFMediaType *ret; ++ HRESULT hr; + +- return E_NOTIMPL; ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); ++ ++ TRACE("%p, %u, %p.\n", converter, id, type); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (FAILED(hr = MFCreateMediaType(&ret))) ++ return hr; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ if (converter->input_type) ++ hr = IMFMediaType_CopyAllItems(converter->input_type, (IMFAttributes *)ret); ++ else ++ hr = MF_E_TRANSFORM_TYPE_NOT_SET; ++ ++ LeaveCriticalSection(&converter->cs); ++ ++ if (SUCCEEDED(hr)) ++ *type = ret; ++ else ++ IMFMediaType_Release(ret); ++ ++ return hr; + } + + static HRESULT WINAPI color_converter_GetOutputCurrentType(IMFTransform *iface, DWORD id, IMFMediaType **type) + { +- FIXME("%p, %u, %p.\n", iface, id, type); ++ IMFMediaType *ret; ++ HRESULT hr; + +- return E_NOTIMPL; ++ struct color_converter *converter = impl_color_converter_from_IMFTransform(iface); ++ ++ TRACE("%p, %u, %p.\n", converter, id, type); ++ ++ if (id != 0) ++ return MF_E_INVALIDSTREAMNUMBER; ++ ++ if (FAILED(hr = MFCreateMediaType(&ret))) ++ return hr; ++ ++ EnterCriticalSection(&converter->cs); ++ ++ if (converter->output_type) ++ hr = IMFMediaType_CopyAllItems(converter->output_type, (IMFAttributes *)ret); ++ else ++ hr = MF_E_TRANSFORM_TYPE_NOT_SET; ++ ++ LeaveCriticalSection(&converter->cs); ++ ++ if (SUCCEEDED(hr)) ++ *type = ret; ++ else ++ IMFMediaType_Release(ret); ++ ++ return hr; + } + + static HRESULT WINAPI color_converter_GetInputStatus(IMFTransform *iface, DWORD id, DWORD *flags) +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0015-winegstreamer-Implement-IMFMediaSource-Stop.patch b/patches/mfplat-streaming-support/0018-winegstreamer-Implement-IMFMediaSource-Stop.patch similarity index 82% rename from patches/mfplat-streaming-support/0015-winegstreamer-Implement-IMFMediaSource-Stop.patch rename to patches/mfplat-streaming-support/0018-winegstreamer-Implement-IMFMediaSource-Stop.patch index 2a7192b4..a03adf39 100644 --- a/patches/mfplat-streaming-support/0015-winegstreamer-Implement-IMFMediaSource-Stop.patch +++ b/patches/mfplat-streaming-support/0018-winegstreamer-Implement-IMFMediaSource-Stop.patch @@ -1,15 +1,15 @@ -From c6563305821336faffd5089cf9ee365bcbaf1f05 Mon Sep 17 00:00:00 2001 +From 1472041682ce09e0e8bdda78ed0366fba6aa41a0 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Thu, 7 May 2020 13:09:47 -0500 Subject: [PATCH] winegstreamer: Implement IMFMediaSource::Stop. Signed-off-by: Derek Lesho --- - dlls/winegstreamer/media_source.c | 29 +++++++++++++++++++++++++++-- - 1 file changed, 27 insertions(+), 2 deletions(-) + dlls/winegstreamer/media_source.c | 31 +++++++++++++++++++++++++++++-- + 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 5c502cf3ed5..7d677e39feb 100644 +index 5c502cf3ed5..655e765fee7 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -64,6 +64,7 @@ struct media_stream @@ -20,15 +20,17 @@ index 5c502cf3ed5..7d677e39feb 100644 SOURCE_ASYNC_REQUEST_SAMPLE, }; -@@ -343,6 +344,22 @@ static void start_pipeline(struct media_source *source, struct source_async_comm +@@ -343,6 +344,24 @@ static void start_pipeline(struct media_source *source, struct source_async_comm gst_element_set_state(source->container, GST_STATE_PLAYING); } +static void stop_pipeline(struct media_source *source) +{ ++ unsigned int i; ++ + gst_element_set_state(source->container, GST_STATE_PAUSED); + -+ for (unsigned int i = 0; i < source->stream_count; i++) ++ for (i = 0; i < source->stream_count; i++) + { + struct media_stream *stream = source->streams[i]; + if (stream->state != STREAM_INACTIVE) @@ -43,7 +45,7 @@ index 5c502cf3ed5..7d677e39feb 100644 static void dispatch_end_of_presentation(struct media_source *source) { PROPVARIANT empty = {.vt = VT_EMPTY}; -@@ -417,6 +434,9 @@ static HRESULT WINAPI source_async_commands_Invoke(IMFAsyncCallback *iface, IMFA +@@ -417,6 +436,9 @@ static HRESULT WINAPI source_async_commands_Invoke(IMFAsyncCallback *iface, IMFA case SOURCE_ASYNC_START: start_pipeline(source, command); break; @@ -53,7 +55,7 @@ index 5c502cf3ed5..7d677e39feb 100644 case SOURCE_ASYNC_REQUEST_SAMPLE: wait_on_sample(command->u.request_sample.stream, command->u.request_sample.token); break; -@@ -1087,13 +1107,18 @@ static HRESULT WINAPI media_source_Start(IMFMediaSource *iface, IMFPresentationD +@@ -1087,13 +1109,18 @@ static HRESULT WINAPI media_source_Start(IMFMediaSource *iface, IMFPresentationD static HRESULT WINAPI media_source_Stop(IMFMediaSource *iface) { struct media_source *source = impl_from_IMFMediaSource(iface); diff --git a/patches/mfplat-streaming-support/0016-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-on-raw-video-types.patch b/patches/mfplat-streaming-support/0019-winegstreamer-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-attr.patch similarity index 67% rename from patches/mfplat-streaming-support/0016-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-on-raw-video-types.patch rename to patches/mfplat-streaming-support/0019-winegstreamer-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-attr.patch index 0618c8fe..89bcd342 100644 --- a/patches/mfplat-streaming-support/0016-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-on-raw-video-types.patch +++ b/patches/mfplat-streaming-support/0019-winegstreamer-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-attr.patch @@ -1,17 +1,19 @@ -From ae56ea765474f1881070e72fa029b3a5229a97db Mon Sep 17 00:00:00 2001 +From fbf25644246c31e0116b319a1876c89697c07bc5 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 25 Nov 2020 12:29:50 -0500 -Subject: [PATCH] Set MF_MT_ALL_SAMPLES_INDEPENDENT on raw video types. +Subject: [PATCH] winegstreamer: Set MF_MT_ALL_SAMPLES_INDEPENDENT attribute on + raw video media types. +Signed-off-by: Derek Lesho --- dlls/winegstreamer/mfplat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index e5255937387..4e0a9c10f9d 100644 +index 1b19c43d991..f4a0c5b00f0 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -610,6 +610,7 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) +@@ -604,6 +604,7 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) unsigned int i; IMFMediaType_SetUINT32(media_type, &MF_MT_COMPRESSED, FALSE); diff --git a/patches/mfplat-streaming-support/0020-mf-Add-invalid-connect-method-test.patch b/patches/mfplat-streaming-support/0020-mf-Add-invalid-connect-method-test.patch new file mode 100644 index 00000000..856b79e6 --- /dev/null +++ b/patches/mfplat-streaming-support/0020-mf-Add-invalid-connect-method-test.patch @@ -0,0 +1,54 @@ +From 539f0ad63d83dd1f60a9a54063f3cb108d71f794 Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Mon, 30 Nov 2020 11:56:48 -0500 +Subject: [PATCH] mf: Add invalid connect method test. + +Nikolay stripped out this test in his updated version of the patchset, which is fine. But I think it's useful to have it somewhere. + +Signed-off-by: Derek Lesho +--- + dlls/mf/tests/mf.c | 28 ++++++++++++++++++++++++++++ + 1 file changed, 28 insertions(+) + +diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c +index 8272064466f..32ae84b837b 100644 +--- a/dlls/mf/tests/mf.c ++++ b/dlls/mf/tests/mf.c +@@ -1824,6 +1824,34 @@ static void test_topology_loader(void) + LOADER_TODO, + }, + ++ { ++ /* MP3 -> PCM */ ++ &MFMediaType_Audio, ++ { ++ { ++ { &MF_MT_SUBTYPE, WAVE_FORMAT_MPEGLAYER3 }, ++ { &MF_MT_AUDIO_NUM_CHANNELS, 2 }, ++ { &MF_MT_AUDIO_SAMPLES_PER_SECOND, 44100 }, ++ { &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, 16000 }, ++ { &MF_MT_AUDIO_BLOCK_ALIGNMENT, 1 }, ++ } ++ }, ++ { ++ { ++ { &MF_MT_SUBTYPE, WAVE_FORMAT_PCM }, ++ { &MF_MT_AUDIO_NUM_CHANNELS, 1 }, ++ { &MF_MT_AUDIO_SAMPLES_PER_SECOND, 44100 }, ++ { &MF_MT_AUDIO_AVG_BYTES_PER_SECOND, 44100 }, ++ { &MF_MT_AUDIO_BLOCK_ALIGNMENT, 1 }, ++ { &MF_MT_AUDIO_BITS_PER_SAMPLE, 8 }, ++ } ++ }, ++ ++ MF_CONNECT_ALLOW_DECODER &~ MF_CONNECT_ALLOW_CONVERTER, ++ MF_E_INVALIDMEDIATYPE, ++ LOADER_TODO, ++ }, ++ + { + /* MP3 -> PCM */ + &MFMediaType_Audio, +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0021-Allow-for-compressed-types.patch b/patches/mfplat-streaming-support/0021-Allow-for-compressed-types.patch new file mode 100644 index 00000000..9825d30d --- /dev/null +++ b/patches/mfplat-streaming-support/0021-Allow-for-compressed-types.patch @@ -0,0 +1,71 @@ +From dd7243f4ee9f7bee1019621c974f98737b760905 Mon Sep 17 00:00:00 2001 +From: Derek Lesho +Date: Wed, 2 Dec 2020 17:12:22 -0500 +Subject: [PATCH] Allow for compressed types. + +--- + dlls/winegstreamer/mfplat.c | 28 ++++++++++++++++++---------- + 1 file changed, 18 insertions(+), 10 deletions(-) + +diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c +index f4a0c5b00f0..8d2d8996f22 100644 +--- a/dlls/winegstreamer/mfplat.c ++++ b/dlls/winegstreamer/mfplat.c +@@ -779,22 +779,20 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) + { + DWORD rate = -1, channels = -1, channel_mask = -1; + +- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &rate))) +- { +- ERR("Sample rate not set.\n"); +- return NULL; +- } +- if (FAILED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &channels))) +- { +- ERR("Channel count not set.\n"); +- return NULL; +- } ++ IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_SAMPLES_PER_SECOND, &rate); ++ IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_NUM_CHANNELS, &channels); + IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_CHANNEL_MASK, &channel_mask); + + if (IsEqualGUID(&subtype, &MFAudioFormat_Float)) + { + GstAudioInfo float_info; + ++ if (rate == -1 || channels == -1) ++ { ++ ERR("Incomplete media type.\n"); ++ return NULL; ++ } ++ + gst_audio_info_set_format(&float_info, GST_AUDIO_FORMAT_F32LE, rate, channels, NULL); + output = gst_audio_info_to_caps(&float_info); + } +@@ -804,6 +802,12 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) + GstAudioInfo pcm_info; + DWORD bits_per_sample; + ++ if (rate == -1 || channels == -1) ++ { ++ ERR("Incomplete media type.\n"); ++ return NULL; ++ } ++ + if (SUCCEEDED(IMFMediaType_GetUINT32(type, &MF_MT_AUDIO_BITS_PER_SAMPLE, &bits_per_sample))) + { + pcm_format = gst_audio_format_build_integer(bits_per_sample > 8, G_LITTLE_ENDIAN, bits_per_sample, bits_per_sample); +@@ -823,6 +827,10 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) + return NULL; + } + ++ if (rate != -1) ++ gst_caps_set_simple(output, "rate", G_TYPE_INT, rate, NULL); ++ if (channels != -1) ++ gst_caps_set_simple(output, "channels", G_TYPE_INT, channels, NULL); + if (channel_mask != -1) + gst_caps_set_simple(output, "channel-mask", GST_TYPE_BITMASK, (guint64) channel_mask, NULL); + +-- +2.29.2 + diff --git a/patches/mfplat-streaming-support/0012-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch b/patches/mfplat-streaming-support/0022-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch similarity index 95% rename from patches/mfplat-streaming-support/0012-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch rename to patches/mfplat-streaming-support/0022-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch index 633cdae3..0239d05c 100644 --- a/patches/mfplat-streaming-support/0012-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch +++ b/patches/mfplat-streaming-support/0022-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch @@ -1,4 +1,4 @@ -From 364f264ab7d77047fe9082cdeab885fe0461c68f Mon Sep 17 00:00:00 2001 +From 3b4148fbc1338e6a202d852491eba1362c905bfc Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 14 Oct 2020 11:07:05 -0500 Subject: [PATCH] mf/session: Unconditionally deliver NULL (EOS) samples. diff --git a/patches/mfplat-streaming-support/0013-mf-session-Request-more-samples-when-a-transform-nee.patch b/patches/mfplat-streaming-support/0023-mf-session-Request-more-samples-when-a-transform-nee.patch similarity index 96% rename from patches/mfplat-streaming-support/0013-mf-session-Request-more-samples-when-a-transform-nee.patch rename to patches/mfplat-streaming-support/0023-mf-session-Request-more-samples-when-a-transform-nee.patch index bb611628..acbff915 100644 --- a/patches/mfplat-streaming-support/0013-mf-session-Request-more-samples-when-a-transform-nee.patch +++ b/patches/mfplat-streaming-support/0023-mf-session-Request-more-samples-when-a-transform-nee.patch @@ -1,4 +1,4 @@ -From c6cfead684074a72b5f55a2f5f4070a743b09862 Mon Sep 17 00:00:00 2001 +From e1c9fe73263c2220be53482d195264832842279e Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Thu, 2 Apr 2020 15:42:18 -0500 Subject: [PATCH] mf/session: Request more samples when a transform needs them. diff --git a/patches/mfplat-streaming-support/0017-HACK-Flush-decoder-when-changing-times.patch b/patches/mfplat-streaming-support/0024-HACK-Flush-decoder-when-changing-times.patch similarity index 83% rename from patches/mfplat-streaming-support/0017-HACK-Flush-decoder-when-changing-times.patch rename to patches/mfplat-streaming-support/0024-HACK-Flush-decoder-when-changing-times.patch index da3d15ef..cb672e38 100644 --- a/patches/mfplat-streaming-support/0017-HACK-Flush-decoder-when-changing-times.patch +++ b/patches/mfplat-streaming-support/0024-HACK-Flush-decoder-when-changing-times.patch @@ -1,4 +1,4 @@ -From 446501feb60dbff0305449647b316ab99ecbb995 Mon Sep 17 00:00:00 2001 +From b25ab6a73f44bdab1a4ce782a27a8b3f1213cf64 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Thu, 15 Oct 2020 12:18:10 -0500 Subject: [PATCH] HACK: Flush decoder when changing times. @@ -8,10 +8,10 @@ Subject: [PATCH] HACK: Flush decoder when changing times. 1 file changed, 3 insertions(+) diff --git a/dlls/mf/session.c b/dlls/mf/session.c -index ae10548b304..b29cacf8a77 100644 +index 5a08a2eb6c6..a6bc7803390 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c -@@ -2331,7 +2331,10 @@ static void session_set_presentation_clock(struct media_session *session) +@@ -2326,7 +2326,10 @@ static void session_set_presentation_clock(struct media_session *session) LIST_FOR_EACH_ENTRY(node, &session->presentation.nodes, struct topo_node, entry) { if (node->type == MF_TOPOLOGY_TRANSFORM_NODE) diff --git a/patches/mfplat-streaming-support/0018-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch b/patches/mfplat-streaming-support/0025-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch similarity index 94% rename from patches/mfplat-streaming-support/0018-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch rename to patches/mfplat-streaming-support/0025-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch index d5e0a22b..c5f33aa4 100644 --- a/patches/mfplat-streaming-support/0018-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch +++ b/patches/mfplat-streaming-support/0025-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch @@ -1,4 +1,4 @@ -From 1506f79c2e68478112ee52709a19a4a298ebc399 Mon Sep 17 00:00:00 2001 +From 8b681e5bd589b330790a0e887f5dbcd380e84a05 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Mon, 2 Nov 2020 09:56:54 -0600 Subject: [PATCH] winegstreamer: Add IMFSeekInfo::GetNearestKeyFrames stub. @@ -9,7 +9,7 @@ Signed-off-by: Derek Lesho 1 file changed, 111 insertions(+) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 7d677e39feb..18d9f016aa0 100644 +index 655e765fee7..a0bce3cfe9d 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -92,6 +92,8 @@ struct source_async_command @@ -38,7 +38,7 @@ index 7d677e39feb..18d9f016aa0 100644 static inline struct media_source *impl_from_async_commands_callback_IMFAsyncCallback(IMFAsyncCallback *iface) { return CONTAINING_RECORD(iface, struct media_source, async_commands_callback); -@@ -976,6 +988,10 @@ static HRESULT WINAPI media_source_QueryInterface(IMFMediaSource *iface, REFIID +@@ -978,6 +990,10 @@ static HRESULT WINAPI media_source_QueryInterface(IMFMediaSource *iface, REFIID { *out = &source->IMFMediaSource_iface; } @@ -49,7 +49,7 @@ index 7d677e39feb..18d9f016aa0 100644 else { FIXME("(%s, %p)\n", debugstr_guid(riid), out); -@@ -1210,6 +1226,99 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl = +@@ -1212,6 +1228,99 @@ static const IMFMediaSourceVtbl IMFMediaSource_vtbl = media_source_Shutdown, }; @@ -149,7 +149,7 @@ index 7d677e39feb..18d9f016aa0 100644 static void stream_added(GstElement *element, GstPad *pad, gpointer user) { struct media_source *source = user; -@@ -1281,6 +1390,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1283,6 +1392,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ return E_OUTOFMEMORY; object->IMFMediaSource_iface.lpVtbl = &IMFMediaSource_vtbl; diff --git a/patches/mfplat-streaming-support/0019-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch b/patches/mfplat-streaming-support/0026-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch similarity index 89% rename from patches/mfplat-streaming-support/0019-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch rename to patches/mfplat-streaming-support/0026-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch index a297062b..344ea71e 100644 --- a/patches/mfplat-streaming-support/0019-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch +++ b/patches/mfplat-streaming-support/0026-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch @@ -1,4 +1,4 @@ -From 938b5aed7b1f752ee15a17a7bd501ba9945df7e2 Mon Sep 17 00:00:00 2001 +From 18dea0ccadf90b4ac523dc1073c3870fdd6bcf6a Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Fri, 6 Nov 2020 10:06:23 -0600 Subject: [PATCH] winegstreamer: Fixup raw audio caps to be compatible with @@ -12,11 +12,11 @@ Signed-off-by: Derek Lesho 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 1fa13560e8a..6a6da817d58 100644 +index 075e0ce1f0f..dcf76554b6d 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h -@@ -78,6 +78,7 @@ void start_dispatch_thread(void) DECLSPEC_HIDDEN; - extern HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) DECLSPEC_HIDDEN; +@@ -79,6 +79,7 @@ extern HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) + extern HRESULT mfplat_DllRegisterServer(void) DECLSPEC_HIDDEN; HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN; +GstCaps *make_mf_compatible_caps(GstCaps *caps) DECLSPEC_HIDDEN; @@ -24,10 +24,10 @@ index 1fa13560e8a..6a6da817d58 100644 GstCaps *caps_from_mf_media_type(IMFMediaType *type) DECLSPEC_HIDDEN; IMFSample *mf_sample_from_gst_buffer(GstBuffer *in) DECLSPEC_HIDDEN; diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 18d9f016aa0..83891153bc0 100644 +index a0bce3cfe9d..5f3457e50b0 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -889,15 +889,20 @@ fail: +@@ -891,15 +891,20 @@ fail: static HRESULT media_stream_init_desc(struct media_stream *stream) { @@ -50,10 +50,10 @@ index 18d9f016aa0..83891153bc0 100644 if (!strcmp(major_type, "video/x-raw")) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 4e0a9c10f9d..dd8b1a2a542 100644 +index 8d2d8996f22..a2873907437 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -716,6 +716,63 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) +@@ -710,6 +710,63 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) return media_type; } diff --git a/patches/mfplat-streaming-support/0020-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch b/patches/mfplat-streaming-support/0027-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch similarity index 87% rename from patches/mfplat-streaming-support/0020-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch rename to patches/mfplat-streaming-support/0027-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch index 15fe640f..f6292614 100644 --- a/patches/mfplat-streaming-support/0020-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch +++ b/patches/mfplat-streaming-support/0027-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch @@ -1,4 +1,4 @@ -From c7474cf94097b935da7b135c9f911e048b97f47f Mon Sep 17 00:00:00 2001 +From fe0175d8676cbd15ddeac07876e726ef76eef7b5 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Mon, 2 Nov 2020 10:18:27 -0600 Subject: [PATCH] winegstreamer: Set MF_PD_MIME_TYPE on source's presentation @@ -10,10 +10,10 @@ Signed-off-by: Derek Lesho 1 file changed, 13 insertions(+) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 83891153bc0..ba6bddc0af5 100644 +index 5f3457e50b0..1bbbb2ffd81 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -1375,6 +1375,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1377,6 +1377,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ GST_STATIC_PAD_TEMPLATE("mf_src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); IMFStreamDescriptor **descriptors = NULL; @@ -21,7 +21,7 @@ index 83891153bc0..ba6bddc0af5 100644 struct media_source *object; gint64 total_pres_time = 0; DWORD bytestream_caps; -@@ -1518,6 +1519,18 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1520,6 +1521,18 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ if (object->stream_count) IMFPresentationDescriptor_SetUINT64(object->pres_desc, &MF_PD_DURATION, total_pres_time / 100); diff --git a/patches/mfplat-streaming-support/0021-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch b/patches/mfplat-streaming-support/0028-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch similarity index 93% rename from patches/mfplat-streaming-support/0021-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch rename to patches/mfplat-streaming-support/0028-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch index b7d65b50..33b8eadd 100644 --- a/patches/mfplat-streaming-support/0021-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch +++ b/patches/mfplat-streaming-support/0028-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch @@ -1,4 +1,4 @@ -From ff4f51df0a12f39b0afd72ab0425684d54531876 Mon Sep 17 00:00:00 2001 +From 7bb33ab950fe2fdddcd5e7409827be982044f813 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 15 Sep 2020 14:25:26 -0500 Subject: [PATCH] winegstreamer: Insert parser into pipeline to rectify type @@ -10,10 +10,10 @@ Signed-off-by: Derek Lesho 1 file changed, 92 insertions(+), 3 deletions(-) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index ba6bddc0af5..941d7c27473 100644 +index 1bbbb2ffd81..aecf4f27375 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -789,8 +789,17 @@ static const IMFMediaStreamVtbl media_stream_vtbl = +@@ -791,8 +791,17 @@ static const IMFMediaStreamVtbl media_stream_vtbl = media_stream_RequestSample }; @@ -33,7 +33,7 @@ index ba6bddc0af5..941d7c27473 100644 static HRESULT media_stream_connect_to_sink(struct media_stream *stream) { GstCaps *source_caps = gst_pad_query_caps(stream->their_src, NULL); -@@ -830,7 +839,68 @@ static HRESULT media_stream_connect_to_sink(struct media_stream *stream) +@@ -832,7 +841,68 @@ static HRESULT media_stream_connect_to_sink(struct media_stream *stream) } else { @@ -103,7 +103,7 @@ index ba6bddc0af5..941d7c27473 100644 } if (gst_pad_link(stream->their_src, stream->my_sink) != GST_PAD_LINK_OK) -@@ -1324,6 +1394,23 @@ static const IMFSeekInfoVtbl IMFSeekInfo_vtbl = +@@ -1326,6 +1396,23 @@ static const IMFSeekInfoVtbl IMFSeekInfo_vtbl = source_seek_info_GetNearestKeyFrames, }; @@ -127,7 +127,7 @@ index ba6bddc0af5..941d7c27473 100644 static void stream_added(GstElement *element, GstPad *pad, gpointer user) { struct media_source *source = user; -@@ -1443,6 +1530,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1445,6 +1532,8 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ gst_bin_add(GST_BIN(object->container), object->decodebin); diff --git a/patches/mfplat-streaming-support/0022-winegstreamer-Translate-H.264-caps-to-attributes.patch b/patches/mfplat-streaming-support/0029-winegstreamer-Translate-H.264-caps-to-attributes.patch similarity index 94% rename from patches/mfplat-streaming-support/0022-winegstreamer-Translate-H.264-caps-to-attributes.patch rename to patches/mfplat-streaming-support/0029-winegstreamer-Translate-H.264-caps-to-attributes.patch index fde809d3..1841380b 100644 --- a/patches/mfplat-streaming-support/0022-winegstreamer-Translate-H.264-caps-to-attributes.patch +++ b/patches/mfplat-streaming-support/0029-winegstreamer-Translate-H.264-caps-to-attributes.patch @@ -1,4 +1,4 @@ -From ad124c30b95bac3cdfeb4e0c8fd5607dcb23a375 Mon Sep 17 00:00:00 2001 +From d95e8d8349b884800066c9af1ea9a7c7492ca02c Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 24 Mar 2020 16:00:26 -0500 Subject: [PATCH] winegstreamer: Translate H.264 caps to attributes. @@ -9,7 +9,7 @@ Signed-off-by: Derek Lesho 1 file changed, 75 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index dd8b1a2a542..d853c46ec58 100644 +index a2873907437..afce3d9831a 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -26,6 +26,7 @@ @@ -20,7 +20,7 @@ index dd8b1a2a542..d853c46ec58 100644 #include "wine/debug.h" #include "wine/heap.h" -@@ -635,6 +636,74 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) +@@ -629,6 +630,74 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) } } } @@ -95,7 +95,7 @@ index dd8b1a2a542..d853c46ec58 100644 else { FIXME("Unrecognized video format %s\n", mime_type); -@@ -760,6 +829,12 @@ GstCaps *make_mf_compatible_caps(GstCaps *caps) +@@ -754,6 +823,12 @@ GstCaps *make_mf_compatible_caps(GstCaps *caps) } } } diff --git a/patches/mfplat-streaming-support/0023-winegstreamer-Translate-WMV-caps-to-attributes.patch b/patches/mfplat-streaming-support/0030-winegstreamer-Translate-WMV-caps-to-attributes.patch similarity index 92% rename from patches/mfplat-streaming-support/0023-winegstreamer-Translate-WMV-caps-to-attributes.patch rename to patches/mfplat-streaming-support/0030-winegstreamer-Translate-WMV-caps-to-attributes.patch index 5f1acc49..83cecf5e 100644 --- a/patches/mfplat-streaming-support/0023-winegstreamer-Translate-WMV-caps-to-attributes.patch +++ b/patches/mfplat-streaming-support/0030-winegstreamer-Translate-WMV-caps-to-attributes.patch @@ -1,4 +1,4 @@ -From 5e15609b9f1e4e70e11257464999ba9c62bf998a Mon Sep 17 00:00:00 2001 +From 10dcfecc84651a4c2a270960c585c735ff09ec1c Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 24 Mar 2020 16:01:20 -0500 Subject: [PATCH] winegstreamer: Translate WMV caps to attributes. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 51 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index d853c46ec58..4b0b9cba300 100644 +index afce3d9831a..6906fd3faeb 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -570,6 +570,24 @@ uncompressed_video_formats[] = +@@ -564,6 +564,24 @@ uncompressed_video_formats[] = {&MFVideoFormat_RGB555, GST_VIDEO_FORMAT_BGR15}, }; @@ -37,7 +37,7 @@ index d853c46ec58..4b0b9cba300 100644 /* returns NULL if doesn't match exactly */ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) { -@@ -704,6 +722,39 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) +@@ -698,6 +716,39 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) } } } diff --git a/patches/mfplat-streaming-support/0024-winegstreamer-Translate-AAC-caps-to-attributes.patch b/patches/mfplat-streaming-support/0031-winegstreamer-Translate-AAC-caps-to-attributes.patch similarity index 96% rename from patches/mfplat-streaming-support/0024-winegstreamer-Translate-AAC-caps-to-attributes.patch rename to patches/mfplat-streaming-support/0031-winegstreamer-Translate-AAC-caps-to-attributes.patch index ab7c75aa..9074f05a 100644 --- a/patches/mfplat-streaming-support/0024-winegstreamer-Translate-AAC-caps-to-attributes.patch +++ b/patches/mfplat-streaming-support/0031-winegstreamer-Translate-AAC-caps-to-attributes.patch @@ -1,4 +1,4 @@ -From 05be1cc0fef98b3936c3a61ed5e2878cdde3bd20 Mon Sep 17 00:00:00 2001 +From 90d881fc889fdaedc7e44c0bee5e54634c0d065c Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 24 Mar 2020 16:02:27 -0500 Subject: [PATCH] winegstreamer: Translate AAC caps to attributes. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 108 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 4b0b9cba300..8a8e2d076c5 100644 +index 6906fd3faeb..66048f359e5 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -570,6 +570,15 @@ uncompressed_video_formats[] = +@@ -564,6 +564,15 @@ uncompressed_video_formats[] = {&MFVideoFormat_RGB555, GST_VIDEO_FORMAT_BGR15}, }; @@ -28,7 +28,7 @@ index 4b0b9cba300..8a8e2d076c5 100644 static void codec_data_to_user_data(GstStructure *structure, IMFMediaType *type) { const GValue *codec_data; -@@ -820,6 +829,105 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) +@@ -814,6 +823,105 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) IMFMediaType_SetUINT32(media_type, &MF_MT_AUDIO_BITS_PER_SAMPLE, depth); } diff --git a/patches/mfplat-streaming-support/0025-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch b/patches/mfplat-streaming-support/0032-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch similarity index 88% rename from patches/mfplat-streaming-support/0025-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch rename to patches/mfplat-streaming-support/0032-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch index 7058cd25..c66c1a4a 100644 --- a/patches/mfplat-streaming-support/0025-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch +++ b/patches/mfplat-streaming-support/0032-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch @@ -1,4 +1,4 @@ -From 0ad065da0f4f991d1475ccecae63bcd82165b0c9 Mon Sep 17 00:00:00 2001 +From c4955ec1798428fe9941cdbb9fed146f3d29dbe2 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 25 Mar 2020 13:36:19 -0500 Subject: [PATCH] winegstreamer: Translate MPEG-4 Section-2 caps to attributes. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 16 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 8a8e2d076c5..1ed1c70e7e6 100644 +index 66048f359e5..090952e7d2b 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -764,6 +764,22 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) +@@ -758,6 +758,22 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) codec_data_to_user_data(info, media_type); } diff --git a/patches/mfplat-streaming-support/0026-winegstreamer-Translate-WMA-caps-to-attributes.patch b/patches/mfplat-streaming-support/0033-winegstreamer-Translate-WMA-caps-to-attributes.patch similarity index 90% rename from patches/mfplat-streaming-support/0026-winegstreamer-Translate-WMA-caps-to-attributes.patch rename to patches/mfplat-streaming-support/0033-winegstreamer-Translate-WMA-caps-to-attributes.patch index d802a5db..21b6a354 100644 --- a/patches/mfplat-streaming-support/0026-winegstreamer-Translate-WMA-caps-to-attributes.patch +++ b/patches/mfplat-streaming-support/0033-winegstreamer-Translate-WMA-caps-to-attributes.patch @@ -1,4 +1,4 @@ -From 098b390f1d6f3fa2f481de0e5e45847084cbab8c Mon Sep 17 00:00:00 2001 +From 56ac324cb533bde61e25bc86a29440aec7111764 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 12 May 2020 17:05:41 -0500 Subject: [PATCH] winegstreamer: Translate WMA caps to attributes. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 24 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 1ed1c70e7e6..18f9c42ca8b 100644 +index 090952e7d2b..b2f8f0b83c1 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -944,6 +944,30 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) +@@ -938,6 +938,30 @@ IMFMediaType *mf_media_type_from_caps(const GstCaps *caps) FIXME("Unhandled mpegversion %d\n", mpeg_version); } } diff --git a/patches/mfplat-streaming-support/0027-winegstreamer-Translate-H.264-attributes-to-caps.patch b/patches/mfplat-streaming-support/0034-winegstreamer-Translate-H.264-attributes-to-caps.patch similarity index 95% rename from patches/mfplat-streaming-support/0027-winegstreamer-Translate-H.264-attributes-to-caps.patch rename to patches/mfplat-streaming-support/0034-winegstreamer-Translate-H.264-attributes-to-caps.patch index 85fb20e9..3973bae1 100644 --- a/patches/mfplat-streaming-support/0027-winegstreamer-Translate-H.264-attributes-to-caps.patch +++ b/patches/mfplat-streaming-support/0034-winegstreamer-Translate-H.264-attributes-to-caps.patch @@ -1,4 +1,4 @@ -From 8882fbbd49aaf97f7a45db8a03a6c6b362c59e66 Mon Sep 17 00:00:00 2001 +From 6ace23bd172cb48c7e326fd3013624a73cdf8c10 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 24 Mar 2020 16:18:40 -0500 Subject: [PATCH] winegstreamer: Translate H.264 attributes to caps. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 71 insertions(+), 19 deletions(-) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 18f9c42ca8b..17ef78667d8 100644 +index b2f8f0b83c1..e02f0dfbc5c 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -1062,10 +1062,6 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) +@@ -1056,10 +1056,6 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) { UINT64 frame_rate = 0, frame_size = 0; DWORD width, height; @@ -23,7 +23,7 @@ index 18f9c42ca8b..17ef78667d8 100644 if (FAILED(IMFMediaType_GetUINT64(type, &MF_MT_FRAME_SIZE, &frame_size))) return NULL; -@@ -1074,28 +1070,84 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) +@@ -1068,28 +1064,84 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) output = gst_caps_new_empty_simple("video/x-raw"); diff --git a/patches/mfplat-streaming-support/0028-winegstreamer-Translate-WMV-attributes-to-caps.patch b/patches/mfplat-streaming-support/0035-winegstreamer-Translate-WMV-attributes-to-caps.patch similarity index 92% rename from patches/mfplat-streaming-support/0028-winegstreamer-Translate-WMV-attributes-to-caps.patch rename to patches/mfplat-streaming-support/0035-winegstreamer-Translate-WMV-attributes-to-caps.patch index d444c10f..8c2975b6 100644 --- a/patches/mfplat-streaming-support/0028-winegstreamer-Translate-WMV-attributes-to-caps.patch +++ b/patches/mfplat-streaming-support/0035-winegstreamer-Translate-WMV-attributes-to-caps.patch @@ -1,4 +1,4 @@ -From 77a54feb2c4a025102cf0a96b71d47ebfd388daa Mon Sep 17 00:00:00 2001 +From 5f71506e9482e475bb636a4d3738734afe004443 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 24 Mar 2020 16:20:17 -0500 Subject: [PATCH] winegstreamer: Translate WMV attributes to caps. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 51 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 17ef78667d8..d7d6a46d73a 100644 +index e02f0dfbc5c..2456d633c6c 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -1047,6 +1047,21 @@ GstCaps *make_mf_compatible_caps(GstCaps *caps) +@@ -1041,6 +1041,21 @@ GstCaps *make_mf_compatible_caps(GstCaps *caps) return ret; } @@ -34,7 +34,7 @@ index 17ef78667d8..d7d6a46d73a 100644 GstCaps *caps_from_mf_media_type(IMFMediaType *type) { GUID major_type; -@@ -1118,6 +1133,42 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) +@@ -1112,6 +1127,42 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) gst_caps_set_simple(output, "level", G_TYPE_STRING, level, NULL); } } diff --git a/patches/mfplat-streaming-support/0029-winegstreamer-Translate-AAC-attributes-to-caps.patch b/patches/mfplat-streaming-support/0036-winegstreamer-Translate-AAC-attributes-to-caps.patch similarity index 95% rename from patches/mfplat-streaming-support/0029-winegstreamer-Translate-AAC-attributes-to-caps.patch rename to patches/mfplat-streaming-support/0036-winegstreamer-Translate-AAC-attributes-to-caps.patch index bd590074..1cba7371 100644 --- a/patches/mfplat-streaming-support/0029-winegstreamer-Translate-AAC-attributes-to-caps.patch +++ b/patches/mfplat-streaming-support/0036-winegstreamer-Translate-AAC-attributes-to-caps.patch @@ -1,4 +1,4 @@ -From 6cc3427929ad7e824afa65d3ca3e10c1fa2b81a4 Mon Sep 17 00:00:00 2001 +From 09b135accfd48e079d6a2a3862e647b66b872b15 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 21 Apr 2020 10:31:02 -0500 Subject: [PATCH] winegstreamer: Translate AAC attributes to caps. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 66 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index d7d6a46d73a..a2e9ba3a5f7 100644 +index 2456d633c6c..b1f83f4fa6c 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -1249,6 +1249,72 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) +@@ -1255,6 +1255,72 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) return NULL; } } diff --git a/patches/mfplat-streaming-support/0030-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch b/patches/mfplat-streaming-support/0037-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch similarity index 85% rename from patches/mfplat-streaming-support/0030-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch rename to patches/mfplat-streaming-support/0037-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch index 1f10ec26..a36690c9 100644 --- a/patches/mfplat-streaming-support/0030-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch +++ b/patches/mfplat-streaming-support/0037-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch @@ -1,4 +1,4 @@ -From b6d752722d031d298ea6e5465994a7fa8220c646 Mon Sep 17 00:00:00 2001 +From 9638f311e7d31f5e4aa80e173c31396d774afb75 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Mon, 11 May 2020 16:03:09 -0500 Subject: [PATCH] winegstreamer: Translate MPEG-4 Section-2 attributes to caps. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 8 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index a2e9ba3a5f7..51faa95fcc9 100644 +index b1f83f4fa6c..8906e472766 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -1169,6 +1169,14 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) +@@ -1163,6 +1163,14 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) user_data_to_codec_data(type, output); } diff --git a/patches/mfplat-streaming-support/0031-winegstreamer-Translate-WMA-attributes-to-caps.patch b/patches/mfplat-streaming-support/0038-winegstreamer-Translate-WMA-attributes-to-caps.patch similarity index 88% rename from patches/mfplat-streaming-support/0031-winegstreamer-Translate-WMA-attributes-to-caps.patch rename to patches/mfplat-streaming-support/0038-winegstreamer-Translate-WMA-attributes-to-caps.patch index 5fe2d554..e0dac18c 100644 --- a/patches/mfplat-streaming-support/0031-winegstreamer-Translate-WMA-attributes-to-caps.patch +++ b/patches/mfplat-streaming-support/0038-winegstreamer-Translate-WMA-attributes-to-caps.patch @@ -1,4 +1,4 @@ -From 236f4ec9c0e01ef0b166bd3ab1e06b411ef43ffc Mon Sep 17 00:00:00 2001 +From e16c1d7b27467663a90eb23863d8110627ec3ad1 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 12 May 2020 17:05:59 -0500 Subject: [PATCH] winegstreamer: Translate WMA attributes to caps. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 15 insertions(+) diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 51faa95fcc9..65d2d2efd64 100644 +index 8906e472766..bf3486d2be8 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -1323,6 +1323,21 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) +@@ -1329,6 +1329,21 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) CoTaskMemFree(user_data); } } diff --git a/patches/mfplat-streaming-support/0032-tools-Add-support-for-multiple-parent-directories.patch b/patches/mfplat-streaming-support/0039-tools-Add-support-for-multiple-parent-directories.patch similarity index 95% rename from patches/mfplat-streaming-support/0032-tools-Add-support-for-multiple-parent-directories.patch rename to patches/mfplat-streaming-support/0039-tools-Add-support-for-multiple-parent-directories.patch index dbafa68c..7e62bd7a 100644 --- a/patches/mfplat-streaming-support/0032-tools-Add-support-for-multiple-parent-directories.patch +++ b/patches/mfplat-streaming-support/0039-tools-Add-support-for-multiple-parent-directories.patch @@ -1,4 +1,4 @@ -From d2e9ca17ba7f224ba465358aa3502678b0ed7025 Mon Sep 17 00:00:00 2001 +From dd690ffa7c0a3b2a067f0f2fc1ec7f99cfc9d343 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 29 Jan 2020 15:37:39 -0600 Subject: [PATCH] tools: Add support for multiple parent directories. @@ -91,10 +91,10 @@ index 2d3c14cb2ec..cb4a808244d 100755 } diff --git a/tools/makedep.c b/tools/makedep.c -index cee64fd61bf..bf22af33572 100644 +index d892b7e9541..688487ffd82 100644 --- a/tools/makedep.c +++ b/tools/makedep.c -@@ -184,11 +184,11 @@ struct makefile +@@ -190,11 +190,11 @@ struct makefile struct strarray install_dev; struct strarray extra_targets; struct strarray extra_imports; @@ -107,7 +107,7 @@ index cee64fd61bf..bf22af33572 100644 const char *module; const char *testdll; const char *sharedlib; -@@ -1382,14 +1382,21 @@ static struct file *open_local_file( const struct makefile *make, const char *pa +@@ -1388,14 +1388,21 @@ static struct file *open_local_file( const struct makefile *make, const char *pa { char *src_path = src_dir_path( make, path ); struct file *ret = load_file( src_path ); @@ -133,7 +133,7 @@ index cee64fd61bf..bf22af33572 100644 } if (ret) *filename = src_path; -@@ -4145,13 +4152,13 @@ static void load_sources( struct makefile *make ) +@@ -4158,13 +4165,13 @@ static void load_sources( struct makefile *make ) strarray_set_value( &make->vars, "top_srcdir", root_src_dir_path( "" )); strarray_set_value( &make->vars, "srcdir", src_dir_path( make, "" )); @@ -148,7 +148,7 @@ index cee64fd61bf..bf22af33572 100644 make->programs = get_expanded_make_var_array( make, "PROGRAMS" ); make->scripts = get_expanded_make_var_array( make, "SCRIPTS" ); make->imports = get_expanded_make_var_array( make, "IMPORTS" ); -@@ -4196,8 +4203,11 @@ static void load_sources( struct makefile *make ) +@@ -4209,8 +4216,11 @@ static void load_sources( struct makefile *make ) strarray_add( &make->include_args, strmake( "-I%s", obj_dir_path( make, "" ))); if (make->src_dir) strarray_add( &make->include_args, strmake( "-I%s", make->src_dir )); diff --git a/patches/mfplat-streaming-support/0033-mf-Introduce-handler-helper.patch b/patches/mfplat-streaming-support/0040-mf-Introduce-handler-helper.patch similarity index 98% rename from patches/mfplat-streaming-support/0033-mf-Introduce-handler-helper.patch rename to patches/mfplat-streaming-support/0040-mf-Introduce-handler-helper.patch index d02b1790..a04ff9d2 100644 --- a/patches/mfplat-streaming-support/0033-mf-Introduce-handler-helper.patch +++ b/patches/mfplat-streaming-support/0040-mf-Introduce-handler-helper.patch @@ -1,4 +1,4 @@ -From fab06ab2fd1ec08488160951f4392933237541a4 Mon Sep 17 00:00:00 2001 +From ef2efb4cb317917e4269ea42b322be7f48ac7682 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 29 Jan 2020 15:30:49 -0600 Subject: [PATCH] mf: Introduce handler helper. @@ -934,7 +934,7 @@ index 5395d6fd501..4f6b428f067 100644 media_source.c \ mediatype.c \ diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 941d7c27473..0085459f86f 100644 +index aecf4f27375..5f46f7d575a 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c @@ -23,6 +23,7 @@ @@ -945,7 +945,7 @@ index 941d7c27473..0085459f86f 100644 #include #include -@@ -1633,21 +1634,11 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1635,21 +1636,11 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ return hr; } @@ -968,7 +968,7 @@ index 941d7c27473..0085459f86f 100644 }; static struct winegstreamer_stream_handler *impl_from_IMFByteStreamHandler(IMFByteStreamHandler *iface) -@@ -1655,11 +1646,6 @@ static struct winegstreamer_stream_handler *impl_from_IMFByteStreamHandler(IMFBy +@@ -1657,11 +1648,6 @@ static struct winegstreamer_stream_handler *impl_from_IMFByteStreamHandler(IMFBy return CONTAINING_RECORD(iface, struct winegstreamer_stream_handler, IMFByteStreamHandler_iface); } @@ -980,7 +980,7 @@ index 941d7c27473..0085459f86f 100644 static HRESULT WINAPI winegstreamer_stream_handler_QueryInterface(IMFByteStreamHandler *iface, REFIID riid, void **obj) { TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj); -@@ -1689,247 +1675,44 @@ static ULONG WINAPI winegstreamer_stream_handler_AddRef(IMFByteStreamHandler *if +@@ -1691,247 +1677,44 @@ static ULONG WINAPI winegstreamer_stream_handler_AddRef(IMFByteStreamHandler *if static ULONG WINAPI winegstreamer_stream_handler_Release(IMFByteStreamHandler *iface) { @@ -1235,7 +1235,7 @@ index 941d7c27473..0085459f86f 100644 } static HRESULT WINAPI winegstreamer_stream_handler_GetMaxNumberOfBytesRequiredForResolution(IMFByteStreamHandler *iface, QWORD *bytes) -@@ -1949,47 +1732,16 @@ static const IMFByteStreamHandlerVtbl winegstreamer_stream_handler_vtbl = +@@ -1951,47 +1734,16 @@ static const IMFByteStreamHandlerVtbl winegstreamer_stream_handler_vtbl = winegstreamer_stream_handler_GetMaxNumberOfBytesRequiredForResolution, }; @@ -1286,7 +1286,7 @@ index 941d7c27473..0085459f86f 100644 if (FAILED(hr = media_source_constructor(stream, &new_source))) return hr; -@@ -2008,64 +1760,6 @@ static HRESULT winegstreamer_stream_handler_create_object(struct winegstreamer_s +@@ -2010,64 +1762,6 @@ static HRESULT winegstreamer_stream_handler_create_object(struct winegstreamer_s } } @@ -1351,7 +1351,7 @@ index 941d7c27473..0085459f86f 100644 HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) { struct winegstreamer_stream_handler *this; -@@ -2077,11 +1771,9 @@ HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) +@@ -2079,11 +1773,9 @@ HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) if (!this) return E_OUTOFMEMORY; diff --git a/patches/mfplat-streaming-support/0034-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch b/patches/mfplat-streaming-support/0041-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch similarity index 97% rename from patches/mfplat-streaming-support/0034-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch rename to patches/mfplat-streaming-support/0041-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch index b23c63f9..c5ecee7c 100644 --- a/patches/mfplat-streaming-support/0034-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch +++ b/patches/mfplat-streaming-support/0041-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch @@ -1,4 +1,4 @@ -From 2cf98353e8634f38e2823899d554535fcda3b81f Mon Sep 17 00:00:00 2001 +From f84c2f0717e5c90f837262e88dad4b1fdcbc64d2 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Mon, 16 Mar 2020 12:09:39 -0500 Subject: [PATCH] winegstreamer: Implement decoder MFT on gstreamer. @@ -8,12 +8,11 @@ Subject: [PATCH] winegstreamer: Implement decoder MFT on gstreamer. dlls/winegstreamer/gst_cbs.c | 65 + dlls/winegstreamer/gst_cbs.h | 23 + dlls/winegstreamer/gst_private.h | 7 + - dlls/winegstreamer/main.c | 3 +- dlls/winegstreamer/mf_decode.c | 1320 ++++++++++++++++++ dlls/winegstreamer/mfplat.c | 63 +- dlls/winegstreamer/winegstreamer_classes.idl | 12 + include/mfidl.idl | 2 + - 9 files changed, 1494 insertions(+), 2 deletions(-) + 8 files changed, 1492 insertions(+), 1 deletion(-) create mode 100644 dlls/winegstreamer/mf_decode.c diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in @@ -163,7 +162,7 @@ index a48999bbf71..6659aedefa5 100644 #endif diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 6a6da817d58..b7817608653 100644 +index dcf76554b6d..019cce5fad5 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h @@ -75,6 +75,7 @@ BOOL init_gstreamer(void) DECLSPEC_HIDDEN; @@ -172,9 +171,9 @@ index 6a6da817d58..b7817608653 100644 +extern HRESULT mfplat_DllRegisterServer(void) DECLSPEC_HIDDEN; extern HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) DECLSPEC_HIDDEN; + extern HRESULT mfplat_DllRegisterServer(void) DECLSPEC_HIDDEN; - HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN; -@@ -84,6 +85,12 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) DECLSPEC_HIDDEN; +@@ -85,6 +86,12 @@ GstCaps *caps_from_mf_media_type(IMFMediaType *type) DECLSPEC_HIDDEN; IMFSample *mf_sample_from_gst_buffer(GstBuffer *in) DECLSPEC_HIDDEN; GstBuffer *gst_buffer_from_mf_sample(IMFSample *in) DECLSPEC_HIDDEN; @@ -187,20 +186,6 @@ index 6a6da817d58..b7817608653 100644 HRESULT winegstreamer_stream_handler_create(REFIID riid, void **obj) DECLSPEC_HIDDEN; HRESULT audio_converter_create(REFIID riid, void **ret) DECLSPEC_HIDDEN; -diff --git a/dlls/winegstreamer/main.c b/dlls/winegstreamer/main.c -index 4ca371d58bd..385c5550235 100644 ---- a/dlls/winegstreamer/main.c -+++ b/dlls/winegstreamer/main.c -@@ -368,7 +368,8 @@ HRESULT WINAPI DllRegisterServer(void) - IFilterMapper2_RegisterFilter(mapper, &CLSID_WAVEParser, wave_parserW, NULL, NULL, NULL, ®_wave_parser); - - IFilterMapper2_Release(mapper); -- return S_OK; -+ -+ return mfplat_DllRegisterServer(); - } - - HRESULT WINAPI DllUnregisterServer(void) diff --git a/dlls/winegstreamer/mf_decode.c b/dlls/winegstreamer/mf_decode.c new file mode 100644 index 00000000000..7055ffa54fc @@ -1528,12 +1513,12 @@ index 00000000000..7055ffa54fc + } +} diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 65d2d2efd64..8bc05d3ea94 100644 +index bf3486d2be8..b604f6df066 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c -@@ -410,6 +410,16 @@ static GUID CLSID_WINEAudioConverter = {0x6a170414,0xaad9,0x4693,{0xb8,0x06,0x3a +@@ -410,6 +410,16 @@ static const GUID CLSID_WINEAudioConverter = {0x6a170414,0xaad9,0x4693,{0xb8,0x0 - static GUID CLSID_CColorConvertDMO = {0x98230571,0x0087,0x4204,{0xb0,0x20,0x32,0x82,0x53,0x8e,0x57,0xd3}}; + static GUID CLSID_WINEColorConverter = {0x2be8b27f,0xcd60,0x4b8a,{0x95,0xae,0xd1,0x74,0xcc,0x5c,0xba,0xa7}}; +static HRESULT h264_decoder_create(REFIID riid, void **ret) +{ @@ -1551,13 +1536,13 @@ index 65d2d2efd64..8bc05d3ea94 100644 @@ -421,6 +431,8 @@ class_objects[] = { &CLSID_GStreamerByteStreamHandler, &winegstreamer_stream_handler_create }, { &CLSID_WINEAudioConverter, &audio_converter_create }, - { &CLSID_CColorConvertDMO, &color_converter_create }, + { &CLSID_WINEColorConverter, &color_converter_create }, + { &CLSID_CMSH264DecoderMFT, &h264_decoder_create }, + { &CLSID_CMSAACDecMFT, &aac_decoder_create }, }; HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) -@@ -477,6 +489,32 @@ const GUID *color_converter_supported_types[] = +@@ -476,6 +488,32 @@ const GUID *color_converter_supported_types[] = &MFVideoFormat_YVYU, }; @@ -1590,7 +1575,7 @@ index 65d2d2efd64..8bc05d3ea94 100644 static const struct mft { const GUID *clsid; -@@ -516,6 +554,30 @@ mfts[] = +@@ -515,6 +553,30 @@ mfts[] = color_converter_supported_types, NULL }, @@ -1621,7 +1606,7 @@ index 65d2d2efd64..8bc05d3ea94 100644 }; HRESULT mfplat_DllRegisterServer(void) -@@ -574,7 +636,6 @@ struct aac_user_data +@@ -568,7 +630,6 @@ struct aac_user_data { WORD payload_type; WORD profile_level_indication; @@ -1630,13 +1615,13 @@ index 65d2d2efd64..8bc05d3ea94 100644 /* audio-specific-config is stored here */ }; diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl -index 9788fd45d36..6a71031b949 100644 +index 47c10a09cf0..fe8649c690c 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -73,3 +73,15 @@ coclass WINEAudioConverter { } - uuid(98230571-0087-4204-b020-3282538e57d3) + uuid(2be8b27f-cd60-4b8a-95ae-d174cc5cbaa7) ] - coclass CColorConvertDMO { } + coclass WINEColorConverter { } + +[ + threading(both), diff --git a/patches/mfplat-streaming-support/0035-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch b/patches/mfplat-streaming-support/0042-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch similarity index 92% rename from patches/mfplat-streaming-support/0035-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch rename to patches/mfplat-streaming-support/0042-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch index 2fbde003..43615c72 100644 --- a/patches/mfplat-streaming-support/0035-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch +++ b/patches/mfplat-streaming-support/0042-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch @@ -1,4 +1,4 @@ -From 4202931a370fc4024b01e10291219d4906270096 Mon Sep 17 00:00:00 2001 +From 7fa665fa4360cf8656c30683c84280c1751850c0 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Mon, 23 Mar 2020 11:55:41 -0500 Subject: [PATCH] mfreadwrite: Select all streams when creating a source diff --git a/patches/mfplat-streaming-support/0036-Miscellaneous.patch b/patches/mfplat-streaming-support/0043-Miscellaneous.patch similarity index 94% rename from patches/mfplat-streaming-support/0036-Miscellaneous.patch rename to patches/mfplat-streaming-support/0043-Miscellaneous.patch index b1d8d7b9..c335f168 100644 --- a/patches/mfplat-streaming-support/0036-Miscellaneous.patch +++ b/patches/mfplat-streaming-support/0043-Miscellaneous.patch @@ -1,4 +1,4 @@ -From 030a2783c1fab91535bac4d4e6c7ea7d1e5da4a9 Mon Sep 17 00:00:00 2001 +From 2cc1a2009879fec87340b1818111f3cea6fe2442 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Mon, 2 Nov 2020 09:58:09 -0600 Subject: [PATCH] Miscellaneous @@ -102,10 +102,10 @@ index 6659aedefa5..825b46d13bb 100644 #endif diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 0085459f86f..acc9d53ca2e 100644 +index 5f46f7d575a..2156e07a13c 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -552,6 +552,11 @@ static gboolean bytestream_query(GstPad *pad, GstObject *parent, GstQuery *query +@@ -554,6 +554,11 @@ static gboolean bytestream_query(GstPad *pad, GstObject *parent, GstQuery *query gst_query_add_scheduling_mode(query, GST_PAD_MODE_PULL); return TRUE; } @@ -117,7 +117,7 @@ index 0085459f86f..acc9d53ca2e 100644 default: { WARN("Unhandled query type %s\n", GST_QUERY_TYPE_NAME(query)); -@@ -614,6 +619,23 @@ GstBusSyncReply bus_watch(GstBus *bus, GstMessage *message, gpointer user) +@@ -616,6 +621,23 @@ GstBusSyncReply bus_watch(GstBus *bus, GstMessage *message, gpointer user) g_error_free(err); g_free(dbg_info); break; @@ -141,7 +141,7 @@ index 0085459f86f..acc9d53ca2e 100644 default: break; } -@@ -1152,7 +1174,7 @@ static HRESULT WINAPI media_source_GetCharacteristics(IMFMediaSource *iface, DWO +@@ -1154,7 +1176,7 @@ static HRESULT WINAPI media_source_GetCharacteristics(IMFMediaSource *iface, DWO if (source->state == SOURCE_SHUTDOWN) return MF_E_SHUTDOWN; diff --git a/patches/mfplat-streaming-support/0037-WMV.patch b/patches/mfplat-streaming-support/0044-WMV.patch similarity index 93% rename from patches/mfplat-streaming-support/0037-WMV.patch rename to patches/mfplat-streaming-support/0044-WMV.patch index a0185b43..77754183 100644 --- a/patches/mfplat-streaming-support/0037-WMV.patch +++ b/patches/mfplat-streaming-support/0044-WMV.patch @@ -1,4 +1,4 @@ -From a24c920e166f93add20edbf2dc7b156ab2465a6e Mon Sep 17 00:00:00 2001 +From c918862beea585aa413d3a629e5818a762d1568f Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 25 Mar 2020 19:07:11 -0500 Subject: [PATCH] WMV @@ -12,10 +12,10 @@ Subject: [PATCH] WMV 5 files changed, 59 insertions(+) diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index b7817608653..0eba22fe30f 100644 +index 019cce5fad5..02343fa676e 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h -@@ -89,6 +89,7 @@ enum decoder_type +@@ -90,6 +90,7 @@ enum decoder_type { DECODER_TYPE_H264, DECODER_TYPE_AAC, @@ -52,7 +52,7 @@ index 7055ffa54fc..3625382c573 100644 }; diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 8bc05d3ea94..2a225f82d36 100644 +index b604f6df066..2fb730ff4c0 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -420,6 +420,10 @@ static HRESULT aac_decoder_create(REFIID riid, void **ret) @@ -67,14 +67,14 @@ index 8bc05d3ea94..2a225f82d36 100644 { const GUID *clsid; @@ -433,6 +437,7 @@ class_objects[] = - { &CLSID_CColorConvertDMO, &color_converter_create }, + { &CLSID_WINEColorConverter, &color_converter_create }, { &CLSID_CMSH264DecoderMFT, &h264_decoder_create }, { &CLSID_CMSAACDecMFT, &aac_decoder_create }, + { &CLSID_CWMVDecMediaObject, &wmv_decoder_create }, }; HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) -@@ -515,6 +520,29 @@ const GUID *aac_decoder_output_types[] = +@@ -514,6 +519,29 @@ const GUID *aac_decoder_output_types[] = &MFAudioFormat_PCM, }; @@ -104,7 +104,7 @@ index 8bc05d3ea94..2a225f82d36 100644 static const struct mft { const GUID *clsid; -@@ -578,6 +606,18 @@ mfts[] = +@@ -577,6 +605,18 @@ mfts[] = aac_decoder_output_types, NULL }, @@ -124,7 +124,7 @@ index 8bc05d3ea94..2a225f82d36 100644 HRESULT mfplat_DllRegisterServer(void) diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl -index 6a71031b949..51d44ad5242 100644 +index fe8649c690c..3b29bbfc36d 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -85,3 +85,9 @@ coclass CMSH264DecoderMFT { } diff --git a/patches/mfplat-streaming-support/0038-Expose-PCM-output-type-on-AAC-decoder.patch b/patches/mfplat-streaming-support/0045-Expose-PCM-output-type-on-AAC-decoder.patch similarity index 94% rename from patches/mfplat-streaming-support/0038-Expose-PCM-output-type-on-AAC-decoder.patch rename to patches/mfplat-streaming-support/0045-Expose-PCM-output-type-on-AAC-decoder.patch index a466dbbe..c2395a78 100644 --- a/patches/mfplat-streaming-support/0038-Expose-PCM-output-type-on-AAC-decoder.patch +++ b/patches/mfplat-streaming-support/0045-Expose-PCM-output-type-on-AAC-decoder.patch @@ -1,4 +1,4 @@ -From 9724cb4288ad131c8a40d240320ca4774b26e988 Mon Sep 17 00:00:00 2001 +From 8b1429c51559a4cb5685cfcf11302f0b8a6e9f14 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Fri, 3 Apr 2020 11:12:33 -0500 Subject: [PATCH] Expose PCM output type on AAC decoder. diff --git a/patches/mfplat-streaming-support/0039-Improve-tests.patch b/patches/mfplat-streaming-support/0046-Improve-tests.patch similarity index 99% rename from patches/mfplat-streaming-support/0039-Improve-tests.patch rename to patches/mfplat-streaming-support/0046-Improve-tests.patch index 955bcc5e..dc56a43c 100644 --- a/patches/mfplat-streaming-support/0039-Improve-tests.patch +++ b/patches/mfplat-streaming-support/0046-Improve-tests.patch @@ -1,4 +1,4 @@ -From 923e08293c4fd297eaada8f96f7ca134682eff49 Mon Sep 17 00:00:00 2001 +From a5d03373274821c741f3974643750289c0b27a75 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Mon, 9 Mar 2020 11:59:17 -0500 Subject: [PATCH] Improve tests @@ -13,7 +13,7 @@ Subject: [PATCH] Improve tests create mode 100644 dlls/mfreadwrite/tests/test.mp4 diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c -index 474d6281f5f..f364b80ba21 100644 +index b361d4da162..43a5d098709 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -454,6 +454,9 @@ static BOOL get_event(IMFMediaEventGenerator *generator, MediaEventType expected @@ -320,7 +320,7 @@ index 474d6281f5f..f364b80ba21 100644 static void init_functions(void) { HMODULE mod = GetModuleHandleA("mfplat.dll"); -@@ -5982,6 +6196,7 @@ START_TEST(mfplat) +@@ -6012,6 +6226,7 @@ START_TEST(mfplat) test_MFCreateMFByteStreamOnStream(); test_system_memory_buffer(); test_source_resolver(); diff --git a/patches/mfplat-streaming-support/0040-Revert-Improve-tests.patch b/patches/mfplat-streaming-support/0047-Revert-Improve-tests.patch similarity index 99% rename from patches/mfplat-streaming-support/0040-Revert-Improve-tests.patch rename to patches/mfplat-streaming-support/0047-Revert-Improve-tests.patch index fb664822..9549d06c 100644 --- a/patches/mfplat-streaming-support/0040-Revert-Improve-tests.patch +++ b/patches/mfplat-streaming-support/0047-Revert-Improve-tests.patch @@ -1,4 +1,4 @@ -From 5c66ec65febd0aa62d0e3f0cd757252e0512941d Mon Sep 17 00:00:00 2001 +From fc80acc18fc96ec5acc697ea6d4887374faf570d Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Wed, 25 Mar 2020 13:58:36 -0500 Subject: [PATCH] Revert "Improve tests" @@ -14,7 +14,7 @@ This reverts commit 603b1717a2b511a66d3be99ab5761d49cd5ef34d. delete mode 100644 dlls/mfreadwrite/tests/test.mp4 diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c -index f364b80ba21..9027fd0af3e 100644 +index 43a5d098709..e1d0e59b7f5 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -454,9 +454,6 @@ static BOOL get_event(IMFMediaEventGenerator *generator, MediaEventType expected @@ -320,7 +320,7 @@ index f364b80ba21..9027fd0af3e 100644 static void init_functions(void) { HMODULE mod = GetModuleHandleA("mfplat.dll"); -@@ -6196,7 +5981,6 @@ START_TEST(mfplat) +@@ -6226,7 +6011,6 @@ START_TEST(mfplat) test_MFCreateMFByteStreamOnStream(); test_system_memory_buffer(); test_source_resolver(); diff --git a/patches/mfplat-streaming-support/0041-Report-streams-backwards-and-only-select-one-of-each.patch b/patches/mfplat-streaming-support/0048-Report-streams-backwards-and-only-select-one-of-each.patch similarity index 91% rename from patches/mfplat-streaming-support/0041-Report-streams-backwards-and-only-select-one-of-each.patch rename to patches/mfplat-streaming-support/0048-Report-streams-backwards-and-only-select-one-of-each.patch index cebb8dcb..7c20f408 100644 --- a/patches/mfplat-streaming-support/0041-Report-streams-backwards-and-only-select-one-of-each.patch +++ b/patches/mfplat-streaming-support/0048-Report-streams-backwards-and-only-select-one-of-each.patch @@ -1,4 +1,4 @@ -From 0876c6332d81b43a956e48aee31a113807a486a5 Mon Sep 17 00:00:00 2001 +From cda7c0339af6bf5c4d903ef844844ca0d4332d73 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 5 May 2020 15:35:16 -0500 Subject: [PATCH] Report streams backwards and only select one of each stream @@ -9,10 +9,10 @@ Subject: [PATCH] Report streams backwards and only select one of each stream 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index acc9d53ca2e..26e9a1805fb 100644 +index 2156e07a13c..fd7f1a7f55e 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -1484,6 +1484,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1486,6 +1486,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE("mf_src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS_ANY); @@ -20,7 +20,7 @@ index acc9d53ca2e..26e9a1805fb 100644 IMFStreamDescriptor **descriptors = NULL; IMFAttributes *byte_stream_attributes; struct media_source *object; -@@ -1598,15 +1599,34 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1600,15 +1601,34 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ descriptors = heap_alloc(object->stream_count * sizeof(IMFStreamDescriptor*)); for (i = 0; i < object->stream_count; i++) { diff --git a/patches/mfplat-streaming-support/0042-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch b/patches/mfplat-streaming-support/0049-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch similarity index 94% rename from patches/mfplat-streaming-support/0042-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch rename to patches/mfplat-streaming-support/0049-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch index 176a1a71..b99ed4f8 100644 --- a/patches/mfplat-streaming-support/0042-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch +++ b/patches/mfplat-streaming-support/0049-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch @@ -1,4 +1,4 @@ -From 88551b8014795f2cfbf87249d81a56a242ee2863 Mon Sep 17 00:00:00 2001 +From 32e2cc5815a0f2836ba22f42e2eb7930289a18db Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Mon, 11 May 2020 16:05:50 -0500 Subject: [PATCH] winegstreamer: Introduce MPEG-4 Section-2 video decoder. @@ -13,10 +13,10 @@ Signed-off-by: Derek Lesho 5 files changed, 53 insertions(+) diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 0eba22fe30f..0dc31d16b87 100644 +index 02343fa676e..1c6530d2f38 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h -@@ -90,6 +90,7 @@ enum decoder_type +@@ -91,6 +91,7 @@ enum decoder_type DECODER_TYPE_H264, DECODER_TYPE_AAC, DECODER_TYPE_WMV, @@ -53,7 +53,7 @@ index c188d08c57f..b5220bc3332 100644 }; diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 2a225f82d36..09598e0886f 100644 +index 2fb730ff4c0..e5227340fd2 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -424,6 +424,12 @@ static HRESULT wmv_decoder_create(REFIID riid, void **ret) @@ -77,7 +77,7 @@ index 2a225f82d36..09598e0886f 100644 }; HRESULT mfplat_get_class_object(REFCLSID rclsid, REFIID riid, void **obj) -@@ -543,6 +550,22 @@ const GUID *wmv_decoder_output_types[] = +@@ -542,6 +549,22 @@ const GUID *wmv_decoder_output_types[] = &MFVideoFormat_RGB8, }; @@ -100,7 +100,7 @@ index 2a225f82d36..09598e0886f 100644 static const struct mft { const GUID *clsid; -@@ -618,6 +641,18 @@ mfts[] = +@@ -617,6 +640,18 @@ mfts[] = wmv_decoder_output_types, NULL }, @@ -120,7 +120,7 @@ index 2a225f82d36..09598e0886f 100644 HRESULT mfplat_DllRegisterServer(void) diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl -index 51d44ad5242..337a32bf6cb 100644 +index 3b29bbfc36d..2382a884069 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -86,6 +86,12 @@ coclass CMSH264DecoderMFT { } diff --git a/patches/mfplat-streaming-support/0043-winegstreamer-Introduce-WMA-audio-decoder.patch b/patches/mfplat-streaming-support/0050-winegstreamer-Introduce-WMA-audio-decoder.patch similarity index 94% rename from patches/mfplat-streaming-support/0043-winegstreamer-Introduce-WMA-audio-decoder.patch rename to patches/mfplat-streaming-support/0050-winegstreamer-Introduce-WMA-audio-decoder.patch index a92f4a90..ac12a432 100644 --- a/patches/mfplat-streaming-support/0043-winegstreamer-Introduce-WMA-audio-decoder.patch +++ b/patches/mfplat-streaming-support/0050-winegstreamer-Introduce-WMA-audio-decoder.patch @@ -1,4 +1,4 @@ -From d0ad478928f1814523cb9c1f33c0e0c87471a1f0 Mon Sep 17 00:00:00 2001 +From 1d5e925925e63fe244964b26cf6128ede0776a06 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 12 May 2020 16:50:41 -0500 Subject: [PATCH] winegstreamer: Introduce WMA audio decoder. @@ -13,10 +13,10 @@ Signed-off-by: Derek Lesho 5 files changed, 51 insertions(+), 1 deletion(-) diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h -index 0dc31d16b87..17be65995e3 100644 +index 1c6530d2f38..81fc9b5ce14 100644 --- a/dlls/winegstreamer/gst_private.h +++ b/dlls/winegstreamer/gst_private.h -@@ -90,6 +90,7 @@ enum decoder_type +@@ -91,6 +91,7 @@ enum decoder_type DECODER_TYPE_H264, DECODER_TYPE_AAC, DECODER_TYPE_WMV, @@ -53,7 +53,7 @@ index b5220bc3332..9b10cfd9e4a 100644 &MFMediaType_Video, m4s2_input_types, diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c -index 09598e0886f..8ee152fce92 100644 +index e5227340fd2..8f770f94bf8 100644 --- a/dlls/winegstreamer/mfplat.c +++ b/dlls/winegstreamer/mfplat.c @@ -425,6 +425,11 @@ static HRESULT wmv_decoder_create(REFIID riid, void **ret) @@ -76,7 +76,7 @@ index 09598e0886f..8ee152fce92 100644 { &CLSID_CMpeg4sDecMFT, m4s2_decoder_create }, }; -@@ -550,6 +556,20 @@ const GUID *wmv_decoder_output_types[] = +@@ -549,6 +555,20 @@ const GUID *wmv_decoder_output_types[] = &MFVideoFormat_RGB8, }; @@ -97,7 +97,7 @@ index 09598e0886f..8ee152fce92 100644 static WCHAR m4s2decoderW[] = {'M','p','e','g','4','s',' ','D','e','c','o','d','e','r',' ','M','F','T',0}; const GUID *m4s2_decoder_input_types[] = -@@ -641,6 +661,18 @@ mfts[] = +@@ -640,6 +660,18 @@ mfts[] = wmv_decoder_output_types, NULL }, @@ -117,7 +117,7 @@ index 09598e0886f..8ee152fce92 100644 &CLSID_CMpeg4sDecMFT, &MFT_CATEGORY_VIDEO_DECODER, diff --git a/dlls/winegstreamer/winegstreamer_classes.idl b/dlls/winegstreamer/winegstreamer_classes.idl -index 337a32bf6cb..ec92c2d0616 100644 +index 2382a884069..3aa85dfdab3 100644 --- a/dlls/winegstreamer/winegstreamer_classes.idl +++ b/dlls/winegstreamer/winegstreamer_classes.idl @@ -97,3 +97,9 @@ coclass CMpeg4sDecMFT { } diff --git a/patches/mfplat-streaming-support/0044-winegstreamer-Implement-MF_SD_LANGUAGE.patch b/patches/mfplat-streaming-support/0051-winegstreamer-Implement-MF_SD_LANGUAGE.patch similarity index 91% rename from patches/mfplat-streaming-support/0044-winegstreamer-Implement-MF_SD_LANGUAGE.patch rename to patches/mfplat-streaming-support/0051-winegstreamer-Implement-MF_SD_LANGUAGE.patch index 3c1ac0ab..9b8af7e8 100644 --- a/patches/mfplat-streaming-support/0044-winegstreamer-Implement-MF_SD_LANGUAGE.patch +++ b/patches/mfplat-streaming-support/0051-winegstreamer-Implement-MF_SD_LANGUAGE.patch @@ -1,4 +1,4 @@ -From 2e307dbb8d28616bca55b661f55dcdc0b702e0eb Mon Sep 17 00:00:00 2001 +From f85db2dd85e074dcb3373d711a937c00c3a5bc73 Mon Sep 17 00:00:00 2001 From: Derek Lesho Date: Tue, 11 Aug 2020 13:41:15 -0500 Subject: [PATCH] winegstreamer: Implement MF_SD_LANGUAGE. @@ -9,10 +9,10 @@ Signed-off-by: Derek Lesho 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c -index 26e9a1805fb..54273d1959b 100644 +index fd7f1a7f55e..2c6b82c43b4 100644 --- a/dlls/winegstreamer/media_source.c +++ b/dlls/winegstreamer/media_source.c -@@ -1634,11 +1634,12 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1636,11 +1636,12 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ for (i = 0; i < object->stream_count; i++) { @@ -28,7 +28,7 @@ index 26e9a1805fb..54273d1959b 100644 if (stream_pres_time > total_pres_time) total_pres_time = stream_pres_time; } -@@ -1646,6 +1647,31 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ +@@ -1648,6 +1649,31 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_ { WARN("Unable to get presentation time of stream %u\n", i); } diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 72a70a45..dc71d37b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "e4fbae832c868e9fcf5a91c58255fe3f4ea1cb30" + echo "727168a9e116a43f851df2673a9169ad280a9ec8" } # Show version information @@ -2762,54 +2762,66 @@ fi # | * [#49692] Multiple applications need a Media Foundation media source implementation # | # | Modified files: -# | * dlls/mf/Makefile.in, dlls/mf/handler.c, dlls/mf/handler.h, dlls/mf/main.c, dlls/mf/session.c, +# | * dlls/mf/Makefile.in, dlls/mf/handler.c, dlls/mf/handler.h, dlls/mf/main.c, dlls/mf/session.c, dlls/mf/tests/mf.c, # | dlls/mfplat/tests/mfplat.c, dlls/mfplat/tests/test.mp4, dlls/mfreadwrite/reader.c, dlls/mfreadwrite/tests/mfplat.c, # | dlls/mfreadwrite/tests/resource.rc, dlls/mfreadwrite/tests/test.mp4, dlls/winegstreamer/Makefile.in, # | dlls/winegstreamer/audioconvert.c, dlls/winegstreamer/colorconvert.c, dlls/winegstreamer/gst_cbs.c, -# | dlls/winegstreamer/gst_cbs.h, dlls/winegstreamer/gst_private.h, dlls/winegstreamer/main.c, -# | dlls/winegstreamer/media_source.c, dlls/winegstreamer/mf_decode.c, dlls/winegstreamer/mfplat.c, -# | dlls/winegstreamer/winegstreamer_classes.idl, include/mfidl.idl, tools/make_makefiles, tools/makedep.c +# | dlls/winegstreamer/gst_cbs.h, dlls/winegstreamer/gst_private.h, dlls/winegstreamer/media_source.c, +# | dlls/winegstreamer/mf_decode.c, dlls/winegstreamer/mfplat.c, dlls/winegstreamer/winegstreamer_classes.idl, +# | include/mfidl.idl, tools/make_makefiles, tools/makedep.c # | if test "$enable_mfplat_streaming_support" -eq 1; then - patch_apply mfplat-streaming-support/0005-winegstreamer-Introduce-audio-conversion-transform.patch - patch_apply mfplat-streaming-support/0006-winegstreamer-Implement-Set-Input-Output-Type-for-au.patch - patch_apply mfplat-streaming-support/0007-winegstreamer-Implement-Process-Input-Output-for-aud.patch - patch_apply mfplat-streaming-support/0008-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch - patch_apply mfplat-streaming-support/0009-winegstreamer-Implement-Get-Attributes-functions-for.patch - patch_apply mfplat-streaming-support/0010-Implement-Get-Input-Output-CurrentType-functions-for.patch - patch_apply mfplat-streaming-support/0011-winegstreamer-Implement-Color-Converter-MFT.patch - patch_apply mfplat-streaming-support/0012-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch - patch_apply mfplat-streaming-support/0013-mf-session-Request-more-samples-when-a-transform-nee.patch - patch_apply mfplat-streaming-support/0015-winegstreamer-Implement-IMFMediaSource-Stop.patch - patch_apply mfplat-streaming-support/0016-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-on-raw-video-types.patch - patch_apply mfplat-streaming-support/0017-HACK-Flush-decoder-when-changing-times.patch - patch_apply mfplat-streaming-support/0018-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch - patch_apply mfplat-streaming-support/0019-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch - patch_apply mfplat-streaming-support/0020-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch - patch_apply mfplat-streaming-support/0021-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch - patch_apply mfplat-streaming-support/0022-winegstreamer-Translate-H.264-caps-to-attributes.patch - patch_apply mfplat-streaming-support/0023-winegstreamer-Translate-WMV-caps-to-attributes.patch - patch_apply mfplat-streaming-support/0024-winegstreamer-Translate-AAC-caps-to-attributes.patch - patch_apply mfplat-streaming-support/0025-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch - patch_apply mfplat-streaming-support/0026-winegstreamer-Translate-WMA-caps-to-attributes.patch - patch_apply mfplat-streaming-support/0027-winegstreamer-Translate-H.264-attributes-to-caps.patch - patch_apply mfplat-streaming-support/0028-winegstreamer-Translate-WMV-attributes-to-caps.patch - patch_apply mfplat-streaming-support/0029-winegstreamer-Translate-AAC-attributes-to-caps.patch - patch_apply mfplat-streaming-support/0030-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch - patch_apply mfplat-streaming-support/0031-winegstreamer-Translate-WMA-attributes-to-caps.patch - patch_apply mfplat-streaming-support/0032-tools-Add-support-for-multiple-parent-directories.patch - patch_apply mfplat-streaming-support/0033-mf-Introduce-handler-helper.patch - patch_apply mfplat-streaming-support/0034-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch - patch_apply mfplat-streaming-support/0035-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch - patch_apply mfplat-streaming-support/0036-Miscellaneous.patch - patch_apply mfplat-streaming-support/0037-WMV.patch - patch_apply mfplat-streaming-support/0038-Expose-PCM-output-type-on-AAC-decoder.patch - patch_apply mfplat-streaming-support/0039-Improve-tests.patch - patch_apply mfplat-streaming-support/0040-Revert-Improve-tests.patch - patch_apply mfplat-streaming-support/0041-Report-streams-backwards-and-only-select-one-of-each.patch - patch_apply mfplat-streaming-support/0042-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch - patch_apply mfplat-streaming-support/0043-winegstreamer-Introduce-WMA-audio-decoder.patch - patch_apply mfplat-streaming-support/0044-winegstreamer-Implement-MF_SD_LANGUAGE.patch + patch_apply mfplat-streaming-support/0001-winegstreamer-Implement-SetInputType-for-audio-conve.patch + patch_apply mfplat-streaming-support/0002-winegstreamer-Implement-SetOutputType-for-audio-conv.patch + patch_apply mfplat-streaming-support/0003-winegstreamer-Implement-Process-Input-Output-for-aud.patch + patch_apply mfplat-streaming-support/0004-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch + patch_apply mfplat-streaming-support/0005-winegstreamer-Implement-Get-Attributes-functions-for.patch + patch_apply mfplat-streaming-support/0006-winegstreamer-Implement-Get-Input-Output-CurrentType.patch + patch_apply mfplat-streaming-support/0007-winegstreamer-Introduce-color-conversion-transform.patch + patch_apply mfplat-streaming-support/0008-winegstreamer-Register-the-color-conversion-transfor.patch + patch_apply mfplat-streaming-support/0009-winegstreamer-Implement-GetInputAvailableType-for-co.patch + patch_apply mfplat-streaming-support/0010-winegstreamer-Implement-SetInputType-for-color-conve.patch + patch_apply mfplat-streaming-support/0011-winegstreamer-Implement-GetOutputAvailableType-for-c.patch + patch_apply mfplat-streaming-support/0012-winegstreamer-Implement-SetOutputType-for-color-conv.patch + patch_apply mfplat-streaming-support/0013-winegstreamer-Implement-Process-Input-Output-for-col.patch + patch_apply mfplat-streaming-support/0014-winegstreamer-Implement-ProcessMessage-for-color-con.patch + patch_apply mfplat-streaming-support/0015-winegstreamer-Implement-Get-Input-Output-StreamInfo-.patch + patch_apply mfplat-streaming-support/0016-winegstreamer-Implement-Get-Attributes-functions-for.patch + patch_apply mfplat-streaming-support/0017-winegstreamer-Implement-Get-Input-Output-CurrentType.patch + patch_apply mfplat-streaming-support/0018-winegstreamer-Implement-IMFMediaSource-Stop.patch + patch_apply mfplat-streaming-support/0019-winegstreamer-Set-MF_MT_ALL_SAMPLES_INDEPENDENT-attr.patch + patch_apply mfplat-streaming-support/0020-mf-Add-invalid-connect-method-test.patch + patch_apply mfplat-streaming-support/0021-Allow-for-compressed-types.patch + patch_apply mfplat-streaming-support/0022-mf-session-Unconditionally-deliver-NULL-EOS-samples.patch + patch_apply mfplat-streaming-support/0023-mf-session-Request-more-samples-when-a-transform-nee.patch + patch_apply mfplat-streaming-support/0024-HACK-Flush-decoder-when-changing-times.patch + patch_apply mfplat-streaming-support/0025-winegstreamer-Add-IMFSeekInfo-GetNearestKeyFrames-st.patch + patch_apply mfplat-streaming-support/0026-winegstreamer-Fixup-raw-audio-caps-to-be-compatible-.patch + patch_apply mfplat-streaming-support/0027-winegstreamer-Set-MF_PD_MIME_TYPE-on-source-s-presen.patch + patch_apply mfplat-streaming-support/0028-winegstreamer-Insert-parser-into-pipeline-to-rectify.patch + patch_apply mfplat-streaming-support/0029-winegstreamer-Translate-H.264-caps-to-attributes.patch + patch_apply mfplat-streaming-support/0030-winegstreamer-Translate-WMV-caps-to-attributes.patch + patch_apply mfplat-streaming-support/0031-winegstreamer-Translate-AAC-caps-to-attributes.patch + patch_apply mfplat-streaming-support/0032-winegstreamer-Translate-MPEG-4-Section-2-caps-to-att.patch + patch_apply mfplat-streaming-support/0033-winegstreamer-Translate-WMA-caps-to-attributes.patch + patch_apply mfplat-streaming-support/0034-winegstreamer-Translate-H.264-attributes-to-caps.patch + patch_apply mfplat-streaming-support/0035-winegstreamer-Translate-WMV-attributes-to-caps.patch + patch_apply mfplat-streaming-support/0036-winegstreamer-Translate-AAC-attributes-to-caps.patch + patch_apply mfplat-streaming-support/0037-winegstreamer-Translate-MPEG-4-Section-2-attributes-.patch + patch_apply mfplat-streaming-support/0038-winegstreamer-Translate-WMA-attributes-to-caps.patch + patch_apply mfplat-streaming-support/0039-tools-Add-support-for-multiple-parent-directories.patch + patch_apply mfplat-streaming-support/0040-mf-Introduce-handler-helper.patch + patch_apply mfplat-streaming-support/0041-winegstreamer-Implement-decoder-MFT-on-gstreamer.patch + patch_apply mfplat-streaming-support/0042-mfreadwrite-Select-all-streams-when-creating-a-sourc.patch + patch_apply mfplat-streaming-support/0043-Miscellaneous.patch + patch_apply mfplat-streaming-support/0044-WMV.patch + patch_apply mfplat-streaming-support/0045-Expose-PCM-output-type-on-AAC-decoder.patch + patch_apply mfplat-streaming-support/0046-Improve-tests.patch + patch_apply mfplat-streaming-support/0047-Revert-Improve-tests.patch + patch_apply mfplat-streaming-support/0048-Report-streams-backwards-and-only-select-one-of-each.patch + patch_apply mfplat-streaming-support/0049-winegstreamer-Introduce-MPEG-4-Section-2-video-decod.patch + patch_apply mfplat-streaming-support/0050-winegstreamer-Introduce-WMA-audio-decoder.patch + patch_apply mfplat-streaming-support/0051-winegstreamer-Implement-MF_SD_LANGUAGE.patch patch_apply mfplat-streaming-support/0060-winegstreamer-Support-eAVEncH264VProfile_Constrained.patch fi diff --git a/staging/upstream-commit b/staging/upstream-commit index 20e7e7fe..bbea0c5a 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -e4fbae832c868e9fcf5a91c58255fe3f4ea1cb30 +727168a9e116a43f851df2673a9169ad280a9ec8