File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1093,7 +1093,8 @@ private Uri GetControlUri(Media media)
10931093 {
10941094 string sdpControl = attrib . Value ;
10951095
1096- if ( sdpControl . StartsWith ( "rtsp://" , StringComparison . OrdinalIgnoreCase ) ||
1096+ if ( sdpControl . StartsWith ( "rtsp://" , StringComparison . OrdinalIgnoreCase ) ||
1097+ sdpControl . StartsWith ( "rtsps://" , StringComparison . OrdinalIgnoreCase ) ||
10971098 sdpControl . StartsWith ( "http://" , StringComparison . OrdinalIgnoreCase ) )
10981099 {
10991100 // the "track" or "stream id"
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ public class RTSPServer : IDisposable
6464 private readonly NetworkCredential _credentials ;
6565 private readonly Authentication _authentication ;
6666
67+ public bool IsRTSPS { get ; set ; } = false ;
68+
6769 /// <summary>
6870 /// Initializes a new instance of the <see cref="RTSPServer"/> class.
6971 /// </summary>
@@ -128,7 +130,18 @@ private void AcceptConnection()
128130 _logger . LogDebug ( "Connection from {remoteEndPoint}" , oneClient . Client . RemoteEndPoint ) ;
129131
130132 // Hand the incoming TCP connection over to the RTSP classes
131- var rtspSocket = new RtspTcpTransport ( oneClient ) ;
133+ RtspTcpTransport rtspSocket ;
134+
135+ if ( IsRTSPS )
136+ {
137+ // TODO: untested
138+ rtspSocket = new RtspTcpTlsTransport ( oneClient ) ;
139+ }
140+ else
141+ {
142+ rtspSocket = new RtspTcpTransport ( oneClient ) ;
143+ }
144+
132145 RtspListener newListener = new RtspListener ( rtspSocket , _loggerFactory . CreateLogger < RtspListener > ( ) ) ;
133146 newListener . MessageReceived += RTSPMessageReceived ;
134147
You can’t perform that action at this time.
0 commit comments