Пример #1
0
        public void QueryLayerResolutionLrcpTest()
        {
            int layerIdx = 1;
            int resIdx   = 1;

            int precinctsInResolution    = 1;
            int components               = 3;
            int resolutions              = 3;
            int packetsInLayerResolution = precinctsInResolution * components;
            int packetsInLayer           = packetsInLayerResolution * resolutions;

            int expectedStart = layerIdx * packetsInLayer;

            expectedStart += resIdx * packetsInLayerResolution;
            int          expectedEnd = expectedStart + packetsInLayerResolution;
            PreciseQuery q           = PreciseQuery.Create(_queryContext);

            PacketInterval[] intervals = q
                                         .Quality(layerIdx)
                                         .Resolution(resIdx)
                                         .Execute()
                                         .ToArray();

            Assert.AreEqual(intervals.Length, 1);
            Assert.AreEqual(intervals[0].PacketStart, expectedStart);
            Assert.AreEqual(intervals[0].PacketEnd, expectedEnd);
            Assert.AreEqual(intervals[0].Count, packetsInLayerResolution);
        }
Пример #2
0
        public void QueryLayerLrcpTest()
        {
            int resolutions            = 3;
            int precinctsPerResolution = 1;
            int components             = 3;
            int packetsInLayer         = 1;

            packetsInLayer *= resolutions;
            packetsInLayer *= precinctsPerResolution;
            packetsInLayer *= components;
            PreciseQuery q = PreciseQuery.Create(_queryContext);

            PacketInterval[] intervals = q.Quality(1).Execute().ToArray();
            Assert.AreEqual(intervals.Length, 1);
            Assert.AreEqual(intervals[0].PacketStart, packetsInLayer);
            Assert.AreEqual(intervals[0].PacketEnd, 2 * packetsInLayer);
            Assert.AreEqual(intervals[0].Count, packetsInLayer);
        }