using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Crestron.SimplSharp;
using PepperDash.Core;
using PepperDash.Essentials.Core;
namespace PepperDash.Essentials.Devices.Common.Cameras
{
///
/// Enum for camera control modes
///
public enum eCameraControlMode
{
///
/// Manual control mode, where the camera is controlled directly by the user or system
///
Manual = 0,
///
/// Off control mode, where the camera is turned off or disabled
///
Off,
///
/// Auto control mode, where the camera automatically adjusts settings based on the environment or conditions
///
Auto
}
///
/// Interface for devices that have cameras
///
public interface IHasCameras : IKeyName
{
///
/// Event that is raised when a camera is selected
///
event EventHandler CameraSelected;
///
/// List of cameras on the device. This should be a list of CameraBase objects
///
List Cameras { get; }
///
/// The currently selected camera. This should be a CameraBase object
///
CameraBase SelectedCamera { get; }
///
/// Feedback that indicates the currently selected camera
///
StringFeedback SelectedCameraFeedback { get; }
///
/// Selects a camera from the list of available cameras based on the provided key.
///
/// The unique identifier or name of the camera to select.
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
{
///
/// Feedback that indicates whether the camera is off
///
BoolFeedback CameraIsOffFeedback { get; }
///
/// Turns the camera off, blanking the near end video
///
void CameraOff();
}
///
/// Describes the ability to mute and unmute camera video
///
public interface IHasCameraMute
{
///
/// Feedback that indicates whether the camera is muted
///
BoolFeedback CameraIsMutedFeedback { get; }
///
/// Mutes the camera video, preventing it from being sent to the far end
///
void CameraMuteOn();
///
/// Unmutes the camera video, allowing it to be sent to the far end
///
void CameraMuteOff();
///
/// Toggles the camera mute state. If the camera is muted, it will be unmuted, and vice versa.
///
void CameraMuteToggle();
}
///
/// Interface for devices that can mute and unmute their camera video, with an event for unmute requests
///
public interface IHasCameraMuteWithUnmuteReqeust : IHasCameraMute
{
///
/// Event that is raised when a video unmute is requested, typically by the far end
///
event EventHandler VideoUnmuteRequested;
}
///
/// Event arguments for the CameraSelected event
///
public class CameraSelectedEventArgs : EventArgs
{
///
/// Gets or sets the SelectedCamera
///
public CameraBase SelectedCamera { get; private set; }
///
/// Constructor for CameraSelectedEventArgs
///
///
public CameraSelectedEventArgs(CameraBase camera)
{
SelectedCamera = camera;
}
}
///
/// Interface for devices that have a far end camera control
///
public interface IHasFarEndCameraControl
{
///
/// Gets the far end camera, which is typically a CameraBase object that represents the camera at the far end of a call
///
CameraBase FarEndCamera { get; }
///
/// Feedback that indicates whether the far end camera is being controlled
///
BoolFeedback ControllingFarEndCameraFeedback { get; }
}
///
/// Defines the contract for IAmFarEndCamera
///
public interface IAmFarEndCamera
{
}
///
/// Interface for devices that have camera controls
///
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
{
///
/// Pans the camera left
///
void PanLeft();
///
/// Pans the camera right
///
void PanRight();
///
/// Stops the camera pan movement
///
void PanStop();
}
///
/// Defines the contract for IHasCameraTiltControl
///
public interface IHasCameraTiltControl : IHasCameraControls
{
///
/// Tilts the camera down
///
void TiltDown();
///
/// Tilts the camera up
///
void TiltUp();
///
/// Stops the camera tilt movement
///
void TiltStop();
}
///
/// Defines the contract for IHasCameraZoomControl
///
public interface IHasCameraZoomControl : IHasCameraControls
{
///
/// Zooms the camera in
///
void ZoomIn();
///
/// Zooms the camera out
///
void ZoomOut();
///
/// Stops the camera zoom movement
///
void ZoomStop();
}
///
/// Defines the contract for IHasCameraFocusControl
///
public interface IHasCameraFocusControl : IHasCameraControls
{
///
/// Focuses the camera near
///
void FocusNear();
///
/// Focuses the camera far
///
void FocusFar();
///
/// Stops the camera focus movement
///
void FocusStop();
///
/// Triggers the camera's auto focus functionality, if available.
///
void TriggerAutoFocus();
}
///
/// Interface for devices that have auto focus mode control
///
public interface IHasAutoFocusMode
{
///
/// Sets the focus mode to auto or manual, or toggles between them.
///
void SetFocusModeAuto();
///
/// Sets the focus mode to manual, allowing for manual focus adjustments.
///
void SetFocusModeManual();
///
/// Toggles the focus mode between auto and manual.
///
void ToggleFocusMode();
}
///
/// Interface for devices that have camera auto mode control
///
public interface IHasCameraAutoMode : IHasCameraControls
{
///
/// Enables or disables the camera's auto mode, which may include automatic adjustments for focus, exposure, and other settings.
///
void CameraAutoModeOn();
///
/// Disables the camera's auto mode, allowing for manual control of camera settings.
///
void CameraAutoModeOff();
///
/// Toggles the camera's auto mode state. If the camera is in auto mode, it will switch to manual mode, and vice versa.
///
void CameraAutoModeToggle();
///
/// Feedback that indicates whether the camera's auto mode is currently enabled.
///
BoolFeedback CameraAutoModeIsOnFeedback { get; }
}
}