summaryrefslogtreecommitdiff
path: root/platform/android/os_android.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-03-13 22:57:24 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-03-13 22:57:24 -0300
commit31ce3c5fd0300aac1e86bced1efc5f9ec94bdb6b (patch)
treeb6d3a290333c72940b49ed4c930ff6858a59515e /platform/android/os_android.h
parenta65edb4caabec21654c56552e11aacf0fd9291de (diff)
-fix bug in cache for atlas import/export
-fix some menus -fixed bug in out transition curves -detect and remove file:/// in collada -remove multiscript for now -remove dependencies on mouse in OS, moved to Input -avoid fscache from screwing up (fix might make it slower, but it works) -funcref was missing, it's there now
Diffstat (limited to 'platform/android/os_android.h')
-rw-r--r--platform/android/os_android.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index 93c672927e..76139c8a2d 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -41,16 +41,19 @@
#ifdef ANDROID_NATIVE_ACTIVITY
-#include "audio_driver_android.h"
+
#include <android/sensor.h>
#include <android/log.h>
#include <android_native_app_glue.h>
#else
-#include "audio_driver_jandroid.h"
+
#endif
+#include "audio_driver_jandroid.h"
+#include "audio_driver_opensl.h"
+
typedef void (*GFXInitFunc)(void *ud,bool gl2);
typedef int (*OpenURIFunc)(const String&);
typedef String (*GetDataDirFunc)();
@@ -61,6 +64,11 @@ typedef void (*ShowVirtualKeyboardFunc)(const String&);
typedef void (*HideVirtualKeyboardFunc)();
typedef void (*SetScreenOrientationFunc)(int);
+typedef void (*VideoPlayFunc)(const String&);
+typedef bool (*VideoIsPlayingFunc)();
+typedef void (*VideoPauseFunc)();
+typedef void (*VideoStopFunc)();
+
class OS_Android : public OS_Unix {
public:
@@ -89,7 +97,12 @@ private:
SpatialSound2DServerSW *spatial_sound_2d_server;
PhysicsServer *physics_server;
Physics2DServer *physics_2d_server;
+#if 0
AudioDriverAndroid audio_driver_android;
+#else
+ AudioDriverOpenSL audio_driver_android;
+#endif
+
const char* gl_extensions;
InputDefault *input;
@@ -105,6 +118,11 @@ private:
SetScreenOrientationFunc set_screen_orientation_func;
GetUniqueIDFunc get_unique_id_func;
+ VideoPlayFunc video_play_func;
+ VideoIsPlayingFunc video_is_playing_func;
+ VideoPauseFunc video_pause_func;
+ VideoStopFunc video_stop_func;
+
public:
// functions used by main to initialize/deintialize the OS
@@ -189,7 +207,13 @@ public:
void process_touch(int p_what,int p_pointer, const Vector<TouchPos>& p_points);
void process_event(InputEvent p_event);
void init_video_mode(int p_video_width,int p_video_height);
- OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func,GetModelFunc p_get_model_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient,GetUniqueIDFunc p_get_unique_id);
+
+ virtual Error native_video_play(String p_path);
+ virtual bool native_video_is_playing();
+ virtual void native_video_pause();
+ virtual void native_video_stop();
+
+ OS_Android(GFXInitFunc p_gfx_init_func,void*p_gfx_init_ud, OpenURIFunc p_open_uri_func, GetDataDirFunc p_get_data_dir_func,GetLocaleFunc p_get_locale_func,GetModelFunc p_get_model_func, ShowVirtualKeyboardFunc p_show_vk, HideVirtualKeyboardFunc p_hide_vk, SetScreenOrientationFunc p_screen_orient,GetUniqueIDFunc p_get_unique_id, VideoPlayFunc p_video_play_func, VideoIsPlayingFunc p_video_is_playing_func, VideoPauseFunc p_video_pause_func, VideoStopFunc p_video_stop_func);
~OS_Android();
};