using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; using PepperDash.Essentials.Core; namespace PepperDash.Essentials.Devices.Common.Cameras { /// /// Enumeration of eCameraControlMode values /// public enum eCameraControlMode { Manual = 0, Off, Auto } /// /// Defines the contract for IHasCameras /// public interface IHasCameras { event EventHandler CameraSelected; List Cameras { get; } CameraBase SelectedCamera { get; } StringFeedback SelectedCameraFeedback { get; } void SelectCamera(string key); } /// /// Defines the contract for IHasCodecCameras /// public interface IHasCodecCameras : IHasCameras, IHasFarEndCameraControl { } /// /// To be implmented on codecs that can disable their camera(s) to blank the near end video /// public interface IHasCameraOff { BoolFeedback CameraIsOffFeedback { get; } void CameraOff(); } /// /// Describes the ability to mute and unmute camera video /// public interface IHasCameraMute { BoolFeedback CameraIsMutedFeedback { get; } void CameraMuteOn(); void CameraMuteOff(); void CameraMuteToggle(); } public interface IHasCameraMuteWithUnmuteReqeust : IHasCameraMute { event EventHandler VideoUnmuteRequested; } /// /// Represents a CameraSelectedEventArgs /// public class CameraSelectedEventArgs : EventArgs { /// /// Gets or sets the SelectedCamera /// public CameraBase SelectedCamera { get; private set; } public CameraSelectedEventArgs(CameraBase camera) { SelectedCamera = camera; } } /// /// Defines the contract for IHasFarEndCameraControl /// public interface IHasFarEndCameraControl { CameraBase FarEndCamera { get; } BoolFeedback ControllingFarEndCameraFeedback { get; } } /// /// Defines the contract for IAmFarEndCamera /// public interface IAmFarEndCamera { } public interface IHasCameraControls { } /// /// Defines the contract for IHasCameraPtzControl /// public interface IHasCameraPtzControl : IHasCameraPanControl, IHasCameraTiltControl, IHasCameraZoomControl { /// /// Resets the camera position /// void PositionHome(); } /// /// Interface for camera pan control /// public interface IHasCameraPanControl : IHasCameraControls { void PanLeft(); void PanRight(); void PanStop(); } /// /// Defines the contract for IHasCameraTiltControl /// public interface IHasCameraTiltControl : IHasCameraControls { void TiltDown(); void TiltUp(); void TiltStop(); } /// /// Defines the contract for IHasCameraZoomControl /// public interface IHasCameraZoomControl : IHasCameraControls { void ZoomIn(); void ZoomOut(); void ZoomStop(); } /// /// Defines the contract for IHasCameraFocusControl /// public interface IHasCameraFocusControl : IHasCameraControls { void FocusNear(); void FocusFar(); void FocusStop(); void TriggerAutoFocus(); } public interface IHasAutoFocusMode { void SetFocusModeAuto(); void SetFocusModeManual(); void ToggleFocusMode(); } /// /// Defines the contract for IHasCameraAutoMode /// public interface IHasCameraAutoMode : IHasCameraControls { void CameraAutoModeOn(); void CameraAutoModeOff(); void CameraAutoModeToggle(); BoolFeedback CameraAutoModeIsOnFeedback { get; } } }