Skip to content

Commit

Permalink
pre-load libraries on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
codeanticode committed Feb 27, 2022
1 parent 0c99d25 commit 3c2ca88
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 154 deletions.
2 changes: 1 addition & 1 deletion src/processing/video/Capture.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
Part of the Processing project - http://processing.org
Copyright (c) 2012-19 The Processing Foundation
Copyright (c) 2012-22 The Processing Foundation
Copyright (c) 2004-12 Ben Fry and Casey Reas
GStreamer implementation ported from GSVideo library by Andres Colubri
The previous version of this code was developed by Hernando Barragan
Expand Down
2 changes: 1 addition & 1 deletion src/processing/video/Environment.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
Part of the Processing project - http://processing.org
Copyright (c) 2012-19 The Processing Foundation
Copyright (c) 2012-22 The Processing Foundation
Copyright (c) 2004-12 Ben Fry and Casey Reas
Based on from:
Expand Down
133 changes: 61 additions & 72 deletions src/processing/video/LibraryLoader.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
Part of the Processing project - http://processing.org
Copyright (c) 2012-19 The Processing Foundation
Copyright (c) 2012-22 The Processing Foundation
Copyright (c) 2011-12 Ben Fry and Casey Reas
GStreamer implementation ported from GSVideo library by Andres Colubri
Library loader based on code by Tal Shalif
Expand Down Expand Up @@ -45,7 +45,7 @@ public interface DummyLibrary extends Library {
private static LibraryLoader instance;

static final Object[][] WINDOWS_DEPENDENCIES = {
// Core gstreamer libraries
// Core GStreamer libraries
{ "libgstadaptivedemux-1.0-0", new String[] {}, false },
{ "libgstallocators-1.0-0", new String[] {}, false },
{ "libgstapp-1.0-0", new String[] {}, false },
Expand Down Expand Up @@ -158,79 +158,68 @@ public interface DummyLibrary extends Library {
};

static final Object[][] LINUX_DEPENDENCIES = {
{ "libgstbase-1.0", new String[] {}, false },
{ "libgstreamer-1.0", new String[] {}, false },
{ "libgstadaptivedemux-1.0", new String[] {}, false },
{ "libgstallocators-1.0", new String[] {}, false },
{ "libgstapp-1.0", new String[] {}, false },
{ "libgstaudio-1.0", new String[] {}, false },
{ "libgstbadaudio-1.0", new String[] {}, false },
{ "libgstbasecamerabinsrc-1.0", new String[] {}, false },
{ "libgstcheck-1.0", new String[] {}, false },
{ "libgstcodecparsers-1.0", new String[] {}, false },
{ "libgstcontroller-1.0", new String[] {}, false },
{ "libgstfft-1.0", new String[] {}, false },
{ "libgstinsertbin-1.0", new String[] {}, false },
{ "libgstisoff-1.0", new String[] {}, false },
{ "libgstmpegts-1.0", new String[] {}, false },
{ "libgstnet-1.0", new String[] {}, false },
{ "libgstpbutils-1.0", new String[] {}, false },
{ "libgstphotography-1.0", new String[] {}, false },
{ "libgstplayer-1.0", new String[] {}, false },
{ "libgstriff-1.0", new String[] {}, false },
{ "libgstrtp-1.0", new String[] {}, false },
{ "libgstrtsp-1.0", new String[] {}, false },
{ "libgstrtspserver-1.0", new String[] {}, false },
{ "libgstsctp-1.0", new String[] {}, false },
{ "libgstsdp-1.0", new String[] {}, false },
{ "libgsttag-1.0", new String[] {}, false },
{ "libgsturidownloader-1.0", new String[] {}, false },
{ "libgstvalidate-1.0", new String[] {}, false },
{ "libgstvalidate-default-overrides-1.0", new String[] {}, false },
{ "libgstvideo-1.0", new String[] {}, false },
{ "libgstwebrtc-1.0", new String[] {}, false },

{ "libglib-2.0", new String[] {}, false },
{ "libgobject-2.0", new String[] {}, false },
{ "libgio-2.0", new String[] {}, false },
{ "libgmodule-2.0", new String[] {}, false },
{ "libgthread-2.0", new String[] {}, false },

{ "libavcodec", new String[] {}, false },
{ "libavdevice", new String[] {}, false },
{ "libavfilter", new String[] {}, false },
{ "libavformat", new String[] {}, false },
{ "libavresample", new String[] {}, false },
{ "libavutil", new String[] {}, false },
{ "libges-1.0", new String[] {}, false },
{ "libjson-glib-1.0", new String[] {}, false },
{ "libnice", new String[] {}, false },
{ "libnice.10", new String[] {}, false },
{ "libopenh264", new String[] {}, false },
{ "libopenh264.4", new String[] {}, false },
{ "liborc-0.4", new String[] {}, false },
{ "liborc-test-0.4", new String[] {}, false },
{ "libpostproc", new String[] {}, false },
{ "libswresample", new String[] {}, false },
{ "libswscale", new String[] {}, false },
{ "libx264", new String[] {}, false }
// GLib libraries
{ "glib-2.0", new String[] {}, false },
{ "gobject-2.0", new String[] {}, false },
{ "gio-2.0", new String[] {}, false },
{ "gmodule-2.0", new String[] {}, false },
{ "gthread-2.0", new String[] {}, false },

// Core GStreamer libraries
{ "gstreamer-1.0", new String[] {}, false },
{ "gstbase-1.0", new String[] {}, false },
{ "gsturidownloader-1.0", new String[] {}, false },
{ "gstadaptivedemux-1.0", new String[] {}, false },
{ "gstapp-1.0", new String[] {}, false },
{ "gsttag-1.0", new String[] {}, false },
{ "gstvideo-1.0", new String[] {}, false },
{ "gstaudio-1.0", new String[] {}, false },
{ "gstpbutils-1.0", new String[] {}, false },
{ "gstplayer-1.0", new String[] {}, false },
{ "gstbadaudio-1.0", new String[] {}, false },
{ "gstbasecamerabinsrc-1.0", new String[] {}, false },
{ "gstcheck-1.0", new String[] {}, false },
{ "gstcodecparsers-1.0", new String[] {}, false },
{ "gstcontroller-1.0", new String[] {}, false },
{ "gstfft-1.0", new String[] {}, false },
{ "gstinsertbin-1.0", new String[] {}, false },
{ "gstisoff-1.0", new String[] {}, false },
{ "gstmpegts-1.0", new String[] {}, false },
{ "gstnet-1.0", new String[] {}, false },
{ "gstphotography-1.0", new String[] {}, false },
{ "gstallocators-1.0", new String[] {}, false },
{ "gstriff-1.0", new String[] {}, false },
{ "gstrtp-1.0", new String[] {}, false },
{ "gstrtsp-1.0", new String[] {}, false },
{ "gstsdp-1.0", new String[] {}, false },
{ "gstsctp-1.0", new String[] {}, false },
{ "gstrtspserver-1.0", new String[] {}, false },
{ "gstvalidate-1.0", new String[] {}, false },
{ "gstvalidate-default-overrides-1.0", new String[] {}, false },
{ "gstwebrtc-1.0", new String[] {}, false },

// External libraries
{ "avutil", new String[] {}, false },
{ "swresample", new String[] {}, false },
{ "swscale", new String[] {}, false },
{ "avcodec", new String[] {}, false },
{ "avformat", new String[] {}, false },
{ "avresample", new String[] {}, false },
{ "avfilter", new String[] {}, false },
{ "avdevice", new String[] {}, false },
{ "ges-1.0", new String[] {}, false },
{ "json-glib-1.0", new String[] {}, false },
{ "nice", new String[] {}, false },
{ "x264", new String[] {}, false },
{ "openh264", new String[] {}, false },
{ "orc-0.4", new String[] {}, false },
{ "orc-test-0.4", new String[] {}, false },
{ "postproc", new String[] {}, false }
};

static final Object[][] MACOS_DEPENDENCIES = {
{ "gstbase-1.0", new String[] { "gstreamer-1.0" }, true },
{ "gstinterfaces-1.0", new String[] { "gstreamer-1.0" }, true },
{ "gstcontroller-1.0", new String[] { "gstreamer-1.0" }, true },
{ "gstaudio-1.0", new String[] { "gstbase-1.0" }, true },
{ "gstvideo-1.0", new String[] { "gstbase-1.0" }, true } };

static final Object[][] DEFAULT_DEPENDENCIES = {
{ "gstreamer-1.0", new String[] {}, true },
{ "gstbase-1.0", new String[] { "gstreamer-1.0" }, true },
{ "gstinterfaces-1.0", new String[] { "gstreamer-1.0" }, true },
{ "gstcontroller-1.0", new String[] { "gstreamer-1.0" }, true },
{ "gstaudio-1.0", new String[] { "gstbase-1.0" }, true },
{ "gstvideo-1.0", new String[] { "gstbase-1.0" }, true }, };
static final Object[][] MACOS_DEPENDENCIES = { };

static final Object[][] DEFAULT_DEPENDENCIES = { };

static final Object[][] dependencies =
Platform.isWindows() ? WINDOWS_DEPENDENCIES :
Expand Down
2 changes: 1 addition & 1 deletion src/processing/video/Movie.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
Part of the Processing project - http://processing.org
Copyright (c) 2012-19 The Processing Foundation
Copyright (c) 2012-22 The Processing Foundation
Copyright (c) 2004-12 Ben Fry and Casey Reas
GStreamer implementation ported from GSVideo library by Andres Colubri
The previous version of this code was developed by Hernando Barragan
Expand Down
Loading

0 comments on commit 3c2ca88

Please sign in to comment.