Example #1
0
 public void flushReaderTest()
 {
     readPath = sampleVideos[2];
     YuvVideoHandler yvh = new YuvVideoHandler();
     yvh.setImportContext(readPath);
     int oldFrameByteSize = yvh.frameByteSize;
     yvh.flushReader();
     Assert.AreEqual(oldFrameByteSize, yvh.frameByteSize);
     Assert.AreEqual(0, yvh.positionReader);
 }
Example #2
0
        public void importContextTest()
        {
            YuvVideoHandler yvh = new YuvVideoHandler();
            readPath = sampleVideos[2];
            YuvVideoInfo info = new YuvVideoInfo(readPath);
            yvh.setImportContext(readPath);
            Assert.AreEqual(info, yvh.readVidInfo);
            Assert.IsNotNull(yvh.frameByteSize);
            Assert.IsTrue(yvh.consistent);
            string falsePath = "\\bla_cif.yuv";
            try
            {
                yvh.setImportContext(falsePath);
                Assert.Fail("no exception thrown");
            }
            catch (Exception )
            {

            }
        }