clone

a desktop tv and program guide for over-the-air broadcasts: what's on air, what your tuner gets, live tv, recordings

main
airwaves / internal / vchan / vchan.go
vchan.go 1.6K
1// Package vchan provides custom channels: streams with a guide schedule2// but no tuner behind them, such as the Airwaves Weather display. They only3// do work while someone is watching.4package vchan56import (7 "context"8 "io"9 "time"10)1112// Program is one scheduled item in a custom channel's guide.13type Program struct {14 Start time.Time15 End time.Time16 Title string17 Subtitle string18 Description string19 Category string20 Season string21 Episode string22 Image string // URL23 New bool // a first run24 // Date is when it was made, as XMLTV writes it: "2014", "202603" or25 // "20140304".26 Date string27 // Aired is when it first aired ("2014-03-04"), Cast its actors as28 // "Name (Role)", Rating its content rating ("TV-14") and Genres its29 // genres, where the source knows them.30 Aired string31 Cast []string32 Rating string33 Genres []string34 // AudioLang is the sound's language as tagged ("eng", "jpn"), "" when35 // unknown, which is taken for English.36 AudioLang string37 Captions bool // has English captions38 // OffAir marks a gap in a scheduled channel's airings; its39 // Description says what's next and when.40 OffAir bool41}4243// Channel is a custom channel.44type Channel interface {45 Number() string46 Name() string47 // Details describe the channel for guides and lineups, as of now:48 // they're read again when their file changes.49 Details() Details50 // Programs lists the schedule between from and to.51 Programs(from, to time.Time) []Program52 // Stream writes MPEG-TS (H.264 and AAC) to w until ctx ends.53 Stream(ctx context.Context, w io.Writer) error54}