From cc0097f2ae3bd17d31652b4c183c6d022c8d7a7d Mon Sep 17 00:00:00 2001 From: michel_jacobson Date: Tue, 19 Nov 2002 17:51:45 +0000 Subject: [PATCH] no message --- source/org/thdl/media/SmartJMFPlayer.java | 28 ++++++++++++++++------ source/org/thdl/media/SmartMoviePanel.java | 8 ++----- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/source/org/thdl/media/SmartJMFPlayer.java b/source/org/thdl/media/SmartJMFPlayer.java index ea4ede9..c466c9b 100644 --- a/source/org/thdl/media/SmartJMFPlayer.java +++ b/source/org/thdl/media/SmartJMFPlayer.java @@ -128,6 +128,9 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene public boolean isInitialized() { return isSized; } + //public Dimension getSize() { + // return player.getControlPanelComponent().getSize(); //tester avant si player exist + //} /*-----------------------------------------------------------------------*/ private void showMediaComponent() { if (isRealized && isCached) { @@ -166,10 +169,10 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene } else if (isCached) //must be http showMediaComponent(); } else if (event instanceof StartEvent) { + System.out.println("received StartEvent event"); launchAnnotationTimer(); //FIXME should have upper limit (stop time) - if (timer != null) - { + if (timer != null) { timer.cancel(); timer = null; } @@ -182,7 +185,6 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene player.stop(); }}, 0, 15); } else if (event instanceof StopEvent) { - System.out.println("received StopEvent"); pauseTime = player.getMediaTime(); cancelAnnotationTimer(); @@ -199,16 +201,28 @@ public class SmartJMFPlayer extends SmartMoviePanel implements ControllerListene time.*/ if (!(event instanceof RestartingEvent)) { + //player.setMediaTime(pauseTime); + //player.prefetch(); + } + + if (event instanceof StopAtTimeEvent) { + System.out.println("received StopAtTimeEvent"); + } else if (event instanceof StopByRequestEvent) { + System.out.println("received StopByRequestEvent"); + } else if (event instanceof RestartingEvent) { System.out.println("received RestartingEvent"); - player.setMediaTime(pauseTime); - player.prefetch(); + } else if (event instanceof DataStarvedEvent) { + System.out.println("received DataStarvedEvent"); + } else if (event instanceof DeallocateEvent) { + System.out.println("received DeallocateEvent"); + } else if (event instanceof EndOfMediaEvent) { + System.out.println("received EndOfMediaEvent"); } stopTime = null; - if (timer != null) - { + if (timer != null) { timer.cancel(); timer = null; } diff --git a/source/org/thdl/media/SmartMoviePanel.java b/source/org/thdl/media/SmartMoviePanel.java index 68b54d6..97cbe9a 100644 --- a/source/org/thdl/media/SmartMoviePanel.java +++ b/source/org/thdl/media/SmartMoviePanel.java @@ -161,25 +161,21 @@ public abstract class SmartMoviePanel extends Panel System.out.println(hashStart.containsKey(theID)); return hashStart.containsKey(theID); } - public boolean cmd_playFrom(String fromID) { + public void cmd_playFrom(String fromID) { Integer from = (Integer)hashStart.get(fromID); try { cmd_playSegment(from, null); - return true; } catch (SmartMoviePanelException smpe) { smpe.printStackTrace(); - return false; } } - public boolean cmd_playS(String fromID) { + public void cmd_playS(String fromID) { Integer from = (Integer)hashStart.get(fromID); Integer to = (Integer)hashEnd.get(fromID); try { cmd_playSegment(from, to); - return true; } catch (SmartMoviePanelException smpe) { smpe.printStackTrace(); - return false; } } public void launchAnnotationTimer() { //FIXME: should have upper limit - stop time else end time