import { StreamStatisticsSampling } from "@norskvideo/norsk-api/lib/media_pb"; import { AutoSinkMediaNode, SinkNodeSettings } from "./common"; import { Interval, StreamKey } from "./types"; import { PlainMessage } from "@bufbuild/protobuf"; /** * @public * Settings to control stream timestamp report * see {@link NorskInspect.streamTimestampReport} */ export interface StreamTimestampReportSettings extends SinkNodeSettings { onTimestamp?: (streamKey: StreamKey, timestamp: Interval, info: { duration?: Interval; }) => void; } /** * @public * see: {@link NorskInspect.streamTimestampReport} */ export declare class StreamTimestampReportNode extends AutoSinkMediaNode { } /** * @public * Settings to subtitles inspect node * see {@link NorskInspect.subtitles} */ export interface InspectSubtitlesSettings extends SinkNodeSettings { /** * Callback to observe subtitle cues in the subscribed stream. * * Timestamps are not directly related to cue timings, but Norsk timestamps as per timestamp report. * * @param cue * @returns */ onCue?: (cue: { streamKey: StreamKey; startTimestamp: Interval; endTimestamp: Interval; text: string; }) => void; } /** * @public * see: {@link NorskInspect.subtitles} */ export declare class InspectSubtitlesNode extends AutoSinkMediaNode { } /** * @public * Settings for metrics node * see {@link NorskInspect.metrics} */ export interface MetricsSettings extends SinkNodeSettings { name: string; includeTimestamps: boolean; includeStreams: boolean; streamStatistics?: { statsSampling?: PlainMessage; }; labels: { [k: string]: string; }; } /** * @public * see: {@link NorskInspect.subtitles} */ export declare class MetricsNode extends AutoSinkMediaNode { } /** * @public * Methods that allow you to inspect media streams, for monitoring, decisioning or debug purposes. */ export interface NorskInspect { /** Intercept all the timestamps of any subscribed stream * @param settings - Configuration for the report node */ streamTimestampReport(settings: StreamTimestampReportSettings): Promise; /** * Observe the cues in a subtitle stream. * * These can be modified and sent to a streamWebVtt input * @param settings - Configuration for the report node */ subtitles(settings: InspectSubtitlesSettings): Promise; /** * Generate metrics for one or more input streams * * These will end up in the telemetry store and are exportable via the prometheus endpoint * or an otel collector */ streamMetrics(settings: MetricsSettings): Promise; } //# sourceMappingURL=inspect.d.ts.map