embedded

package
v0.1.144 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: GPL-2.0, GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package embedded detects embedded subtitles in video files. Supports all containers and subtitle codecs that ffprobe can parse. Delegates stream detection to the subsync package (ffprobe wrapper).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(_ context.Context, settings map[string]any) (api.Provider, error)

Factory creates an embedded subtitle provider from settings.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider detects embedded subtitles via ffprobe.

func (*Provider) Download

func (p *Provider) Download(_ context.Context, _ *api.Subtitle) ([]byte, error)

Download is a no-op for embedded subtitles.

func (*Provider) Name

func (p *Provider) Name() api.ProviderID

Name returns the provider identifier.

func (*Provider) Search

func (p *Provider) Search(ctx context.Context, req *api.SearchRequest) ([]api.Subtitle, error)

Search probes the video file for embedded subtitle streams. The video file path is passed via SearchRequest.VideoPath.

type ProviderDirect

type ProviderDirect struct{}

ProviderDirect provides direct access to embedded subtitle detection without going through the api.Provider interface. Returns all tracks (including bitmap) for coverage tracking.

Note: this type satisfies the search.TrackDetector interface, but the compile-time assertion lives in search/track_detector.go (search-side) rather than here, to keep this provider package decoupled from search/.

func (ProviderDirect) DetectTracks

func (p ProviderDirect) DetectTracks(ctx context.Context, videoPath string) []api.EmbeddedTrack

DetectTracks detects embedded subtitle tracks in a video file. Returns all tracks including bitmap formats (PGS, VobSub) for coverage tracking. Codec filtering only applies to Search (downloadable subs). Implements search.TrackDetector.

Jump to

Keyboard shortcuts

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