mirror of
				https://github.com/flavioribeiro/donut.git
				synced 2025-10-31 18:42:44 +08:00 
			
		
		
		
	provides cancelation when a component stop responding it closes all resources
This commit is contained in:
		| @@ -1,8 +1,10 @@ | ||||
| package entities | ||||
|  | ||||
| import ( | ||||
| 	"context" | ||||
| 	"fmt" | ||||
|  | ||||
| 	astisrt "github.com/asticode/go-astisrt/pkg" | ||||
| 	"github.com/pion/webrtc/v3" | ||||
| ) | ||||
|  | ||||
| @@ -67,6 +69,15 @@ type Track struct { | ||||
| 	Type TrackType | ||||
| } | ||||
|  | ||||
| type StreamParameters struct { | ||||
| 	WebRTCConn    *webrtc.PeerConnection | ||||
| 	Cancel        context.CancelFunc | ||||
| 	Ctx           context.Context | ||||
| 	SRTConnection *astisrt.Connection | ||||
| 	VideoTrack    *webrtc.TrackLocalStaticSample | ||||
| 	MetadataTrack *webrtc.DataChannel | ||||
| } | ||||
|  | ||||
| type Config struct { | ||||
| 	HTTPPort int32  `required:"true" default:"8080"` | ||||
| 	HTTPHost string `required:"true" default:"0.0.0.0"` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Leandro Moreira
					Leandro Moreira