mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-22 17:47:11 +00:00
Add vpx
This commit is contained in:
parent
173e64cd01
commit
f0fe89a82d
2 changed files with 1 additions and 3 deletions
|
|
@ -6,6 +6,7 @@ COPY . /go/src/github.com/giongto35/game-online/
|
|||
# Install server dependencies
|
||||
RUN apt-get update
|
||||
RUN apt-get install portaudio19-dev -y
|
||||
RUN apt-get install libvpx-dev -y
|
||||
RUN go get github.com/pions/webrtc
|
||||
RUN go get github.com/gordonklaus/portaudio
|
||||
RUN go get github.com/gorilla/mux
|
||||
|
|
|
|||
|
|
@ -233,9 +233,6 @@ func (w *WebRTC) startStreaming(vp8Track *webrtc.Track) {
|
|||
go func() {
|
||||
for i := 0; w.isConnected; i++ {
|
||||
bs := <-w.encoder.Output
|
||||
//if i%10 == 0 {
|
||||
//fmt.Println("On Frame", len(bs), i)
|
||||
//}
|
||||
vp8Track.WriteSample(media.Sample{Data: bs, Samples: 1})
|
||||
}
|
||||
}()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue