return CameraDisplay.SetDisplay(GetHandle(), type, evasObject);
}
- CameraError IDisplayable<CameraError>.ApplyEcoreWindow(IntPtr windowHandle)
+ CameraError IDisplayable<CameraError>.ApplyEcoreWindow(IntPtr windowHandle, NUI.Rectangle rect)
{
Debug.Assert(_disposed == false);
type == DisplayType.Overlay ? PlayerDisplayType.Overlay : PlayerDisplayType.Evas, evasObject);
}
- PlayerErrorCode IDisplayable<PlayerErrorCode>.ApplyEcoreWindow(IntPtr windowHandle)
+ PlayerErrorCode IDisplayable<PlayerErrorCode>.ApplyEcoreWindow(IntPtr windowHandle, NUI.Rectangle rect)
{
Debug.Assert(IsDisposed == false);
return NativeDisplay.SetEcoreDisplay(Handle,
- _uiSync ? PlayerDisplayType.OverlayUISync : PlayerDisplayType.Overlay, windowHandle);
+ _uiSync ? PlayerDisplayType.OverlayUISync : PlayerDisplayType.Overlay, windowHandle, rect.X, rect.Y, rect.Width, rect.Height);
}
#endregion
return Native.SetDisplay(Handle, (int)type, evasObject);
}
- ScreenMirroringErrorCode IDisplayable<ScreenMirroringErrorCode>.ApplyEcoreWindow(IntPtr windowHandle)
+ ScreenMirroringErrorCode IDisplayable<ScreenMirroringErrorCode>.ApplyEcoreWindow(IntPtr windowHandle, NUI.Rectangle rect)
{
return Native.SetEcoreDisplay(Handle, windowHandle);
}
return trackId;
}
- uint IDisplayable<uint>.ApplyEcoreWindow(IntPtr windowHandle)
+ uint IDisplayable<uint>.ApplyEcoreWindow(IntPtr windowHandle, NUI.Rectangle rect)
{
NativeWebRTC.SetEcoreVideoLoopback(WebRtc.Handle, SourceId.Value, windowHandle, out uint trackId).
ThrowIfFailed("Failed to set ecore video loopback");
return trackId;
}
}
-}
\ No newline at end of file
+}
type == DisplayType.Overlay ? WebRTCDisplayType.Overlay : WebRTCDisplayType.Evas, evasObject);
}
- WebRTCErrorCode IDisplayable<WebRTCErrorCode>.ApplyEcoreWindow(IntPtr windowHandle)
+ WebRTCErrorCode IDisplayable<WebRTCErrorCode>.ApplyEcoreWindow(IntPtr windowHandle, NUI.Rectangle rect)
{
return NativeWebRTC.SetEcoreDisplay(_webRtc.Handle, _trackId, windowHandle);
}
internal interface IDisplayable<TError>
{
TError ApplyEvasDisplay(DisplayType type, EvasObject evasObject);
- TError ApplyEcoreWindow(IntPtr windowHandle);
+ TError ApplyEcoreWindow(IntPtr windowHandle, NUI.Rectangle rect);
}
internal interface IDisplaySetter
internal class EcoreDisplaySetter : IDisplaySetter
{
private readonly IntPtr _windowHandle;
+ private readonly NUI.Rectangle _rect;
- internal EcoreDisplaySetter(IntPtr windowHandle)
+ internal EcoreDisplaySetter(IntPtr windowHandle, NUI.Rectangle rect)
{
_windowHandle = windowHandle;
+ _rect = rect;
}
public TError SetDisplay<TError>(IDisplayable<TError> target)
{
- return target.ApplyEcoreWindow(_windowHandle);
+ return target.ApplyEcoreWindow(_windowHandle, _rect);
}
}
{
throw new ArgumentNullException(nameof(window));
}
-
- _setter = new EcoreDisplaySetter(window.GetNativeWindowHandler());
+ _setter = new EcoreDisplaySetter(window.GetNativeWindowHandler(), window.WindowPositionSize);
UiSync = uiSync;
}