Module uk.co.caprica.vlcj
Class MediaPlayerEventFactory
java.lang.Object
uk.co.caprica.vlcj.player.base.events.MediaPlayerEventFactory
A factory that creates a media player event instance for a native media player event.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MediaPlayerEvent
createEvent
(uk.co.caprica.vlcj.binding.internal.libvlc_instance_t libvlcInstance, MediaPlayer mediaPlayer, uk.co.caprica.vlcj.binding.internal.libvlc_event_t event) Create a new media player event for a given native event.static MediaPlayerEvent
createMediaPlayerReadyEvent
(MediaPlayer mediaPlayer) Create a media player ready event.
-
Method Details
-
createEvent
public static MediaPlayerEvent createEvent(uk.co.caprica.vlcj.binding.internal.libvlc_instance_t libvlcInstance, MediaPlayer mediaPlayer, uk.co.caprica.vlcj.binding.internal.libvlc_event_t event) Create a new media player event for a given native event.Events generally are expected to copy values from the native structure as needed (specifically this applies to non-primitive values like Strings) because once the event handler returns the native memory will be gone. Without copying such structure values pointers will become invalid.
- Parameters:
libvlcInstance
- native library instancemediaPlayer
- component the event relates toevent
- native event- Returns:
- media player event, or
null
if the native event type is not enabled or otherwise could not be handled
-
createMediaPlayerReadyEvent
Create a media player ready event.This event is a "semantic" event, it has no direct native event counterpart.
- Parameters:
mediaPlayer
- component the event relates to- Returns:
- event
-