From: Mohamad Al-Jaf mohamadaljaf@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58631 --- dlls/windows.media.playback.mediaplayer/main.c | 3 ++- .../tests/mediaplayer.c | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/windows.media.playback.mediaplayer/main.c b/dlls/windows.media.playback.mediaplayer/main.c index 67b50ba065b..63f57ce26c4 100644 --- a/dlls/windows.media.playback.mediaplayer/main.c +++ b/dlls/windows.media.playback.mediaplayer/main.c @@ -417,7 +417,8 @@ DEFINE_IINSPECTABLE( media_player2, IMediaPlayer2, struct media_player, IMediaPl static HRESULT WINAPI media_player2_get_SystemMediaTransportControls( IMediaPlayer2 *iface, ISystemMediaTransportControls **value ) { FIXME( "iface %p, value %p stub!\n", iface, value ); - return E_NOTIMPL; + *value = NULL; + return S_OK; }
static HRESULT WINAPI media_player2_get_AudioCategory( IMediaPlayer2 *iface, MediaPlayerAudioCategory *value ) diff --git a/dlls/windows.media.playback.mediaplayer/tests/mediaplayer.c b/dlls/windows.media.playback.mediaplayer/tests/mediaplayer.c index 93b0a3d71a4..5b47d1215ef 100644 --- a/dlls/windows.media.playback.mediaplayer/tests/mediaplayer.c +++ b/dlls/windows.media.playback.mediaplayer/tests/mediaplayer.c @@ -28,6 +28,7 @@ #define WIDL_using_Windows_Foundation #define WIDL_using_Windows_Foundation_Collections #include "windows.foundation.h" +#define WIDL_using_Windows_Media #define WIDL_using_Windows_Media_Playback #include "windows.media.playback.h"
@@ -48,6 +49,7 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid, BOOL static void test_MediaPlayer_Statics(void) { static const WCHAR *media_player_name = L"Windows.Media.Playback.MediaPlayer"; + ISystemMediaTransportControls *media_transport_controls = NULL; IMediaPlayer2 *media_player2 = (void *)0xdeadbeef; IActivationFactory *factory = (void *)0xdeadbeef; IMediaPlayer *media_player = (void *)0xdeadbeef; @@ -85,6 +87,12 @@ static void test_MediaPlayer_Statics(void) hr = IMediaPlayer_QueryInterface( media_player, &IID_IMediaPlayer2, (void **)&media_player2 ); ok( hr == S_OK, "got hr %#lx.\n", hr );
+ hr = IMediaPlayer2_get_SystemMediaTransportControls( media_player2, &media_transport_controls ); + ok( hr == S_OK, "got hr %#lx.\n", hr ); + todo_wine + ok( media_transport_controls != NULL, "failed to get media_transport_controls.\n" ); + if (media_transport_controls) ISystemMediaTransportControls_Release( media_transport_controls ); + ref = IMediaPlayer2_Release( media_player2 ); ok( ref == 2, "got ref %ld.\n", ref ); ref = IMediaPlayer_Release( media_player );