This is used to pass around media references without requiring the full-blown Media component.
-
Constructor Summary
ConstructorsConstructorDescriptionMediaRef(uk.co.caprica.vlcj.binding.internal.libvlc_instance_t libvlcInstance, uk.co.caprica.vlcj.binding.internal.libvlc_media_t mediaInstance) Create a new media reference. -
Method Summary
-
Constructor Details
-
MediaRef
public MediaRef(uk.co.caprica.vlcj.binding.internal.libvlc_instance_t libvlcInstance, uk.co.caprica.vlcj.binding.internal.libvlc_media_t mediaInstance) Create a new media reference.- Parameters:
libvlcInstance- native library instancemediaInstance- native media instance
-
-
Method Details
-
newMedia
Return a newMediacomponent for thisMediaRef.The returned media component shares the native media instance with any others that may be created subsequently.
The caller must release the returned media when it is of no further use.
- Returns:
- media
-
newMediaRef
Return a newMediaReffor thisMediaRef.The returned media reference shares the native media instance with any others that may be created subsequently.
The caller must release the returned media reference when it is of no further use.
- Returns:
- media reference
-
duplicateMedia
Return a duplicateMediacomponent for thisMediaRef.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 is of no further use.
- Returns:
- duplicated media
-
duplicateMediaRef
Return a duplicateMediaReffor thisMediaRef.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
Mediawhen it has no further use for it.- Returns:
- duplicated media reference
-
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 native media instance.- Returns:
- media instance
-