Skip to content

media sdk analog monitors

Andre Lafleur edited this page Oct 8, 2026 · 7 revisions

About AnalogMonitorController

AnalogMonitorController exposes analog monitor activity to a Media SDK integration. It raises events when the analog monitor begins playing a stream, and when the monitor is asked to display a camera that is blocked for the configured user.

AnalogMonitorController does not display video itself and is not a substitute for MediaPlayer. Use it only when the integration needs to observe or react to analog monitor behavior.

How the controller works

You don't construct AnalogMonitorController directly. Get one from AnalogMonitorControllerFactory, passing the connected engine and the GUID of the plugin role that owns the analog monitor workflow. The factory returns null when the engine is null or is not connected to a Directory. Getting a controller also requires the system license to allow Media SDK access.

Subscribe to the events the integration needs, and then retain the controller for as long as the integration needs to receive notifications. Dispose it when the workflow ends.

AnalogMonitorController

using Genetec.Sdk.Media.AnalogMonitor;

var factory = new AnalogMonitorControllerFactory();

AnalogMonitorController controller =
    factory.CreateAnalogMonitorController(
        engine,
        pluginRoleGuid);

if (controller == null)
{
    throw new InvalidOperationException(
        "The engine is not connected.");
}

controller.StreamBeginPlay += OnStreamBeginPlay;
controller.BlockedCameraRequested += OnBlockedCameraRequested;

pluginRoleGuid is the GUID of the plugin role on whose behalf the controller observes analog monitor activity. The controller uses that role identity when it participates in analog monitor workflows.

AnalogMonitorController members

Member Type Description
CameraBlockingUserId Guid The Security Center user identity used for camera-blocking checks. Set to Guid.Empty to evaluate against the user who last displayed the camera on the monitor.
StreamBeginPlay event EventHandler<BeginPlayEventArgs> Raised when the analog monitor begins playing a stream.
BlockedCameraRequested event EventHandler<CameraBlockedEventArgs> Raised when a requested camera is blocked for the configured user.
Dispose() void Releases the controller and unsubscribes from the underlying analog monitor channel.

StreamBeginPlay

Raised when the analog monitor begins playing a stream. BeginPlayEventArgs carries the analog monitor identity, the multicast endpoint, the source identity, and the compression value.

private static void OnStreamBeginPlay(
    object sender,
    BeginPlayEventArgs e)
{
    Guid analogMonitorId = e.AnalogMonitorId;
    Guid sourceId = e.SourceId;
    IPEndPoint multicastEndPoint = e.MulticastEndPoint;
}
Property Type Description
AnalogMonitorId Guid Identity of the analog monitor that began playing.
SourceId Guid Identity of the source whose stream began playing.
MulticastEndPoint IPEndPoint Multicast endpoint the stream is using.
Compression string Compression identifier of the stream.

BlockedCameraRequested

Raised when the analog monitor was asked to display a camera that is currently blocked for the user identified by CameraBlockingUserId. CameraBlockedEventArgs carries the analog monitor identity, the camera identity, the user identity, and the block level that caused the denial.

private static void OnBlockedCameraRequested(
    object sender,
    CameraBlockedEventArgs e)
{
    Guid analogMonitorId = e.AnalogMonitorId;
    Guid cameraId = e.CameraId;
    Guid userId = e.UserId;
    int blockLevel = e.BlockLevel;
}
Property Type Description
AnalogMonitorId Guid Identity of the analog monitor whose request was denied.
CameraId Guid Identity of the camera that was blocked.
UserId Guid Identity of the user whose blocking rules denied the request. Guid.Empty indicates no specific local user, which typically corresponds to a federated camera.
BlockLevel int Block level that caused the denial.

CameraBlockingUserId

Determines whose blocking rules BlockedCameraRequested evaluates against. Set this before subscribing to BlockedCameraRequested if the integration acts on behalf of a specific user. Leave it Guid.Empty to evaluate blocking against the user who last displayed the camera on the analog monitor.

controller.CameraBlockingUserId = userGuid;

Disposing the controller

AnalogMonitorController exposes a Dispose() method but does not implement IDisposable, so it cannot be the target of a using statement. Call Dispose() directly when the integration no longer needs to observe analog monitor activity.

controller.Dispose();

See also

Platform SDK

Plugin SDK

Workspace SDK

Media SDK

Macro SDK

Web SDK

Synergis RIO

Media Gateway

Genetec Web Player

Clone this wiki locally