Пример #1
0
        public RemoteMicrophoneStats(IntPtr obj)
        {
            objPtr = obj;

            List <LocalSpeakerStreamStats> csLocalSpeakerStreams = new List <LocalSpeakerStreamStats>();
            int    nLocalSpeakerStreamsSize  = 0;
            IntPtr nLocalSpeakerStreams      = VidyoRemoteMicrophoneStatsGetlocalSpeakerStreamsArrayNative(VidyoRemoteMicrophoneStatsGetlocalSpeakerStreamsNative(objPtr), ref nLocalSpeakerStreamsSize);
            int    nLocalSpeakerStreamsIndex = 0;

            while (nLocalSpeakerStreamsIndex < nLocalSpeakerStreamsSize)
            {
                LocalSpeakerStreamStats csTlocalSpeakerStreams = new LocalSpeakerStreamStats(Marshal.ReadIntPtr(nLocalSpeakerStreams + (nLocalSpeakerStreamsIndex * Marshal.SizeOf(nLocalSpeakerStreams))));
                csLocalSpeakerStreams.Add(csTlocalSpeakerStreams);
                nLocalSpeakerStreamsIndex++;
            }

            bitsPerSample       = VidyoRemoteMicrophoneStatsGetbitsPerSampleNative(objPtr);
            codecDtx            = VidyoRemoteMicrophoneStatsGetcodecDtxNative(objPtr);
            codecName           = Marshal.PtrToStringAnsi(VidyoRemoteMicrophoneStatsGetcodecNameNative(objPtr));
            codecQualitySetting = VidyoRemoteMicrophoneStatsGetcodecQualitySettingNative(objPtr);
            id                             = Marshal.PtrToStringAnsi(VidyoRemoteMicrophoneStatsGetidNative(objPtr));
            lastFrameMs                    = VidyoRemoteMicrophoneStatsGetlastFrameMsNative(objPtr);
            localSpeakerStreams            = csLocalSpeakerStreams;
            name                           = Marshal.PtrToStringAnsi(VidyoRemoteMicrophoneStatsGetnameNative(objPtr));
            numberOfChannels               = VidyoRemoteMicrophoneStatsGetnumberOfChannelsNative(objPtr);
            receiveNetworkBitRate          = VidyoRemoteMicrophoneStatsGetreceiveNetworkBitRateNative(objPtr);
            receiveNetworkDelay            = VidyoRemoteMicrophoneStatsGetreceiveNetworkDelayNative(objPtr);
            receiveNetworkDroppedPackets   = VidyoRemoteMicrophoneStatsGetreceiveNetworkDroppedPacketsNative(objPtr);
            receiveNetworkJitter           = VidyoRemoteMicrophoneStatsGetreceiveNetworkJitterNative(objPtr);
            receiveNetworkPacketsConcealed = VidyoRemoteMicrophoneStatsGetreceiveNetworkPacketsConcealedNative(objPtr);
            receiveNetworkPacketsLost      = VidyoRemoteMicrophoneStatsGetreceiveNetworkPacketsLostNative(objPtr);
            sampleRateMeasured             = VidyoRemoteMicrophoneStatsGetsampleRateMeasuredNative(objPtr);
            sampleRateSet                  = VidyoRemoteMicrophoneStatsGetsampleRateSetNative(objPtr);
            VidyoRemoteMicrophoneStatsFreelocalSpeakerStreamsArrayNative(nLocalSpeakerStreams, nLocalSpeakerStreamsSize);
        }
Пример #2
0
        public LocalMicrophoneStats(IntPtr obj)
        {
            objPtr = obj;

            List <LocalSpeakerStreamStats> csLocalSpeakerStreams = new List <LocalSpeakerStreamStats>();
            int    nLocalSpeakerStreamsSize  = 0;
            IntPtr nLocalSpeakerStreams      = VidyoLocalMicrophoneStatsGetlocalSpeakerStreamsArrayNative(VidyoLocalMicrophoneStatsGetlocalSpeakerStreamsNative(objPtr), ref nLocalSpeakerStreamsSize);
            int    nLocalSpeakerStreamsIndex = 0;

            while (nLocalSpeakerStreamsIndex < nLocalSpeakerStreamsSize)
            {
                LocalSpeakerStreamStats csTlocalSpeakerStreams = new LocalSpeakerStreamStats(Marshal.ReadIntPtr(nLocalSpeakerStreams + (nLocalSpeakerStreamsIndex * Marshal.SizeOf(nLocalSpeakerStreams))));
                csLocalSpeakerStreams.Add(csTlocalSpeakerStreams);
                nLocalSpeakerStreamsIndex++;
            }

            List <RemoteSpeakerStreamStats> csRemoteSpeakerStreams = new List <RemoteSpeakerStreamStats>();
            int    nRemoteSpeakerStreamsSize  = 0;
            IntPtr nRemoteSpeakerStreams      = VidyoLocalMicrophoneStatsGetremoteSpeakerStreamsArrayNative(VidyoLocalMicrophoneStatsGetremoteSpeakerStreamsNative(objPtr), ref nRemoteSpeakerStreamsSize);
            int    nRemoteSpeakerStreamsIndex = 0;

            while (nRemoteSpeakerStreamsIndex < nRemoteSpeakerStreamsSize)
            {
                RemoteSpeakerStreamStats csTremoteSpeakerStreams = new RemoteSpeakerStreamStats(Marshal.ReadIntPtr(nRemoteSpeakerStreams + (nRemoteSpeakerStreamsIndex * Marshal.SizeOf(nRemoteSpeakerStreams))));
                csRemoteSpeakerStreams.Add(csTremoteSpeakerStreams);
                nRemoteSpeakerStreamsIndex++;
            }

            aecEchoCoupling = VidyoLocalMicrophoneStatsGetaecEchoCouplingNative(objPtr);
            agcAverageGain  = VidyoLocalMicrophoneStatsGetagcAverageGainNative(objPtr);
            bitsPerSample   = VidyoLocalMicrophoneStatsGetbitsPerSampleNative(objPtr);
            format          = VidyoLocalMicrophoneStatsGetformatNative(objPtr);
            id = Marshal.PtrToStringAnsi(VidyoLocalMicrophoneStatsGetidNative(objPtr));
            localSpeakerStreams = csLocalSpeakerStreams;
            name = Marshal.PtrToStringAnsi(VidyoLocalMicrophoneStatsGetnameNative(objPtr));
            noiseSuppressionSnr  = VidyoLocalMicrophoneStatsGetnoiseSuppressionSnrNative(objPtr);
            numberOfChannels     = VidyoLocalMicrophoneStatsGetnumberOfChannelsNative(objPtr);
            remoteSpeakerStreams = csRemoteSpeakerStreams;
            sampleRateMeasured   = VidyoLocalMicrophoneStatsGetsampleRateMeasuredNative(objPtr);
            sampleRateSet        = VidyoLocalMicrophoneStatsGetsampleRateSetNative(objPtr);
            VidyoLocalMicrophoneStatsFreeremoteSpeakerStreamsArrayNative(nRemoteSpeakerStreams, nRemoteSpeakerStreamsSize);
            VidyoLocalMicrophoneStatsFreelocalSpeakerStreamsArrayNative(nLocalSpeakerStreams, nLocalSpeakerStreamsSize);
        }