schema

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioChannelLayout

type AudioChannelLayout struct {
	*ff.AVChannelLayout
}

func NewAudioChannelLayout

func NewAudioChannelLayout(ch *ff.AVChannelLayout) *AudioChannelLayout

func (AudioChannelLayout) Cell

func (r AudioChannelLayout) Cell(col int) string

func (AudioChannelLayout) Description

func (r AudioChannelLayout) Description() string

func (AudioChannelLayout) Header

func (AudioChannelLayout) Header() []string

func (AudioChannelLayout) MarshalJSON

func (r AudioChannelLayout) MarshalJSON() ([]byte, error)

func (AudioChannelLayout) Name

func (r AudioChannelLayout) Name() string

func (AudioChannelLayout) String

func (r AudioChannelLayout) String() string

func (AudioChannelLayout) Width

func (AudioChannelLayout) Width(col int) int

type AudioFingerprintLookupRequest

type AudioFingerprintLookupRequest struct {
	Fingerprint string   `json:"fingerprint"` // Audio fingerprint string
	Duration    float64  `json:"duration"`    // Track duration in seconds
	Metadata    []string ``                   // Metadata to request
	/* 148-byte string literal not displayed */
}

type AudioFingerprintLookupResponse

type AudioFingerprintLookupResponse struct {
	Matches [][]*chromaprintschema.ResponseMatch `json:"matches,omitempty"` // AcoustID matches
}

func (AudioFingerprintLookupResponse) String

type AudioFingerprintRequest

type AudioFingerprintRequest struct {
	Input       string    `json:"input,omitempty"` // Input media file path
	Reader      io.Reader `json:"-" kong:"-"`      // Reader for media data
	InputFormat string    `json:"input_format,omitempty" name:"input-format" help:"Input format name (e.g. s16le)"`
	InputOpts   []string  `json:"input_opts,omitempty" name:"input-opt" help:"Input format option key=value (repeatable)"`
	Duration    float64   `json:"duration,omitempty"` // Full track duration in seconds (0 = auto-detect)
}

type AudioFingerprintResponse

type AudioFingerprintResponse struct {
	Fingerprint string  `json:"fingerprint"` // Audio fingerprint string
	Duration    float64 `json:"duration"`    // Track duration in seconds
}

func (AudioFingerprintResponse) String

func (r AudioFingerprintResponse) String() string

type Codec

type Codec struct {
	*ff.AVCodec
	Opts []*ff.AVOption `json:"options,omitempty"`
}

func NewCodec

func NewCodec(codec *ff.AVCodec) *Codec

func (Codec) Cell

func (c Codec) Cell(col int) string

func (Codec) Header

func (Codec) Header() []string

func (Codec) MarshalJSON

func (r Codec) MarshalJSON() ([]byte, error)

func (Codec) Role

func (c Codec) Role() string

func (Codec) String

func (r Codec) String() string

func (*Codec) Type

func (c *Codec) Type() *MediaType

Type returns a MediaType wrapper that provides proper string formatting.

func (Codec) Width

func (Codec) Width(col int) int

type Device

type Device struct {
	Index       int      `json:"index"`
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	IsDefault   bool     `json:"is_default,omitempty"`
	MediaTypes  []string `json:"media_types,omitempty"`
}

func NewDevice

func NewDevice(info *ff.AVDeviceInfo, index int, isDefault bool) *Device

func (Device) Cell

func (d Device) Cell(col int) string

func (Device) Header

func (Device) Header() []string

func (Device) Media

func (d Device) Media() string

func (Device) String

func (r Device) String() string

func (Device) Width

func (Device) Width(col int) int

type Filter

type Filter struct {
	*ff.AVFilter
	Opts []*ff.AVOption `json:"options,omitempty"`
}

func NewFilter

func NewFilter(filter *ff.AVFilter) *Filter

func (Filter) Cell

func (f Filter) Cell(col int) string

func (Filter) Header

func (Filter) Header() []string

func (Filter) MarshalJSON

func (r Filter) MarshalJSON() ([]byte, error)

func (Filter) String

func (r Filter) String() string

func (Filter) Width

func (Filter) Width(col int) int

type Format

type Format struct {
	Name        string   `json:"name"`
	Description string   `json:"description,omitempty"`
	MimeTypes   []string `json:"mime_types,omitempty"`
	Extensions  []string `json:"extensions,omitempty"`
	IsInput     bool     `json:"is_input"`
	IsOutput    bool     `json:"is_output"`
	IsDevice    bool     `json:"is_device,omitempty"`
	Flags       []string `json:"flags,omitempty"`
	MediaTypes  []string `json:"media_types,omitempty"`

	DefaultVideoCodec    string `json:"default_video_codec,omitempty"`
	DefaultAudioCodec    string `json:"default_audio_codec,omitempty"`
	DefaultSubtitleCodec string `json:"default_subtitle_codec,omitempty"`

	Devices []Device       `json:"devices,omitempty"`
	Opts    []*ff.AVOption `json:"options,omitempty"`
}

func NewInputFormat

func NewInputFormat(input *ff.AVInputFormat, isDevice bool) *Format

func NewOutputFormat

func NewOutputFormat(output *ff.AVOutputFormat, isDevice bool) *Format

func (*Format) AddMediaType

func (f *Format) AddMediaType(mediaType string)

func (Format) Cell

func (f Format) Cell(col int) string

func (Format) Header

func (Format) Header() []string

func (Format) Kind

func (f Format) Kind() string

func (Format) Media

func (f Format) Media() string

func (*Format) SetDevices

func (f *Format) SetDevices(devices []Device)

func (Format) String

func (r Format) String() string

func (Format) Width

func (Format) Width(col int) int

type ListAudioChannelLayoutRequest

type ListAudioChannelLayoutRequest struct {
	Name        string `json:"name"`
	NumChannels int    `json:"num_channels"`
}

type ListAudioChannelLayoutResponse

type ListAudioChannelLayoutResponse []AudioChannelLayout

func (ListAudioChannelLayoutResponse) String

type ListCodecRequest

type ListCodecRequest struct {
	Name      string `json:"name,omitempty" help:"Filter by codec name (partial match)"`
	Type      string `json:"type,omitempty" help:"Filter by media type: video, audio, subtitle, data"`
	IsEncoder *bool  `json:"is_encoder,omitempty" help:"Filter by encoder (true) or decoder (false)"`
}

type ListCodecResponse

type ListCodecResponse []Codec

func (ListCodecResponse) String

func (r ListCodecResponse) String() string

type ListFilterRequest

type ListFilterRequest struct {
	Name string `json:"name" help:"Filter by filter name (partial match)"`
}

type ListFilterResponse

type ListFilterResponse []Filter

func (ListFilterResponse) String

func (r ListFilterResponse) String() string

type ListFormatRequest

type ListFormatRequest struct {
	Name     string `json:"name,omitempty" help:"Filter by format name (partial match)"`
	IsInput  *bool  `json:"is_input,omitempty" help:"Filter by input format (demuxer)"`
	IsOutput *bool  `json:"is_output,omitempty" help:"Filter by output format (muxer)"`
	IsDevice *bool  `json:"is_device,omitempty" help:"Filter by device format"`
}

type ListFormatResponse

type ListFormatResponse []Format

func (ListFormatResponse) String

func (r ListFormatResponse) String() string

type ListPixelFormatRequest

type ListPixelFormatRequest struct {
	Name      string `json:"name"`
	NumPlanes int    `json:"num_planes"`
}

type ListPixelFormatResponse

type ListPixelFormatResponse []PixelFormat

func (ListPixelFormatResponse) String

func (r ListPixelFormatResponse) String() string

type ListSampleFormatRequest

type ListSampleFormatRequest struct {
	Name     string `json:"name"`
	IsPlanar *bool  `json:"is_planar,omitempty"`
}

type ListSampleFormatResponse

type ListSampleFormatResponse []SampleFormat

func (ListSampleFormatResponse) String

func (r ListSampleFormatResponse) String() string

type MediaType

type MediaType ff.AVMediaType

func (*MediaType) Equals

func (mt *MediaType) Equals(t ff.AVMediaType) bool

Equals checks if the MediaType equals the given AVMediaType.

func (MediaType) MarshalJSON

func (mt MediaType) MarshalJSON() ([]byte, error)

func (MediaType) String

func (mt MediaType) String() string

type Meta

type Meta struct {
	ContentType string     `json:"content_type,omitempty"`
	Meta        []MetaItem `json:"meta,omitempty"`
}

func (Meta) MarshalJSON

func (m Meta) MarshalJSON() ([]byte, error)

MarshalJSON emits metadata as explicit key/value pairs rather than marshaling embedded interface-backed structs directly.

type MetaItem

type MetaItem struct {
	gomedia.Metadata
}

func (MetaItem) Cell

func (r MetaItem) Cell(col int) string

func (MetaItem) Header

func (MetaItem) Header() []string

func (MetaItem) Width

func (MetaItem) Width(col int) int

type PixelFormat

type PixelFormat struct {
	ff.AVPixelFormat
}

func NewPixelFormat

func NewPixelFormat(pixfmt ff.AVPixelFormat) *PixelFormat

func (PixelFormat) BitDepth

func (r PixelFormat) BitDepth() int

func (PixelFormat) Cell

func (r PixelFormat) Cell(col int) string

func (PixelFormat) Flags

func (r PixelFormat) Flags() string

func (PixelFormat) Header

func (PixelFormat) Header() []string

func (PixelFormat) MarshalJSON

func (r PixelFormat) MarshalJSON() ([]byte, error)

func (PixelFormat) Name

func (r PixelFormat) Name() string

func (PixelFormat) NumPlanes

func (r PixelFormat) NumPlanes() int

func (PixelFormat) String

func (r PixelFormat) String() string

func (PixelFormat) Width

func (PixelFormat) Width(col int) int

type ProbeRequest

type ProbeRequest struct {
	Reader      io.Reader `json:"-" kong:"-"` // Reader for media data
	InputFormat string    `json:"input_format,omitempty" name:"input-format" help:"Input format name (e.g. mpegts)"`
	InputOpts   []string  `json:"input_opts,omitempty" name:"input-opt" help:"Input format option key=value (repeatable)"`
}

type ProbeResponse

type ProbeResponse struct {
	Format      string    `json:"format"`                // Format name (e.g., "mov,mp4,m4a,3gp,3g2,mj2")
	Description string    `json:"description,omitempty"` // Format description (e.g., "QuickTime / MOV")
	MimeTypes   []string  `json:"mime_types,omitempty"`  // MIME types
	Duration    float64   `json:"duration"`              // Duration in seconds
	Streams     []*Stream `json:"streams,omitempty"`     // Stream information
}

func (ProbeResponse) String

func (r ProbeResponse) String() string

type SampleFormat

type SampleFormat struct {
	ff.AVSampleFormat
}

func NewSampleFormat

func NewSampleFormat(samplefmt ff.AVSampleFormat) *SampleFormat

func (SampleFormat) BytesPerSample

func (r SampleFormat) BytesPerSample() int

func (SampleFormat) Cell

func (r SampleFormat) Cell(col int) string

func (SampleFormat) Header

func (SampleFormat) Header() []string

func (SampleFormat) IsPlanar

func (r SampleFormat) IsPlanar() bool

func (SampleFormat) MarshalJSON

func (r SampleFormat) MarshalJSON() ([]byte, error)

func (SampleFormat) Name

func (r SampleFormat) Name() string

func (SampleFormat) PackedName

func (r SampleFormat) PackedName() string

func (SampleFormat) String

func (r SampleFormat) String() string

func (SampleFormat) Width

func (SampleFormat) Width(col int) int

type SegmentAudioRequest

type SegmentAudioRequest struct {
	Reader           io.Reader     `json:"-" kong:"-"`
	OutputDir        string        `json:"output_dir,omitempty" name:"out" help:"Output directory for encoded segment M4A files."`
	Duration         time.Duration `json:"duration,omitempty" name:"duration" help:"Target segment duration (e.g. 30s). Use 0s to disable fixed-size splits."`
	Silence          bool          `json:"silence" name:"silence" help:"Enable silence-based segmentation." negatable:"" default:"true"`
	SilenceDuration  time.Duration `` /* 168-byte string literal not displayed */
	SilenceThreshold float64       `` /* 172-byte string literal not displayed */
}

type Stream

type Stream struct {
	*ffschema.Stream
}

Stream wraps pkg/ffmpeg/schema Stream and adds CLI table formatting helpers.

func WrapStream

func WrapStream(s *ffschema.Stream) *Stream

func (Stream) Cell

func (s Stream) Cell(col int) string

func (Stream) Details

func (s Stream) Details() string

func (Stream) Header

func (Stream) Header() []string

func (Stream) MarshalJSON

func (s Stream) MarshalJSON() ([]byte, error)

func (Stream) String

func (s Stream) String() string

func (Stream) Width

func (Stream) Width(col int) int

Jump to

Keyboard shortcuts

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