Skip to content

Commit

Permalink
MP1-5221: Core: FrameGrabber: Fix frame grabbing (for EVR)
Browse files Browse the repository at this point in the history
  • Loading branch information
epbk committed Jul 18, 2024
1 parent 9c14bf5 commit 78cb7a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions mediaportal/Core/Player/FrameGrabber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private FrameGrabber()
}

// MP1-4248 : Start* Line Code for Ambilight System Capture (Atmolight)
public delegate void NewFrameHandler(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, Surface pSurface, FrameSource FrameSource);
public delegate void NewFrameHandler(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pSurface, FrameSource FrameSource);

public event NewFrameHandler OnNewFrame;
// MP1-4248 : End* Ambilight Capture
Expand Down Expand Up @@ -315,7 +315,7 @@ public void OnFrameGUI(Surface surface)
{
unsafe
{
OnFrame((Int16)surface.Description.Width, (Int16)surface.Description.Height, 0, 0, surface, FrameSource.GUI);
OnFrame((Int16)surface.Description.Width, (Int16)surface.Description.Height, 0, 0, (IntPtr)surface, FrameSource.GUI);
}
}
}
Expand All @@ -328,7 +328,7 @@ public void OnFrameGUI(Surface surface)
/// <param name="arWidth"></param>
/// <param name="arHeight"></param>
/// <param name="pTargetmadVrDib"></param>
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pTargetmadVrDib, FrameSource FrameSource)
public void OnFrameMadVrDib(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pTargetmadVrDib, FrameSource FrameSource)
{
FrameGrabberD3D9Enable = false;
//Dont pass GUI frames to GetCurrentImage() -> VideoModeSwitcher is using it
Expand Down Expand Up @@ -408,7 +408,7 @@ public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, In
/// <param name="arWidth"></param>
/// <param name="arHeight"></param>
/// <param name="pSurface"></param>
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, Surface pSurface, FrameSource FrameSource)
public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, IntPtr pSurface, FrameSource FrameSource)
{
FrameGrabberD3D9Enable = true;
// MP1-4248 :Start* Line Code for Ambilight System Capture (Atmolight)
Expand Down Expand Up @@ -471,7 +471,7 @@ public void OnFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight, Su
// Log.Debug("Calling VideoSurfaceToRGBSurface");
if (rgbSurface != null)
{
VideoSurfaceToRGBSurface((IntPtr)pSurface, (IntPtr)rgbSurface);
VideoSurfaceToRGBSurface(pSurface, (IntPtr)rgbSurface);
}
lock (grabNotifier)
{
Expand Down
2 changes: 1 addition & 1 deletion mediaportal/Core/Player/PlaneScene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ public void RenderFrame(Int16 width, Int16 height, Int16 arWidth, Int16 arHeight
lock (GUIGraphicsContext.RenderModeSwitch)
{
if (grabber != null)
grabber.OnFrame((short)client.Width, (short)client.Height, (short)client.Width, (short)client.Height, surfaceMadVr,
grabber.OnFrame((short)client.Width, (short)client.Height, (short)client.Width, (short)client.Height, (IntPtr)surfaceMadVr,
FrameGrabber.FrameSource.Video);
}
}
Expand Down

0 comments on commit 78cb7a1

Please sign in to comment.