From 91084ee0e21a497a3e71086096cdd1874b3357a5 Mon Sep 17 00:00:00 2001 From: notedit Date: Thu, 9 Jan 2020 17:31:16 +0800 Subject: [PATCH] fix build Former-commit-id: c1b04561ea2e5c039546342afc3d62e6e289438b [formerly 32a6e80a040842ba0e726e8ad05f189f4d7aec46] [formerly 73a051606af3c159c29e092e4dac7a4454599e51 [formerly f76000c718b7553b79f77aa4f9f15e1a5cff180e]] Former-commit-id: 0f6641f1065ff16f6a65637b3cc33083d1ac7cc6 [formerly a700b3efcd332e6a85dca7d64213dc8fe40a9a27] Former-commit-id: 912f499a441189b2afe2792a0f1934d90bb73f18 --- incomingstream.go | 3 --- transport.go | 9 --------- transport_test.go | 1 - wrapper/module.go | 1 + 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/incomingstream.go b/incomingstream.go index 963f8f9..91a45b2 100644 --- a/incomingstream.go +++ b/incomingstream.go @@ -281,9 +281,6 @@ func (i *IncomingStream) CreateTrack(track *sdp.TrackInfo) *IncomingStreamTrack // Append to soruces with empty rid sources[""] = source - runtime.SetFinalizer(source, func(source native.RTPIncomingSourceGroup) { - i.transport.RemoveIncomingSourceGroup(source) - }) } incomingTrack := NewIncomingStreamTrack(track.GetMedia(), track.GetID(), i.receiver, sources) diff --git a/transport.go b/transport.go index f587361..9d550aa 100644 --- a/transport.go +++ b/transport.go @@ -2,7 +2,6 @@ package mediaserver import ( "fmt" - "runtime" "sync" "github.com/gofrs/uuid" @@ -460,10 +459,6 @@ func (t *Transport) CreateOutgoingStreamTrack(media string, trackId string, ssrc outgoingTrack := newOutgoingStreamTrack(media, trackId, native.TransportToSender(t.transport), source) - runtime.SetFinalizer(source, func(source native.RTPOutgoingSourceGroup) { - t.transport.RemoveOutgoingSourceGroup(source) - }) - for _, trackFunc := range t.onOutgoingTrackListeners { trackFunc(outgoingTrack, nil) } @@ -526,10 +521,6 @@ func (t *Transport) CreateIncomingStreamTrack(media string, trackId string, ssrc incomingTrack := NewIncomingStreamTrack(media, trackId, native.TransportToReceiver(t.transport), sources) - runtime.SetFinalizer(source, func(source native.RTPIncomingSourceGroup) { - t.transport.RemoveIncomingSourceGroup(source) - }) - for _, trackFunc := range t.onIncomingTrackListeners { trackFunc(incomingTrack, nil) } diff --git a/transport_test.go b/transport_test.go index 96008d0..bd48eba 100644 --- a/transport_test.go +++ b/transport_test.go @@ -208,7 +208,6 @@ func Test_TransportCreateStream(t *testing.T) { fmt.Println(incoming) - //incoming.Stop() transport.Stop() } diff --git a/wrapper/module.go b/wrapper/module.go index 1211638..28aa438 100644 --- a/wrapper/module.go +++ b/wrapper/module.go @@ -10,6 +10,7 @@ package native #cgo CPPFLAGS: -I${SRCDIR}/../include/media-server/src/ #cgo LDFLAGS: -L/usr/local/lib -lmediaserver -lssl -lcrypto -lsrtp2 #cgo LDFLAGS: /usr/local/lib/libmp4v2.a +#cgo LDFLAGS: /usr/local/lib/libsrtp2.a #cgo LDFLAGS: -ldl */ import "C"