/// <summary>
        /// Create a property dialog for an existing source
        /// </summary>
        /// <param name="source">Source of type ObsSource</param>
        public TestProperties(ObsSource source)
            : this()
        {
            this.source = source;
            ObsData sourceSettings = source.GetSettings();

            view = new PropertiesView(sourceSettings, source, source.GetProperties, source.GetDefaults, source.Update);
            propertyPanel.Controls.Add(view);

            undoButton.Click += (sender, args) =>
            {
                view.ResetChanges();
            };

            defaultButton.Click += (sender, args) =>
            {
                view.ResetToDefaults();
            };

            okButton.Click += (o, args) =>
            {
                view.UpdateSettings();
                DialogResult = DialogResult.OK;
                Close();
            };

            cancelButton.Click += (o, args) =>
            {
                view.ResetChanges();
                DialogResult = DialogResult.Cancel;
                Close();
            };
        }
Beispiel #2
0
        public unsafe ObsSource GetFilterTarget(ObsSource filter)
        {
            IntPtr ptr = libobs.obs_filter_get_target(filter.GetPointer());

            if (ptr == IntPtr.Zero)
            {
                return(null);
            }

            return(new ObsSource(ptr));
        }
Beispiel #3
0
        public unsafe ObsSceneItem Add(ObsSource source)
        {
            IntPtr ptr = libobs.obs_scene_add(instance, source.GetPointer());

            if (ptr == IntPtr.Zero)
            {
                return(null);
            }

            return(new ObsSceneItem(ptr));
        }
Beispiel #4
0
 public unsafe void RemoveFilter(ObsSource filter)
 {
     libobs.obs_source_filter_remove(instance, filter.GetPointer());
 }
Beispiel #5
0
 public unsafe void AddFilter(ObsSource filter)
 {
     libobs.obs_source_filter_add(instance, filter.GetPointer());
 }
Beispiel #6
0
 public unsafe bool AttachSource(ObsSource source)
 {
     return(libobs.obs_volmeter_attach_source(instance, source.GetPointer()));
 }
Beispiel #7
0
 /// <summary> Sets primary output to source for a channel. </summary>
 public static unsafe void SetOutputSource(UInt32 channel, ObsSource source)
 {
     libobs.obs_set_output_source(channel, (IntPtr)source.GetPointer());
 }
Beispiel #8
0
 /// <summary> Sets primary output to source for a channel. </summary>
 public static unsafe void SetOutputSource(UInt32 channel, ObsSource source)
 {
     libobs.obs_set_output_source(channel, (IntPtr)source.GetPointer());
 }
Beispiel #9
0
 /// <summary> Sets name of the underlying source. </summary>
 public unsafe void SetName(string name)
 {
     using (ObsSource source = GetSource())
         source.Name = name;
 }
Beispiel #10
0
 /// <summary> Sets primary output to scene for a channel. </summary>
 public static unsafe void SetOutputScene(UInt32 channel, ObsScene scene)
 {
     using (ObsSource source = scene.GetSource())
         SetOutputSource(channel, source);
 }
Beispiel #11
0
 public void SetFilterOrder(ObsSource filter, obs_order_movement direction)
 {
     libobs.obs_source_filter_set_order(instance, filter.GetPointer(), direction);
 }
Beispiel #12
0
 public unsafe void RemoveFilter(ObsSource filter)
 {
     libobs.obs_source_filter_remove(instance, filter.GetPointer());
 }
Beispiel #13
0
        public unsafe ObsSource GetFilterTarget(ObsSource filter)
        {
            IntPtr ptr = libobs.obs_filter_get_target(filter.GetPointer());
            if (ptr == IntPtr.Zero)
                return null;

            return new ObsSource(ptr);
        }
Beispiel #14
0
 public unsafe void AddFilter(ObsSource filter)
 {
     libobs.obs_source_filter_add(instance, filter.GetPointer());
 }
Beispiel #15
0
 public void SetFilterOrder(ObsSource filter, obs_order_movement direction)
 {
     libobs.obs_source_filter_set_order(instance, filter.GetPointer(), direction);
 }
Beispiel #16
0
 /// <summary> Gets output scene for a channel. </summary>
 /// <returns> null if current output is not set or is not a scene. </returns>
 public static unsafe ObsScene GetOutputScene(UInt32 channel)
 {
     using (ObsSource source = GetOutputSource(channel))
         return(source.GetScene());
 }
 public SourcePreviewPanel(ObsSource source)
 {
     this.source = source;
 }
Beispiel #18
0
 /// <summary> Gets name of the underlying source. </summary>
 public unsafe string GetName()
 {
     using (ObsSource source = GetSource())
         return(source.Name);
 }