Skip to content

Commit 3b2a772

Browse files
committed
fix: invert dependency
1 parent 04db579 commit 3b2a772

File tree

9 files changed

+12
-10
lines changed

9 files changed

+12
-10
lines changed

cmd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/blendle/zapdriver"
99
transcoder "github.com/muxable/transcoder/api"
10-
"github.com/muxable/transcoder/internal"
10+
"github.com/muxable/transcoder/internal/server"
1111
"github.com/pion/webrtc/v3"
1212
"go.uber.org/zap"
1313
"google.golang.org/grpc"
@@ -46,7 +46,7 @@ func main() {
4646

4747
s := grpc.NewServer()
4848

49-
transcoder.RegisterTranscoderServer(s, internal.NewTranscoderServer(webrtc.Configuration{
49+
transcoder.RegisterTranscoderServer(s, server.NewTranscoderServer(webrtc.Configuration{
5050
ICEServers: []webrtc.ICEServer{
5151
{URLs: []string{"stun:stun.l.google.com:19302"}},
5252
},
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
package internal
1+
// peerconnection is a package that configures a peerconnection with additional video types supported.
2+
package peerconnection
23

34
import (
45
"github.com/pion/interceptor"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package internal
1+
package server
22

33
import (
44
"fmt"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package internal
1+
package server
22

33
import (
44
"math/rand"
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
package internal
1+
package server
22

33
import (
44
"context"
55
"encoding/json"
66
"sync"
77

88
"github.com/muxable/transcoder/api"
9+
"github.com/muxable/transcoder/internal/peerconnection"
910
"github.com/notedit/gst"
1011
"github.com/pion/webrtc/v3"
1112
"go.uber.org/zap"
@@ -38,7 +39,7 @@ func NewTranscoderServer(config webrtc.Configuration) *TranscoderServer {
3839
}
3940

4041
func (s *TranscoderServer) Signal(conn api.Transcoder_SignalServer) error {
41-
peerConnection, err := NewTranscoderPeerConnection(s.config)
42+
peerConnection, err := peerconnection.NewTranscoderPeerConnection(s.config)
4243
if err != nil {
4344
return err
4445
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package internal
1+
package server
22

33
/*
44
#cgo pkg-config: gstreamer-1.0 gstreamer-app-1.0

pkg/transcoder/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"sync"
88

99
"github.com/muxable/transcoder/api"
10-
"github.com/muxable/transcoder/internal"
10+
"github.com/muxable/transcoder/internal/peerconnection"
1111
"github.com/pion/webrtc/v3"
1212
"go.uber.org/zap"
1313
"google.golang.org/grpc"
@@ -23,7 +23,7 @@ type Client struct {
2323
}
2424

2525
func NewClient(ctx context.Context, conn *grpc.ClientConn) (*Client, error) {
26-
peerConnection, err := internal.NewTranscoderPeerConnection(webrtc.Configuration{
26+
peerConnection, err := peerconnection.NewTranscoderPeerConnection(webrtc.Configuration{
2727
ICEServers: []webrtc.ICEServer{
2828
{URLs: []string{"stun:stun.l.google.com:19302"}},
2929
},

0 commit comments

Comments
 (0)