Nikolay Sivov : mfplay: Implement border color control methods.

Alexandre Julliard julliard at winehq.org
Wed Apr 21 15:57:54 CDT 2021


Module: wine
Branch: master
Commit: b1203230a3e4fb2b207aedbefbbe97ae67e01d76
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b1203230a3e4fb2b207aedbefbbe97ae67e01d76

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Apr 21 12:29:48 2021 +0300

mfplay: Implement border color control methods.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mfplay/player.c | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/dlls/mfplay/player.c b/dlls/mfplay/player.c
index 708df7614e8..aa9392a1e97 100644
--- a/dlls/mfplay/player.c
+++ b/dlls/mfplay/player.c
@@ -1363,16 +1363,38 @@ static HRESULT WINAPI media_player_UpdateVideo(IMFPMediaPlayer *iface)
 
 static HRESULT WINAPI media_player_SetBorderColor(IMFPMediaPlayer *iface, COLORREF color)
 {
-    FIXME("%p, %#x.\n", iface, color);
+    struct media_player *player = impl_from_IMFPMediaPlayer(iface);
+    IMFVideoDisplayControl *display_control;
+    HRESULT hr;
 
-    return E_NOTIMPL;
+    TRACE("%p, %#x.\n", iface, color);
+
+    if (SUCCEEDED(hr = MFGetService((IUnknown *)player->session, &MR_VIDEO_RENDER_SERVICE,
+            &IID_IMFVideoDisplayControl, (void **)&display_control)))
+    {
+        hr = IMFVideoDisplayControl_SetBorderColor(display_control, color);
+        IMFVideoDisplayControl_Release(display_control);
+    }
+
+    return hr;
 }
 
 static HRESULT WINAPI media_player_GetBorderColor(IMFPMediaPlayer *iface, COLORREF *color)
 {
-    FIXME("%p, %p.\n", iface, color);
+    struct media_player *player = impl_from_IMFPMediaPlayer(iface);
+    IMFVideoDisplayControl *display_control;
+    HRESULT hr;
 
-    return E_NOTIMPL;
+    TRACE("%p, %p.\n", iface, color);
+
+    if (SUCCEEDED(hr = MFGetService((IUnknown *)player->session, &MR_VIDEO_RENDER_SERVICE,
+            &IID_IMFVideoDisplayControl, (void **)&display_control)))
+    {
+        hr = IMFVideoDisplayControl_GetBorderColor(display_control, color);
+        IMFVideoDisplayControl_Release(display_control);
+    }
+
+    return hr;
 }
 
 static HRESULT WINAPI media_player_InsertEffect(IMFPMediaPlayer *iface, IUnknown *effect,




More information about the wine-cvs mailing list