File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ func (manager *SessionManager) GetSessionById(streamKey string) (session *sessio
8282}
8383
8484// Gets the current state of all sessions
85- func (manager * SessionManager ) GetSessionStates (includePrivateStreams bool ) (result []session.StreamSessionDto ) {
85+ func (manager * SessionManager ) GetSessionStates (includePrivateStreams bool ) (result []session.StreamSessionState ) {
8686 log .Println ("SessionManager.GetSessionStates: IsAdmin" , includePrivateStreams )
8787 manager .sessionsLock .RLock ()
8888 copiedSessions := make (map [string ]* session.Session )
@@ -97,12 +97,12 @@ func (manager *SessionManager) GetSessionStates(includePrivateStreams bool) (res
9797 continue
9898 }
9999
100- streamSession := session.StreamSessionDto {
100+ streamSession := session.StreamSessionState {
101101 StreamKey : s .StreamKey ,
102102 StreamStart : s .StreamStart ,
103103 IsPublic : s .IsPublic ,
104104 MOTD : s .MOTD ,
105- Sessions : []whep.WhepSessionStateDto {},
105+ Sessions : []whep.SessionState {},
106106 VideoTracks : []session.VideoTrackState {},
107107 AudioTracks : []session.AudioTrackState {},
108108 }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type WhipSessionStatus struct {
1515}
1616
1717// Information for a whip session
18- type StreamSessionDto struct {
18+ type StreamSessionState struct {
1919 StreamKey string `json:"streamKey"`
2020 IsPublic bool `json:"isPublic"`
2121 MOTD string `json:"motd"`
@@ -24,7 +24,7 @@ type StreamSessionDto struct {
2424 AudioTracks []AudioTrackState `json:"audioTracks"`
2525 VideoTracks []VideoTrackState `json:"videoTracks"`
2626
27- Sessions []whep.WhepSessionStateDto `json:"sessions"`
27+ Sessions []whep.SessionState `json:"sessions"`
2828}
2929
3030type AudioTrackState struct {
Original file line number Diff line number Diff line change 11package whep
22
3- type WhepSessionStateDto struct {
3+ type SessionState struct {
44 Id string `json:"id"`
55
66 AudioLayerCurrent string `json:"audioLayerCurrent"`
Original file line number Diff line number Diff line change @@ -79,15 +79,15 @@ func (whepSession *WhepSession) Close() {
7979}
8080
8181// Get the current status of the WHEP session
82- func (whepSession * WhepSession ) GetWhepSessionStatus () (state WhepSessionStateDto ) {
82+ func (whepSession * WhepSession ) GetWhepSessionStatus () (state SessionState ) {
8383 whepSession .AudioLock .RLock ()
8484 whepSession .VideoLock .Lock ()
8585 whepSession .updateVideoBitrateLocked (time .Now ())
8686
8787 currentAudioLayer := whepSession .AudioLayerCurrent .Load ().(string )
8888 currentVideoLayer := whepSession .VideoLayerCurrent .Load ().(string )
8989
90- state = WhepSessionStateDto {
90+ state = SessionState {
9191 Id : whepSession .SessionId ,
9292
9393 AudioLayerCurrent : currentAudioLayer ,
You can’t perform that action at this time.
0 commit comments