diff --git a/cmd/example/main.go b/cmd/example/main.go index c0b6b7c855..18b149290c 100644 --- a/cmd/example/main.go +++ b/cmd/example/main.go @@ -186,4 +186,4 @@ func main() { }) lpms.Start(context.Background()) -} \ No newline at end of file +} diff --git a/ffmpeg/ffmpeg.go b/ffmpeg/ffmpeg.go index ff2aefa9a7..233420cdf7 100644 --- a/ffmpeg/ffmpeg.go +++ b/ffmpeg/ffmpeg.go @@ -52,8 +52,8 @@ var FfEncoderLookup = map[Acceleration]map[VideoCodec]string{ Software: { H264: "libx264", H265: "libx265", - VP8: "libvpx", - VP9: "libvpx-vp9", + VP8: "libvpx", + VP9: "libvpx-vp9", }, Nvidia: { H264: "h264_nvenc", @@ -115,10 +115,10 @@ func GetCodecInfo(fname string) (bool, string, string, error) { defer C.free(unsafe.Pointer(acodec_c)) defer C.free(unsafe.Pointer(vcodec_c)) bres := int(C.lpms_get_codec_info(cfname, vcodec_c, acodec_c)) - if C.strlen(acodec_c)<255 { + if C.strlen(acodec_c) < 255 { acodec = C.GoString(acodec_c) } - if C.strlen(vcodec_c)<255 { + if C.strlen(vcodec_c) < 255 { vcodec = C.GoString(vcodec_c) } return bres == 1, acodec, vcodec, nil diff --git a/ffmpeg/ffmpeg_test.go b/ffmpeg/ffmpeg_test.go index 2c329609e6..4572cf4dd0 100644 --- a/ffmpeg/ffmpeg_test.go +++ b/ffmpeg/ffmpeg_test.go @@ -605,11 +605,11 @@ func TestTranscoder_MuxerOpts(t *testing.T) { } type TranscodeOptionsTest struct { - InputCodec VideoCodec - OutputCodec VideoCodec - InputAccel Acceleration - OutputAccel Acceleration - Profile VideoProfile + InputCodec VideoCodec + OutputCodec VideoCodec + InputAccel Acceleration + OutputAccel Acceleration + Profile VideoProfile } func TestSW_Transcoding(t *testing.T) { @@ -627,18 +627,18 @@ func supportedCodecsCombinations(accels []Acceleration) []TranscodeOptionsTest { for _, outCodec := range outCodecs { // skip unsupported combinations switch outAccel { - case Nvidia: - switch outCodec { - case VP8, VP9: - continue - } + case Nvidia: + switch outCodec { + case VP8, VP9: + continue + } } opts = append(opts, TranscodeOptionsTest{ - InputCodec: inCodec, - OutputCodec: outCodec, - InputAccel: inAccel, - OutputAccel: outAccel, - Profile: prof, + InputCodec: inCodec, + OutputCodec: outCodec, + InputAccel: inAccel, + OutputAccel: outAccel, + Profile: prof, }) } } @@ -661,18 +661,18 @@ func codecsComboTest(t *testing.T, options []TranscodeOptionsTest) { for i := range options { curOptions := options[i] switch curOptions.InputCodec { - case VP8, VP9: - inName = dir + "/test_in.mkv" - case H264, H265: - inName = dir + "/test_in.ts" + case VP8, VP9: + inName = dir + "/test_in.mkv" + case H264, H265: + inName = dir + "/test_in.ts" } switch curOptions.OutputCodec { - case VP8, VP9: - outName = dir + "/out.mkv" - qName = dir + "/sw.mkv" - case H264, H265: - outName = dir + "/out.ts" - qName = dir + "/sw.ts" + case VP8, VP9: + outName = dir + "/out.mkv" + qName = dir + "/sw.mkv" + case H264, H265: + outName = dir + "/out.ts" + qName = dir + "/sw.ts" } // if non-h264 test requested, transcode to target input codec first prepare := true diff --git a/segmenter/video_segmenter.go b/segmenter/video_segmenter.go index 6284fe6c07..1039d19541 100644 --- a/segmenter/video_segmenter.go +++ b/segmenter/video_segmenter.go @@ -14,10 +14,10 @@ import ( "path" "github.com/golang/glog" + "github.com/livepeer/joy4/av" "github.com/livepeer/lpms/ffmpeg" "github.com/livepeer/lpms/stream" "github.com/livepeer/m3u8" - "github.com/livepeer/joy4/av" ) var ErrSegmenterTimeout = errors.New("SegmenterTimeout") diff --git a/stream/interface.go b/stream/interface.go index 6e77b53433..40eee9a65c 100644 --- a/stream/interface.go +++ b/stream/interface.go @@ -3,8 +3,8 @@ package stream import ( "context" - "github.com/livepeer/m3u8" "github.com/livepeer/joy4/av" + "github.com/livepeer/m3u8" ) type AppData interface { diff --git a/stream/stream.go b/stream/stream.go index 6a38d49486..efd7ae733d 100644 --- a/stream/stream.go +++ b/stream/stream.go @@ -71,10 +71,10 @@ func (b *streamBuffer) len() int64 { //We couldn't just use the m3u8 definition type HLSSegment struct { - SeqNo uint64 - Name string - Data []byte - Duration float64 + SeqNo uint64 + Name string + Data []byte + Duration float64 IsZeroFrame bool } diff --git a/vidlistener/listener.go b/vidlistener/listener.go index 89e57d5fc8..812733b0a3 100644 --- a/vidlistener/listener.go +++ b/vidlistener/listener.go @@ -6,9 +6,9 @@ import ( "time" "github.com/golang/glog" + joy4rtmp "github.com/livepeer/joy4/format/rtmp" "github.com/livepeer/lpms/segmenter" "github.com/livepeer/lpms/stream" - joy4rtmp "github.com/livepeer/joy4/format/rtmp" ) var segOptions = segmenter.SegmenterOptions{SegLength: time.Second * 2} diff --git a/vidlistener/listener_test.go b/vidlistener/listener_test.go index 4d415f38c6..229c18f93c 100644 --- a/vidlistener/listener_test.go +++ b/vidlistener/listener_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/livepeer/lpms/stream" "github.com/livepeer/joy4/av/pubsub" joy4rtmp "github.com/livepeer/joy4/format/rtmp" + "github.com/livepeer/lpms/stream" ) type testStream string diff --git a/vidplayer/player.go b/vidplayer/player.go index 3fd98179ef..b913c8efae 100644 --- a/vidplayer/player.go +++ b/vidplayer/player.go @@ -17,9 +17,9 @@ import ( "time" "github.com/golang/glog" + joy4rtmp "github.com/livepeer/joy4/format/rtmp" "github.com/livepeer/lpms/stream" "github.com/livepeer/m3u8" - joy4rtmp "github.com/livepeer/joy4/format/rtmp" ) var ErrNotFound = errors.New("ErrNotFound") diff --git a/vidplayer/player_test.go b/vidplayer/player_test.go index 2cf8819770..aa6ca057e8 100644 --- a/vidplayer/player_test.go +++ b/vidplayer/player_test.go @@ -10,9 +10,9 @@ import ( "net/url" + joy4rtmp "github.com/livepeer/joy4/format/rtmp" "github.com/livepeer/lpms/stream" "github.com/livepeer/m3u8" - joy4rtmp "github.com/livepeer/joy4/format/rtmp" ) func TestRTMP(t *testing.T) {