java.lang.Object
uk.co.caprica.vlcj.media.MediaEventAdapter
- All Implemented Interfaces:
MediaEventListener
Default implementation of the media player event listener.
Simply override the methods you're interested in.
Events are not raised on the Swing Event Dispatch thread so if updating user interface components in
response to these events care must be taken to use SwingUtilities.invokeLater(Runnable)
.
Equally, care must be taken not to call back into LibVLC from the event handling thread - if an event handler needs
to call back into LibVLC it should use the MediaPlayerFactory.submit(Runnable)
method to submit a task for
asynchronous execution.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
mediaDurationChanged
(Media media, long newDuration) The current media duration changed.void
mediaFreed
(Media media, MediaRef mediaFreed) The current media was freed.void
mediaMetaChanged
(Media media, Meta metaType) Current media meta data changed.void
mediaParsedChanged
(Media media, MediaParsedStatus newStatus) The current media parsed status changed.void
mediaStateChanged
(Media media, State newState) The current media state changed.void
mediaSubItemAdded
(Media media, MediaRef newChild) A new sub-item was added to the current media.void
mediaSubItemTreeAdded
(Media media, MediaRef item) A sub-item tree was added to the media.void
mediaThumbnailGenerated
(Media media, Picture picture)
-
Constructor Details
-
MediaEventAdapter
public MediaEventAdapter()
-
-
Method Details
-
mediaMetaChanged
Description copied from interface:MediaEventListener
Current media meta data changed.- Specified by:
mediaMetaChanged
in interfaceMediaEventListener
- Parameters:
media
- media that raised the eventmetaType
- type of meta data that changed
-
mediaSubItemAdded
Description copied from interface:MediaEventListener
A new sub-item was added to the current media.- Specified by:
mediaSubItemAdded
in interfaceMediaEventListener
- Parameters:
media
- media that raised the eventnewChild
- native sub-item handle
-
mediaDurationChanged
Description copied from interface:MediaEventListener
The current media duration changed.- Specified by:
mediaDurationChanged
in interfaceMediaEventListener
- Parameters:
media
- media that raised the eventnewDuration
- new duration (number of milliseconds)
-
mediaParsedChanged
Description copied from interface:MediaEventListener
The current media parsed status changed.- Specified by:
mediaParsedChanged
in interfaceMediaEventListener
- Parameters:
media
- media that raised the eventnewStatus
- new parsed status
-
mediaFreed
Description copied from interface:MediaEventListener
The current media was freed.- Specified by:
mediaFreed
in interfaceMediaEventListener
- Parameters:
media
- media that raised the eventmediaFreed
-
-
mediaStateChanged
Description copied from interface:MediaEventListener
The current media state changed.- Specified by:
mediaStateChanged
in interfaceMediaEventListener
- Parameters:
media
- media that raised the eventnewState
- new state
-
mediaSubItemTreeAdded
Description copied from interface:MediaEventListener
A sub-item tree was added to the media.- Specified by:
mediaSubItemTreeAdded
in interfaceMediaEventListener
- Parameters:
media
- media that raised the eventitem
- media item
-
mediaThumbnailGenerated
- Specified by:
mediaThumbnailGenerated
in interfaceMediaEventListener
- Parameters:
media
-picture
-
-