Documentation
¶
Overview ¶
Package timinglog keeps the times of two events on one clock: a keyboard report was written to USB, and the last byte of an OS Services video frame was there. A tool that measures the time from a key to the frame that shows it reads both times here, so the network to the KVM is not part of its result.
The log has memory only between Start and Stop, and keeps the newest entries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Frame ¶
Frame logs an OS Services video frame: the RTP timestamp of its packets, and when its last byte was there.
Types ¶
type Log ¶
type Log struct {
Running bool `json:"running"`
// KeyCount and FrameCount count every entry since Start. A count above
// the number of entries tells that the oldest are gone.
KeyCount uint32 `json:"keyCount"`
FrameCount uint32 `json:"frameCount"`
// Keys: when the report was written, and the code of its first key, 0
// when no key is down.
Keys [][2]int64 `json:"keys"`
// Frames: when the frame was complete, and the RTP timestamp of its
// packets.
Frames [][2]int64 `json:"frames"`
}
Log is the timing log as a tool reads it. Each entry is a time in microseconds and a value, the oldest entry first.
type VideoTap ¶
type VideoTap struct {
interceptor.NoOp
// contains filtered or unexported fields
}
VideoTap reads the RTP timestamp of the video packets that one peer connection sends. The track makes the timestamps itself, so the sender of a frame reads the timestamp of its packets here.
A VideoTap is the interceptor factory and the interceptor of one peer connection. It is the last in the registry: a packet that an earlier interceptor sends again does not pass it.
func (*VideoTap) BindLocalStream ¶
func (t *VideoTap) BindLocalStream(info *interceptor.StreamInfo, writer interceptor.RTPWriter) interceptor.RTPWriter
func (*VideoTap) Last ¶
Last returns the RTP timestamp of the newest video packet, and the number of video packets until now. A sender that sees the number change across the write of a frame has the timestamp of that frame.
func (*VideoTap) NewInterceptor ¶
func (t *VideoTap) NewInterceptor(string) (interceptor.Interceptor, error)