@@ -10,7 +10,6 @@ import (
10
10
11
11
ethcommon "github.com/ethereum/go-ethereum/common"
12
12
"github.com/golang/glog"
13
- "github.com/livepeer/go-livepeer/media"
14
13
"github.com/livepeer/go-livepeer/net"
15
14
"github.com/livepeer/go-livepeer/trickle"
16
15
)
@@ -48,17 +47,7 @@ type StreamInfo struct {
48
47
StreamID string
49
48
Capability string
50
49
//Gateway fields
51
- StreamRequest []byte
52
- ExcludeOrchs []string
53
- OrchToken * JobToken
54
- OrchUrl string
55
- OrchPublishUrl string
56
- OrchSubscribeUrl string
57
- OrchControlUrl string
58
- OrchEventsUrl string
59
- OrchDataUrl string
60
- ControlPub * trickle.TricklePublisher
61
- StopControl func ()
50
+ StreamRequest []byte
62
51
63
52
//Orchestrator fields
64
53
Sender ethcommon.Address
@@ -68,8 +57,6 @@ type StreamInfo struct {
68
57
eventsChannel * trickle.TrickleLocalPublisher
69
58
dataChannel * trickle.TrickleLocalPublisher
70
59
//Stream fields
71
- Params interface {}
72
- DataWriter * media.SegmentWriter
73
60
JobParams string
74
61
StreamCtx context.Context
75
62
CancelStream context.CancelFunc
@@ -82,19 +69,13 @@ func (sd *StreamInfo) IsActive() bool {
82
69
return false
83
70
}
84
71
85
- if sd .controlChannel == nil && sd . ControlPub == nil {
72
+ if sd .controlChannel == nil {
86
73
return false
87
74
}
88
75
89
76
return true
90
77
}
91
78
92
- func (sd * StreamInfo ) ExcludeOrch (orchUrl string ) {
93
- sd .sdm .Lock ()
94
- defer sd .sdm .Unlock ()
95
- sd .ExcludeOrchs = append (sd .ExcludeOrchs , orchUrl )
96
- }
97
-
98
79
func (sd * StreamInfo ) UpdateParams (params string ) {
99
80
sd .sdm .Lock ()
100
81
defer sd .sdm .Unlock ()
@@ -123,7 +104,7 @@ func NewExternalCapabilities() *ExternalCapabilities {
123
104
}
124
105
}
125
106
126
- func (extCaps * ExternalCapabilities ) AddStream (streamID string , pipeline string , params interface {} , streamReq []byte ) (* StreamInfo , error ) {
107
+ func (extCaps * ExternalCapabilities ) AddStream (streamID string , capability string , streamReq []byte ) (* StreamInfo , error ) {
127
108
extCaps .capm .Lock ()
128
109
defer extCaps .capm .Unlock ()
129
110
_ , ok := extCaps .Streams [streamID ]
@@ -135,8 +116,7 @@ func (extCaps *ExternalCapabilities) AddStream(streamID string, pipeline string,
135
116
ctx , cancel := context .WithCancel (context .Background ())
136
117
stream := StreamInfo {
137
118
StreamID : streamID ,
138
- Capability : pipeline ,
139
- Params : params , // Store the interface value directly, not a pointer to it
119
+ Capability : capability ,
140
120
StreamRequest : streamReq ,
141
121
StreamCtx : ctx ,
142
122
CancelStream : cancel ,
@@ -147,15 +127,6 @@ func (extCaps *ExternalCapabilities) AddStream(streamID string, pipeline string,
147
127
go func () {
148
128
<- ctx .Done ()
149
129
150
- //gateway channels shutdown
151
- if stream .DataWriter != nil {
152
- stream .DataWriter .Close ()
153
- }
154
- if stream .ControlPub != nil {
155
- stream .StopControl ()
156
- stream .ControlPub .Close ()
157
- }
158
-
159
130
//orchestrator channels shutdown
160
131
if stream .pubChannel != nil {
161
132
stream .pubChannel .Close ()
0 commit comments