public static void OsdSetRenderCallback(object madvr) { try { IMadVROsdServices osdServices = (IMadVROsdServices)madvr; osdServices.OsdSetRenderCallback("MP-GUI", null, reserved); osdServices.SafeDispose(); } catch (Exception e) { } }
public static void SetRenderCallback(object madvr) { try { IMadVROsdServices osdServices = (IMadVROsdServices)madvr; osdServices.OsdSetRenderCallback("MP-GUI", osdRenderCallback, reserved); } catch (Exception e) { Log.Error("[Madvr Interface] Error setting callback: " + e); } }
public static void ShowMadVrBitmap(string name, IntPtr leftEye, int Posx, int Posy, uint Duration, int ImagePriority, MadVR madvr) { IntPtr rightEye = IntPtr.Zero; uint colorkey = 0; reserved = IntPtr.Zero; //mouseCallback = new OSDMOUSECALLBACK(OnMouseEvent); IMadVROsdServices osdServices = (IMadVROsdServices)madvr; int ScreenBottom = 0; // Madvr_VideoPlayer.Plugin.Madvr_VideoPlayer.VideoPlayer.ScreenHeight; if (Posy > (ScreenBottom / 2)) { if (name != "transportTime") { CurrentName = name; CurrentLeftEye = leftEye; CurrentPosX = Posx; CurrentPosY = Posy; CurrentDuration = Duration; CurrentImagePriority = ImagePriority; if (startTransition == false) { while (Posy < ScreenBottom) { osdServices.OsdSetBitmap(name, leftEye, rightEye, colorkey, Posx, ScreenBottom, false, ImagePriority, Duration, 0, mouseCallback, callbackContext, reserved); if (Posy < ScreenBottom) { ScreenBottom--; } if (Posy < ScreenBottom) { ScreenBottom--; } if (Posy < ScreenBottom) { ScreenBottom--; } if (Posy < ScreenBottom) { ScreenBottom--; } if (name == "iMovieInfoImage") { if (Posy < ScreenBottom) { ScreenBottom--; } if (Posy < ScreenBottom) { ScreenBottom--; } if (Posy < ScreenBottom) { ScreenBottom--; } if (Posy < ScreenBottom) { ScreenBottom--; } } Thread.Sleep(1); } osdServices.OsdSetBitmap(name, leftEye, rightEye, colorkey, Posx, ScreenBottom, false, ImagePriority, Duration, 0, mouseCallback, callbackContext, reserved); startTransition = true; } else { osdServices.OsdSetBitmap(name, leftEye, rightEye, colorkey, Posx, Posy, false, ImagePriority, Duration, 0, mouseCallback, callbackContext, reserved); } } else { osdServices.OsdSetBitmap(name, leftEye, rightEye, colorkey, Posx, Posy, false, ImagePriority, Duration, 0, mouseCallback, callbackContext, reserved); } } else { osdServices.OsdSetBitmap(name, leftEye, rightEye, colorkey, Posx, Posy, false, ImagePriority, Duration, 0, mouseCallback, callbackContext, reserved); } if (name.ToLower().Contains("pause") || name.ToLower().StartsWith("pause")) { osdServices.OsdRedrawFrame(); } //else if (Madvr_VideoPlayer.Plugin.Madvr_VideoPlayer.VideoPlayer.m_state == "Paused") //{ // osdServices.OsdRedrawFrame(); //} }