/**************************************************************************/ /* video_stream.cpp */ /**************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ /* https://godotengine.org */ /**************************************************************************/ /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */ /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ /* "Software"), to deal in the Software without restriction, including */ /* without limitation the rights to use, copy, modify, merge, publish, */ /* distribute, sublicense, and/or sell copies of the Software, and to */ /* permit persons to whom the Software is furnished to do so, subject to */ /* the following conditions: */ /* */ /* The above copyright notice and this permission notice shall be */ /* included in all copies or substantial portions of the Software. */ /* */ /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */ /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */ /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */ /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */ /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ #include "video_stream.h" #include "core/config/project_settings.h" #include "servers/audio_server.h" // VideoStreamPlayback starts here. void VideoStreamPlayback::_bind_methods() { … } VideoStreamPlayback::VideoStreamPlayback() { … } VideoStreamPlayback::~VideoStreamPlayback() { … } void VideoStreamPlayback::stop() { … } void VideoStreamPlayback::play() { … } bool VideoStreamPlayback::is_playing() const { … } void VideoStreamPlayback::set_paused(bool p_paused) { … } bool VideoStreamPlayback::is_paused() const { … } double VideoStreamPlayback::get_length() const { … } double VideoStreamPlayback::get_playback_position() const { … } void VideoStreamPlayback::seek(double p_time) { … } void VideoStreamPlayback::set_audio_track(int p_idx) { … } Ref<Texture2D> VideoStreamPlayback::get_texture() const { … } void VideoStreamPlayback::update(double p_delta) { … } void VideoStreamPlayback::set_mix_callback(AudioMixCallback p_callback, void *p_userdata) { … } int VideoStreamPlayback::get_channels() const { … } int VideoStreamPlayback::get_mix_rate() const { … } int VideoStreamPlayback::mix_audio(int num_frames, PackedFloat32Array buffer, int offset) { … } /* --- NOTE VideoStream starts here. ----- */ Ref<VideoStreamPlayback> VideoStream::instantiate_playback() { … } void VideoStream::set_file(const String &p_file) { … } String VideoStream::get_file() { … } void VideoStream::_bind_methods() { … } VideoStream::VideoStream() { … } VideoStream::~VideoStream() { … } void VideoStream::set_audio_track(int p_track) { … }