Open Class Propertymigueldeicaza.swiftgodot 0.45.0SwiftGodot
godotClassName
MovieWriter.swift:25override class var godotClassName: StringName { get }
Overrides
Other members in extension
Type members
static func addWriter(MovieWriter?
) Adds a writer to be usable by the engine. The supported file extensions can be set by overriding
_handlesFile(path:)
.
Instance members
Show implementation details (6)
Hide implementation details
func _getAudioMixRate(
) -> UInt32 Called when the audio sample rate used for recording the audio is requested by the engine. The value returned must be specified in Hz. Defaults to 48000 Hz if
_getAudioMixRate
is not overridden.func _getAudioSpeakerMode(
) -> AudioServer.SpeakerMode Called when the audio speaker mode used for recording the audio is requested by the engine. This can affect the number of output channels in the resulting audio file/stream. Defaults to
AudioServer/SpeakerMode/stereo
if_getAudioSpeakerMode
is not overridden.func _handlesFile(path: String
) -> Bool Called when the engine determines whether this
MovieWriter
is able to handle the file atpath
. Must returntrue
if thisMovieWriter
is able to handle the given file path,false
otherwise. Typically,_handlesFile(path:)
is overridden as follows to allow the user to record a file at any path with a given file extension:func _writeBegin(movieSize: Vector2i, fps: UInt32, basePath: String
) -> GodotError Called once before the engine starts writing video and audio data.
movieSize
is the width and height of the video to save.fps
is the number of frames per second specified in the project settings or using the--fixed-fps <fps>
command line argument.func _writeEnd(
) Called when the engine finishes writing. This occurs when the engine quits by pressing the window manager’s close button, or when
quit(exitCode:)
is called.func _writeFrame(frameImage: Image?, audioFrameBlock: OpaquePointer?
) -> GodotError Called at the end of every rendered frame. The
frameImage
andaudioFrameBlock
function arguments should be written to.