/// <summary> /// Creates an instance of the TimedBroadcasterPlugin class, attempting to make a connection to XSplit. /// </summary> /// <param name="connectionUID"> /// A unique ID for this application, to be matched in the accompanying .xbs file. /// </param> /// <param name="visual"> /// The visual to be rendered. /// </param> /// <param name="width"> /// Desired output render width, in pixels. /// </param> /// <param name="height"> /// Desired output render height, in pixels. /// </param> /// <param name="timeInterval"> /// The time interval between updates, in milliseconds. /// </param> /// <returns> /// Returns an instance of a TimedBroadcasterPlugin if the connection to XSplit was successful, otherwise null is returned. /// </returns> public static TimedBroadcasterPlugin CreateInstance( string connectionUID, Visual visual, int width, int height, int timeInterval) { TimedBroadcasterPlugin plugin = null; try { var extsrc = new VHCOMRenderEngineExtSrc2 { ConnectionUID = connectionUID }; plugin = new TimedBroadcasterPlugin(extsrc, timeInterval) { visual = visual, width = width, height = height, taskScheduler = TaskScheduler.FromCurrentSynchronizationContext() }; } catch (COMException) { // Do nothing, the plugin failed to load so null will be returned. } return(plugin); }
public MusicControlPanelView() { InitializeComponent(); this.Measure(new Size(this.Width, this.Height)); this.Arrange(new Rect(0, 0, this.DesiredSize.Width, this.DesiredSize.Height)); broadcaster = TimedBroadcasterPlugin.CreateInstance("3A56008B-E2EE-4180-95EB-8B1D9BC23ED7", contentView, this.OutputWidth, this.OutputHeight, REFRESH_RATE); }
/// <summary> Initializes a new instance of the <see cref="ScoreboardControlPanelView"/> class. </summary> public ScoreboardControlPanelView() { this.InitializeComponent(); this.plugin = TimedBroadcasterPlugin.CreateInstance( "d89befe0-8115-11e1-b0c4-0800200c9a66", this.contentView, 1500, 45, 200); if (this.plugin != null) { this.plugin.StartTimer(); this.contentView.PreviewMouseDown += this.contentView_PreviewMouseDown; this.contentView.PreviewMouseMove += this.contentView_PreviewMouseMove; } }
/// <summary> Initializes a new instance of the <see cref="ScoreboardControlPanelView"/> class. </summary> public ScoreboardControlPanelView() { this.InitializeComponent(); this.plugin = TimedBroadcasterPlugin.CreateInstance( "BCB458E4-13D9-11E1-BF80-790C4824019B", this.contentView, 1380, 112, 50); if (this.plugin != null) { this.plugin.StartTimer(); this.contentView.PreviewMouseDown += this.contentView_PreviewMouseDown; this.contentView.PreviewMouseMove += this.contentView_PreviewMouseMove; } }
public MainWindow() { InitializeComponent(); const int OutputWidth = 1000; const int OutputHeight = 200; // Outputs a 1000x200 image every 50ms (20 FPS) plugin = TimedBroadcasterPlugin.CreateInstance( "livesplit", new irrelevant(), OutputWidth, OutputHeight, 50); if (this.plugin != null) { // The correct version of XSplit was installed, so we can start our output. this.plugin.StartTimer(); } }
/// <summary> /// Creates an instance of the TimedBroadcasterPlugin class, attempting to make a connection to XSplit. /// </summary> /// <param name="connectionUID"> /// A unique ID for this application, to be matched in the accompanying .xbs file. /// </param> /// <param name="visual"> /// The visual to be rendered. /// </param> /// <param name="width"> /// Desired output render width, in pixels. /// </param> /// <param name="height"> /// Desired output render height, in pixels. /// </param> /// <param name="timeInterval"> /// The time interval between updates, in milliseconds. /// </param> /// <returns> /// Returns an instance of a TimedBroadcasterPlugin if the connection to XSplit was successful, otherwise null is returned. /// </returns> public static TimedBroadcasterPlugin CreateInstance( string connectionUID, Visual visual, int width, int height, int timeInterval) { TimedBroadcasterPlugin plugin = null; try { var extsrc = new VHCOMRenderEngineExtSrc2 { ConnectionUID = connectionUID }; plugin = new TimedBroadcasterPlugin(extsrc, timeInterval) { visual = visual, width = width, height = height, taskScheduler = TaskScheduler.FromCurrentSynchronizationContext() }; } catch (COMException) { // Do nothing, the plugin failed to load so null will be returned. } return plugin; }