Interface URIHandler

All Superinterfaces:
Proxy
All Known Implementing Classes:
AppSink, AppSrc, AudioCdSrc, URIHandler.URIHandler$Impl

@Generated("org.javagi.JavaGI") public interface URIHandler extends Proxy

The GstURIHandler is an interface that is implemented by Source and Sink GstElement to unify handling of URI.

An application can use the following functions to quickly get an element that handles the given URI for reading or writing (gst_element_make_from_uri()).

Source and Sink plugins should implement this interface when possible.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    The URIHandler$Impl type represents a native instance of the URIHandler interface.
    static class 
    Any GstElement using this interface should implement these methods.
  • Method Summary

    Modifier and Type
    Method
    Description
    default @Nullable String @Nullable []
    Gets the list of protocols supported by handler. This list may not be modified.
    static @Nullable Type
    Get the GType of the URIHandler class.
    default @Nullable String
    Gets the currently handled URI.
    default URIType
    Gets the type of the given URI handler
    default boolean
    Tries to set the URI of the given handler.

    Methods inherited from interface Proxy

    handle
  • Method Details

    • getType

      static @Nullable Type getType()
      Get the GType of the URIHandler class.
      Returns:
      the GType
    • getProtocols

      default @Nullable String @Nullable [] getProtocols()
      Gets the list of protocols supported by handler. This list may not be modified.
      Returns:
      the supported protocols. Returns null if the this URIHandler isn't implemented properly, or the this URIHandler doesn't support any protocols.
    • getUri

      default @Nullable String getUri()
      Gets the currently handled URI.
      Returns:
      the URI currently handled by the handler. Returns null if there are no URI currently handled. The returned string must be freed with g_free() when no longer needed.
    • getUriType

      default URIType getUriType()
      Gets the type of the given URI handler
      Returns:
      the GstURIType of the URI handler. Returns GST_URI_UNKNOWN if the this URIHandler isn't implemented correctly.
    • setUri

      default boolean setUri(String uri) throws GErrorException
      Tries to set the URI of the given handler.
      Parameters:
      uri - URI to set
      Returns:
      true if the URI was set successfully, else false.
      Throws:
      GErrorException - see GError