summaryrefslogtreecommitdiff
path: root/scene/resources/video_stream.h
diff options
context:
space:
mode:
authorMarianoGNU <marianognu.easyrpg@gmail.com>2015-10-16 23:21:39 -0300
committerMarianoGNU <marianognu.easyrpg@gmail.com>2015-10-16 23:21:39 -0300
commita5ebb525000d8301f73377426a2c1924d70aaf86 (patch)
tree55eaf1e0e6553dbb34d236b07a051689ae8f2493 /scene/resources/video_stream.h
parent553edf1f250f34ca0ef0703b13b4d601f609e491 (diff)
parent17a90ddc0824bb51b5ea707f5d4d11aed301f91d (diff)
Merge branch 'master' of https://github.com/okamstudio/godot
# Solved Conflicts: # tools/editor/property_editor.cpp
Diffstat (limited to 'scene/resources/video_stream.h')
-rw-r--r--scene/resources/video_stream.h36
1 files changed, 28 insertions, 8 deletions
diff --git a/scene/resources/video_stream.h b/scene/resources/video_stream.h
index 2ad7457ec4..a23ef0c64f 100644
--- a/scene/resources/video_stream.h
+++ b/scene/resources/video_stream.h
@@ -33,15 +33,17 @@
#include "scene/resources/texture.h"
-class VideoStream : public Resource {
+class VideoStreamPlayback : public Resource {
- OBJ_TYPE(VideoStream,Resource);
+ OBJ_TYPE(VideoStreamPlayback,Resource);
protected:
static void _bind_methods();
public:
+ typedef int (*AudioMixCallback)(void* p_udata,const int16_t *p_data,int p_frames);
+
virtual void stop()=0;
virtual void play()=0;
@@ -58,16 +60,34 @@ public:
virtual float get_pos() const=0;
virtual void seek_pos(float p_time)=0;
- virtual int get_pending_frame_count() const=0;
- virtual void pop_frame(Ref<ImageTexture> p_tex)=0;
- virtual Image peek_frame() const=0;
-
virtual void set_audio_track(int p_idx) =0;
- virtual void update(float p_time)=0;
+ //virtual int mix(int16_t* p_bufer,int p_frames)=0;
+
+ virtual Ref<Texture> get_texture()=0;
+ virtual void update(float p_delta)=0;
- VideoStream();
+ virtual void set_mix_callback(AudioMixCallback p_callback,void *p_userdata)=0;
+ virtual int get_channels() const=0;
+ virtual int get_mix_rate() const=0;
+
+ VideoStreamPlayback();
};
+
+class VideoStream : public Resource {
+
+ OBJ_TYPE( VideoStream, Resource );
+ OBJ_SAVE_TYPE( VideoStream ); //children are all saved as AudioStream, so they can be exchanged
+
+public:
+
+ virtual void set_audio_track(int p_track)=0;
+ virtual Ref<VideoStreamPlayback> instance_playback()=0;
+
+ VideoStream() {}
+};
+
+
#endif