Package com.xuggle.xuggler

Examples of com.xuggle.xuggler.IError


    try
    {
      int rv = getContainer().readNextPacket(packet);
      if (rv < 0)
      {
        IError error = IError.make(rv);

        // if this is an end of file, or unknow, call close

        if (!mCloseOnEofOnly || IError.Type.ERROR_EOF == error.getType())
          close();

        return error;
      }
View Full Code Here


  }

  private static String getErrorMessage(int rv)
  {
    String errorString = "";
    IError error = IError.make(rv);
    if (error != null) {
       errorString = error.toString();
       error.delete();
    }
    return errorString;
  }
View Full Code Here

    int retval = container.open(deviceName, IContainer.Type.READ, format);
    if (retval < 0)
    {
      // This little trick converts the non friendly integer return value into
      // a slightly more friendly object to get a human-readable error name
      IError error = IError.make(retval);
      throw new IllegalArgumentException("could not open file: " + deviceName + "; Error: " + error.getDescription());
    }     

    // query how many streams the call to open found
    int numStreams = container.getNumStreams();
View Full Code Here

  }
 
  private static String getErrorMessage(int rv)
  {
    String errorString = "";
    IError error = IError.make(rv);
    if (error != null) {
       errorString = error.toString();
       error.delete();
    }
    return errorString;
  }
View Full Code Here

    {
      // this little trick converts the non friendly integer return
      // value into a slightly more friendly object to get a
      // human-readable error name

      IError error = IError.make(retval);
      throw new IllegalArgumentException(
        "could not open file: " + deviceName + "; Error: " +
        error.getDescription());
    }     

    // create a media reader to wrap that container

    IMediaReader reader = ToolFactory.makeReader(container);
View Full Code Here

    reader.addListener(readerCounter);
    writer.addListener(writerCounter);

   
    IError rv;
    while ((rv = reader.readPacket()) == null)
      ;

    assertEquals(IError.Type.ERROR_EOF    , rv.getType());

    assertEquals(READER_VIDEO_FRAME_COUNT , readerCounter.getCount(VIDEO));
    assertEquals(READER_AUDIO_FRAME_COUNT , readerCounter.getCount(AUDIO));
    assertEquals(1                        , readerCounter.getCount(OPEN));
    assertEquals(1                        , readerCounter.getCount(CLOSE));
View Full Code Here

    static void throwIfInError(int errorCode) throws XugglerException {
        if (errorCode >= 0) {
            return;
        }

        IError err = IError.make(errorCode);
        if (err != null) {
            throw new XugglerException(err.toString());
        } else {
            throw new XugglerException("Unidentified Xuggler exception with "
                    + "error code: " + errorCode);
        }
    }
View Full Code Here

        false, true, params, null);
    if (retval < 0)
    {
      // This little trick converts the non friendly integer return value into
      // a slightly more friendly object to get a human-readable error name
      IError error = IError.make(retval);
      throw new IllegalArgumentException("could not open file: " + deviceName + "; Error: " + error.getDescription());
    }     

    // query how many streams the call to open found
    int numStreams = container.getNumStreams();
View Full Code Here

    try
    {
      int rv = getContainer().readNextPacket(packet);
      if (rv < 0)
      {
        IError error = IError.make(rv);

        // if this is an end of file, or unknow, call close

        if (!mCloseOnEofOnly || IError.Type.ERROR_EOF == error.getType())
          close();

        return error;
      }
View Full Code Here

  }

  private static String getErrorMessage(int rv)
  {
    String errorString = "";
    IError error = IError.make(rv);
    if (error != null) {
       errorString = error.toString();
       error.delete();
    }
    return errorString;
  }
View Full Code Here

TOP

Related Classes of com.xuggle.xuggler.IError

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.