Permalink
Browse files

MP1-4781V8 : madVR V334 (Revert and change code for Auto3D detection …

…because it break aspect ratio)
  • Loading branch information...
Sebastiii committed Oct 2, 2017
1 parent 3f627cb commit 274b843879effe544ebd722bd1b2db1b5040a846
@@ -992,11 +992,9 @@ private int RenderLayers(GUILayers layers, Int16 width, Int16 height, Int16 arWi
GUIGraphicsContext.TABTopDone = false;
GUIGraphicsContext.TABBottomDone = false;
if (GUIGraphicsContext.basicVideoMadVr != null)
{
GUIGraphicsContext.basicVideoMadVr.SetSourcePosition(0, 0, client.Width, client.Height);
GUIGraphicsContext.basicVideoMadVr.SetDestinationPosition(0, 0, client.Width, client.Height);
}
// Force VideoWindow to be refreshed with madVR when switching from video size like 16:9 to 4:3
GUIGraphicsContext.UpdateVideoWindow = true;
GUIGraphicsContext.VideoWindowChanged();
// Force a madVR refresh to resize MP window
g_Player.RefreshMadVrVideo();
@@ -1045,13 +1043,9 @@ private int RenderLayers(GUILayers layers, Int16 width, Int16 height, Int16 arWi
GUIGraphicsContext.TABBottomDone = false;
GUIGraphicsContext.NoneDone = false;
if (GUIGraphicsContext.basicVideoMadVr != null)
{
if (GUIGraphicsContext.basicVideoMadVr != null)
{
GUIGraphicsContext.basicVideoMadVr.SetDestinationPosition(0, 0, client.Width, client.Height);
}
}
// Force VideoWindow to be refreshed with madVR when switching from video size like 16:9 to 4:3
GUIGraphicsContext.UpdateVideoWindow = true;
GUIGraphicsContext.VideoWindowChanged();
// Force a madVR refresh to resize MP window
g_Player.RefreshMadVrVideo();
@@ -1083,13 +1077,9 @@ private int RenderLayers(GUILayers layers, Int16 width, Int16 height, Int16 arWi
GUIGraphicsContext.TABTopDone = false;
GUIGraphicsContext.TABBottomDone = false;
if (GUIGraphicsContext.basicVideoMadVr != null)
{
if (GUIGraphicsContext.basicVideoMadVr != null)
{
GUIGraphicsContext.basicVideoMadVr.SetDestinationPosition(0, 0, client.Width, client.Height);
}
}
// Force VideoWindow to be refreshed with madVR when switching from video size like 16:9 to 4:3
GUIGraphicsContext.UpdateVideoWindow = true;
GUIGraphicsContext.VideoWindowChanged();
// Force a madVR refresh to resize MP window
g_Player.RefreshMadVrVideo();
@@ -1118,13 +1108,9 @@ private int RenderLayers(GUILayers layers, Int16 width, Int16 height, Int16 arWi
GUIGraphicsContext.Render3DModeHalfDone = false;
GUIGraphicsContext.NoneDone = false;
if (GUIGraphicsContext.basicVideoMadVr != null)
{
if (GUIGraphicsContext.basicVideoMadVr != null)
{
GUIGraphicsContext.basicVideoMadVr.SetDestinationPosition(0, 0, client.Width*2, client.Height);
}
}
// Force VideoWindow to be refreshed with madVR when switching from video size like 16:9 to 4:3
GUIGraphicsContext.UpdateVideoWindow = true;
GUIGraphicsContext.VideoWindowChanged();
// Force a madVR refresh to resize MP window
g_Player.RefreshMadVrVideo();
@@ -1147,13 +1133,9 @@ private int RenderLayers(GUILayers layers, Int16 width, Int16 height, Int16 arWi
GUIGraphicsContext.Render3DModeHalfDone = false;
GUIGraphicsContext.NoneDone = false;
if (GUIGraphicsContext.basicVideoMadVr != null)
{
if (GUIGraphicsContext.basicVideoMadVr != null)
{
GUIGraphicsContext.basicVideoMadVr.SetDestinationPosition(0, 0, client.Width*2, client.Height);
}
}
// Force VideoWindow to be refreshed with madVR when switching from video size like 16:9 to 4:3
GUIGraphicsContext.UpdateVideoWindow = true;
GUIGraphicsContext.VideoWindowChanged();
// Force a madVR refresh to resize MP window
g_Player.RefreshMadVrVideo();
@@ -1177,13 +1159,9 @@ private int RenderLayers(GUILayers layers, Int16 width, Int16 height, Int16 arWi
GUIGraphicsContext.Render3DModeHalfDone = false;
GUIGraphicsContext.NoneDone = false;
if (GUIGraphicsContext.basicVideoMadVr != null)
{
if (GUIGraphicsContext.basicVideoMadVr != null)
{
GUIGraphicsContext.basicVideoMadVr.SetDestinationPosition(0, 0, client.Width, client.Height*2);
}
}
// Force VideoWindow to be refreshed with madVR when switching from video size like 16:9 to 4:3
GUIGraphicsContext.UpdateVideoWindow = true;
GUIGraphicsContext.VideoWindowChanged();
// Force a madVR refresh to resize MP window
g_Player.RefreshMadVrVideo();
@@ -1206,13 +1184,9 @@ private int RenderLayers(GUILayers layers, Int16 width, Int16 height, Int16 arWi
GUIGraphicsContext.Render3DModeHalfDone = false;
GUIGraphicsContext.NoneDone = false;
if (GUIGraphicsContext.basicVideoMadVr != null)
{
if (GUIGraphicsContext.basicVideoMadVr != null)
{
GUIGraphicsContext.basicVideoMadVr.SetDestinationPosition(0, 0, client.Width, client.Height*2);
}
}
// Force VideoWindow to be refreshed with madVR when switching from video size like 16:9 to 4:3
GUIGraphicsContext.UpdateVideoWindow = true;
GUIGraphicsContext.VideoWindowChanged();
// Force a madVR refresh to resize MP window
g_Player.RefreshMadVrVideo();
@@ -718,10 +718,10 @@ protected virtual void SetSourceDestRectangles(Rectangle rSource, Rectangle rDes
if (GUIGraphicsContext.Render3DMode == GUIGraphicsContext.eRender3DMode.SideBySideTo2D)
{
rDest.Width = rDest.Width*2;
}
}
if (GUIGraphicsContext.Render3DMode == GUIGraphicsContext.eRender3DMode.TopAndBottomTo2D)
{
rDest.Height = rDest.Height * 2;
rDest.Height = rDest.Height*2;
}
basicVideo.SetDestinationPosition(rDest.Left, rDest.Top, rDest.Width, rDest.Height);
}
@@ -544,7 +544,7 @@ protected override bool GetInterfaces()
//Get filterCodecName
filterCodec = GetFilterCodec();
GUIGraphicsContext.basicVideoMadVr = basicVideo = graphBuilder as IBasicVideo2;
basicVideo = graphBuilder as IBasicVideo2;
if (filterConfig.bAutoDecoderSettings)
{
@@ -1568,17 +1568,12 @@ protected void Cleanup()
{
DirectShowUtil.ReleaseComObject(basicVideo);
}
if (GUIGraphicsContext.basicVideoMadVr != null)
{
DirectShowUtil.ReleaseComObject(GUIGraphicsContext.basicVideoMadVr);
}
videoWin = null;
mediaCtrl = null;
mediaSeek = null;
mediaPos = null;
basicAudio = null;
basicVideo = null;
GUIGraphicsContext.basicVideoMadVr = null;
Log.Info("VideoPlayer9: Cleanup Sub/PostProcess");
if (VMR9Util.g_vmr9 != null)
@@ -174,7 +174,6 @@ public enum VideoRendererType
// For madVR
public static Surface MadVrRenderTargetVMR9 = null;
public static IntPtr HWnd;
internal static IBasicVideo2 basicVideoMadVr;
// Stacks for matrix transformations.
private static readonly Stack<Matrix> ProjectionMatrixStack = new Stack<Matrix>();

0 comments on commit 274b843

Please sign in to comment.