Merge branch 'develop' of github.com:sleuthkit/autopsy into 6081-Use-Helper-For-Artifact-Creation

This commit is contained in:
U-BASIS\dsmyda 2020-03-15 14:09:41 -04:00
commit b4087ed9ff
4 changed files with 602 additions and 500 deletions

View File

@ -39,7 +39,7 @@ public class CentralRepoDbUpgrader13To14 implements CentralRepoDbUpgrader {
try (Statement statement = connection.createStatement();) { try (Statement statement = connection.createStatement();) {
CentralRepoPlatforms selectedPlatform = CentralRepoPlatforms.getSelectedPlatform(); CentralRepoPlatforms selectedPlatform = CentralRepoDbManager.getSavedDbChoice().getDbPlatform();
// Create account_types and accounts tables which are referred by X_instances tables // Create account_types and accounts tables which are referred by X_instances tables
statement.execute(RdbmsCentralRepoFactory.getCreateAccountTypesTableStatement(selectedPlatform)); statement.execute(RdbmsCentralRepoFactory.getCreateAccountTypesTableStatement(selectedPlatform));

View File

@ -241,7 +241,7 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
progressSlider.addChangeListener(new ChangeListener() { progressSlider.addChangeListener(new ChangeListener() {
@Override @Override
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
if (progressSlider.getValueIsAdjusting()) { if (progressSlider.getValueIsAdjusting() && gstPlayBin != null) {
long duration = gstPlayBin.queryDuration(TimeUnit.NANOSECONDS); long duration = gstPlayBin.queryDuration(TimeUnit.NANOSECONDS);
double relativePosition = progressSlider.getValue() * 1.0 / PROGRESS_SLIDER_SIZE; double relativePosition = progressSlider.getValue() * 1.0 / PROGRESS_SLIDER_SIZE;
long newStartTime = (long) (relativePosition * duration); long newStartTime = (long) (relativePosition * duration);
@ -267,17 +267,20 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (gstPlayBin != null) {
previousState = gstPlayBin.getState(); previousState = gstPlayBin.getState();
gstPlayBin.pause(); gstPlayBin.pause();
} }
}
@Override @Override
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if(previousState.equals(State.PLAYING)) { if (previousState.equals(State.PLAYING) && gstPlayBin != null) {
gstPlayBin.play(); gstPlayBin.play();
} }
previousState = State.NULL; previousState = State.NULL;
} }
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
} }
@ -293,7 +296,7 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
}); });
//Manage the audio level when the user is adjusting the volume slider //Manage the audio level when the user is adjusting the volume slider
audioSlider.addChangeListener((ChangeEvent event) -> { audioSlider.addChangeListener((ChangeEvent event) -> {
if (audioSlider.getValueIsAdjusting()) { if (audioSlider.getValueIsAdjusting() && gstPlayBin != null) {
double audioPercent = (audioSlider.getValue() * 2.0) / 100.0; double audioPercent = (audioSlider.getValue() * 2.0) / 100.0;
gstPlayBin.setVolume(audioPercent); gstPlayBin.setVolume(audioPercent);
} }
@ -327,12 +330,14 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
endOfStreamListener = new Bus.EOS() { endOfStreamListener = new Bus.EOS() {
@Override @Override
public void endOfStream(GstObject go) { public void endOfStream(GstObject go) {
if (gstPlayBin != null) {
gstPlayBin.seek(ClockTime.ZERO); gstPlayBin.seek(ClockTime.ZERO);
/** /**
* Keep the video from automatically playing * Keep the video from automatically playing
*/ */
Gst.getExecutor().submit(() -> gstPlayBin.pause()); Gst.getExecutor().submit(() -> gstPlayBin.pause());
} }
}
}; };
} }
@ -556,10 +561,12 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
//Video is ready for playback. Create new components //Video is ready for playback. Create new components
gstPlayBin = new PlayBin("VideoPlayer", tempFile.toURI()); gstPlayBin = new PlayBin("VideoPlayer", tempFile.toURI());
//Configure event handling //Configure event handling
if (gstPlayBin != null) {
Bus playBinBus = gstPlayBin.getBus(); Bus playBinBus = gstPlayBin.getBus();
playBinBus.connect(endOfStreamListener); playBinBus.connect(endOfStreamListener);
playBinBus.connect(stateChangeListener); playBinBus.connect(stateChangeListener);
playBinBus.connect(errorListener); playBinBus.connect(errorListener);
}
if (this.isCancelled()) { if (this.isCancelled()) {
return; return;
@ -570,15 +577,16 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
videoPanel.setLayout(new BoxLayout(videoPanel, BoxLayout.Y_AXIS)); videoPanel.setLayout(new BoxLayout(videoPanel, BoxLayout.Y_AXIS));
videoPanel.add(fxPanel); videoPanel.add(fxPanel);
fxAppSink = new JavaFxAppSink("JavaFxAppSink", fxPanel); fxAppSink = new JavaFxAppSink("JavaFxAppSink", fxPanel);
if (gstPlayBin != null) {
gstPlayBin.setVideoSink(fxAppSink); gstPlayBin.setVideoSink(fxAppSink);
}
if (this.isCancelled()) { if (this.isCancelled()) {
return; return;
} }
if (gstPlayBin != null) {
gstPlayBin.setVolume((audioSlider.getValue() * 2.0) / 100.0); gstPlayBin.setVolume((audioSlider.getValue() * 2.0) / 100.0);
gstPlayBin.pause(); gstPlayBin.pause();
}
timer.start(); timer.start();
enableComponents(true); enableComponents(true);
} catch (CancellationException ex) { } catch (CancellationException ex) {
@ -598,7 +606,7 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (!progressSlider.getValueIsAdjusting()) { if (!progressSlider.getValueIsAdjusting() && gstPlayBin != null) {
sliderLock.acquireUninterruptibly(); sliderLock.acquireUninterruptibly();
long position = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS); long position = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS);
long duration = gstPlayBin.queryDuration(TimeUnit.NANOSECONDS); long duration = gstPlayBin.queryDuration(TimeUnit.NANOSECONDS);
@ -655,8 +663,8 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
} }
/** /**
* Modifies the View to be an oval rather than the underlying * Modifies the View to be an oval rather than the underlying rectangle
* rectangle Controller. * Controller.
*/ */
@Override @Override
public void paintThumb(Graphics graphic) { public void paintThumb(Graphics graphic) {
@ -705,11 +713,12 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
@Override @Override
protected TrackListener createTrackListener(JSlider slider) { protected TrackListener createTrackListener(JSlider slider) {
/** /**
* This track listener will force the thumb to be snapped to the mouse * This track listener will force the thumb to be snapped to the
* location. This makes grabbing and dragging the JSlider much easier. * mouse location. This makes grabbing and dragging the JSlider much
* Using the default track listener, the user would have to click * easier. Using the default track listener, the user would have to
* exactly on the slider thumb to drag it. Now the thumb positions * click exactly on the slider thumb to drag it. Now the thumb
* itself under the mouse so that it can always be dragged. * positions itself under the mouse so that it can always be
* dragged.
*/ */
return new TrackListener() { return new TrackListener() {
@Override @Override
@ -982,6 +991,7 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
private void rewindButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rewindButtonActionPerformed private void rewindButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rewindButtonActionPerformed
if (gstPlayBin != null) {
long currentTime = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS); long currentTime = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS);
//Skip 30 seconds. //Skip 30 seconds.
long rewindDelta = TimeUnit.NANOSECONDS.convert(SKIP_IN_SECONDS, TimeUnit.SECONDS); long rewindDelta = TimeUnit.NANOSECONDS.convert(SKIP_IN_SECONDS, TimeUnit.SECONDS);
@ -997,9 +1007,11 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
SeekType.SET, newTime, SeekType.SET, newTime,
//Do nothing for the end position //Do nothing for the end position
SeekType.NONE, -1); SeekType.NONE, -1);
}
}//GEN-LAST:event_rewindButtonActionPerformed }//GEN-LAST:event_rewindButtonActionPerformed
private void fastForwardButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fastForwardButtonActionPerformed private void fastForwardButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fastForwardButtonActionPerformed
if (gstPlayBin != null) {
long duration = gstPlayBin.queryDuration(TimeUnit.NANOSECONDS); long duration = gstPlayBin.queryDuration(TimeUnit.NANOSECONDS);
long currentTime = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS); long currentTime = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS);
//Skip 30 seconds. //Skip 30 seconds.
@ -1029,9 +1041,11 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
SeekType.SET, newTime, SeekType.SET, newTime,
//Do nothing for the end position //Do nothing for the end position
SeekType.NONE, -1); SeekType.NONE, -1);
}
}//GEN-LAST:event_fastForwardButtonActionPerformed }//GEN-LAST:event_fastForwardButtonActionPerformed
private void playButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_playButtonActionPerformed private void playButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_playButtonActionPerformed
if (gstPlayBin != null) {
if (gstPlayBin.isPlaying()) { if (gstPlayBin.isPlaying()) {
gstPlayBin.pause(); gstPlayBin.pause();
} else { } else {
@ -1049,9 +1063,11 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
SeekType.NONE, -1); SeekType.NONE, -1);
gstPlayBin.play(); gstPlayBin.play();
} }
}
}//GEN-LAST:event_playButtonActionPerformed }//GEN-LAST:event_playButtonActionPerformed
private void playBackSpeedComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_playBackSpeedComboBoxActionPerformed private void playBackSpeedComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_playBackSpeedComboBoxActionPerformed
if (gstPlayBin != null) {
double playBackRate = getPlayBackRate(); double playBackRate = getPlayBackRate();
long currentTime = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS); long currentTime = gstPlayBin.queryPosition(TimeUnit.NANOSECONDS);
gstPlayBin.seek(playBackRate, gstPlayBin.seek(playBackRate,
@ -1063,6 +1079,7 @@ public class MediaPlayerPanel extends JPanel implements MediaFileViewer.MediaVie
//playback rate. //playback rate.
SeekType.SET, currentTime, SeekType.SET, currentTime,
SeekType.NONE, 0); SeekType.NONE, 0);
}
}//GEN-LAST:event_playBackSpeedComboBoxActionPerformed }//GEN-LAST:event_playBackSpeedComboBoxActionPerformed
// Variables declaration - do not modify//GEN-BEGIN:variables // Variables declaration - do not modify//GEN-BEGIN:variables

View File

@ -78,9 +78,6 @@ BlackboardArtifactNode.createSheet.taggedItem.description=Result or associated f
BlackboardArtifactNode.createSheet.tags.displayName=Tags BlackboardArtifactNode.createSheet.tags.displayName=Tags
# {0} - artifactDisplayName # {0} - artifactDisplayName
BlackboardArtifactNode.displayName.artifact={0} Artifact BlackboardArtifactNode.displayName.artifact={0} Artifact
BlackboardArtifactNode.getAction.errorTitle=Error getting actions
BlackboardArtifactNode.getAction.linkedFileMessage=There was a problem getting actions for the selected result. The 'View File in Timeline' action will not be available.
BlackboardArtifactNode.getAction.resultErrorMessage=There was a problem getting actions for the selected result. The 'View Result in Timeline' action will not be available.
BlackboardArtifactTagNode.createSheet.userName.text=User Name BlackboardArtifactTagNode.createSheet.userName.text=User Name
BlackboardArtifactTagNode.viewSourceArtifact.text=View Source Result BlackboardArtifactTagNode.viewSourceArtifact.text=View Source Result
Category.five=CAT-5: Non-pertinent Category.five=CAT-5: Non-pertinent