From 4b866d2686ab9c3fd7cf6708925b4663ad81e359 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 11 Sep 2013 20:23:32 +0200 Subject: Relocate FFMPEGNatives.initIDS0() -> FFMPEGStaticNatives.initIDS0(); Cleanup up warnings and includes (clang). --- .../jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java | 4 ++-- src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java | 2 +- src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java | 1 - src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java | 2 ++ src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java | 3 --- src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java | 3 --- src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java | 3 --- 7 files changed, 5 insertions(+), 13 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/util/av') diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java index 400788a24..146a47ebc 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGDynamicLibraryBundleInfo.java @@ -226,8 +226,8 @@ class FFMPEGDynamicLibraryBundleInfo implements DynamicLibraryBundleInfo { } else { System.err.println("LIB_AV No Version/Native-Impl Match"); natives = null; - } - if( null != natives ) { + } + if( null != natives && FFMPEGStaticNatives.initIDs0() ) { ready = natives.initSymbols0(symbolAddr, symbolCount); } else { ready = false; diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java index 33b1867c8..f028d7f9c 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java @@ -208,7 +208,7 @@ public class FFMPEGMediaPlayer extends GLMediaPlayerImpl { swResampleMajorVersionCC = 0; libAVVersionGood = false; } - available = libAVGood && libAVVersionGood && null != natives ? natives.initIDs0() : false; + available = libAVGood && libAVVersionGood && null != natives; } public static final boolean isAvailable() { return available; } diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java index b919f22c7..77cf4ff77 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGNatives.java @@ -37,7 +37,6 @@ interface FFMPEGNatives { int getAvCodecMajorVersionCC0(); int getAvResampleMajorVersionCC0(); int getSwResampleMajorVersionCC0(); - boolean initIDs0(); long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose); void destroyInstance0(long moviePtr); diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java index 16ee2dd4b..01c249313 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGStaticNatives.java @@ -35,5 +35,7 @@ class FFMPEGStaticNatives { ( vers >> 8 ) & 0xFF, ( vers >> 0 ) & 0xFF ); } + static native boolean initIDs0(); + static native int getAvVersion0(long func); } diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java index 2a0c9dc3d..22694888d 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv08Natives.java @@ -46,9 +46,6 @@ class FFMPEGv08Natives implements FFMPEGNatives { @Override public native int getSwResampleMajorVersionCC0(); - @Override - public native boolean initIDs0(); - @Override public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose); diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java index 422f1ceb0..08e19d5e6 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv09Natives.java @@ -46,9 +46,6 @@ class FFMPEGv09Natives implements FFMPEGNatives { @Override public native int getSwResampleMajorVersionCC0(); - @Override - public native boolean initIDs0(); - @Override public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose); diff --git a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java index e3007ab69..0081743fa 100644 --- a/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java +++ b/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGv10Natives.java @@ -46,9 +46,6 @@ class FFMPEGv10Natives implements FFMPEGNatives { @Override public native int getSwResampleMajorVersionCC0(); - @Override - public native boolean initIDs0(); - @Override public native long createInstance0(FFMPEGMediaPlayer upstream, boolean verbose); -- cgit v1.2.3