Commit 173d6309 authored by ludwig's avatar ludwig

changes for editor2. added methods etc.

git-svn-id: https://www2.in.tum.de/repos/ttt/trunk@78 0463f305-d864-43cb-8a47-61cf597d4139
parent 3b027cab
......@@ -9,7 +9,11 @@
<classpathentry kind="lib" path="lib/swing-layout-1.0.2.jar"/>
<classpathentry kind="lib" path="lib/jmf-2.1.1e.jar"/>
<classpathentry kind="lib" path="lib/mp3plugin.jar"/>
<classpathentry kind="lib" path="lib/v4l4j.jar"/>
<classpathentry kind="lib" path="lib/v4l4j.jar">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="TTT/native/linux32"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/lti-civil.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
......@@ -82,6 +82,10 @@ public class PlaybackControls extends GradientPanel implements TimeChangedListen
volumeSlider.dispose();
}
public int getTimeSliderValue(){
return timeSlider.getValue();
}
Icon playIcon, pauseIcon, stopIcon, nextIcon, previousIcon, volumeOnIcon, volumeOffIcon, saveIcon, findIcon,
movieIcon;
boolean timerChangedSlider;
......
......@@ -344,13 +344,19 @@ public class Player extends JInternalFrame {
});
}
private PlaybackControls playbackControls;
public PlaybackControls getPlaybackControls(){
return playbackControls;
}
// File Playback
public Player(String file) throws IOException {
Recording recording = new Recording(file);
closeables.add(recording);
GraphicsContext graphicsContext = recording.getGraphicsContext();
PlaybackControls playbackControls = recording.getPlaybackControls();
playbackControls = recording.getPlaybackControls();
// add display
JPanel pane = new JPanel(new BorderLayout());
......
// TeleTeachingTool - Presentation Recording With Automated Indexing
//
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universitt Mnchen
// Copyright (C) 2003-2008 Peter Ziewer - Technische Universit�t M�nchen
//
// This file is part of TeleTeachingTool.
//
......@@ -65,6 +65,14 @@ public class Messages {
return messages.get(i);
}
public void setmessages(ArrayList<Message> list){
messages = list;
}
public ArrayList<Message> getMessages(){
return messages;
}
/*******************************************************************************************************************
* read messages *
******************************************************************************************************************/
......@@ -392,7 +400,7 @@ public class Messages {
synchronized public void setTime_full_frame_check_regarding_stripes(int time) {
// long t = System.currentTimeMillis();
// if not set newly, this causes a call of stop() in run() beacuse end of recording reached
// if not set newly, this causes a call of stop() in run() because end of recording reached
int newNext = messages.size();
int totalCounter = 0;
......
......@@ -88,6 +88,18 @@ public class Recording extends MessageProducerAdapter implements Runnable, Actio
this(filename, true);
}
public Messages getMessages(){
return messages;
}
public void setfileDesktop(File name){
fileDesktop = name;
}
public void setMessages(ArrayList<Message> list){
messages.setmessages(list);
}
public Recording(String filename, boolean loadAudioVideoStreams) throws IOException {
// read
read(filename);
......@@ -384,6 +396,14 @@ public class Recording extends MessageProducerAdapter implements Runnable, Actio
// list of extensions
private ArrayList<byte[]> extensions = new ArrayList<byte[]>();
public ArrayList<byte[]> getExtensions(){
return extensions;
}
public void setExtensions(ArrayList<byte[]> ext){
extensions = ext;
}
private void readExtensions(DataInputStream in) throws IOException {
// new format without total length of all extensions
int len;
......@@ -813,12 +833,22 @@ public class Recording extends MessageProducerAdapter implements Runnable, Actio
// original recording flag - used for first backup name
private boolean original = true;
public void store() {
/**
* Save the recording in a new file
*
* @param OutputFile saves the recording into this file
*/
public boolean store(File OutputFile){
fileDesktop = OutputFile;
return store();
}
public boolean store() {
// TODO: Progress Monitor (leave EventDispatchingThread)
// ProgressMonitor progressMonitor = null;
try {
// progressMonitor = new ProgressMonitor(TTT.getInstance(), "Writing...", null, 0, messages.size());
// backup ttt file
File renameFile = null;
......@@ -854,11 +884,13 @@ public class Recording extends MessageProducerAdapter implements Runnable, Actio
// write body
messages.writeMessages(out);
return true;
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Writing failed.", "Error:", JOptionPane.ERROR_MESSAGE);
System.out.println("Error: Writing failed. " + e.getMessage());
e.printStackTrace();
return false;
}
// if (progressMonitor != null)
// progressMonitor.close();
......
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