Class Media

java.lang.Object
uk.co.caprica.vlcj.media.Media

public final class Media extends Object
Encapsulation of a native media instance.
  • Constructor Details

    • Media

      public Media(uk.co.caprica.vlcj.binding.internal.libvlc_instance_t libvlcInstance, uk.co.caprica.vlcj.binding.internal.libvlc_media_t media)
      Create a new media item.

      This component will "own" the supplied native media instance and will take care of releasing it during release().

      The caller should not release the native media instance.

      Parameters:
      libvlcInstance - native library instance
      media - native media instance
  • Method Details

    • events

      public EventApi events()
      Behaviour pertaining to events.
      Returns:
      event behaviour
    • info

      public InfoApi info()
      Behaviour pertaining to information about the media.
      Returns:
      information behaviour
    • meta

      public MetaApi meta()
      Behaviour pertaining to media meta data.
      Returns:
      meta data behaviour
    • options

      public OptionsApi options()
      Behaviour pertaining to media options.
      Returns:
      meida options behaviour
    • parsing

      public ParseApi parsing()
      Behaviour pertaining to parsing of the media.
      Returns:
      parsing behaviour
    • slaves

      public SlaveApi slaves()
      Behaviour pertaining to media slaves.
      Returns:
      media slave behaviour
    • subitems

      public SubitemApi subitems()
      Behaviour pertianing to media subitems.
      Returns:
      subitem behaviour
    • newMediaRef

      public MediaRef newMediaRef()
      Create a new MediaRef from this media.

      The caller must release the returned MediaRef when it has no further use for it.

      Returns:
      media reference
    • newMedia

      public Media newMedia()
      Create a new Media from this media.

      The caller must release the returned Media when it has no further use for it.

      Returns:
      media
    • duplicateMediaRef

      public MediaRef duplicateMediaRef()
      Return a duplicate MediaRef for this MediaRef.

      Unlike newMediaRef(), this function will duplicate the native media instance, meaning it is separate from the native media instance in this component and any changes made to it (such as adding new media options) will not be reflected on the original media.

      The caller must release the returned MediaRef when it has no further use for it.

      Returns:
      duplicated media reference
    • duplicateMedia

      public Media duplicateMedia()
      Return a duplicate Media component for this MediaRef.

      Unlike newMedia(), this function will duplicate the native media instance, meaning it is separate from the native media instance in this component and any changes made to it (such as adding new media options) will not be reflected on the original media.

      The caller must release the returned Media when it has no further use for it.

      Returns:
      duplicated media
    • release

      public void release()
      Release this component and the associated native resources.

      The component must no longer be used.

    • mediaInstance

      public uk.co.caprica.vlcj.binding.internal.libvlc_media_t mediaInstance()
      Get the associated native media instance.
      Returns:
      media instance