File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
examples/server-per-stream-multicast-settings Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -92,28 +92,28 @@ func (sh *serverHandler) OnAnnounce(ctx *gortsplib.ServerHandlerOnAnnounceCtx) (
9292 }
9393
9494 // Use stream-specific IP address and ports (one for each media)
95- medi_video := & description.Media {
95+ mediVideo := & description.Media {
9696 Type : description .MediaTypeVideo ,
9797 }
98- medi_audio := & description.Media {
98+ mediAudio := & description.Media {
9999 Type : description .MediaTypeAudio ,
100100 }
101- medi_application := & description.Media {
101+ mediApplication := & description.Media {
102102 Type : description .MediaTypeApplication ,
103103 }
104104
105105 multicastParams := map [* description.Media ]gortsplib.StreamMediaMulticastParams {
106- medi_video : {
106+ mediVideo : {
107107 IP : net .ParseIP ("224.1.0.99" ),
108108 RTPPort : 8006 ,
109109 RTCPPort : 8007 ,
110110 },
111- medi_audio : {
111+ mediAudio : {
112112 IP : net .ParseIP ("224.0.0.100" ),
113113 RTPPort : 8008 ,
114114 RTCPPort : 8009 ,
115115 },
116- medi_application : {
116+ mediApplication : {
117117 IP : net .ParseIP ("224.0.0.101" ),
118118 RTPPort : 8010 ,
119119 RTCPPort : 8011 ,
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ func serverStreamExtractExistingSSRCs(medias map[*description.Media]*serverStrea
2626 return ret
2727}
2828
29- // Optionally request specific Multicast configuration for each media in a stream
29+ // StreamMediaMulticastParams used to request specific Multicast configuration for each media in a stream
3030type StreamMediaMulticastParams struct {
3131 IP net.IP
3232 RTPPort int
@@ -216,11 +216,11 @@ func (st *ServerStream) readerAdd(
216216 if st .multicastReaderCount == 0 {
217217 for _ , media := range st .medias {
218218 // check whether we have any stream-specific Multicast IP / Port settings for this media type
219- var multicastIP * net.IP = nil
220- var multicastRTPPort * int = nil
221- var multicastRTCPPort * int = nil
222- for params_media , params := range st .MulticastParams {
223- if params_media .Type == media .media .Type {
219+ var multicastIP * net.IP
220+ var multicastRTPPort * int
221+ var multicastRTCPPort * int
222+ for paramsMedia , params := range st .MulticastParams {
223+ if paramsMedia .Type == media .media .Type {
224224 multicastIP = & params .IP
225225 multicastRTPPort = & params .RTPPort
226226 multicastRTCPPort = & params .RTCPPort
You can’t perform that action at this time.
0 commit comments