package org.videolan.jvlc.event;
-import org.videolan.jvlc.MediaInstance;
+import org.videolan.jvlc.MediaPlayer;
import org.videolan.jvlc.internal.LibVlc;
import org.videolan.jvlc.internal.LibVlcEventType;
import org.videolan.jvlc.internal.LibVlc.LibVlcCallback;
{
private MediaInstanceListener listener;
- private MediaInstance mediaInstance;
+ private MediaPlayer mediaInstance;
- public MediaInstanceCallback(MediaInstance mediaInstance, MediaInstanceListener listener)
+ public MediaInstanceCallback(MediaPlayer mediaInstance, MediaInstanceListener listener)
{
this.mediaInstance = mediaInstance;
this.listener = listener;
/**
* {@inheritDoc}
*/
- @Override
public void callback(libvlc_event_t libvlc_event, Pointer userData)
{
- if (libvlc_event.type == LibVlcEventType.libvlc_MediaInstancePlayed.ordinal())
+ if (libvlc_event.type == LibVlcEventType.libvlc_MediaPlayerPlaying.ordinal())
{
listener.played(mediaInstance);
}
- else if (libvlc_event.type == LibVlcEventType.libvlc_MediaInstancePaused.ordinal())
+ else if (libvlc_event.type == LibVlcEventType.libvlc_MediaPlayerPaused.ordinal())
{
listener.paused(mediaInstance);
}
- else if (libvlc_event.type == LibVlcEventType.libvlc_MediaInstanceReachedEnd.ordinal())
+ else if (libvlc_event.type == LibVlcEventType.libvlc_MediaPlayerEndReached.ordinal())
{
listener.endReached(mediaInstance);
}
- else if (libvlc_event.type == LibVlcEventType.libvlc_MediaInstancePositionChanged.ordinal())
+ else if (libvlc_event.type == LibVlcEventType.libvlc_MediaPlayerPositionChanged.ordinal())
{
listener.positionChanged(mediaInstance);
}
- else if (libvlc_event.type == LibVlcEventType.libvlc_MediaInstanceTimeChanged.ordinal())
+ else if (libvlc_event.type == LibVlcEventType.libvlc_MediaPlayerTimeChanged.ordinal())
{
libvlc_event.event_type_specific.setType(LibVlc.media_player_time_changed.class);
LibVlc.media_player_time_changed timeChanged = (media_player_time_changed) libvlc_event.event_type_specific