Added new GStreamer; updated install; cleanup.

This commit is contained in:
U-BASIS\dgrove 2019-02-01 10:10:48 -05:00
parent b60faf0212
commit cee91fa3d2
1834 changed files with 54725 additions and 803 deletions

View File

@ -1,4 +1,4 @@
Last Updated: 30 October 2015
Last Updated: 1 February 2019
This file outlines what it takes to build Autopsy from source.
@ -55,11 +55,13 @@ from the TSK root directory to install the libraries and such in
the needed places (i.e. '/usr/local').
3) For 32-bit targets, get GStreamer Setup. GStreamer is used to view video files.
You can either download it and install it or manually by unzipping the
version that is included in the 'thirdparty/gstreamer' folder. You
will need the 'bin' and 'lib/gstreamer-0.10' folders to be in your
Windows PATH environment variable.
3) For Windows builds, GStreamer must be setup. GStreamer is used to view video
files. You can either download it and install it, or you can copy it from the
'thirdparty/gstreamer' folder. Both 32-bit (x86) and 64-bit (x86_64) versions
are included, so feel free to exclude what you want. You will need to unzip the
'lib/gstreamer-1.0/libgstlibav.zip' file into it's residing
folder. You will also need the 'bin' and 'lib/gstreamer-1.0' paths included in
your Windows PATH environment variable.
NOTE: This has not been fully tested in non-Windows environments
yet, so we don't have instructions for that yet.

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Form version="1.4" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
<Properties>
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
<Color blue="0" green="0" red="0" type="rgb"/>
</Property>
</Properties>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
</AuxValues>
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jFXPanel" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jFXPanel" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
<SubComponents>
<Container class="javafx.embed.swing.JFXPanel" name="jFXPanel">
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="400" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="300" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
</Container>
</SubComponents>
</Form>

View File

@ -1,686 +0,0 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2013-2018 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sleuthkit.autopsy.contentviewers;
import com.google.common.io.Files;
import java.awt.Dimension;
import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.concurrent.CancellationException;
import java.util.logging.Level;
import javafx.application.Platform;
import javafx.beans.Observable;
import javafx.concurrent.Task;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.Slider;
import javafx.scene.control.Tooltip;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.scene.media.Media;
import javafx.scene.media.MediaException;
import javafx.scene.media.MediaPlayer;
import javafx.scene.media.MediaPlayer.Status;
import static javafx.scene.media.MediaPlayer.Status.PAUSED;
import static javafx.scene.media.MediaPlayer.Status.PLAYING;
import static javafx.scene.media.MediaPlayer.Status.READY;
import static javafx.scene.media.MediaPlayer.Status.STOPPED;
import javafx.scene.media.MediaView;
import javafx.util.Duration;
import javax.swing.JPanel;
import org.netbeans.api.progress.ProgressHandle;
import org.openide.util.NbBundle;
import org.openide.util.lookup.ServiceProvider;
import org.openide.util.lookup.ServiceProviders;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.core.Installer;
import org.sleuthkit.autopsy.corecomponents.FrameCapture;
import org.sleuthkit.autopsy.corecomponents.VideoFrame;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.VideoUtils;
import org.sleuthkit.autopsy.datamodel.ContentUtils;
import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector;
import org.sleuthkit.datamodel.AbstractFile;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData;
/**
* Video viewer part of the Media View layered pane.
*/
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
public class FXVideoPanel extends JPanel implements MediaFileViewer.MediaViewPanel {
// Refer to https://docs.oracle.com/javafx/2/api/javafx/scene/media/package-summary.html
// for Javafx supported formats
private static final String[] EXTENSIONS = new String[]{".m4v", ".fxm", ".flv", ".m3u8", ".mp4", ".aif", ".aiff", ".mp3", "m4a", ".wav"}; //NON-NLS
private static final List<String> MIMETYPES = Arrays.asList("audio/x-aiff", "video/x-javafx", "video/x-flv", "application/vnd.apple.mpegurl", " audio/mpegurl", "audio/mpeg", "video/mp4", "audio/x-m4a", "video/x-m4v", "audio/x-wav"); //NON-NLS
private static final Logger logger = Logger.getLogger(FXVideoPanel.class.getName());
private boolean fxInited = false;
private MediaPane mediaPane;
private AbstractFile currentFile;
public FXVideoPanel() {
fxInited = Installer.isJavaFxInited();
initComponents();
if (fxInited) {
Platform.runLater(() -> {
mediaPane = new MediaPane();
Scene fxScene = new Scene(mediaPane);
jFXPanel.setScene(fxScene);
});
}
}
@Deprecated
public JPanel getVideoPanel() {
return this;
}
void loadFile(final AbstractFile file, final Dimension dims) {
if (file.equals(currentFile)) {
return;
}
if (!Case.isCaseOpen()) {
//handle in-between condition when case is being closed
//and an image was previously selected
return;
}
reset();
currentFile = file;
final boolean deleted = file.isDirNameFlagSet(TskData.TSK_FS_NAME_FLAG_ENUM.UNALLOC);
if (deleted) {
mediaPane.setInfoLabelText(NbBundle.getMessage(this.getClass(), "FXVideoPanel.mediaPane.infoLabel"));
removeAll();
return;
}
mediaPane.setFit(dims);
String path = "";
try {
path = file.getUniquePath();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Cannot get unique path of video file", ex); //NON-NLS
}
mediaPane.setInfoLabelText(path);
mediaPane.setInfoLabelToolTipText(path);
final File tempFile;
try {
tempFile = VideoUtils.getVideoFileInTempDir(currentFile);
} catch (NoCurrentCaseException ex) {
logger.log(Level.SEVERE, "Exception while getting open case.", ex); //NON-NLS
return;
}
new Thread(mediaPane.new ExtractMedia(currentFile, tempFile)).start();
}
void reset() {
Platform.runLater(() -> {
if (mediaPane != null) {
mediaPane.reset();
}
});
currentFile = null;
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jFXPanel = new javafx.embed.swing.JFXPanel();
setBackground(new java.awt.Color(0, 0, 0));
javax.swing.GroupLayout jFXPanelLayout = new javax.swing.GroupLayout(jFXPanel);
jFXPanel.setLayout(jFXPanelLayout);
jFXPanelLayout.setHorizontalGroup(
jFXPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
jFXPanelLayout.setVerticalGroup(
jFXPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jFXPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jFXPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
}// </editor-fold>//GEN-END:initComponents
// Variables declaration - do not modify//GEN-BEGIN:variables
private javafx.embed.swing.JFXPanel jFXPanel;
// End of variables declaration//GEN-END:variables
public boolean isInited() {
return fxInited;
}
private class MediaPane extends BorderPane {
private MediaPlayer mediaPlayer;
private final MediaView mediaView;
/**
* The Duration of the media. *
*/
private Duration duration;
/**
* The container for the media controls. *
*/
private final HBox mediaTools;
/**
* The container for the media video output. *
*/
private final HBox mediaViewPane;
private final VBox controlPanel;
private final Slider progressSlider;
private final Button pauseButton;
private final Button stopButton;
private final Label progressLabel;
private final Label infoLabel;
private int totalHours;
private int totalMinutes;
private int totalSeconds;
private final String durationFormat = "%02d:%02d:%02d/%02d:%02d:%02d "; //NON-NLS
private static final String PLAY_TEXT = "";
private static final String PAUSE_TEXT = "||";
private static final String STOP_TEXT = "X"; //NON-NLS
public MediaPane() {
// Video Display
mediaViewPane = new HBox();
mediaViewPane.setStyle("-fx-background-color: black"); //NON-NLS
mediaViewPane.setAlignment(Pos.CENTER);
mediaView = new MediaView();
mediaViewPane.getChildren().add(mediaView);
setCenter(mediaViewPane);
// Media Controls
controlPanel = new VBox();
mediaTools = new HBox();
mediaTools.setAlignment(Pos.CENTER);
mediaTools.setPadding(new Insets(5, 10, 5, 10));
pauseButton = new Button(PLAY_TEXT);
stopButton = new Button(STOP_TEXT);
mediaTools.getChildren().add(pauseButton);
mediaTools.getChildren().add(new Label(" "));
mediaTools.getChildren().add(stopButton);
mediaTools.getChildren().add(new Label(" "));
progressSlider = new Slider();
HBox.setHgrow(progressSlider, Priority.ALWAYS);
progressSlider.setMinWidth(50);
progressSlider.setMaxWidth(Double.MAX_VALUE);
mediaTools.getChildren().add(progressSlider);
progressLabel = new Label();
progressLabel.setPrefWidth(135);
progressLabel.setMinWidth(135);
mediaTools.getChildren().add(progressLabel);
controlPanel.getChildren().add(mediaTools);
controlPanel.setStyle("-fx-background-color: white"); //NON-NLS
infoLabel = new Label("");
controlPanel.getChildren().add(infoLabel);
setBottom(controlPanel);
setProgressActionListeners();
}
/**
* Reset this MediaPane.
*
*/
public void reset() {
if (mediaPlayer != null) {
setInfoLabelText("");
if (mediaPlayer.getStatus() == Status.PLAYING) {
mediaPlayer.stop();
}
mediaPlayer = null;
mediaView.setMediaPlayer(null);
}
resetProgress();
}
/**
* Set the Information Label of this MediaPane.
*
* @param text
*/
public void setInfoLabelText(final String text) {
logger.log(Level.INFO, "Setting Info Label Text: {0}", text); //NON-NLS
Platform.runLater(() -> {
infoLabel.setText(text);
});
}
/**
* Set the size of the MediaPane and it's components.
*
* @param dims the current dimensions of the DataContentViewer
*/
public void setFit(final Dimension dims) {
Platform.runLater(() -> {
setPrefSize(dims.getWidth(), dims.getHeight());
// Set the Video output to fit the size allocated for it. give an
// extra few px to ensure the info label will be shown
mediaView.setFitHeight(dims.getHeight() - controlPanel.getHeight());
});
}
/**
* Set the action listeners for the pause button and progress slider.
*/
private void setProgressActionListeners() {
pauseButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent e) {
if (mediaPlayer == null) {
return;
}
Status status = mediaPlayer.getStatus();
switch (status) {
// If playing, pause
case PLAYING:
mediaPlayer.pause();
break;
// If ready, paused or stopped, continue playing
case READY:
case PAUSED:
case STOPPED:
mediaPlayer.play();
break;
default:
logger.log(Level.INFO, "MediaPlayer in unexpected state: {0}", status.toString()); //NON-NLS
// If the MediaPlayer is in an unexpected state, stop playback.
mediaPlayer.stop();
setInfoLabelText(NbBundle.getMessage(this.getClass(),
"FXVideoPanel.pauseButton.infoLabel.playbackErr"));
break;
}
}
});
stopButton.setOnAction((ActionEvent e) -> {
if (mediaPlayer == null) {
return;
}
mediaPlayer.stop();
});
progressSlider.valueProperty().addListener((Observable o) -> {
if (mediaPlayer == null) {
return;
}
if (progressSlider.isValueChanging()) {
mediaPlayer.seek(duration.multiply(progressSlider.getValue() / 100.0));
}
});
}
/**
* Reset the progress label and slider to zero.
*/
private void resetProgress() {
totalHours = 0;
totalMinutes = 0;
totalSeconds = 0;
progressSlider.setValue(0.0);
updateTime(Duration.ZERO);
}
/**
* Construct a MediaPlayer from the given Media URI.
*
* Also adds the necessary listeners to MediaPlayer events.
*
* @param mediaUri the location of the media.
*
* @return a MediaPlayer
*/
private MediaPlayer createMediaPlayer(String mediaUri) {
Media media = new Media(mediaUri);
MediaPlayer player = new MediaPlayer(media);
player.setOnReady(new ReadyListener());
final Runnable pauseListener = () -> {
pauseButton.setText(PLAY_TEXT);
};
player.setOnPaused(pauseListener);
player.setOnStopped(pauseListener);
player.setOnPlaying(() -> {
pauseButton.setText(PAUSE_TEXT);
});
player.setOnEndOfMedia(new EndOfMediaListener());
player.currentTimeProperty().addListener((observable, oldTime, newTime) -> {
updateSlider(newTime);
updateTime(newTime);
});
return player;
}
/**
* Update the progress slider and label with the current time of the
* media.
*/
private void updateProgress() {
if (mediaPlayer == null) {
return;
}
Duration currentTime = mediaPlayer.getCurrentTime();
updateSlider(currentTime);
updateTime(currentTime);
}
/**
* Update the slider with the current time.
*
* @param currentTime
*/
private void updateSlider(Duration currentTime) {
if (progressSlider != null) {
progressSlider.setDisable(currentTime.isUnknown());
if (!progressSlider.isDisabled() && duration.greaterThan(Duration.ZERO)
&& !progressSlider.isValueChanging()) {
progressSlider.setValue(currentTime.divide(duration.toMillis()).toMillis() * 100.0);
}
}
}
/**
* Update the progress label with the current time.
*
* @param currentTime
*/
private void updateTime(Duration currentTime) {
long millisElapsed = (long) currentTime.toMillis();
long elapsedHours, elapsedMinutes, elapsedSeconds;
// pick out the elapsed hours, minutes, seconds
long secondsElapsed = millisElapsed / 1000;
elapsedHours = (int) secondsElapsed / 3600;
secondsElapsed -= elapsedHours * 3600;
elapsedMinutes = (int) secondsElapsed / 60;
secondsElapsed -= elapsedMinutes * 60;
elapsedSeconds = (int) secondsElapsed;
String durationStr = String.format(durationFormat,
elapsedHours, elapsedMinutes, elapsedSeconds,
totalHours, totalMinutes, totalSeconds);
Platform.runLater(() -> {
progressLabel.setText(durationStr);
});
}
private void setInfoLabelToolTipText(final String text) {
Platform.runLater(() -> {
infoLabel.setTooltip(new Tooltip(text));
});
}
/**
* Responds to MediaPlayer onReady events.
*
* Updates the progress label with the duration of the media.
*/
private class ReadyListener implements Runnable {
@Override
public void run() {
if (mediaPlayer == null) {
return;
}
duration = mediaPlayer.getMedia().getDuration();
long durationInMillis = (long) mediaPlayer.getMedia().getDuration().toMillis();
// pick out the total hours, minutes, seconds
long durationSeconds = (int) durationInMillis / 1000;
totalHours = (int) durationSeconds / 3600;
durationSeconds -= totalHours * 3600;
totalMinutes = (int) durationSeconds / 60;
durationSeconds -= totalMinutes * 60;
totalSeconds = (int) durationSeconds;
updateProgress();
}
}
/**
* Responds to MediaPlayer onEndOfMediaEvents.
*
* Prepares the media to be replayed.
*/
private class EndOfMediaListener implements Runnable {
@Override
public void run() {
if (mediaPlayer == null) {
return;
}
Duration beginning = mediaPlayer.getStartTime();
mediaPlayer.stop();
mediaPlayer.pause();
pauseButton.setText(PLAY_TEXT);
updateSlider(beginning);
updateTime(beginning);
}
}
/**
* Thread that extracts Media from a Sleuthkit file representation to a
* Java file representation that the Media Player can take as input.
*/
private class ExtractMedia extends Task<Long> {
private ProgressHandle progress;
private final AbstractFile sourceFile;
private final java.io.File tempFile;
ExtractMedia(AbstractFile sFile, java.io.File jFile) {
this.sourceFile = sFile;
this.tempFile = jFile;
}
/**
* Get the URI of the media file.
*
* @return the URI of the media file.
*/
public String getMediaUri() {
return Paths.get(tempFile.getAbsolutePath()).toUri().toString();
}
@Override
protected Long call() throws Exception {
if (tempFile.exists() == false || tempFile.length() < sourceFile.getSize()) {
progress = ProgressHandle.createHandle(
NbBundle.getMessage(this.getClass(),
"FXVideoPanel.progress.bufferingFile",
sourceFile.getName()
),
() -> ExtractMedia.this.cancel(true));
Platform.runLater(() -> {
progressLabel.setText(NbBundle.getMessage(this.getClass(), "FXVideoPanel.progressLabel.buffering"));
});
progress.start(100);
try {
Files.createParentDirs(tempFile);
return ContentUtils.writeToFile(sourceFile, tempFile, progress, this, true);
} catch (IOException ex) {
logger.log(Level.WARNING, "Error buffering file", ex); //NON-NLS
return 0L;
} finally {
logger.log(Level.INFO, "Done buffering: {0}", tempFile.getName()); //NON-NLS
}
}
return 0L;
}
@Override
protected void failed() {
super.failed();
onDone();
}
@Override
protected void succeeded() {
super.succeeded();
onDone();
}
@Override
protected void cancelled() {
super.cancelled();
onDone();
}
private void onDone() {
progressLabel.setText("");
try {
super.get(); //block and get all exceptions thrown while doInBackground()
} catch (CancellationException ex) {
logger.log(Level.INFO, "Media buffering was canceled."); //NON-NLS
progressLabel.setText(NbBundle.getMessage(this.getClass(), "FXVideoPanel.progress.bufferingCancelled"));
} catch (InterruptedException ex) {
logger.log(Level.INFO, "Media buffering was interrupted."); //NON-NLS
progressLabel.setText(NbBundle.getMessage(this.getClass(), "FXVideoPanel.progress.bufferingInterrupted"));
} catch (Exception ex) {
logger.log(Level.SEVERE, "Fatal error during media buffering.", ex); //NON-NLS
progressLabel.setText(NbBundle.getMessage(this.getClass(), "FXVideoPanel.progress.errorWritingVideoToDisk"));
} finally {
if (null != progress) {
progress.finish();
}
if (!this.isCancelled()) {
logger.log(Level.INFO, "ExtractMedia is done: {0}", tempFile.getName()); //NON-NLS
try {
mediaPane.mediaPlayer = mediaPane.createMediaPlayer(getMediaUri());
mediaView.setMediaPlayer(mediaPane.mediaPlayer);
} catch (MediaException ex) {
progressLabel.setText("");
mediaPane.setInfoLabelText(NbBundle.getMessage(this.getClass(), "FXVideoPanel.media.unsupportedFormat"));
}
}
}
}
}
}
@Override
public List<String> getSupportedExtensions() {
return Arrays.asList(EXTENSIONS.clone());
}
@Override
public List<String> getSupportedMimeTypes() {
return MIMETYPES;
}
@Override
public boolean isSupported(AbstractFile file) {
String extension = file.getNameExtension();
/**
* Although it seems too restrictive, requiring both a supported
* extension and a supported MIME type prevents two undesirable
* behaviors:
*
* 1) Until AUT-1766 and AUT-1801 are fixed, we incorrectly identify all
* iff files as audio/aiff. This means that if this panel went with the
* looser 'mime type OR extension' criteria we use for images, then this
* panel would attempt (and fail) to display all iff files, even non
* audio ones.
*
* 2) The looser criteria means we are less confident about the files we
* are potentialy sending to GStreamer on 32bit jvms. We are less
* comfortable with the error handling for GStreamer, and don't want to
* send it files which might cause it trouble.
*/
if (getSupportedExtensions().contains("." + extension)) {
SortedSet<String> mimeTypes = new TreeSet<>(getSupportedMimeTypes());
try {
String mimeType = new FileTypeDetector().getMIMEType(file);
return mimeTypes.contains(mimeType);
} catch (FileTypeDetector.FileTypeDetectorInitException ex) {
logger.log(Level.WARNING, "Failed to look up mimetype for " + file.getName() + " using FileTypeDetector. Fallingback on AbstractFile.isMimeType", ex);
if (!mimeTypes.isEmpty() && file.isMimeType(mimeTypes) == AbstractFile.MimeMatchEnum.TRUE) {
return true;
}
}
return getSupportedExtensions().contains("." + extension);
}
return false;
}
}

View File

@ -1,40 +0,0 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2013 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.sleuthkit.autopsy.corecomponents;
import java.io.File;
import java.util.List;
/**
* Interface used to capture frames from a video file.
*/
public interface FrameCapture {
/**
* @param file the video file to use
* @param numFrames the number of frames to capture. Note that the actual
* number of frames returned may be less than this number.
* Specifically, this may happen if the video is very
* short.
*
* @return a list of VideoFrames representing the captured frames
*/
List<VideoFrame> captureFrames(File file, int numFrames) throws Exception;
}

View File

@ -10,9 +10,9 @@
<dependency conf="autopsy_core->*" org="org.reflections" name="reflections" rev="0.9.8"/>
<!-- for viewers -->
<dependency conf="autopsy_core->*" org="com.googlecode.gstreamer-java" name="gstreamer-java" rev="1.5"/>
<dependency conf="autopsy_core->*" org="org.freedesktop.gstreamer" name="gst1-java-core" rev="0.9.3"/>
<dependency conf="autopsy_core->*" org="net.java.dev.jna" name="jna" rev="3.4.0"/>
<dependency conf="autopsy_core->*" org="net.java.dev.jna" name="platform" rev="3.4.0"/>
<!-- for file search -->
<dependency conf="autopsy_core->*" org="com.github.lgooddatepicker" name="LGoodDatePicker" rev="10.3.1"/>
@ -71,5 +71,6 @@
<!-- conflict resolutions for multiple JAR versions -->
<conflict org="net.java.dev.jna" module="jna" rev="3.4.0"/>
<conflict org="net.java.dev.jna" module="platform" rev="3.4.0"/>
</dependencies>
</ivy-module>

View File

@ -980,10 +980,6 @@
<runtime-relative-path>ext/common-lang-3.2.jar</runtime-relative-path>
<binary-origin>release/modules/ext/common-lang-3.2.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/gstreamer-java-1.5.jar</runtime-relative-path>
<binary-origin>release/modules/ext/gstreamer-java-1.5.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/gst1-java-core-0.9.3.jar</runtime-relative-path>
<binary-origin>release/modules/ext/gst1-java-core-0.9.3.jar</binary-origin>

View File

@ -21,10 +21,10 @@
<if>
<isset property="jre.home.32" />
<then>
<echo message="32-bit JRE found, 32 bit installer will be built."/>
<echo message="32-bit JRE found, 32-bit installer will be built."/>
</then>
<else>
<echo message="32-bit JRE not found. No 32 bit installer will be build. Set the JRE_HOME_32 environment variable to generate a 32-bit installer."/>
<echo message="32-bit JRE not found. No 32-bit installer will be built. Set the JRE_HOME_32 environment variable to generate a 32-bit installer."/>
</else>
</if>
@ -34,10 +34,10 @@
<if>
<isset property="jre.home.64" />
<then>
<echo message="64-bit JRE found, 64 bit installer will be built."/>
<echo message="64-bit JRE found, 64-bit installer will be built."/>
</then>
<else>
<echo message="64-bit JRE not found. No 64 bit installer will be build. Set the JRE_HOME_64 environment variable to generate a 64-bit installer."/>
<echo message="64-bit JRE not found. No 64-bit installer will be built. Set the JRE_HOME_64 environment variable to generate a 64-bit installer."/>
</else>
</if>
</target>
@ -118,19 +118,15 @@
<arg line="/edit ${aip-path-base} /SetAppdir -buildname DefaultBuild -path [ProgramFilesFolder][ProductName]-${app.version}"/>
</exec>
<!-- gstreamer needs special path info to be set -->
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]gstreamer\bin -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]gstreamer\lib\gstreamer-1.0 -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name PATH -value %GSTREAMER_PATH% -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<var name="gstreamer-relative-path" value="gstreamer/1.0/x86"/>
<antcall target="install-gstreamer" inheritAll="true" />
<antcall target="ai-build" inheritAll="true" />
<delete includeEmptyDirs="true">
<fileset dir="${inst-path}/${app.name}/${gstreamer-relative-path}"/>
</delete>
<delete dir="${nbdist.dir}/installer_${app.name}_32-cache"/>
<move file="${nbdist.dir}/installer_${app.name}_32-SetupFiles/installer_${app.name}_32.msi" tofile="${nbdist.dir}/${app.name}-${app.version}-32bit.msi" />
</target>
@ -158,11 +154,45 @@
<arg line="/edit ${aip-path} /SetPackageType x64"/>
</exec>
<var name="gstreamer-relative-path" value="gstreamer/1.0/x86_64"/>
<antcall target="install-gstreamer" inheritAll="true" />
<antcall target="ai-build" inheritAll="true" />
<delete includeEmptyDirs="true">
<fileset dir="${inst-path}/${app.name}/${gstreamer-relative-path}"/>
</delete>
<delete dir="${nbdist.dir}/installer_${app.name}_64-cache"/>
<move file="${nbdist.dir}/installer_${app.name}_64-SetupFiles/installer_${app.name}_64.msi" tofile="${nbdist.dir}/${app.name}-${app.version}-64bit.msi" />
</target>
<target name="install-gstreamer" description="Install a copy of GStreamer.">
<!-- Make GStreamer available to the installer -->
<mkdir dir="${inst-path}/${app.name}/${gstreamer-relative-path}"/>
<copy todir="${inst-path}/${app.name}/${gstreamer-relative-path}" >
<fileset dir="${thirdparty.dir}/${gstreamer-relative-path}"/>
</copy>
<!-- The 'libgstlibav.dll' file is too big to store on GitHub, so we
have it stored in a ZIP file. We'll extract it in place and remove
the ZIP file afterward. -->
<unzip src="${inst-path}/${app.name}/${gstreamer-relative-path}/lib/gstreamer-1.0/libgstlibav.zip"
dest="${inst-path}/${app.name}/${gstreamer-relative-path}/lib/gstreamer-1.0/"/>
<delete file="${inst-path}/${app.name}/${gstreamer-relative-path}/lib/gstreamer-1.0/libgstlibav.zip" />
<!-- GStreamer needs special path info to be set -->
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]${gstreamer-relative-path}\bin -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name GSTREAMER_PATH -value [APPDIR]${gstreamer-relative-path}\lib\gstreamer-1.0 -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /NewEnvironment -name PATH -value %GSTREAMER_PATH% -install_operation CreateUpdate -behavior Append -system_variable"/>
</exec>
</target>
<!-- 32/64 specific since config settings are different -->
@ -194,7 +224,7 @@
</path>
</foreach>
<echo message="Removing extra executable..."/>
<echo message="Removing extra Autopsy executable..."/>
<exec executable="${ai-exe-path}">
<arg line="/edit ${aip-path} /DelFile APPDIR\bin\${aut-bin-name-todelete}"/>
</exec>

View File

@ -103,7 +103,6 @@
<copy file="${basedir}/Running_Linux_OSX.txt" tofile="${zip-tmp}/${app.name}/Running_Linux_OSX.txt"/>
<copy file="${basedir}/unix_setup.sh" tofile="${zip-tmp}/${app.name}/unix_setup.sh"/>
<replaceregexp file="${zip-tmp}/${app.name}/unix_setup.sh" match="TSK_VERSION=(.*)" replace="TSK_VERSION=${TSK_VERSION}" byline="true"/>
<unzip src="${thirdparty.dir}/gstreamer/windows/i386/1.14.4/gstreamer.zip" dest="${zip-tmp}/${app.name}/gstreamer"/>
<copy file="${basedir}/icons/icon.ico" tofile="${zip-tmp}/${app.name}/icon.ico" overwrite="true"/>

BIN
thirdparty/gstreamer/1.0/x86/bin/gdbus.exe vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/gsettings.exe vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

24
thirdparty/gstreamer/1.0/x86/bin/gst-shell vendored Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
export GSTREAMER_ROOT="c:/gstreamer/1.0/x86"
export CPPFLAGS="-I${GSTREAMER_ROOT}/include ${CPPFLAGS}"
export GST_REGISTRY_1_0="${HOME}/.cache/gstreamer-1.0/gstreamer-cerbero-registry"
export XDG_CONFIG_DIRS="${GSTREAMER_ROOT}/etc/xdg${XDG_CONFIG_DIRS:+:$XDG_CONFIG_DIRS}:/etc/xdg"
export LDFLAGS="-L${GSTREAMER_ROOT}/lib ${LDFLAGS}"
export XDG_DATA_DIRS="${GSTREAMER_ROOT}/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}:/usr/local/share:/usr/share"
export GST_PLUGIN_SYSTEM_PATH_1_0="${GSTREAMER_ROOT}/lib/gstreamer-1.0"
export GIO_EXTRA_MODULES="${GSTREAMER_ROOT}/lib/gio/modules"
export GST_PLUGIN_SYSTEM_PATH="${GSTREAMER_ROOT}/lib/gstreamer-0.10"
export GST_PLUGIN_SCANNER="${GSTREAMER_ROOT}/libexec/gstreamer-0.10/gst-plugin-scanner"
export GST_PLUGIN_SCANNER_1_0="${GSTREAMER_ROOT}/libexec/gstreamer-1.0/gst-plugin-scanner"
export CFLAGS="-I${GSTREAMER_ROOT}/include ${CFLAGS}"
export PYTHONPATH="${GSTREAMER_ROOT}/lib/python2.7/site-packages${PYTHONPATH:+:$PYTHONPATH}"
export PKG_CONFIG_PATH="${GSTREAMER_ROOT}/lib/pkgconfig:${GSTREAMER_ROOT}/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
export PATH="${GSTREAMER_ROOT}/bin${PATH:+:$PATH}:/usr/local/bin:/usr/bin:/bin"
export GST_REGISTRY="${HOME}/.gstreamer-0.10/gstreamer-cerbero-registry"
export LD_LIBRARY_PATH="${GSTREAMER_ROOT}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export CXXFLAGS="-I${GSTREAMER_ROOT}/include ${CXXFLAGS}"
export GI_TYPELIB_PATH="${GSTREAMER_ROOT}/lib/girepository-1.0"
$SHELL "$@"

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,69 @@
#!/usr/bin/env python3
#
# Copyright (c) 2014,Thibault Saunier <thibault.saunier@collabora.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301, USA.
import os
import subprocess
import sys
LIBDIR = r'/c/gstreamer/1.0/x86/lib'
BUILDDIR = r'@BUILDDIR@'
SRCDIR = r'@SRCDIR@'
GIT_FIRST_HASH = 'da962d096af9460502843e41b7d25fdece7ff1c2'
def _get_git_first_hash(path):
cdir = os.path.abspath(os.curdir)
try:
os.chdir(path)
res = subprocess.check_output(['git', 'rev-list', '--max-parents=0', 'HEAD']).decode().rstrip('\n')
except (subprocess.CalledProcessError, OSError):
res = ''
finally:
os.chdir(cdir)
return res
def _in_devel():
root_dir = os.path.abspath(os.path.dirname(os.path.join(os.path.dirname(os.path.abspath(__file__)),
"..", "..", "..")))
return _get_git_first_hash(root_dir) == GIT_FIRST_HASH
def _add_gst_launcher_path():
f = os.path.abspath(__file__)
if _in_devel():
print("Running with development path")
dir_ = os.path.dirname(os.path.abspath(__file__))
root = os.path.split(dir_)[0]
elif f.startswith(BUILDDIR):
# Make sure to have the configured config.py in the python path
sys.path.insert(0, os.path.abspath(os.path.join(BUILDDIR, "..")))
root = os.path.abspath(os.path.join(SRCDIR, "../"))
else:
root = os.path.join(LIBDIR, 'gst-validate-launcher', 'python')
sys.path.insert(0, root)
return os.path.join(root, "launcher")
if "__main__" == __name__:
libsdir = _add_gst_launcher_path()
from launcher.main import main
exit(main(libsdir))

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libFLAC-8.dll vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/liba52-0.dll vendored Executable file

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libass-9.dll vendored Executable file

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libbz2.dll vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libdca-0.dll vendored Executable file

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libdv-4.dll vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libfaad-2.dll vendored Executable file

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libffi-7.dll vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libgmp-10.dll vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libgomp-1.dll vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libintl-8.dll vendored Executable file

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libjpeg-8.dll vendored Executable file

Binary file not shown.

Binary file not shown.

BIN
thirdparty/gstreamer/1.0/x86/bin/libkate-1.dll vendored Executable file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More