using go fmt

This commit is contained in:
Saxon Milton 2018-04-15 20:23:53 +09:30
parent 4ae6919cae
commit e3f5c14562
6 changed files with 32 additions and 32 deletions

View File

@ -7,7 +7,7 @@ import (
)
func main() {
// Give the platform some time to set itself up
// Give the platform some time to set itself up
time.Sleep(30 * time.Second)
config := revid.Config{
Input: revid.Raspivid,
@ -23,8 +23,8 @@ func main() {
fmt.Println("Should not have got error!")
return
}
// Run this instance for 2 days! Power to the pi will surely turn itself
// off before this time is up.
// Run this instance for 2 days! Power to the pi will surely turn itself
// off before this time is up.
revidInst.Start()
time.Sleep(2 * 43200 * time.Second)
revidInst.Stop()

View File

@ -51,15 +51,15 @@ var dummyAudioTag2Data = []byte{0x01, 0xdc, 0x00, 0x4c, 0x61, 0x76, 0x63, 0x35,
// flvGenerator provides properties required for the generation of flv video
// from raw video data
type flvGenerator struct {
fps uint
inputChan chan []byte
outputChan chan []byte
audioFlag bool
videoFlag bool
lastTagSize int
header flv.Header
startTime time.Time
firstTag bool
fps uint
inputChan chan []byte
outputChan chan []byte
audioFlag bool
videoFlag bool
lastTagSize int
header flv.Header
startTime time.Time
firstTag bool
}
// GetInputChan returns the input channel to the generator. This is where the
@ -215,7 +215,7 @@ func (g *flvGenerator) generate() {
// Do we even have some audio to send off ?
if g.audioFlag {
// Not sure why but we need two audio tags for dummy silent audio
// TODO: create constants or SoundSize and SoundType parameters
// TODO: create constants or SoundSize and SoundType parameters
tag := flv.AudioTag{
TagType: uint8(flv.AudioTagType),
DataSize: 7,

View File

@ -177,7 +177,7 @@ func (g *tsGenerator) generate() {
}
pkt.FillPayload(g.payloadByteChan)
// TODO: create consts for AFC parameters
// TODO: create consts for AFC parameters
if pusi {
// Create pat table
patPkt := mpegts.MpegTsPacket{

View File

@ -30,4 +30,4 @@ package itut
func StartCode1() []byte { return []byte{0x00, 0x00, 0x01} }
func StartCode2() []byte { return []byte{0x00, 0x00, 0x00, 0x01} }
func AUD() []byte { return []byte{0x09, 0xF0} }
func AUD() []byte { return []byte{0x09, 0xF0} }

View File

@ -28,20 +28,20 @@ LICENSE
package psi
type PMT struct {
PF byte // POint field
PFB []byte // pointer filler bytes
TableID byte // Table ID
SSI bool // Sectiopn syntax indicator (1 for PAT, PMT, CAT)
PB bool // Private bit (0 for PAT, PMT, CAT)
SL uint16 // Section length
TIE uint16 // Table ID extension
Version byte // Version number
CNI bool // Current/next indicator
Section byte // Section number
LSN byte // Last section number
}
func (p* PMT)ToByteSlice()(output []byte){
PF byte // POint field
PFB []byte // pointer filler bytes
TableID byte // Table ID
SSI bool // Sectiopn syntax indicator (1 for PAT, PMT, CAT)
PB bool // Private bit (0 for PAT, PMT, CAT)
SL uint16 // Section length
TIE uint16 // Table ID extension
Version byte // Version number
CNI bool // Current/next indicator
Section byte // Section number
LSN byte // Last section number
}
func (p *PMT) ToByteSlice() (output []byte) {
}

View File

@ -45,7 +45,7 @@ type Config struct {
RtmpMethod uint8
Packetization uint8
QuantizationMode uint8
Verbosity uint8
Verbosity uint8
FramesPerClip int
RtmpUrl string
Bitrate string
@ -94,7 +94,7 @@ const (
defaultQuantization = "40"
defaultBitrate = "0"
defaultQuantizationMode = QuantizationOff
defaultFramesPerClip = 1
defaultFramesPerClip = 1
)
// Validate checks for any errors in the config fields and defaults settings