Commit 8dc81141 authored by Filippo Carone's avatar Filippo Carone

jvlc: MediaInstance* renamed to MediaPlayer*

parent f3ebe393
...@@ -29,8 +29,8 @@ import java.util.ArrayList; ...@@ -29,8 +29,8 @@ import java.util.ArrayList;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import org.videolan.jvlc.event.MediaInstanceCallback; import org.videolan.jvlc.event.MediaPlayerCallback;
import org.videolan.jvlc.event.MediaInstanceListener; import org.videolan.jvlc.event.MediaPlayerListener;
import org.videolan.jvlc.internal.LibVlc; import org.videolan.jvlc.internal.LibVlc;
import org.videolan.jvlc.internal.LibVlcEventType; import org.videolan.jvlc.internal.LibVlcEventType;
import org.videolan.jvlc.internal.LibVlc.LibVlcEventManager; import org.videolan.jvlc.internal.LibVlc.LibVlcEventManager;
...@@ -47,7 +47,7 @@ public class MediaPlayer ...@@ -47,7 +47,7 @@ public class MediaPlayer
private final LibVlcEventManager eventManager; private final LibVlcEventManager eventManager;
private List<MediaInstanceCallback> callbacks = new ArrayList<MediaInstanceCallback>(); private List<MediaPlayerCallback> callbacks = new ArrayList<MediaPlayerCallback>();
private MediaDescriptor mediaDescriptor; private MediaDescriptor mediaDescriptor;
...@@ -151,9 +151,9 @@ public class MediaPlayer ...@@ -151,9 +151,9 @@ public class MediaPlayer
return libvlc.libvlc_media_player_get_fps(instance, exception); return libvlc.libvlc_media_player_get_fps(instance, exception);
} }
public void addListener(final MediaInstanceListener listener) public void addListener(final MediaPlayerListener listener)
{ {
MediaInstanceCallback callback = new MediaInstanceCallback(this, listener); MediaPlayerCallback callback = new MediaPlayerCallback(this, listener);
libvlc_exception_t exception = new libvlc_exception_t(); libvlc_exception_t exception = new libvlc_exception_t();
for (LibVlcEventType event : EnumSet.range( for (LibVlcEventType event : EnumSet.range(
LibVlcEventType.libvlc_MediaPlayerPlaying, LibVlcEventType.libvlc_MediaPlayerPlaying,
...@@ -171,7 +171,7 @@ public class MediaPlayer ...@@ -171,7 +171,7 @@ public class MediaPlayer
protected void finalize() throws Throwable protected void finalize() throws Throwable
{ {
libvlc_exception_t exception = new libvlc_exception_t(); libvlc_exception_t exception = new libvlc_exception_t();
for (MediaInstanceCallback callback : callbacks) for (MediaPlayerCallback callback : callbacks)
{ {
for (LibVlcEventType event : EnumSet.range( for (LibVlcEventType event : EnumSet.range(
LibVlcEventType.libvlc_MediaPlayerPlaying, LibVlcEventType.libvlc_MediaPlayerPlaying,
......
...@@ -35,13 +35,13 @@ import org.videolan.jvlc.internal.LibVlc.media_player_time_changed; ...@@ -35,13 +35,13 @@ import org.videolan.jvlc.internal.LibVlc.media_player_time_changed;
import com.sun.jna.Pointer; import com.sun.jna.Pointer;
public class MediaInstanceCallback implements LibVlcCallback public class MediaPlayerCallback implements LibVlcCallback
{ {
private MediaInstanceListener listener; private MediaPlayerListener listener;
private MediaPlayer mediaInstance; private MediaPlayer mediaInstance;
public MediaInstanceCallback(MediaPlayer mediaInstance, MediaInstanceListener listener) public MediaPlayerCallback(MediaPlayer mediaInstance, MediaPlayerListener listener)
{ {
this.mediaInstance = mediaInstance; this.mediaInstance = mediaInstance;
this.listener = listener; this.listener = listener;
......
...@@ -28,7 +28,7 @@ package org.videolan.jvlc.event; ...@@ -28,7 +28,7 @@ package org.videolan.jvlc.event;
import org.videolan.jvlc.MediaPlayer; import org.videolan.jvlc.MediaPlayer;
public interface MediaInstanceListener public interface MediaPlayerListener
{ {
void played(MediaPlayer mediaInstance); void played(MediaPlayer mediaInstance);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment