xr_ai_tools.video_memory#

Native tools backed by the typed video-memory service.

Classes#

ListRecordedParticipantsResult

Participants with camera recordings available in video memory.

VideoStatsRequest

Select one participant's recording statistics.

VideoStatsResult

Storage and time-range statistics for one participant's recording.

LatestVideoRequest

Select the newest recorded video window.

HistoricalVideoRequest

Select a recorded video window beginning at an absolute timestamp.

RecordedVideoResult

A recorded H.264 file and its covered time range.

LatestFramesRequest

Sample the newest recorded frame window.

HistoricalFramesRequest

Sample a recorded frame window beginning at an absolute timestamp.

SampledVideoFrame

One image sampled from a recorded video window.

SampleFramesResult

Bounded image samples and metadata for a recorded video window.

HistoricalFrameRequest

Select the recorded frame nearest an absolute timestamp.

HistoricalFrameResult

The recorded image nearest a requested absolute timestamp.

VideoHealthResult

Readiness and recording state reported by video memory.

VideoMemoryTools

Own a video-memory service client and its finite tools.

Module Contents#

class xr_ai_tools.video_memory.ListRecordedParticipantsResult#

Participants with camera recordings available in video memory.

participants: list[str]#

Exact recorded participant identifiers.

class xr_ai_tools.video_memory.VideoStatsRequest#

Select one participant’s recording statistics.

participant_id: str#

Participant whose camera recording should be inspected.

class xr_ai_tools.video_memory.VideoStatsResult#

Storage and time-range statistics for one participant’s recording.

participant_id: str#

Participant whose recording was inspected.

num_chunks: int#

Number of persisted video chunks.

total_bytes: int#

Total encoded size of all chunks in bytes.

avg_chunk_bytes: int#

Average encoded chunk size in bytes.

earliest_us: int#

Earliest recorded Unix timestamp in microseconds.

latest_us: int#

Latest recorded Unix timestamp in microseconds.

class xr_ai_tools.video_memory.LatestVideoRequest#

Select the newest recorded video window.

class xr_ai_tools.video_memory.HistoricalVideoRequest#

Select a recorded video window beginning at an absolute timestamp.

start_us: int#

Unix timestamp in microseconds at the start of the window.

class xr_ai_tools.video_memory.RecordedVideoResult#

A recorded H.264 file and its covered time range.

path: str#

Local path to the exported H.264 file.

size: int#

Encoded file size in bytes.

start_us: int#

Beginning of the returned window in Unix microseconds.

end_us: int#

End of the returned window in Unix microseconds.

class xr_ai_tools.video_memory.LatestFramesRequest#

Sample the newest recorded frame window.

class xr_ai_tools.video_memory.HistoricalFramesRequest#

Sample a recorded frame window beginning at an absolute timestamp.

start_us: int#

Unix timestamp in microseconds at the start of the window.

class xr_ai_tools.video_memory.SampledVideoFrame#

One image sampled from a recorded video window.

timestamp_us: int#

Estimated Unix timestamp interpolated from recording chunk metadata.

width: int#

Frame width in pixels.

height: int#

Frame height in pixels.

class xr_ai_tools.video_memory.SampleFramesResult#

Bounded image samples and metadata for a recorded video window.

frames: list[SampledVideoFrame]#

Sampled frames in chronological order.

start_us: int#

Beginning of the sampled window in Unix microseconds.

end_us: int#

End of the sampled window in Unix microseconds.

duration_seconds: int#

Requested duration of the sampled window in whole seconds.

frame_budget: int#

Requested maximum number of returned frames.

max_width: int | None#

Requested maximum frame width, if resizing was enabled.

max_height: int | None#

Requested maximum frame height, if resizing was enabled.

class xr_ai_tools.video_memory.HistoricalFrameRequest#

Select the recorded frame nearest an absolute timestamp.

start_us: int#

Unix timestamp in microseconds of the requested frame.

class xr_ai_tools.video_memory.HistoricalFrameResult#

The recorded image nearest a requested absolute timestamp.

timestamp_us: int#

Estimated Unix timestamp interpolated from recording chunk metadata.

width: int#

Frame width in pixels.

height: int#

Frame height in pixels.

class xr_ai_tools.video_memory.VideoHealthResult#

Readiness and recording state reported by video memory.

ready: bool = True#

Whether the service is ready for queries.

recording_enabled: bool#

Whether the service is currently persisting camera video.

class xr_ai_tools.video_memory.VideoMemoryTools(endpoint: str, *, timeout_s: float = 30.0)#

Own a video-memory service client and its finite tools.

async get_health() VideoHealthResult#

Return detailed video-memory readiness and recording state.

async health() bool#

Return whether the video-memory service is reachable and ready.

async close() None#

Close the underlying service connection.