Documentation
¶
Overview ¶
Package talk plays audio from an RTSP client through a camera's speaker.
The camera side is internal/baichuan's: OpenTalk negotiates the session and Talk carries the blocks. What this package adds is the conversion between the two ends. An RTSP back channel arrives as G.711 at 8 kHz in packets of whatever size the client chose; the cameras surveyed here take IMA ADPCM at 16 kHz in blocks of exactly 1024 samples. So audio is resampled to the camera's rate, collected until a whole block is there, and sent a block at a time.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrClosed = errors.New("talk: session closed")
ErrClosed is Write after Close.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session is one talk session on its own camera connection, separate from the ones carrying video, so talking never risks a stream.
func (*Session) Ping ¶
Ping keeps the connection alive between bursts of speech. The camera sends nothing back during a talk session, and a connection that hears nothing for baichuan.DefaultIdleTimeout gives up on itself.