Repository navigation
media sdk analog monitors
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.
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.
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.
| 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. |
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. |
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. |
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;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();- About camera blocking: Evaluating camera-blocking state in Media SDK components.
- About MediaPlayer: MediaPlayer WPF control for live, recorded, and local-file playback.
- Overview
- Connecting to Security Center
- SDK certificates
- Referencing SDK assemblies
- ASP.NET hosting
- SDK compatibility
- Migrating to modern .NET
- Entities
- Entity cache
- Entity loading, cache, and query options
- Detecting entity changes
- Entity change event reference
- Transactions
- Security Center events
- Actions
- Security Desk
- Custom events
- Event-to-actions
- Managing macros
- ReportManager
- ReportManager query reference
- Access control raw events
- DownloadAllRelatedData and StrictResults
- Privileges
- Partitions
- Entity write restrictions
- About custom fields
- About video
- About cameras
- Enrolling a video unit
- Ingesting third-party video
- Archiver and auxiliary archiver roles
- Archive transfer
- About access control
- About cardholders and credentials
- About doors, areas, elevators, and access points
- About access rules and schedules
- About access control units and interface modules
- Enrolling an access control unit
- Door templates
- Visitors
- Mobile credentials
- About threat levels
- About alarms
- About incidents
- Maps
- Logging
- Overview
- Localization
- Certificates
- Lifecycle
- Threading
- State management
- Configuration
- Restricted configuration
- Events
- Queries
- Request manager
- Database
- Entity ownership
- Engine extensions
- Entity mappings
- Server management
- Custom privileges
- Custom entity types
- Resolving non-SDK assemblies
- Deploying plugins
- Modern .NET support
- Overview
- Localization
- Certificates
- Creating modules
- Tasks
- Pages
- Components
- Tile extensions
- Services
- Contextual actions
- Custom actions
- Options extensions
- Configuration pages
- Monitors
- Shared components
- Commands
- Extending events
- Map extensions
- Timeline providers
- Image extractors
- Credential encoders
- Credential readers
- Cardholder fields extractors
- Badge printers
- Content builders
- Dashboard widgets
- Incidents
- Logon providers
- Pinnable content builders
- Custom report pages
- Overview
- Getting started
- Media file formats
- MediaPlayer
- VideoSourceFilter
- MediaExporter
- MediaFile
- G64 converters
- FileCryptingManager
- PlaybackSequenceQuerier
- PlaybackStreamReader
- OverlayFactory
- PtzCoordinatesManager
- AudioTransmitter
- AudioRecorder
- AnalogMonitorController
- Camera blocking
- Overview
- Getting started
- Referencing entities
- Entity operations
- About access control in the Web SDK
- About video in the Web SDK
- Users and user groups
- Partitions
- Custom fields
- Custom card formats
- Actions
- Events and alarms
- Incidents
- Reports
- Tasks
- Macros
- Custom entity types
- System endpoints
- Performance guide
- Reference
- Endpoints
- Constants
- Enumerations
- Under the hood
- Troubleshooting