Autopsy  3.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
MediaViewVideoPanel.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2013 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.corecomponents;
20 
21 import java.awt.Dimension;
22 import java.util.Arrays;
23 import java.util.List;
24 import java.util.logging.Level;
26 import javax.swing.JPanel;
28 
33 public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture {
34 
35  private static final Logger logger = Logger.getLogger(MediaViewVideoPanel.class.getName());
36 
37  // 64 bit architectures
38  private static final String[] ARCH64 = new String[]{"amd64", "x86_64"}; //NON-NLS NON-NLS
39 
40  // 32 bit architectures
41  private static final String[] ARCH32 = new String[]{"x86"}; //NON-NLS
42 
51  if (is64BitJVM()) {
52  logger.log(Level.INFO, "64 bit JVM detected. Creating JavaFX Video Player."); //NON-NLS
53  return getFXImpl();
54  } else {
55  logger.log(Level.INFO, "32 bit JVM detected. Creating GStreamer Video Player."); //NON-NLS
56  return getGstImpl();
57  }
58  }
59 
65  private static boolean is64BitJVM() {
66  String arch = System.getProperty("os.arch");
67  return Arrays.asList(ARCH64).contains(arch);
68  }
69 
75  private static MediaViewVideoPanel getGstImpl() {
76  return new GstVideoPanel();
77  }
78 
84  private static MediaViewVideoPanel getFXImpl() {
85  return new FXVideoPanel();
86  }
87 
93  public abstract boolean isInited();
94 
98  abstract void reset();
99 
106  abstract void setupVideo(final AbstractFile file, final Dimension dims);
107 
111  abstract public String[] getExtensions();
115  abstract public List<String> getMimeTypes();
116 }
static Logger getLogger(String name)
Definition: Logger.java:131

Copyright © 2012-2015 Basis Technology. Generated on: Mon Oct 19 2015
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.