Fixed issue with multiple instances of data result panels.

This commit is contained in:
Jeff Wallace 2013-10-21 10:28:35 -04:00
parent ef74ae3425
commit 27fc247da5

View File

@ -39,12 +39,6 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
// 32 bit architectures // 32 bit architectures
private static final String[] ARCH32 = new String[]{"x86"}; private static final String[] ARCH32 = new String[]{"x86"};
// A Gstreamer implementation of MediaViewVideoPanel
private static GstVideoPanel gstVideoPanel = null;
// A JavaFX implmentation of MediaViewVideoPanel
private static FXVideoPanel fxVideoPanel = null;
/** /**
* Factory Method to create a MediaViewVideoPanel. * Factory Method to create a MediaViewVideoPanel.
* *
@ -78,10 +72,7 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
* @return a GstVideoPanel * @return a GstVideoPanel
*/ */
private static MediaViewVideoPanel getGstImpl() { private static MediaViewVideoPanel getGstImpl() {
if (gstVideoPanel == null) { return new GstVideoPanel();
gstVideoPanel = new GstVideoPanel();
}
return gstVideoPanel;
} }
/** /**
@ -90,10 +81,7 @@ public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture
* @return a FXVideoPanel * @return a FXVideoPanel
*/ */
private static MediaViewVideoPanel getFXImpl() { private static MediaViewVideoPanel getFXImpl() {
if (fxVideoPanel == null) { return new FXVideoPanel();
fxVideoPanel = new FXVideoPanel();
}
return fxVideoPanel;
} }
/** /**