Beispiel #1
0
        /// <summary>
        /// Get current OBS log handler. Handler is set to null if non-wrapped handler is being used.
        /// </summary>
        public static void GetLogHandler(out LogHandlerDelegate handler, out IntPtr param)
        {
            libobs.log_handler_t currentHandler = null;
            libobs.base_get_log_handler(out currentHandler, out param);

            if (currentHandler == wrapperHandler)
                handler = realHandler;
            else
                handler = null;
        }
Beispiel #2
0
        /// <summary>
        /// Get current OBS log handler. Handler is set to null if non-wrapped handler is being used.
        /// </summary>
        public static void GetLogHandler(out LogHandlerDelegate handler, out IntPtr param)
        {
            libobs.log_handler_t currentHandler = null;
            libobs.base_get_log_handler(out currentHandler, out param);

            if (currentHandler == wrapperHandler)
            {
                handler = realHandler;
            }
            else
            {
                handler = null;
            }
        }
        /// <summary>
        /// Default ctor
        /// </summary>
        /// <param name="camera">the camera to hook on</param>
        public StreamingUnityServerPlugin(Camera camera)
        {
            // we need to set up the scoped delegates
            this.managedInputDelegate = new InputHandlerDelegate(OnInput);
            this.managedLogDelegate   = new LogHandlerDelegate(OnLog);

            // and then we can proxy them across to native land
            SetInputDataCallback(Marshal.GetFunctionPointerForDelegate(this.managedInputDelegate));
            SetLogCallback(Marshal.GetFunctionPointerForDelegate(this.managedLogDelegate));

            // configure a command to issue an event to the render event function
            CommandBuffer cmb = new CommandBuffer();

            cmb.name = PluginName + " Encoding";
            cmb.IssuePluginEvent(GetRenderEventFunc(), 0);

            // add the command to the camera so it's issued after all camera rendering occurs
            Camera.main.AddCommandBuffer(CameraEvent.AfterEverything, cmb);
        }
Beispiel #4
0
 /// <summary> Sets OBS current log handler. </summary>
 public static void SetLogHandler(libobs.log_handler_t handler, IntPtr param)
 {
     realHandler = null;
     libobs.base_set_log_handler(handler, param);
 }
Beispiel #5
0
 /// <summary> Sets OBS current log handler and automatically handles message formatting. </summary>
 public static void SetLogHandler(LogHandlerDelegate handler, IntPtr param)
 {
     realHandler = handler;
     libobs.base_set_log_handler(wrapperHandler, param);
 }
Beispiel #6
0
		internal static extern PixelportApp pixelport_set_log_handler(string max_level, LogHandlerDelegate handler);
Beispiel #7
0
 /// <summary> Sets OBS current log handler. </summary>
 public static void SetLogHandler(libobs.log_handler_t handler, IntPtr param)
 {
     realHandler = null;
     libobs.base_set_log_handler(handler, param);
 }
Beispiel #8
0
 /// <summary> Sets OBS current log handler and automatically handles message formatting. </summary>
 public static void SetLogHandler(LogHandlerDelegate handler, IntPtr param)
 {
     realHandler = handler;
     libobs.base_set_log_handler(wrapperHandler, param);
 }