diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-09-15 11:33:30 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-09-15 11:33:30 -0300 |
commit | 8cab401d08f8e25aa9b2dc710204785858ff3dbb (patch) | |
tree | 1a4cec868f937fb24d340ee33fbeba2f1c6fa9f2 /scene/gui | |
parent | 1a2cb755e2d8b9d59178f36702f6dff7235b9088 (diff) |
3D Physics Rework, Other Stuff
-=-=-=-=-=-=-=-=-=-=-=-=-=-
3D Physics:
-Fixed "Bounce" parameter in 3D
-Fixed bug affecting Area (sometims it would not detect properly)
-Vehicle Body has seen heavy work
-Added Query API for doing space queries in 3D. Needs some docs though.
-Added JOINTS! Adapted Bullet Joints: and created easy gizmos for setting them up:
-PinJoint
-HingeJoint (with motor)
-SliderJoint
-ConeTwistJoint
-Generic6DOFJoint
-Added OBJECT PICKING! based on the new query API. Any physics object now (Area or Body) has the following signals and virtual functions:
-input_event (mouse or multitouch input over the body)
-mouse_enter (mouse entered the body area)
-mouse_exit (mouse exited body area)
For Area it needs to be activated manually, as it isn't by default (ray goes thru).
Other:
-Begun working on Windows 8 (RT) port. Compiles but does not work yet.
-Added TheoraPlayer library for improved to-texture and portable video support.
-Fixed a few bugs in the renderer, collada importer, collada exporter, etc.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/video_player.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index e3bb50a9af..9a1c070529 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -46,6 +46,7 @@ void VideoPlayer::_notification(int p_notification) { if (paused) return; + stream->update(get_scene()->get_idle_process_time()); while (stream->get_pending_frame_count()) { Image img = stream->pop_frame(); @@ -104,10 +105,6 @@ void VideoPlayer::set_stream(const Ref<VideoStream> &p_stream) { stop(); - if (stream_rid.is_valid()) - AudioServer::get_singleton()->free(stream_rid); - stream_rid=RID(); - texture = Ref<ImageTexture>(memnew(ImageTexture)); stream=p_stream; @@ -115,7 +112,6 @@ void VideoPlayer::set_stream(const Ref<VideoStream> &p_stream) { stream->set_loop(loops); stream->set_paused(paused); - stream_rid=AudioServer::get_singleton()->audio_stream_create(stream->get_audio_stream()); } }; @@ -131,8 +127,6 @@ void VideoPlayer::play() { if (stream.is_null()) return; stream->play(); - AudioServer::get_singleton()->stream_set_active(stream_rid,true); - AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); set_process(true); }; @@ -143,7 +137,6 @@ void VideoPlayer::stop() { if (stream.is_null()) return; - AudioServer::get_singleton()->stream_set_active(stream_rid,false); stream->stop(); set_process(false); }; @@ -173,8 +166,6 @@ bool VideoPlayer::is_paused() const { void VideoPlayer::set_volume(float p_vol) { volume=p_vol; - if (stream_rid.is_valid()) - AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); }; float VideoPlayer::get_volume() const { @@ -213,6 +204,7 @@ float VideoPlayer::get_pos() const { return stream->get_pos(); }; + void VideoPlayer::set_autoplay(bool p_enable) { autoplay=p_enable; @@ -253,7 +245,7 @@ void VideoPlayer::_bind_methods() { ObjectTypeDB::bind_method(_MD("has_expand"), &VideoPlayer::has_expand ); - ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"AudioStream"), _SCS("set_stream"), _SCS("get_stream") ); + ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"VideoStream"), _SCS("set_stream"), _SCS("get_stream") ); // ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/loop"), _SCS("set_loop"), _SCS("has_loop") ); ADD_PROPERTY( PropertyInfo(Variant::REAL, "stream/volume_db", PROPERTY_HINT_RANGE,"-80,24,0.01"), _SCS("set_volume_db"), _SCS("get_volume_db") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/autoplay"), _SCS("set_autoplay"), _SCS("has_autoplay") ); |