Package com.xuggle.xuggler

Examples of com.xuggle.xuggler.IContainer.open()


  {
    IContainer container = IContainer.make();
   
    int retval = -1;
   
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);
   
    assertEquals("unexpected filesize", 4546420, container.getFileSize());
   
  }
View Full Code Here


  {
    IContainer container = IContainer.make();
   
    int retval = -1;
   
    retval = container.open("fixtures/testfile.mp3", IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);
   
    assertEquals("unexpected bit rate", 127999, container.getBitRate(), 1000);
   
  }
View Full Code Here

  public void testReadPackets()
  {
    IContainer container = IContainer.make();
   
    int retval = -1;
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);

    long packetsRead = 0;
    IPacket packet = IPacket.make();
    while(container.readNextPacket(packet) >= 0)
View Full Code Here

  public void testReadPacketAddsTimeBase()
  {
    IContainer container = IContainer.make();
   
    int retval = -1;
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);

    IPacket packet = IPacket.make();
   
    // just read the first three packets
View Full Code Here

  public void testSeekKeyFrame()
  {
    IContainer container = IContainer.make();
   
    int retval = -1;
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);

    // annoyingly we need to make sure that the timestamp is in the time
    // base of the stream we're looking for which can be different for each stream.
    //
View Full Code Here

  public void testSeekKeyFrame2()
  {
    IContainer container = IContainer.make();
   
    int retval = -1;
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);

    // annoyingly we need to make sure that the timestamp is in the time
    // base of the stream we're looking for which can be different for each stream.
    //
View Full Code Here

  public void testSeekKeyFrameWithNegativeStream()
  {
    IContainer container = IContainer.make();
   
    int retval = -1;
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);

    retval = container.seekKeyFrame(-1, 20*1000*1000, IURLProtocolHandler.SEEK_CUR);
    long packetsRead = 0;
    IPacket packet = IPacket.make();
View Full Code Here

  public void testSeekKeyFrameWithInvalidStream()
  {
    IContainer container = IContainer.make();
   
    int retval = -1;
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);

    retval = container.seekKeyFrame(2, 20*1000, IURLProtocolHandler.SEEK_CUR);
    assertTrue("should fail as only 2 strems in this file", retval <0);
  }
View Full Code Here

    int numProperties = container.getNumProperties();
    assertTrue("should be able to set properties before opening",
        numProperties>0);

    int retval = -1;
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);

    assertEquals("should have same properties",
        numProperties, container.getNumProperties());
    long probeSize = container.getPropertyAsLong("probesize");
View Full Code Here

  public void testGetFlags()
  {
    IContainer container = IContainer.make();
   
    int retval = -1;
    retval = container.open(mSampleFile, IContainer.Type.READ, null);
    assertTrue("could not open file", retval >= 0);

    int flags = container.getFlags();
    assertEquals("container should have no flags: " + flags, flags, 0);
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.