Skip to content

Commit 3b3ed9a

Browse files
committed
Fix lint, vet and fmt errors
1 parent 366f9ec commit 3b3ed9a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

examples/gstreamer-send/gst/gst.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,20 @@ const (
7777
)
7878

7979
//export goHandlePipelineBuffer
80-
func goHandlePipelineBuffer(buffer unsafe.Pointer, bufferLen C.int, duration C.int, pipelineId C.int) {
80+
func goHandlePipelineBuffer(buffer unsafe.Pointer, bufferLen C.int, duration C.int, pipelineID C.int) {
8181
pipelinesLock.Lock()
8282
defer pipelinesLock.Unlock()
8383

84-
if pipeline, ok := pipelines[int(pipelineId)]; ok {
84+
if pipeline, ok := pipelines[int(pipelineID)]; ok {
8585
var samples uint32
8686
if pipeline.codec == webrtc.Opus {
8787
samples = uint32(audioClockRate * (float32(duration) / 1000000000))
8888
} else {
8989
samples = uint32(videoClockRate * (float32(duration) / 1000000000))
9090
}
91-
pipeline.in <- webrtc.RTCSample{C.GoBytes(buffer, bufferLen), samples}
91+
pipeline.in <- webrtc.RTCSample{Data: C.GoBytes(buffer, bufferLen), Samples: samples}
9292
} else {
93-
fmt.Printf("discarding buffer, no pipeline with id %d", int(pipelineId))
93+
fmt.Printf("discarding buffer, no pipeline with id %d", int(pipelineID))
9494
}
9595
C.free(buffer)
9696
}

rtcpeerconnection.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ func init() {
2121
rand.Seed(time.Now().UTC().UnixNano())
2222
}
2323

24+
// RTCSample contains media, and the amount of samples in it
2425
type RTCSample struct {
25-
Data []byte
26+
Data []byte
2627
Samples uint32
2728
}
2829

0 commit comments

Comments
 (0)