atsc

package
v0.0.0-...-a283ab3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package atsc provides representations of ATSC television channel information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	Name        string
	FrequencyHz uint
	Modulation  Modulation
	VideoPID    uint
	AudioPID    uint
	ProgramID   uint
}

Channel represents the definition of an ATSC television channel.

func ParseChannelsConf

func ParseChannelsConf(r io.Reader) ([]Channel, error)

ParseChannelsConf parses Channels from an azap-compatible channels.conf file read from r.

Each line of the file defines a single channel, and is formatted as 6 colon-separated fields corresponding to the fields of Channel as follows:

Name:FrequencyHz:Modulation:VideoPID:AudioPID:ProgramID

FrequencyHz, VideoPID, AudioPID, and ProgramID are all represented in decimal form.

The https://github.com/stefantalpalaru/w_scan2 utility is useful for generating a compatible file. For example, to scan for terrestrial broadcast channels in the United States of America:

w_scan2 -f a -c us -X > channels.conf

func (Channel) String

func (c Channel) String() string

String returns the representation of c in the azap-compatible format described by ParseChannelsConf.

type Modulation

type Modulation string

Modulation represents the modulation of an ATSC television channel.

const (
	// Modulation8VSB may also be parsed as "VSB_8" in a channels.conf file.
	Modulation8VSB   Modulation = "8VSB"
	ModulationQAM64  Modulation = "QAM_64"
	ModulationQAM256 Modulation = "QAM_256"
)

The following are the normalized Modulation values for a Channel.

Directories

Path Synopsis
Package tuner implements an ATSC tuner that outputs WebRTC video and audio tracks.
Package tuner implements an ATSC tuner that outputs WebRTC video and audio tracks.

Jump to

Keyboard shortcuts

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