selection = st;
duration = dur;
}
public void setMovieSelection() {
MovieController mc = null;
if (mc == null) {
// fetch or create a moviecontroller for the selected movie
MediaPresenter presenter = VideoGrok.getPresenter();
try {
presenter.openFromURL(movieURL,getSelectionStart());
mc = presenter.getMovieController();
} catch (Exception e) {
e.printStackTrace();
}
}
if (mc == null) {
System.out.println("Can't create a moviecontroller for "+movieURL+" in MovieSelection.playMovieSelection()");
}
try {
TimeRecord ts = mc.getSelectionBegin();
TimeRecord td = mc.getSelectionDuration();
ts.setValue(selection.getValue());
ts.setScale(selection.getScale());
td.setValue(duration.getValue());
td.setScale(duration.getScale());
mc.setSelectionBegin(ts);
mc.setSelectionDuration(td);
System.out.println("Duration in setMovieSelection: "+td+duration+(td.getValue()-winbase));
} catch (Exception e) {
System.out.println("Could not set selection "+selection.toString()+" "+duration.toString()+" in MovieSelection.setMovieSelection()");
}
}