Esempio n. 1
0
    internal static void Ref(string gst_debug_string, GUBUnityDebugLogPFN log_handler)
    {
#if UNITY_ANDROID && !UNITY_EDITOR
        // Force loading of gstreamer_android.so before GstUnityBridge.so
        gst_android_get_application_class_loader();
        AndroidJNIHelper.debug = true;
        AndroidJavaClass  unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
        AndroidJavaObject activity    = unityPlayer.GetStatic <AndroidJavaObject>("currentActivity");
        AndroidJavaClass  gstAndroid  = new AndroidJavaClass("org.freedesktop.gstreamer.GStreamer");
        gstAndroid.CallStatic("init", activity);
#endif
        gub_log_set_unity_handler(log_handler);
        gub_ref(gst_debug_string, Application.isEditor ? 1 : 0);
    }
 extern static private void gub_log_set_unity_handler(GUBUnityDebugLogPFN pfn);
 internal static void Ref(string gst_debug_string, GUBUnityDebugLogPFN log_handler)
 {
     gub_log_set_unity_handler(log_handler);
     gub_ref(gst_debug_string);
 }
Esempio n. 4
0
 internal static void Ref(string gst_debug_string, GUBUnityDebugLogPFN log_handler)
 {
     #if UNITY_ANDROID
     // Force loading of gstreamer_android.so before GstUnityBridge.so
     gst_android_get_application_class_loader();
     AndroidJNIHelper.debug = true;
     AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
     AndroidJavaObject activity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity");
     AndroidJavaClass gstAndroid = new AndroidJavaClass("org.freedesktop.gstreamer.GStreamer");
     gstAndroid.CallStatic("init", activity);
     #endif
     gub_log_set_unity_handler(log_handler);
     gub_ref(gst_debug_string);
 }
Esempio n. 5
0
 private static extern void gub_log_set_unity_handler(GUBUnityDebugLogPFN pfn);