1 /**
2 $(D VideoStream) resource for Ogg Theora 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.videostreamtheora;
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 Ogg Theora videos.
29 
30 $(D VideoStream) resource handling the $(D url=https://www.theora.org/)Ogg Theora$(D /url) video format with `.ogv` extension. The Theora codec is less efficient than $(D VideoStreamWebm)'s VP8 and VP9, but it requires less CPU resources to decode. The Theora codec is decoded on the CPU.
31 $(B Note:) While Ogg Theora videos can also have an `.ogg` extension, you will have to rename the extension to `.ogv` to use those videos within Godot.
32 */
33 @GodotBaseClass struct VideoStreamTheora
34 {
35 	package(godot) enum string _GODOT_internal_name = "VideoStreamTheora";
36 public:
37 @nogc nothrow:
38 	union { /** */ godot_object _godot_object; /** */ VideoStream _GODOT_base; }
39 	alias _GODOT_base this;
40 	alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses);
41 	package(godot) __gshared bool _classBindingInitialized = false;
42 	package(godot) static struct GDNativeClassBinding
43 	{
44 		__gshared:
45 		@GodotName("get_file") GodotMethod!(String) getFile;
46 		@GodotName("set_file") GodotMethod!(void, String) setFile;
47 	}
48 	/// 
49 	pragma(inline, true) bool opEquals(in VideoStreamTheora other) const
50 	{ return _godot_object.ptr is other._godot_object.ptr; }
51 	/// 
52 	pragma(inline, true) typeof(null) opAssign(typeof(null) n)
53 	{ _godot_object.ptr = n; return null; }
54 	/// 
55 	pragma(inline, true) bool opEquals(typeof(null) n) const
56 	{ return _godot_object.ptr is n; }
57 	/// 
58 	size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; }
59 	mixin baseCasts;
60 	/// Construct a new instance of VideoStreamTheora.
61 	/// Note: use `memnew!VideoStreamTheora` instead.
62 	static VideoStreamTheora _new()
63 	{
64 		static godot_class_constructor constructor;
65 		if(constructor is null) constructor = _godot_api.godot_get_class_constructor("VideoStreamTheora");
66 		if(constructor is null) return typeof(this).init;
67 		return cast(VideoStreamTheora)(constructor());
68 	}
69 	@disable new(size_t s);
70 	/**
71 	Returns the Ogg Theora video file handled by this $(D VideoStreamTheora).
72 	*/
73 	String getFile()
74 	{
75 		checkClassBinding!(typeof(this))();
76 		return ptrcall!(String)(GDNativeClassBinding.getFile, _godot_object);
77 	}
78 	/**
79 	Sets the Ogg Theora video file that this $(D VideoStreamTheora) resource handles. The `file` name should have the `.ogv` extension.
80 	*/
81 	void setFile(in String file)
82 	{
83 		checkClassBinding!(typeof(this))();
84 		ptrcall!(void)(GDNativeClassBinding.setFile, _godot_object, file);
85 	}
86 	/**
87 	
88 	*/
89 	@property String file()
90 	{
91 		return getFile();
92 	}
93 	/// ditto
94 	@property void file(String v)
95 	{
96 		setFile(v);
97 	}
98 }