Exemple #1
0
 /// <summary>
 /// Constructor for creating a local video device initialization settings marshaling struct.
 /// </summary>
 /// <param name="settings">The settings to initialize the newly created marshaling struct.</param>
 /// <seealso cref="DeviceVideoTrackSource.CreateAsync(LocalVideoDeviceInitConfig)"/>
 public LocalVideoDeviceMarshalInitConfig(LocalVideoDeviceInitConfig settings)
 {
     if (settings != null)
     {
         VideoDeviceId               = settings.videoDevice.id;
         VideoProfileId              = settings.videoProfileId;
         VideoProfileKind            = settings.videoProfileKind;
         Width                       = settings.width.GetValueOrDefault(0);
         Height                      = settings.height.GetValueOrDefault(0);
         Framerate                   = settings.framerate.GetValueOrDefault(0.0);
         EnableMixedRealityCapture   = (mrsBool)settings.enableMrc;
         EnableMRCRecordingIndicator = (mrsBool)settings.enableMrcRecordingIndicator;
     }
     else
     {
         VideoDeviceId               = string.Empty;
         VideoProfileId              = string.Empty;
         VideoProfileKind            = VideoProfileKind.Unspecified;
         Width                       = 0;
         Height                      = 0;
         Framerate                   = 0.0;
         EnableMixedRealityCapture   = mrsBool.True;
         EnableMRCRecordingIndicator = mrsBool.True;
     }
 }
            /// <summary>
            /// Constructor for creating a local video track from a wrapper and some user settings.
            /// </summary>
            /// <param name="track">The newly created track wrapper.</param>
            /// <param name="settings">The settings to initialize the newly created native track.</param>
            /// <seealso cref="PeerConnection.AddLocalVideoTrackAsync(LocalVideoTrackSettings)"/>
            public LocalVideoTrackInteropInitConfig(LocalVideoTrack track, LocalVideoTrackSettings settings)
            {
                trackHandle = Utils.MakeWrapperRef(track);

                if (settings != null)
                {
                    VideoDeviceId               = settings.videoDevice.id;
                    VideoProfileId              = settings.videoProfileId;
                    VideoProfileKind            = settings.videoProfileKind;
                    Width                       = settings.width.GetValueOrDefault(0);
                    Height                      = settings.height.GetValueOrDefault(0);
                    Framerate                   = settings.framerate.GetValueOrDefault(0.0);
                    EnableMixedRealityCapture   = (mrsBool)settings.enableMrc;
                    EnableMRCRecordingIndicator = (mrsBool)settings.enableMrcRecordingIndicator;
                }
                else
                {
                    VideoDeviceId               = string.Empty;
                    VideoProfileId              = string.Empty;
                    VideoProfileKind            = VideoProfileKind.Unspecified;
                    Width                       = 0;
                    Height                      = 0;
                    Framerate                   = 0.0;
                    EnableMixedRealityCapture   = mrsBool.True;
                    EnableMRCRecordingIndicator = mrsBool.True;
                }
            }
Exemple #3
0
 public static extern uint AudioTrackReadBuffer_Read(ReadBufferHandle audioTrackReadBuffer,
                                                     int sampleRate, int numChannels, AudioTrackReadBuffer.PadBehavior padBehavior,
                                                     float[] samplesOut, int numSamplesMax, out int numSamplesRead, out mrsBool hasOverrun);
Exemple #4
0
 public static extern void RemoteAudioTrack_OutputToDevice(IntPtr trackHandle, mrsBool output);