Documentation
¶
Index ¶
- Constants
- func PackagedExecutable() string
- func PreviewSource(parent context.Context, executable string, target CaptureTarget) ([]byte, error)
- func ValidDeviceID(id string) bool
- func ValidVideoSize(width, height uint32) bool
- type Adapter
- type Capabilities
- type CaptureTarget
- type EncodedVideoOptions
- type Encoder
- type Frame
- type FrameKind
- type Microphone
- type OutputProfile
- type Stream
- func StartAudio(parent context.Context, executable string, target CaptureTarget, exclude bool) (*Stream, error)
- func StartEncodedVideo(parent context.Context, executable string, options EncodedVideoOptions) (*Stream, error)
- func StartMicrophone(parent context.Context, executable, deviceID string) (*Stream, error)
- func StartSystemAudio(parent context.Context, executable string) (*Stream, error)
- func StartVideo(parent context.Context, executable string, options VideoOptions) (*Stream, error)
- func (stream *Stream) Close() error
- func (stream *Stream) Done() <-chan error
- func (stream *Stream) Outputs() []OutputProfile
- func (stream *Stream) Read() (Frame, error)
- func (stream *Stream) RequestKeyFrame(layer int) error
- func (stream *Stream) SetOutputActive(layer int, active bool) error
- func (stream *Stream) SetOutputBitrate(layer int, bitrate uint32) error
- func (stream *Stream) WriteFrame(frame Frame) error
- type Summary
- type VideoOptions
- type VideoProfile
Constants ¶
View Source
const ( MaxVideoWidth = 2560 MaxVideoHeight = 1440 )
Variables ¶
This section is empty.
Functions ¶
func PackagedExecutable ¶
func PackagedExecutable() string
func PreviewSource ¶
func ValidDeviceID ¶ added in v1.6.0
func ValidVideoSize ¶ added in v1.9.0
ValidVideoSize bounds the decoded picture in the current capture contract.
Types ¶
type Capabilities ¶
type Capabilities struct {
Protocol int `json:"protocol"`
Platform string `json:"platform"`
PlatformBuild string `json:"platformBuild"`
VideoCapture bool `json:"videoCapture"`
CaptureBorderControl bool `json:"captureBorderControl,omitempty"`
Microphone bool `json:"microphone,omitempty"`
ProcessAudio bool `json:"processAudio"`
ProcessAudioExclusion bool `json:"processAudioExclusion,omitempty"`
SystemAudio bool `json:"systemAudio"`
SoftwareVP8 bool `json:"softwareVP8"`
Adapters []Adapter `json:"adapters"`
}
func (Capabilities) Summary ¶
func (capabilities Capabilities) Summary() Summary
type CaptureTarget ¶
type CaptureTarget struct {
Kind string `json:"kind"`
SourceID string `json:"sourceId"`
PID uint32 `json:"pid,omitempty"`
CreationTime string `json:"creationTime,omitempty"`
Title string `json:"title"`
}
func ListSources ¶
func ListSources(parent context.Context, executable string) ([]CaptureTarget, error)
func (CaptureTarget) Valid ¶
func (target CaptureTarget) Valid() bool
type EncodedVideoOptions ¶
type EncodedVideoOptions struct {
Codec string
AdapterIndex uint32
EncoderIndex uint32
Preference string
Outputs []OutputProfile
}
type Microphone ¶ added in v1.6.0
Device identities remain local to the authenticated App control connection.
func ListMicrophones ¶ added in v1.6.0
func ListMicrophones(parent context.Context, executable string) ([]Microphone, error)
type OutputProfile ¶
type OutputProfile struct {
Width uint32 `json:"width"`
Height uint32 `json:"height"`
Framerate uint32 `json:"fps"`
Bitrate uint32 `json:"bitrate"`
}
OutputProfile describes one codec output, not a selectable product preset.
func ScreenShareOutputs ¶
func ScreenShareOutputs(profile VideoProfile) []OutputProfile
ScreenShareOutputs follows LiveKit 2.22.1's screen-share simulcast construction, with even derived dimensions for NV12. The source profile has already passed Valid.
func (OutputProfile) Valid ¶
func (profile OutputProfile) Valid() bool
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func StartAudio ¶
func StartEncodedVideo ¶
func StartMicrophone ¶ added in v1.6.0
func StartSystemAudio ¶
func StartVideo ¶
func (*Stream) Outputs ¶
func (stream *Stream) Outputs() []OutputProfile
func (*Stream) RequestKeyFrame ¶
func (*Stream) SetOutputActive ¶
func (*Stream) SetOutputBitrate ¶
func (*Stream) WriteFrame ¶
WriteFrame shares the existing stdin lock with control. Only encoded video crosses this input boundary; capture status and PCM remain producer outputs.
type Summary ¶
type VideoOptions ¶
type VideoOptions struct {
Target CaptureTarget
Codec string
AdapterIndex uint32
EncoderIndex uint32
Profile VideoProfile
RestoreToken string
OutputGroups int
ShowCaptureBorder bool
}
Click to show internal directories.
Click to hide internal directories.