/// <summary>
 /// Initialises ResponseCameraStream
 /// </summary>
 /// <param name="uri"></param>
 /// <param name="expirationTime"></param>
 /// <param name="protocol"></param>
 /// <param name="resolution"></param>
 /// <param name="authorizationType"></param>
 /// <param name="videoCodec"></param>
 /// <param name="audioCodec"></param>
 /// <param name="idle"></param>
 public ResponseCameraStream(string uri, CameraProtocols protocol, Resolution resolution, CameraAuthorizationTypes authorizationType,
                             VideoCodecs videoCodec, AudioCodecs audioCodec, int?idle = null, DateTime?expirationTime = null)
     : base(protocol, resolution, authorizationType, videoCodec, audioCodec)
 {
     URI                = uri;
     ExpirationTime     = expirationTime;
     IdleTimeoutSeconds = idle;
 }
 private void TestResponseCameraStream(ResponseCameraStream s, string uri, DateTime expirationTime, int idleTimeout,
                                       CameraProtocols protocol, int width, int height, CameraAuthorizationTypes authorizationType, VideoCodecs videoCodec, AudioCodecs audioCodec)
 {
     Assert.Equal(uri, s.URI);
     Assert.Equal(expirationTime.ToUniversalTime(), s.ExpirationTime);
     Assert.Equal(idleTimeout, s.IdleTimeoutSeconds);
     TestRequestCameraStream(s, protocol, width, height, authorizationType, videoCodec, audioCodec);
 }
Example #3
0
 /// <summary>
 /// Initilializes Camerastream
 /// </summary>
 /// <param name="protocol"></param>
 /// <param name="resolution"></param>
 /// <param name="authorizationType"></param>
 /// <param name="videoCodec"></param>
 /// <param name="audioCodec"></param>
 public CameraStream(CameraProtocols protocol, Resolution resolution, CameraAuthorizationTypes authorizationType, VideoCodecs videoCodec, AudioCodecs audioCodec)
 {
     Protocol          = protocol;
     Resolution        = resolution;
     AuthorizationType = authorizationType;
     VideoCodec        = videoCodec;
     AudioCodec        = audioCodec;
 }
 private void TestRequestCameraStream(CameraStream s, CameraProtocols protocol, int width, int height,
                                      CameraAuthorizationTypes authorizationType, VideoCodecs videoCodec, AudioCodecs audioCodec)
 {
     Assert.Equal(protocol, s.Protocol);
     Assert.NotNull(s.Resolution);
     Assert.Equal(width, s.Resolution.Width);
     Assert.Equal(height, s.Resolution.Height);
     Assert.Equal(authorizationType, s.AuthorizationType);
     Assert.Equal(videoCodec, s.VideoCodec);
     Assert.Equal(audioCodec, s.AudioCodec);
 }