diff options
| author | Matt Hughes <mhughes@laughlin.com> | 2017-09-14 15:45:02 -0500 |
|---|---|---|
| committer | Hiroshi Ogawa <hi.ogawa.zz@gmail.com> | 2017-10-14 23:20:39 +0900 |
| commit | 3edd3cd377511b4cef27478be24f7562273d69ce (patch) | |
| tree | 204fcdded3bc7b46a6b559a5e5a44eba4244f25b /modules/webm/video_stream_webm.h | |
| parent | e8f8359b2edd583480218b7348cdbe43e959a16e (diff) | |
| download | redot-engine-3edd3cd377511b4cef27478be24f7562273d69ce.tar.gz | |
Fix video playback
This adds support to
- VideoPlayer
- VideoStreamWebm
- VideoStreamTheora
Diffstat (limited to 'modules/webm/video_stream_webm.h')
| -rw-r--r-- | modules/webm/video_stream_webm.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/modules/webm/video_stream_webm.h b/modules/webm/video_stream_webm.h index fc0720967a..f7dd16a38f 100644 --- a/modules/webm/video_stream_webm.h +++ b/modules/webm/video_stream_webm.h @@ -60,7 +60,7 @@ class VideoStreamPlaybackWebm : public VideoStreamPlayback { PoolVector<uint8_t> frame_data; Ref<ImageTexture> texture; - int16_t *pcm; + float *pcm; public: VideoStreamPlaybackWebm(); @@ -74,7 +74,7 @@ public: virtual bool is_playing() const; virtual void set_paused(bool p_paused); - virtual bool is_paused(bool p_paused) const; + virtual bool is_paused() const; virtual void set_loop(bool p_enable); virtual bool has_loop() const; @@ -95,6 +95,7 @@ public: private: inline bool has_enough_video_frames() const; + bool should_process(WebMFrame &video_frame); void delete_pointers(); }; @@ -103,27 +104,21 @@ private: class VideoStreamWebm : public VideoStream { - GDCLASS(VideoStreamWebm, VideoStream) + GDCLASS(VideoStreamWebm, VideoStream); + RES_BASE_EXTENSION("webmstr"); String file; int audio_track; +protected: + static void _bind_methods(); + public: VideoStreamWebm(); virtual Ref<VideoStreamPlayback> instance_playback(); virtual void set_file(const String &p_file); + String get_file(); virtual void set_audio_track(int p_track); }; - -/**/ - -class ResourceFormatLoaderVideoStreamWebm : public ResourceFormatLoader { - -public: - virtual RES load(const String &p_path, const String &p_original_path, Error *r_error); - virtual void get_recognized_extensions(List<String> *p_extensions) const; - virtual bool handles_type(const String &p_type) const; - virtual String get_resource_type(const String &p_path) const; -}; |
