Package org.gstreamer.event

Examples of org.gstreamer.event.SeekEvent


        assertNotNull("gst_event_new_seek returned null", ev);
        assertTrue("gst_event_new_seek returned a non-SEEK event", ev instanceof SeekEvent);
    }
    @Test public void Seek_getFormat() {
        for (Format FORMAT : new Format[] { Format.TIME, Format.BYTES }) {
            SeekEvent ev = new SeekEvent(1.0, FORMAT, 0,
                    SeekType.SET, 0, SeekType.SET, 0);
            assertEquals("Wrong format in SeekEvent", FORMAT, ev.getFormat());
        }
    }


            assertEquals("Wrong format in SeekEvent", FORMAT, ev.getFormat());
        }
    }
    @Test public void Seek_getStartType() {
        for (SeekType TYPE : new SeekType[] { SeekType.CUR, SeekType.SET, SeekType.END }) {
            SeekEvent ev = new SeekEvent(1.0, Format.TIME, 0,
                    TYPE, 0, SeekType.NONE, 0);
            assertEquals("Wrong startType in SeekEvent", TYPE, ev.getStartType());
        }
    }

            assertEquals("Wrong startType in SeekEvent", TYPE, ev.getStartType());
        }
    }
    @Test public void Seek_getStopType() {
        for (SeekType TYPE : new SeekType[] { SeekType.CUR, SeekType.SET, SeekType.END }) {
            SeekEvent ev = new SeekEvent(1.0, Format.TIME, 0,
                    SeekType.NONE, 0, TYPE, 0);
            assertEquals("Wrong stopType in SeekEvent", TYPE, ev.getStopType());
        }
    }

            assertEquals("Wrong stopType in SeekEvent", TYPE, ev.getStopType());
        }
    }
    @Test public void Seek_getStart() {
        final long START = 0xdeadbeef;
        SeekEvent ev = new SeekEvent(1.0, Format.TIME, 0,
                    SeekType.SET, START, SeekType.SET, -1);
            assertEquals("Wrong start in SeekEvent", START, ev.getStart());
    }

                    SeekType.SET, START, SeekType.SET, -1);
            assertEquals("Wrong start in SeekEvent", START, ev.getStart());
    }
    @Test public void Seek_getStop() {
        final long STOP = 0xdeadbeef;
        SeekEvent ev = new SeekEvent(1.0, Format.TIME, 0,
                    SeekType.SET, 0, SeekType.SET, STOP);
            assertEquals("Wrong stop in SeekEvent", STOP, ev.getStop());
    }

                    SeekType.SET, 0, SeekType.SET, STOP);
            assertEquals("Wrong stop in SeekEvent", STOP, ev.getStop());
    }
    @Test public void Seek_rateZero() {
        try {
            new SeekEvent(0.0, Format.TIME, 0,
                    SeekType.SET, 0, SeekType.SET, -1);
            fail("A rate of 0.0 should throw an exception");
        } catch (IllegalArgumentException ex) {
           
        }

TOP

Related Classes of org.gstreamer.event.SeekEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.