/// <summary> /// Enable processing on a component /// </summary> internal void EnableComponent() { if (!this.Enabled) { MMALCheck(MMALComponent.mmal_component_enable(this.Ptr), "Unable to enable component"); } }
/// <summary> /// Disable processing on a component /// </summary> internal void DisableComponent() { if (this.Enabled) { MMALCheck(MMALComponent.mmal_component_disable(this.Ptr), "Unable to disable component"); } }
/// <summary> /// Provides a facility to create a component with a given name. /// </summary> /// <param name="name">The name of the component to create.</param> /// <returns>A pointer to the new component struct.</returns> private static MMAL_COMPONENT_T* CreateComponent(string name) { IntPtr ptr = IntPtr.Zero; MMALCheck(MMALComponent.mmal_component_create(name, &ptr), "Unable to create component"); var compPtr = (MMAL_COMPONENT_T*)ptr.ToPointer(); return compPtr; }
/// <summary> /// Destroy a previously created component Release an acquired reference on a component. /// Only actually destroys the component when the last reference is being released. /// </summary> internal void DestroyComponent() { MMALCheck(MMALComponent.mmal_component_destroy(this.Ptr), "Unable to destroy component"); }
/// <summary> /// Release a reference on a component Release an acquired reference on a component. Triggers the destruction of the component /// when the last reference is being released. /// </summary> internal void ReleaseComponent() { MMALCheck(MMALComponent.mmal_component_release(this.Ptr), "Unable to release component"); }
/// <summary> /// Acquire a reference on a component. Acquiring a reference on a component will prevent a component from being destroyed until the /// acquired reference is released (by a call to mmal_component_destroy). References are internally counted so all acquired references /// need a matching call to release them. /// </summary> internal void AcquireComponent() { MMALComponent.mmal_component_acquire(this.Ptr); }
/// <summary> /// Acquire a reference on a component. Acquiring a reference on a component will prevent a component from being destroyed until the /// acquired reference is released (by a call to mmal_component_destroy). References are internally counted so all acquired references /// need a matching call to release them. /// </summary> public void AcquireComponent() { MMALComponent.mmal_component_acquire(this.Ptr); }