Commit 856a9dfa authored by Dr. Michael Petter's avatar Dr. Michael Petter

Merge remote-tracking branch 'accidental/master'

parents 3c9a1f6d 1a13ecdf
Pipeline #1705 passed with stage
in 37 seconds
#!/bin/bash
xrandr --output eDP-1 --mode 1024x768
xrandr --output eDP-1 --mode 1920x1080 --pos 0x0
xrandr --output HDMI-2 --mode 1280x720 --pos 0x0
xrandr --output HDMI-2 --scale-from 1920x1080 --pos 0x0
......@@ -55,7 +55,7 @@
<target name="classes" depends="init">
<depend srcdir="${java}" destdir="${classes}" cache="${etc}" />
<javac srcdir="${java}" destdir="${classes}" verbose="off" listfiles="off"
source="6" target="6" debug="on" encoding="Cp1252" >
source="8" target="8" debug="on" encoding="Cp1252" >
<classpath refid="libraries"/>
</javac>
......@@ -67,15 +67,23 @@
<jar jarfile="${dist}/ttt.jar" basedir="${classes}">
<manifest>
<attribute name="Main-Class" value="ttt/TTT" />
<attribute name="Class-Path" value="itext-1.4.8.jar jsch-0.1.49.jar swing-layout-1.0.2.jar jmf-2.1.1e.jar mp3plugin.jar lti-civil.jar v4l4j.jar base64coder.jar" />
<attribute name="Class-Path" value="itext-1.4.8.jar jsch-0.1.49.jar swing-layout-1.0.2.jar jmf-2.1.1e.jar mp3plugin.jar lti-civil.jar v4l4j.jar base64coder.jar highresicons.jar" />
</manifest>
</jar>
<jar jarfile="${dist}/highresicons.jar" basedir="highres">
</jar>
<copy todir="${dist}"><fileset dir="${lib}"></fileset></copy>
<copy todir="${dist}"><fileset dir="${native}"></fileset></copy>
<copy todir="${dist}" file="run.sh" />
<copy todir="${dist}" file="beamer.sh" />
<copy todir="${dist}" file="beamer169.sh" />
<copy todir="${dist}" file="rotateTablet.sh" />
<copy todir="${dist}" file="rotatebackTablet.sh" />
<copy todir="${dist}" file="vncserver.sh" />
<copy todir="${dist}" file="vncserver169.sh" />
<copy todir="${dist}" file="touch-on.sh" />
<copy todir="${dist}" file="touch-off.sh" />
<copy todir="${dist}" file="run.sh" />
<zip destfile="./ttt.zip" basedir="." includes="dist/*" update="true"/>
</target>
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="128"
height="128"
id="svg3186"
sodipodi:version="0.32"
inkscape:version="0.45"
version="1.0"
sodipodi:docname="player_play.svg"
sodipodi:docbase="/home/david/Progetti/sandbox"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
sodipodi:modified="true">
<defs
id="defs3188">
<radialGradient
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
r="40.0294"
cy="59.1865"
cx="53.1978"
id="radialGradient3163">
<stop
id="stop3165"
style="stop-color:#000000;stop-opacity:1;"
offset="0" />
<stop
id="stop3175"
style="stop-color:#666666;stop-opacity:1;"
offset="1" />
</radialGradient>
<linearGradient
id="XMLID_9_"
gradientUnits="userSpaceOnUse"
x1="11.9487"
y1="34"
x2="104.0518"
y2="34"
gradientTransform="translate(559.14286,-264.28571)">
<stop
offset="0"
style="stop-color:#FFFFFF"
id="stop56" />
<stop
offset="0.80000001"
style="stop-color:#ffffff;stop-opacity:0;"
id="stop58" />
</linearGradient>
<radialGradient
id="XMLID_8_"
cx="53.1978"
cy="59.1865"
r="40.0294"
gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
gradientUnits="userSpaceOnUse">
<stop
offset="0"
style="stop-color:#323232"
id="stop41" />
<stop
offset="0.2083"
style="stop-color:#363636"
id="stop43" />
<stop
offset="0.4278"
style="stop-color:#434343"
id="stop45" />
<stop
offset="0.6526"
style="stop-color:#585858"
id="stop47" />
<stop
offset="0.8796"
style="stop-color:#757575"
id="stop49" />
<stop
offset="1"
style="stop-color:#888888"
id="stop51" />
</radialGradient>
<radialGradient
id="XMLID_7_"
cx="58"
cy="58"
r="48"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(559.14286,-264.28571)">
<stop
offset="0"
style="stop-color:#FFFFFF"
id="stop26" />
<stop
offset="0.574"
style="stop-color:#FFFFFF"
id="stop28" />
<stop
offset="0.6842"
style="stop-color:#FBFBFB"
id="stop30" />
<stop
offset="0.8001"
style="stop-color:#EEEEEE"
id="stop32" />
<stop
offset="0.9"
style="stop-color:#DDDDDD"
id="stop34" />
<stop
offset="1"
style="stop-color:#BBBBBB"
id="stop36" />
</radialGradient>
<filter
id="AI_Sfocatura_4">
<feGaussianBlur
stdDeviation="4"
id="feGaussianBlur6" />
</filter>
<linearGradient
id="XMLID_6_"
gradientUnits="userSpaceOnUse"
x1="58.0005"
y1="116"
x2="58.0005"
y2="4.882812e-04">
<stop
offset="0"
style="stop-color:#555555"
id="stop9" />
<stop
offset="0.2736"
style="stop-color:#595959"
id="stop11" />
<stop
offset="0.562"
style="stop-color:#666666"
id="stop13" />
<stop
offset="0.8561"
style="stop-color:#7B7B7B"
id="stop15" />
<stop
offset="1"
style="stop-color:#888888"
id="stop17" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#XMLID_9_"
id="linearGradient3242"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(6.0000006,6.0000006)"
x1="11.9487"
y1="34"
x2="104.0518"
y2="34" />
<radialGradient
inkscape:collect="always"
xlink:href="#XMLID_7_"
id="radialGradient3246"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0833333,0,0,1.0833333,1.1666673,1.1666673)"
cx="58"
cy="58"
r="48" />
<linearGradient
inkscape:collect="always"
xlink:href="#XMLID_6_"
id="linearGradient3251"
gradientUnits="userSpaceOnUse"
x1="58.0005"
y1="116"
x2="58.0005"
y2="4.882812e-04" />
<radialGradient
inkscape:collect="always"
xlink:href="#radialGradient3163"
id="radialGradient3253"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
cx="53.1978"
cy="59.186501"
r="40.0294" />
<radialGradient
inkscape:collect="always"
xlink:href="#radialGradient3163"
id="radialGradient2197"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.6667,0,0,0.7574,20.7214,14.064)"
cx="53.1978"
cy="59.186501"
r="40.0294" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
gridtolerance="10000"
guidetolerance="10"
objecttolerance="10"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="153"
inkscape:cy="56.281828"
inkscape:document-units="px"
inkscape:current-layer="layer1"
width="128px"
height="128px"
showgrid="true"
gridspacingx="8px"
gridspacingy="8px"
inkscape:window-width="1018"
inkscape:window-height="694"
inkscape:window-x="0"
inkscape:window-y="0" />
<metadata
id="metadata3191">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<circle
cx="58"
cy="58"
r="58"
id="circle19"
style="fill:url(#linearGradient3251)"
sodipodi:cx="58"
sodipodi:cy="58"
sodipodi:rx="58"
sodipodi:ry="58"
transform="matrix(1.1034483,0,0,1.1034483,0,-2.8e-6)" />
<g
id="g21"
transform="matrix(1.0833333,0,0,1.0833333,1.1666686,1.1666686)"
style="filter:url(#AI_Sfocatura_4);opacity:0.8">
<path
d="M 10,58 C 10,84.467 31.533,106 58,106 C 84.467,106 106,84.467 106,58 C 106,31.533 84.467,10 58,10 C 31.533,10 10,31.533 10,58 z "
id="path23" />
</g>
<path
d="M 12,63.999999 C 12,92.672581 35.327414,116 63.999998,116 C 92.672584,116 116,92.672581 116,63.999999 C 116,35.327415 92.672584,12 63.999998,12 C 35.327414,12 12,35.327415 12,63.999999 z "
id="path38"
style="fill:url(#radialGradient3246)" />
<polygon
transform="matrix(0.6666666,0,0,1,36.000006,6)"
style="fill:url(#radialGradient2197);fill-opacity:1"
id="polygon2195"
points="42,26 90,58 42,90 42,26 " />
<polygon
points="42,26 90,58 42,90 42,26 "
id="polygon53"
style="fill:url(#radialGradient3253);fill-opacity:1"
transform="matrix(0.5,0,0,0.75,19.000002,20.5)" />
<path
d="M 63.999998,63.999999 C 81.788999,63.999999 97.967006,58.87 110.05199,50.491 C 104.19999,30.582 85.775999,16 63.999998,16 C 42.222999,16 23.798999,30.582999 17.949,50.491 C 30.032,58.87 46.209999,63.999999 63.999998,63.999999 z "
id="path60"
style="opacity:0.5;fill:url(#linearGradient3242)" />
</g>
</svg>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
mogrify -background none -format png -resize 32x32 *.svg
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -34,8 +34,11 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.awt.*;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import ttt.player.PaintControls;
public class Constants {
public static final String VersionMessageTTT = "TTT 001.001\n";
......@@ -561,6 +564,25 @@ public class Constants {
return createBrokenIcon();
}
}
/**
* new High Res icons with fallback
* @param highres
* @param backup
* @return
*/
public static Icon highResIcon(String highres, String backup) {
URL url = PaintControls.class.getResource("/"+highres);
if (url!=null) try {
ImageIcon icon = new ImageIcon(url);
if(icon.getImage() == null){
throw new IOException();
}
return icon;
} catch (IOException e) {
}
return Constants.getIcon(backup);
}
/**
* Generates a 16x16 icon
......
......@@ -58,6 +58,7 @@ import ttt.messages.MessageConsumer;
import ttt.messages.WhiteboardMessage;
import ttt.record.LectureProfile;
import ttt.video.*;
import static ttt.Constants.highResIcon;
public class Recorder implements MessageConsumer, Closeable {
......@@ -193,9 +194,12 @@ public class Recorder implements MessageConsumer, Closeable {
final String STOP = "stop recording";
final String PLAY = "play";
final JButton recordButton = new RollOverButton(Constants.getIcon("Record24.png"), RECORD);
final JButton stopButton = new RollOverButton(Constants.getIcon("Stop24.gif"), STOP);
final JButton playButton = new RollOverButton(Constants.getIcon("Play24.gif"), PLAY);
final JButton recordButton = new JButton(highResIcon("record.png","Record24.png"));
recordButton.setActionCommand(RECORD);
final JButton stopButton = new JButton(highResIcon("stop.png","Stop24.gif"));
stopButton.setActionCommand(STOP);
final JButton playButton = new JButton(highResIcon("play.png","Play24.gif"));
playButton.setActionCommand(PLAY);
recordButton.setEnabled(out == null);
stopButton.setEnabled(out != null);
......@@ -306,7 +310,8 @@ public class Recorder implements MessageConsumer, Closeable {
final Icon record_icon = Constants.getIcon("Record24.png");
final Icon stop_icon = Constants.getIcon("Stop24.gif");
final JButton recordButton = new RollOverButton(record_icon, RECORD);
final JButton recordButton = new JButton(record_icon);
recordButton.setActionCommand(RECORD);
recordButton.setEnabled(out == null);
......
......@@ -105,7 +105,7 @@ import ttt.record.LectureProfileDialog;
import ttt.record.Recording;
public class TTT extends JFrame {
static final String version = "19.09.2014";
static final String version = "23.05.2018";
public static boolean debug = !true;
public static boolean verbose = true;
......@@ -1197,6 +1197,9 @@ public class TTT extends JFrame {
}
public void showTTT() {
Font f = new Font("sans-serif", Font.PLAIN, 12);
UIManager.put("Menu.font", f);
UIManager.put("MenuItem.font", f);
// show and maximize frame
if (!isVisible()) {
// set size (if user de-maximizes)
......
......@@ -104,7 +104,7 @@ public class JSAAudioRecorder extends Thread implements IAudioRecorder {
public static String availableInputs(){
String ret="[";
for (Mixer.Info info: AudioSystem.getMixerInfo()){
TargetDataLine tdl = null;
TargetDataLine tdl = null;
for (int i = 0; i < audioFormats.length; i++) {
DataLine.Info in = new DataLine.Info(TargetDataLine.class, audioFormats[i]);
if (AudioSystem.isLineSupported(in)) {
......@@ -152,4 +152,4 @@ public class JSAAudioRecorder extends Thread implements IAudioRecorder {
targetDataLine.stop();
targetDataLine.close();
}
}
\ No newline at end of file
}
......@@ -274,10 +274,12 @@ public class TTTProcessor {
//add the saved messages
if(firstWhiteboardMessage != null){
firstWhiteboardMessage.setTimestamp(0);
firstCursorMessage.setTimestamp(0);
messages.add(1, firstWhiteboardMessage);
messages.add(2, firstCursorMessage);
firstWhiteboardMessage.setTimestamp(0);
messages.add(1, firstWhiteboardMessage);
if (firstCursorMessage !=null){
firstCursorMessage.setTimestamp(0);
messages.add(2, firstCursorMessage);
}
}
messages.add(last);
......@@ -285,7 +287,7 @@ public class TTTProcessor {
recording.setMessages(messages);
for(Message m : messages){
System.out.println("what's going on? " + Editor2.getStringFromTime( m.getTimestamp()) + " . damn " + m.toString());
//System.out.println("what's going on? " + Editor2.getStringFromTime( m.getTimestamp()) + " . damn " + m.toString());
}
......
......@@ -63,6 +63,9 @@ import javax.media.protocol.DataSource;
import javax.media.protocol.FileTypeDescriptor;
import javax.media.protocol.PushBufferDataSource;
import javax.media.protocol.PushBufferStream;
import javax.sound.sampled.AudioFileFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
/**
* A sample program to cut an input file given the start and end points.
......@@ -203,12 +206,59 @@ public class Cut implements ControllerListener, DataSinkListener {
System.exit(0);
}
public boolean doIt(MediaLocator inML, MediaLocator outML, long start[], long end[], boolean frameMode){
if (!inML.getRemainder().endsWith(".wav")){
System.err.println(inML.getRemainder());
return false;
}
AudioInputStream inputStream = null;
AudioInputStream shortenedStream = null;
try {
// Open input
File file = new File(inML.getRemainder());
if (!file.exists()) {
System.err.println(" ... file does not exist: "+ inML.getRemainder());
return false;
}
AudioFileFormat fileFormat = AudioSystem.getAudioFileFormat(file);
javax.sound.sampled.AudioFormat format = fileFormat.getFormat();
inputStream = AudioSystem.getAudioInputStream(file);
System.err.println(" ... cut audio from "+start[0]+" ns to "+end[0]+"ns");
double startSecond=(start[0]/1000/1000)/1000.0;
double endSecond=(end[0]/1000/1000)/1000.0;
double secondsToCopy=endSecond-startSecond;
// compute parameters for performing the cut
int bytesPerSecond = format.getFrameSize() * (int)format.getFrameRate();
inputStream.skip((long)(startSecond * bytesPerSecond));
long framesOfAudioToCopy = (long)(secondsToCopy * (int)format.getFrameRate());
System.err.println(" ... cut audio from "+startSecond+" sec to "+endSecond+" sec");
// Finally write output
shortenedStream = new AudioInputStream(inputStream, format, framesOfAudioToCopy);
File destinationFile = new File(outML.getRemainder());
AudioSystem.write(shortenedStream, fileFormat.getType(), destinationFile);
} catch (Exception e) {
e.printStackTrace();
return false;
} finally {
if (inputStream != null) try { inputStream.close(); } catch (Exception e) { e.printStackTrace(); return false; }
if (shortenedStream != null) try { shortenedStream.close(); } catch (Exception e) { e.printStackTrace();return false; }
}
System.err.println(" ...done cutting.");
return true;
}
/**
* Given a source media locator, destination media locator and a start and end point, this program cuts the pieces
* out.
*/
public boolean doIt(MediaLocator inML, MediaLocator outML, long start[], long end[], boolean frameMode) {
public boolean doItOld(MediaLocator inML, MediaLocator outML, long start[], long end[], boolean frameMode) {
// Guess the output content descriptor from the file extension.
ContentDescriptor cd;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/bash
input=`xinput | grep Digitizer | cut -f2 | cut -f2 -d=`
xinput disable $input
#!/bin/bash
input=`xinput | grep Digitizer | cut -f2 | cut -f2 -d=`
xinput enable $input
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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