Repository navigation
media sdk playback sequence querier
PlaybackSequenceQuerier returns the time ranges where recordings exist for a camera, an audio stream, or a metadata stream. It does not read frames; for that, use PlaybackStreamReader.
Run a query before connecting a PlaybackStreamReader so the reader does not start at a time where no archive data exists, and so a timeline UI can show recording regions accurately.
Create a querier through one of three factory methods: CreateVideoQuerier, CreateAudioQuerier, or CreateQuerier. Call QuerySequencesAsync(DateTimeRange) for merged recording ranges, or QuerySequencesBySourcesAsync(DateTimeRange) when the camera has recordings on more than one playback source.
Both query methods are async. The querier exposes DisposeAsync(), which returns Task, for asynchronous disposal. Use a try block and call await querier.DisposeAsync() in its finally block to release the querier.
using Genetec.Sdk.Media;
using Genetec.Sdk.Media.Reader;
PlaybackSequenceQuerier querier =
PlaybackSequenceQuerier.CreateVideoQuerier(engine, cameraGuid);
try
{
var range = new DateTimeRange(startTimeUtc, endTimeUtc);
List<PlaybackSequence> sequences =
await querier.QuerySequencesAsync(range);
}
finally
{
await querier.DisposeAsync();
}| Method | Use it for |
|---|---|
CreateVideoQuerier(IEngine, Guid cameraGuid) |
Camera video recordings. |
CreateAudioQuerier(IEngine, Guid cameraGuid) |
Camera audio recordings. |
CreateQuerier(IEngine, Guid cameraGuid, Guid streamGuid) |
A specific metadata stream associated with the camera. |
All three return a querier ready to be queried. Time values passed to QuerySequencesAsync are UTC.
QuerySequencesAsync(DateTimeRange) returns a list of PlaybackSequence ranges for the requested time window, merged across playback sources. Use this when the application only needs to know when recording exists.
PlaybackSequence exposes a single Range property of type DateTimeRange that contains the start and end times of a continuous recorded segment.
A camera can record to more than one playback source, such as an Archiver or Auxiliary Archiver. When the application needs source-level information, use QuerySequencesBySourcesAsync:
List<PlaybackSource> sources =
await querier.QuerySequencesBySourcesAsync(range);
foreach (PlaybackSource source in sources)
{
Guid playbackSourceGuid = source.PlaybackSourceGuid;
bool isOnline = source.IsOnline;
IReadOnlyList<PlaybackSequence> sourceSequences = source.Sequences;
}The returned list contains every playback source configured for the camera, including sources with no recordings in the requested range. Those entries have an empty Sequences list rather than null. IsOnline reflects whether the source was reachable at the moment of the query.
PlaybackSource member |
Description |
|---|---|
PlaybackSourceGuid |
Identity of the playback source. |
IsOnline |
true when the source is currently online and reachable. |
Sequences |
Recorded segments contributed by this source within the queried range. |
Use PlaybackSourceGuid when constructing a PlaybackStreamReader that must read from one specific source rather than across all sources.
PlaybackSequenceQuerier exposes DisposeAsync() returning a Task. Use await querier.DisposeAsync() to release resources.
- About PlaybackStreamReader: Reading raw recorded video, audio, or metadata frames as data.
- About MediaExporter: Producing G64 and G64x export packages from Security Center recordings.
- 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