aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/video_player.h
diff options
context:
space:
mode:
authorRémi Verschelde2017-03-05 16:44:50 +0100
committerRémi Verschelde2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/gui/video_player.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadgodot-5dbf180.tar.gz
godot-5dbf180.tar.zst
godot-5dbf180.zip
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
Diffstat (limited to 'scene/gui/video_player.h')
-rw-r--r--scene/gui/video_player.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/scene/gui/video_player.h b/scene/gui/video_player.h
index 168ea805b..4f2894cdc 100644
--- a/scene/gui/video_player.h
+++ b/scene/gui/video_player.h
@@ -29,15 +29,15 @@
#ifndef VIDEO_PLAYER_H
#define VIDEO_PLAYER_H
-#include "scene/resources/video_stream.h"
#include "scene/gui/control.h"
+#include "scene/resources/video_stream.h"
#include "servers/audio/audio_rb_resampler.h"
class VideoPlayer : public Control {
- GDCLASS(VideoPlayer,Control);
+ GDCLASS(VideoPlayer, Control);
-/* struct InternalStream : public AudioServer::AudioStream {
+ /* struct InternalStream : public AudioServer::AudioStream {
VideoPlayer *player;
virtual int get_channel_count() const;
virtual void set_mix_rate(int p_rate); //notify the stream of the mix rate
@@ -46,16 +46,15 @@ class VideoPlayer : public Control {
};
*/
-// InternalStream internal_stream;
+ // InternalStream internal_stream;
Ref<VideoStreamPlayback> playback;
Ref<VideoStream> stream;
int sp_get_channel_count() const;
void sp_set_mix_rate(int p_rate); //notify the stream of the mix rate
- bool sp_mix(int32_t *p_buffer,int p_frames);
+ bool sp_mix(int32_t *p_buffer, int p_frames);
void sp_update();
-
RID stream_rid;
Ref<ImageTexture> texture;
@@ -70,24 +69,20 @@ class VideoPlayer : public Control {
bool expand;
bool loops;
int buffering_ms;
- int server_mix_rate;
- int audio_track;
-
- static int _audio_mix_callback(void* p_udata,const int16_t *p_data,int p_frames);
+ int server_mix_rate;
+ int audio_track;
+ static int _audio_mix_callback(void *p_udata, const int16_t *p_data, int p_frames);
protected:
-
static void _bind_methods();
void _notification(int p_notification);
public:
-
Size2 get_minimum_size() const;
void set_expand(bool p_expand);
bool has_expand() const;
-
Ref<Texture> get_video_texture();
void set_stream(const Ref<VideoStream> &p_stream);