Interface libvlc_media_read_cb

All Superinterfaces:
com.sun.jna.Callback

public interface libvlc_media_read_cb extends com.sun.jna.Callback
Native read media callback.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.sun.jna.Callback

    com.sun.jna.Callback.UncaughtExceptionHandler
  • Field Summary

    Fields inherited from interface com.sun.jna.Callback

    FORBIDDEN_NAMES, METHOD_NAME
  • Method Summary

    Modifier and Type
    Method
    Description
    read(com.sun.jna.Pointer opaque, com.sun.jna.Pointer buf, size_t len)
    Callback prototype to read data from a custom bitstream input media.
  • Method Details

    • read

      size_t read(com.sun.jna.Pointer opaque, com.sun.jna.Pointer buf, size_t len)
      Callback prototype to read data from a custom bitstream input media.

      If no data is immediately available, then the callback should sleep.

      The application is responsible for avoiding deadlock situations. In particular, the callback should return an error if playback is stopped; if it does not return, then libvlc_media_player_stop() will never return.

      Parameters:
      opaque - private pointer as set by the @ref libvlc_media_open_cb callback
      buf - start address of the buffer to read data into
      len - bytes length of the buffer
      Returns:
      strictly positive number of bytes read, 0 on end-of-stream, or -1 on non-recoverable error