1 /**
2 $(D VideoStream) resource for WebM videos.
3 
4 Copyright:
5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.  
6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)  
7 Copyright (c) 2017-2018 Godot-D contributors  
8 
9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License)
10 
11 
12 */
13 module godot.videostreamwebm;
14 import std.meta : AliasSeq, staticIndexOf;
15 import std.traits : Unqual;
16 import godot.d.traits;
17 import godot.core;
18 import godot.c;
19 import godot.d.bind;
20 import godot.d.reference;
21 import godot.globalenums;
22 import godot.object;
23 import godot.classdb;
24 import godot.videostream;
25 import godot.resource;
26 import godot.reference;
27 /**
28 $(D VideoStream) resource for WebM videos.
29 
30 $(D VideoStream) resource handling the $(D url=https://www.webmproject.org/)WebM$(D /url) video format with `.webm` extension. Both the VP8 and VP9 codecs are supported. The VP8 and VP9 codecs are more efficient than $(D VideoStreamTheora), but they require more CPU resources to decode (especially VP9). Both the VP8 and VP9 codecs are decoded on the CPU.
31 $(B Note:) Alpha channel (also known as transparency) is not supported. The video will always appear to have a black background, even if it originally contains an alpha channel.
32 $(B Note:) There are known bugs and performance issues with WebM video playback in Godot. If you run into problems, try using the Ogg Theora format instead: $(D VideoStreamTheora)
33 */
34 @GodotBaseClass struct VideoStreamWebm
35 {
36 	package(godot) enum string _GODOT_internal_name = "VideoStreamWebm";
37 public:
38 @nogc nothrow:
39 	union { /** */ godot_object _godot_object; /** */ VideoStream _GODOT_base; }
40 	alias _GODOT_base this;
41 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
42 	package(godot) __gshared bool _classBindingInitialized = false;
43 	package(godot) static struct GDNativeClassBinding
44 	{
45 		__gshared:
46 		@GodotName("get_file") GodotMethod!(String) getFile;
47 		@GodotName("set_file") GodotMethod!(void, String) setFile;
48 	}
49 	/// 
50 	pragma(inline, true) bool opEquals(in VideoStreamWebm other) const
51 	{ return _godot_object.ptr is other._godot_object.ptr; }
52 	/// 
53 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
54 	{ _godot_object.ptr = n; return null; }
55 	/// 
56 	pragma(inline, true) bool opEquals(typeof(null) n) const
57 	{ return _godot_object.ptr is n; }
58 	/// 
59 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
60 	mixin baseCasts;
61 	/// Construct a new instance of VideoStreamWebm.
62 	/// Note: use `memnew!VideoStreamWebm` instead.
63 	static VideoStreamWebm _new()
64 	{
65 		static godot_class_constructor constructor;
66 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VideoStreamWebm");
67 		if(constructor is null) return typeof(this).init;
68 		return cast(VideoStreamWebm)(constructor());
69 	}
70 	@disable new(size_t s);
71 	/**
72 	Returns the WebM video file handled by this $(D VideoStreamWebm).
73 	*/
74 	String getFile()
75 	{
76 		checkClassBinding!(typeof(this))();
77 		return ptrcall!(String)(GDNativeClassBinding.getFile, _godot_object);
78 	}
79 	/**
80 	Sets the WebM video file that this $(D VideoStreamWebm) resource handles. The `file` name should have the `.webm` extension.
81 	*/
82 	void setFile(in String file)
83 	{
84 		checkClassBinding!(typeof(this))();
85 		ptrcall!(void)(GDNativeClassBinding.setFile, _godot_object, file);
86 	}
87 	/**
88 	
89 	*/
90 	@property String file()
91 	{
92 		return getFile();
93 	}
94 	/// ditto
95 	@property void file(String v)
96 	{
97 		setFile(v);
98 	}
99 }