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() { 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) time.Sleep(30 * time.Second)
config := revid.Config{ config := revid.Config{
Input: revid.Raspivid, Input: revid.Raspivid,
@ -23,8 +23,8 @@ func main() {
fmt.Println("Should not have got error!") fmt.Println("Should not have got error!")
return return
} }
// Run this instance for 2 days! Power to the pi will surely turn itself // Run this instance for 2 days! Power to the pi will surely turn itself
// off before this time is up. // off before this time is up.
revidInst.Start() revidInst.Start()
time.Sleep(2 * 43200 * time.Second) time.Sleep(2 * 43200 * time.Second)
revidInst.Stop() 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 // flvGenerator provides properties required for the generation of flv video
// from raw video data // from raw video data
type flvGenerator struct { type flvGenerator struct {
fps uint fps uint
inputChan chan []byte inputChan chan []byte
outputChan chan []byte outputChan chan []byte
audioFlag bool audioFlag bool
videoFlag bool videoFlag bool
lastTagSize int lastTagSize int
header flv.Header header flv.Header
startTime time.Time startTime time.Time
firstTag bool firstTag bool
} }
// GetInputChan returns the input channel to the generator. This is where the // GetInputChan returns the input channel to the generator. This is where the

View File

@ -30,4 +30,4 @@ package itut
func StartCode1() []byte { return []byte{0x00, 0x00, 0x01} } func StartCode1() []byte { return []byte{0x00, 0x00, 0x01} }
func StartCode2() []byte { return []byte{0x00, 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 package psi
type PMT struct { type PMT struct {
PF byte // POint field PF byte // POint field
PFB []byte // pointer filler bytes PFB []byte // pointer filler bytes
TableID byte // Table ID TableID byte // Table ID
SSI bool // Sectiopn syntax indicator (1 for PAT, PMT, CAT) SSI bool // Sectiopn syntax indicator (1 for PAT, PMT, CAT)
PB bool // Private bit (0 for PAT, PMT, CAT) PB bool // Private bit (0 for PAT, PMT, CAT)
SL uint16 // Section length SL uint16 // Section length
TIE uint16 // Table ID extension TIE uint16 // Table ID extension
Version byte // Version number Version byte // Version number
CNI bool // Current/next indicator CNI bool // Current/next indicator
Section byte // Section number Section byte // Section number
LSN byte // Last section number LSN byte // Last section number
} }
func (p* PMT)ToByteSlice()(output []byte){ func (p *PMT) ToByteSlice() (output []byte) {
} }

View File

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