Help us shape the future of Go! Take the 2026 Go Developer Survey

caps

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 1, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package caps builds neutral client capabilities from protocol profiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct{ Learn, Rules Layer }

func (Builder) Build

func (b Builder) Build(ctx context.Context, device DeviceInfo, profile DeviceProfile, protocolInfo []string, userAgent string) (core.ClientCaps, error)

Build merges declarations, then applies learning followed by owner rules.

type CodecProfile

type CodecProfile struct {
	Type            string             `json:"Type"`
	Codec           string             `json:"Codec"`
	Container       string             `json:"Container"`
	SubContainer    string             `json:"SubContainer"`
	Conditions      []ProfileCondition `json:"Conditions"`
	ApplyConditions []ProfileCondition `json:"ApplyConditions"`
}

type ContainerProfile

type ContainerProfile struct {
	Type         string             `json:"Type"`
	Container    string             `json:"Container"`
	SubContainer string             `json:"SubContainer"`
	Conditions   []ProfileCondition `json:"Conditions"`
}

type DeviceInfo

type DeviceInfo struct {
	Protocol                                                 core.Protocol
	Product, Platform, Version, Device, DeviceName, ClientID string
	VideoCodecs, AudioCodecs, Containers                     []string
	SubtitleCodecs                                           []string
	DVProfiles                                               []int
	MaxHeight, MaxBitrateKbps                                int
	HDR10, DolbyVision                                       bool
	Remote, Download                                         bool
}

DeviceInfo is the neutral subset of a Silo or other client's declaration.

type DeviceProfile

type DeviceProfile struct {
	DirectPlayProfiles                        []DirectPlayProfile  `json:"DirectPlayProfiles"`
	TranscodingProfiles                       []TranscodingProfile `json:"TranscodingProfiles"`
	SubtitleProfiles                          []SubtitleProfile    `json:"SubtitleProfiles"`
	ContainerProfiles                         []ContainerProfile   `json:"ContainerProfiles"`
	CodecProfiles                             []CodecProfile       `json:"CodecProfiles"`
	MaxStreamingBitrate                       int                  `json:"MaxStreamingBitrate"`
	AlwaysUseMostCompatibleTranscodingProfile bool                 `json:"AlwaysUseMostCompatibleTranscodingProfile"`
	MaxStaticBitrate                          int                  `json:"MaxStaticBitrate"`
	MusicStreamingTranscodingBitrate          int                  `json:"MusicStreamingTranscodingBitrate"`
	MaxStaticMusicBitrate                     int                  `json:"MaxStaticMusicBitrate"`
}

type DirectPlayProfile

type DirectPlayProfile struct {
	Container  string `json:"Container"`
	VideoCodec string `json:"VideoCodec"`
	AudioCodec string `json:"AudioCodec"`
	Type       string `json:"Type"`
}

DirectPlayProfile is the common Jellyfin/Emby DeviceProfile direct-play shape.

type Layer

Layer applies learned capabilities or owner rules after declared capabilities.

type ProfileCondition

type ProfileCondition struct {
	Condition  string `json:"Condition"`
	Property   string `json:"Property"`
	Value      string `json:"Value"`
	IsRequired *bool  `json:"IsRequired"`
}

type SubtitleProfile

type SubtitleProfile struct {
	Format    string `json:"Format"`
	Method    string `json:"Method"`
	DidlMode  string `json:"DidlMode"`
	Language  string `json:"Language"`
	Container string `json:"Container"`
}

type TranscodingProfile

type TranscodingProfile struct {
	Container                 string             `json:"Container"`
	Type                      string             `json:"Type"`
	VideoCodec                string             `json:"VideoCodec"`
	AudioCodec                string             `json:"AudioCodec"`
	Protocol                  string             `json:"Protocol"`
	Context                   string             `json:"Context"`
	EstimateContentLength     bool               `json:"EstimateContentLength"`
	EnableMpegtsM2TsMode      bool               `json:"EnableMpegtsM2TsMode"`
	CopyTimestamps            bool               `json:"CopyTimestamps"`
	EnableSubtitlesInManifest bool               `json:"EnableSubtitlesInManifest"`
	TranscodeSeekInfo         string             `json:"TranscodeSeekInfo"`
	MaxAudioChannels          string             `json:"MaxAudioChannels"`
	MinSegments               int                `json:"MinSegments"`
	SegmentLength             int                `json:"SegmentLength"`
	BreakOnNonKeyFrames       *bool              `json:"BreakOnNonKeyFrames"`
	EnableAudioVbrEncoding    *bool              `json:"EnableAudioVbrEncoding"`
	Conditions                []ProfileCondition `json:"Conditions"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL