summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/bind/core_bind.cpp178
-rw-r--r--core/bind/core_bind.h57
-rw-r--r--core/engine.cpp102
-rw-r--r--core/engine.h67
-rw-r--r--core/os/os.cpp49
-rw-r--r--core/os/os.h34
-rw-r--r--core/register_core_types.cpp4
-rw-r--r--core/script_debugger_remote.cpp2
8 files changed, 346 insertions, 147 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 8f1c1779bd..80fe8b7c85 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -340,24 +340,6 @@ Array _OS::get_fullscreen_mode_list(int p_screen) const {
return vmarr;
}
-void _OS::set_iterations_per_second(int p_ips) {
-
- OS::get_singleton()->set_iterations_per_second(p_ips);
-}
-int _OS::get_iterations_per_second() const {
-
- return OS::get_singleton()->get_iterations_per_second();
-
-}
-
-void _OS::set_target_fps(int p_fps) {
- OS::get_singleton()->set_target_fps(p_fps);
-}
-
-float _OS::get_target_fps() const {
- return OS::get_singleton()->get_target_fps();
-}
-
void _OS::set_low_processor_usage_mode(bool p_enabled) {
OS::get_singleton()->set_low_processor_usage_mode(p_enabled);
@@ -452,19 +434,7 @@ String _OS::get_model_name() const {
return OS::get_singleton()->get_model_name();
}
-MainLoop *_OS::get_main_loop() const {
- return OS::get_singleton()->get_main_loop();
-}
-
-void _OS::set_time_scale(float p_scale) {
- OS::get_singleton()->set_time_scale(p_scale);
-}
-
-float _OS::get_time_scale() {
-
- return OS::get_singleton()->get_time_scale();
-}
bool _OS::is_ok_left_and_cancel_right() const {
@@ -804,10 +774,6 @@ bool _OS::can_draw() const {
return OS::get_singleton()->can_draw();
}
-int _OS::get_frames_drawn() {
-
- return OS::get_singleton()->get_frames_drawn();
-}
int _OS::get_processor_count() const {
@@ -936,11 +902,6 @@ String _OS::get_data_dir() const {
return OS::get_singleton()->get_data_dir();
};
-float _OS::get_frames_per_second() const {
-
- return OS::get_singleton()->get_frames_per_second();
-}
-
Error _OS::native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track) {
return OS::get_singleton()->native_video_play(p_path, p_volume, p_audio_track, p_subtitle_track);
@@ -1005,10 +966,7 @@ String _OS::get_system_dir(SystemDir p_dir) const {
return OS::get_singleton()->get_system_dir(OS::SystemDir(p_dir));
}
-String _OS::get_custom_level() const {
- return OS::get_singleton()->get_custom_level();
-}
String _OS::get_scancode_string(uint32_t p_code) const {
@@ -1079,13 +1037,6 @@ void _OS::_bind_methods() {
ClassDB::bind_method(_MD("set_keep_screen_on","enabled"),&_OS::set_keep_screen_on);
ClassDB::bind_method(_MD("is_keep_screen_on"),&_OS::is_keep_screen_on);
- ClassDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second);
- ClassDB::bind_method(_MD("get_iterations_per_second"),&_OS::get_iterations_per_second);
- ClassDB::bind_method(_MD("set_target_fps","target_fps"),&_OS::set_target_fps);
- ClassDB::bind_method(_MD("get_target_fps"),&_OS::get_target_fps);
-
- ClassDB::bind_method(_MD("set_time_scale","time_scale"),&_OS::set_time_scale);
- ClassDB::bind_method(_MD("get_time_scale"),&_OS::get_time_scale);
ClassDB::bind_method(_MD("has_touchscreen_ui_hint"),&_OS::has_touchscreen_ui_hint);
@@ -1107,7 +1058,6 @@ void _OS::_bind_methods() {
ClassDB::bind_method(_MD("get_name"),&_OS::get_name);
ClassDB::bind_method(_MD("get_cmdline_args"),&_OS::get_cmdline_args);
- ClassDB::bind_method(_MD("get_main_loop"),&_OS::get_main_loop);
ClassDB::bind_method(_MD("get_datetime","utc"),&_OS::get_datetime,DEFVAL(false));
ClassDB::bind_method(_MD("get_date","utc"),&_OS::get_date,DEFVAL(false));
@@ -1133,10 +1083,8 @@ void _OS::_bind_methods() {
ClassDB::bind_method(_MD("get_latin_keyboard_variant"),&_OS::get_latin_keyboard_variant);
ClassDB::bind_method(_MD("get_model_name"),&_OS::get_model_name);
- ClassDB::bind_method(_MD("get_custom_level"),&_OS::get_custom_level);
ClassDB::bind_method(_MD("can_draw"),&_OS::can_draw);
- ClassDB::bind_method(_MD("get_frames_drawn"),&_OS::get_frames_drawn);
ClassDB::bind_method(_MD("is_stdout_verbose"),&_OS::is_stdout_verbose);
ClassDB::bind_method(_MD("can_use_threads"),&_OS::can_use_threads);
@@ -1163,7 +1111,6 @@ void _OS::_bind_methods() {
ClassDB::bind_method(_MD("is_ok_left_and_cancel_right"),&_OS::is_ok_left_and_cancel_right);
- ClassDB::bind_method(_MD("get_frames_per_second"),&_OS::get_frames_per_second);
ClassDB::bind_method(_MD("print_all_textures_by_size"),&_OS::print_all_textures_by_size);
ClassDB::bind_method(_MD("print_resources_by_type","types"),&_OS::print_resources_by_type);
@@ -2596,3 +2543,128 @@ _ClassDB::~_ClassDB(){
}
+///////////////////////////////
+
+
+void _Engine::set_iterations_per_second(int p_ips) {
+
+ Engine::get_singleton()->set_iterations_per_second(p_ips);
+}
+int _Engine::get_iterations_per_second() const {
+
+ return Engine::get_singleton()->get_iterations_per_second();
+
+}
+
+void _Engine::set_target_fps(int p_fps) {
+ Engine::get_singleton()->set_target_fps(p_fps);
+}
+
+float _Engine::get_target_fps() const {
+ return Engine::get_singleton()->get_target_fps();
+}
+
+
+
+float _Engine::get_frames_per_second() const {
+
+ return Engine::get_singleton()->get_frames_per_second();
+}
+
+String _Engine::get_custom_level() const {
+
+ return Engine::get_singleton()->get_custom_level();
+}
+
+void _Engine::set_time_scale(float p_scale) {
+ Engine::get_singleton()->set_time_scale(p_scale);
+}
+
+float _Engine::get_time_scale() {
+
+ return Engine::get_singleton()->get_time_scale();
+}
+
+int _Engine::get_frames_drawn() {
+
+ return Engine::get_singleton()->get_frames_drawn();
+}
+
+MainLoop *_Engine::get_main_loop() const {
+
+ //needs to remain in OS, since it's actually OS that interacts with it, but it's better exposed here
+ return OS::get_singleton()->get_main_loop();
+}
+
+String _Engine::get_version() const {
+
+ return Engine::get_singleton()->get_version();
+}
+String _Engine::get_version_name() const{
+
+ return Engine::get_singleton()->get_version_name();
+}
+String _Engine::get_version_short_name() const{
+
+ return Engine::get_singleton()->get_version_short_name();
+}
+int _Engine::get_version_major() const{
+
+ return Engine::get_singleton()->get_version_major();
+
+}
+int _Engine::get_version_minor() const{
+
+ return Engine::get_singleton()->get_version_minor();
+
+}
+String _Engine::get_version_revision() const{
+
+ return Engine::get_singleton()->get_version_revision();
+
+}
+String _Engine::get_version_status() const{
+
+ return Engine::get_singleton()->get_version_status();
+
+}
+int _Engine::get_version_year() const{
+
+ return Engine::get_singleton()->get_version_year();
+
+}
+
+
+void _Engine::_bind_methods() {
+
+ ClassDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_Engine::set_iterations_per_second);
+ ClassDB::bind_method(_MD("get_iterations_per_second"),&_Engine::get_iterations_per_second);
+ ClassDB::bind_method(_MD("set_target_fps","target_fps"),&_Engine::set_target_fps);
+ ClassDB::bind_method(_MD("get_target_fps"),&_Engine::get_target_fps);
+
+ ClassDB::bind_method(_MD("set_time_scale","time_scale"),&_Engine::set_time_scale);
+ ClassDB::bind_method(_MD("get_time_scale"),&_Engine::get_time_scale);
+
+ ClassDB::bind_method(_MD("get_custom_level"),&_Engine::get_custom_level);
+
+ ClassDB::bind_method(_MD("get_frames_drawn"),&_Engine::get_frames_drawn);
+ ClassDB::bind_method(_MD("get_frames_per_second"),&_Engine::get_frames_per_second);
+
+ ClassDB::bind_method(_MD("get_main_loop:MainLoop"),&_Engine::get_main_loop);
+
+ ClassDB::bind_method(_MD("get_version"),&_Engine::get_version);
+ ClassDB::bind_method(_MD("get_version_name"),&_Engine::get_version_name);
+ ClassDB::bind_method(_MD("get_version_short_name"),&_Engine::get_version_short_name);
+ ClassDB::bind_method(_MD("get_version_major"),&_Engine::get_version_major);
+ ClassDB::bind_method(_MD("get_version_minor"),&_Engine::get_version_minor);
+ ClassDB::bind_method(_MD("get_version_revision"),&_Engine::get_version_revision);
+ ClassDB::bind_method(_MD("get_version_status"),&_Engine::get_version_status);
+ ClassDB::bind_method(_MD("get_version_year"),&_Engine::get_version_year);
+
+}
+
+_Engine *_Engine::singleton = NULL;
+
+_Engine::_Engine() {
+ singleton=this;
+}
diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h
index d491483d82..3401435c68 100644
--- a/core/bind/core_bind.h
+++ b/core/bind/core_bind.h
@@ -169,12 +169,6 @@ public:
void native_video_unpause();
void native_video_stop();
- void set_iterations_per_second(int p_ips);
- int get_iterations_per_second() const;
-
- void set_target_fps(int p_fps);
- float get_target_fps() const;
-
void set_low_processor_usage_mode(bool p_enabled);
bool is_in_low_processor_usage_mode() const;
@@ -196,11 +190,7 @@ public:
String get_latin_keyboard_variant() const;
String get_model_name() const;
- MainLoop *get_main_loop() const;
- String get_custom_level() const;
-
- float get_frames_per_second() const;
void dump_memory_to_file(const String& p_file);
void dump_resources_to_file(const String& p_file);
@@ -271,8 +261,6 @@ public:
bool can_draw() const;
- int get_frames_drawn();
-
bool is_stdout_verbose() const;
int get_processor_count() const;
@@ -313,8 +301,6 @@ public:
void set_keep_screen_on(bool p_enabled);
bool is_keep_screen_on() const;
- void set_time_scale(float p_scale);
- float get_time_scale();
bool is_ok_left_and_cancel_right() const;
@@ -632,4 +618,47 @@ public:
~_ClassDB();
};
+
+class _Engine : public Object {
+ GDCLASS(_Engine,Object);
+
+protected:
+
+ static void _bind_methods();
+ static _Engine *singleton;
+
+public:
+
+ static _Engine* get_singleton() { return singleton; }
+ void set_iterations_per_second(int p_ips);
+ int get_iterations_per_second() const;
+
+ void set_target_fps(int p_fps);
+ float get_target_fps() const;
+
+ float get_frames_per_second() const;
+
+ int get_frames_drawn();
+
+ void set_time_scale(float p_scale);
+ float get_time_scale();
+
+ String get_custom_level() const;
+
+ MainLoop *get_main_loop() const;
+
+ String get_version() const;
+ String get_version_name() const;
+ String get_version_short_name() const;
+ int get_version_major() const;
+ int get_version_minor() const;
+ String get_version_revision() const;
+ String get_version_status() const;
+ int get_version_year() const;
+
+
+ _Engine();
+};
+
+
#endif // CORE_BIND_H
diff --git a/core/engine.cpp b/core/engine.cpp
new file mode 100644
index 0000000000..c63ca59082
--- /dev/null
+++ b/core/engine.cpp
@@ -0,0 +1,102 @@
+#include "engine.h"
+#include "version.h"
+
+void Engine::set_iterations_per_second(int p_ips) {
+
+ ips=p_ips;
+}
+int Engine::get_iterations_per_second() const {
+
+ return ips;
+}
+
+void Engine::set_target_fps(int p_fps) {
+ _target_fps=p_fps>0? p_fps : 0;
+}
+
+float Engine::get_target_fps() const {
+ return _target_fps;
+}
+
+uint64_t Engine::get_frames_drawn() {
+
+ return frames_drawn;
+}
+
+void Engine::set_frame_delay(uint32_t p_msec) {
+
+ _frame_delay=p_msec;
+}
+
+uint32_t Engine::get_frame_delay() const {
+
+ return _frame_delay;
+}
+
+void Engine::set_time_scale(float p_scale) {
+
+ _time_scale=p_scale;
+}
+
+float Engine::get_time_scale() const {
+
+ return _time_scale;
+}
+
+
+String Engine::get_version() const {
+
+ return VERSION_FULL_NAME;
+}
+String Engine::get_version_name() const{
+
+ return _MKSTR(VERSION_NAME);
+}
+String Engine::get_version_short_name() const{
+
+ return _MKSTR(VERSION_SHORT_NAME);
+
+}
+int Engine::get_version_major() const{
+
+ return VERSION_MAJOR;
+}
+int Engine::get_version_minor() const{
+
+ return VERSION_MINOR;
+}
+String Engine::get_version_revision() const{
+
+ return _MKSTR(VERSION_REVISION);
+}
+String Engine::get_version_status() const{
+
+ return _MKSTR(VERSION_STATUS);
+}
+int Engine::get_version_year() const{
+
+ return VERSION_YEAR;
+}
+
+
+Engine *Engine::singleton=NULL;
+
+Engine *Engine::get_singleton() {
+ return singleton;
+}
+
+Engine::Engine()
+{
+
+ singleton=this;
+ frames_drawn=0;
+ ips=60;
+ _frame_delay=0;
+ _fps=1;
+ _target_fps=0;
+ _time_scale=1.0;
+ _pixel_snap=false;
+ _fixed_frames=0;
+ _idle_frames=0;
+ _in_fixed=false;
+}
diff --git a/core/engine.h b/core/engine.h
new file mode 100644
index 0000000000..8bcdb72e17
--- /dev/null
+++ b/core/engine.h
@@ -0,0 +1,67 @@
+#ifndef ENGINE_H
+#define ENGINE_H
+
+#include "ustring.h"
+#include "list.h"
+#include "vector.h"
+#include "os/main_loop.h"
+
+class Engine {
+
+friend class Main;
+
+ String _custom_level;
+ uint64_t frames_drawn;
+ uint32_t _frame_delay;
+
+ int ips;
+ float _fps;
+ int _target_fps;
+ float _time_scale;
+ bool _pixel_snap;
+ uint64_t _fixed_frames;
+ uint64_t _idle_frames;
+ bool _in_fixed;
+
+ static Engine *singleton;
+public:
+
+ static Engine *get_singleton();
+
+ virtual void set_iterations_per_second(int p_ips);
+ virtual int get_iterations_per_second() const;
+
+ virtual void set_target_fps(int p_fps);
+ virtual float get_target_fps() const;
+
+ virtual float get_frames_per_second() const { return _fps; }
+
+ String get_custom_level() const { return _custom_level; }
+
+ uint64_t get_frames_drawn();
+
+ uint64_t get_fixed_frames() const { return _fixed_frames; }
+ uint64_t get_idle_frames() const { return _idle_frames; }
+ bool is_in_fixed_frame() const { return _in_fixed; }
+
+ void set_time_scale(float p_scale);
+ float get_time_scale() const;
+
+ void set_frame_delay(uint32_t p_msec);
+ uint32_t get_frame_delay() const;
+
+ _FORCE_INLINE_ bool get_use_pixel_snap() const { return _pixel_snap; }
+
+ String get_version() const;
+ String get_version_name() const;
+ String get_version_short_name() const;
+ int get_version_major() const;
+ int get_version_minor() const;
+ String get_version_revision() const;
+ String get_version_status() const;
+ int get_version_year() const;
+
+ Engine();
+};
+
+#endif // ENGINE_H
diff --git a/core/os/os.cpp b/core/os/os.cpp
index 677bf63e69..db7b7cb943 100644
--- a/core/os/os.cpp
+++ b/core/os/os.cpp
@@ -98,23 +98,6 @@ void OS::printerr(const char* p_format, ...) {
};
-void OS::set_iterations_per_second(int p_ips) {
-
- ips=p_ips;
-}
-int OS::get_iterations_per_second() const {
-
- return ips;
-}
-
-void OS::set_target_fps(int p_fps) {
- _target_fps=p_fps>0? p_fps : 0;
-}
-
-float OS::get_target_fps() const {
- return _target_fps;
-}
-
void OS::set_keep_screen_on(bool p_enabled) {
_keep_screen_on=p_enabled;
}
@@ -152,10 +135,6 @@ int OS::get_process_ID() const {
return -1;
};
-uint64_t OS::get_frames_drawn() {
-
- return frames_drawn;
-}
bool OS::is_stdout_verbose() const {
@@ -261,15 +240,7 @@ void OS::clear_last_error() {
memfree(last_error);
last_error=NULL;
}
-void OS::set_frame_delay(uint32_t p_msec) {
- _frame_delay=p_msec;
-}
-
-uint32_t OS::get_frame_delay() const {
-
- return _frame_delay;
-}
void OS::set_no_window_mode(bool p_enable) {
@@ -513,20 +484,13 @@ OS::MouseMode OS::get_mouse_mode() const{
return MOUSE_MODE_VISIBLE;
}
-void OS::set_time_scale(float p_scale) {
-
- _time_scale=p_scale;
-}
OS::LatinKeyboardVariant OS::get_latin_keyboard_variant() const {
return LATIN_KEYBOARD_QWERTY;
}
-float OS::get_time_scale() const {
- return _time_scale;
-}
bool OS::is_joy_known(int p_device) {
return true;
@@ -572,25 +536,18 @@ Dictionary OS::get_engine_version() const {
OS::OS() {
last_error=NULL;
- frames_drawn=0;
singleton=this;
- ips=60;
_keep_screen_on=true; // set default value to true, because this had been true before godot 2.0.
low_processor_usage_mode=false;
_verbose_stdout=false;
- _frame_delay=0;
_no_window=false;
_exit_code=0;
_orientation=SCREEN_LANDSCAPE;
- _fps=1;
- _target_fps=0;
+
_render_thread_mode=RENDER_THREAD_SAFE;
- _time_scale=1.0;
- _pixel_snap=false;
+
+
_allow_hidpi=true;
- _fixed_frames=0;
- _idle_frames=0;
- _in_fixed=false;
Math::seed(1234567);
}
diff --git a/core/os/os.h b/core/os/os.h
index 5ea3216f24..4c34ff92f9 100644
--- a/core/os/os.h
+++ b/core/os/os.h
@@ -32,6 +32,7 @@
#include "ustring.h"
#include "list.h"
#include "vector.h"
+#include "engine.h"
#include "os/main_loop.h"
#include <stdarg.h>
@@ -43,28 +44,17 @@ class OS {
static OS* singleton;
String _execpath;
- String _custom_level;
List<String> _cmdline;
- int ips;
bool _keep_screen_on;
bool low_processor_usage_mode;
bool _verbose_stdout;
String _local_clipboard;
- uint64_t frames_drawn;
- uint32_t _frame_delay;
uint64_t _msec_splash;
bool _no_window;
int _exit_code;
int _orientation;
- float _fps;
- int _target_fps;
- float _time_scale;
- bool _pixel_snap;
bool _allow_hidpi;
- uint64_t _fixed_frames;
- uint64_t _idle_frames;
- bool _in_fixed;
char *last_error;
@@ -185,15 +175,6 @@ public:
virtual bool get_borderless_window() { return 0; }
-
- virtual void set_iterations_per_second(int p_ips);
- virtual int get_iterations_per_second() const;
-
- virtual void set_target_fps(int p_fps);
- virtual float get_target_fps() const;
-
- virtual float get_frames_per_second() const { return _fps; }
-
virtual void set_keep_screen_on(bool p_enabled);
virtual bool is_keep_screen_on() const;
virtual void set_low_processor_usage_mode(bool p_enabled);
@@ -217,7 +198,6 @@ public:
virtual MainLoop *get_main_loop() const=0;
- String get_custom_level() const { return _custom_level; }
virtual void yield();
@@ -280,17 +260,9 @@ public:
uint32_t get_ticks_msec() const;
uint64_t get_splash_tick_msec() const;
- void set_frame_delay(uint32_t p_msec);
- uint32_t get_frame_delay() const;
virtual bool can_draw() const = 0;
- uint64_t get_frames_drawn();
-
- uint64_t get_fixed_frames() const { return _fixed_frames; }
- uint64_t get_idle_frames() const { return _idle_frames; }
- bool is_in_fixed_frame() const { return _in_fixed; }
-
bool is_stdout_verbose() const;
enum CursorShape {
@@ -416,10 +388,6 @@ public:
virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
- void set_time_scale(float p_scale);
- float get_time_scale() const;
-
- _FORCE_INLINE_ bool get_use_pixel_snap() const { return _pixel_snap; }
virtual bool is_joy_known(int p_device);
virtual String get_joy_guid(int p_device)const;
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index fe88d1d13d..d97323a95e 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -62,6 +62,7 @@ static ResourceFormatLoaderBinary *resource_loader_binary=NULL;
static _ResourceLoader *_resource_loader=NULL;
static _ResourceSaver *_resource_saver=NULL;
static _OS *_os=NULL;
+static _Engine *_engine=NULL;
static _ClassDB *_classdb=NULL;
static _Marshalls *_marshalls = NULL;
static TranslationLoaderPO *resource_format_po=NULL;
@@ -156,6 +157,7 @@ void register_core_types() {
_resource_loader=memnew(_ResourceLoader);
_resource_saver=memnew(_ResourceSaver);
_os=memnew(_OS);
+ _engine=memnew(_Engine);
_classdb=memnew(_ClassDB);
_marshalls = memnew(_Marshalls);
@@ -179,6 +181,7 @@ void register_core_singletons() {
GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("ResourceSaver",_ResourceSaver::get_singleton()) );
GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("PathRemap",PathRemap::get_singleton() ) );
GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("OS",_OS::get_singleton() ) );
+ GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("Engine",_Engine::get_singleton() ) );
GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("ClassDB",_classdb ) );
GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("Marshalls",_Marshalls::get_singleton() ) );
GlobalConfig::get_singleton()->add_singleton( GlobalConfig::Singleton("TranslationServer",TranslationServer::get_singleton() ) );
@@ -196,6 +199,7 @@ void unregister_core_types() {
memdelete( _resource_loader );
memdelete( _resource_saver );
memdelete( _os);
+ memdelete( _engine );
memdelete( _classdb );
memdelete( _marshalls );
diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp
index 62fcd5247f..a120a28896 100644
--- a/core/script_debugger_remote.cpp
+++ b/core/script_debugger_remote.cpp
@@ -778,7 +778,7 @@ void ScriptDebuggerRemote::_send_profiling_data(bool p_for_frame) {
}
- packet_peer_stream->put_var(OS::get_singleton()->get_frames_drawn()); //total frame time
+ packet_peer_stream->put_var(Engine::get_singleton()->get_frames_drawn()); //total frame time
packet_peer_stream->put_var(frame_time); //total frame time
packet_peer_stream->put_var(idle_time); //idle frame time
packet_peer_stream->put_var(fixed_time); //fixed frame time