godot/modules/theora/video_stream_theora.cpp

/**************************************************************************/
/*  video_stream_theora.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_theora.h"

#include "core/config/project_settings.h"
#include "core/io/image.h"
#include "core/os/os.h"
#include "scene/resources/image_texture.h"

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4127)
#endif

#include "thirdparty/misc/yuv2rgb.h"

#ifdef _MSC_VER
#pragma warning(pop)
#endif

int VideoStreamPlaybackTheora::buffer_data() {}

int VideoStreamPlaybackTheora::queue_page(ogg_page *page) {}

void VideoStreamPlaybackTheora::video_write() {}

void VideoStreamPlaybackTheora::clear() {}

void VideoStreamPlaybackTheora::set_file(const String &p_file) {}

double VideoStreamPlaybackTheora::get_time() const {}

Ref<Texture2D> VideoStreamPlaybackTheora::get_texture() const {}

void VideoStreamPlaybackTheora::update(double p_delta) {}

void VideoStreamPlaybackTheora::play() {}

void VideoStreamPlaybackTheora::stop() {}

bool VideoStreamPlaybackTheora::is_playing() const {}

void VideoStreamPlaybackTheora::set_paused(bool p_paused) {}

bool VideoStreamPlaybackTheora::is_paused() const {}

double VideoStreamPlaybackTheora::get_length() const {}

double VideoStreamPlaybackTheora::get_playback_position() const {}

void VideoStreamPlaybackTheora::seek(double p_time) {}

int VideoStreamPlaybackTheora::get_channels() const {}

void VideoStreamPlaybackTheora::set_audio_track(int p_idx) {}

int VideoStreamPlaybackTheora::get_mix_rate() const {}

#ifdef THEORA_USE_THREAD_STREAMING

void VideoStreamPlaybackTheora::_streaming_thread(void *ud) {
	VideoStreamPlaybackTheora *vs = static_cast<VideoStreamPlaybackTheora *>(ud);

	while (!vs->thread_exit) {
		//just fill back the buffer
		if (!vs->thread_eof) {
			int to_read = vs->ring_buffer.space_left();
			if (to_read > 0) {
				uint64_t read = vs->file->get_buffer(vs->read_buffer.ptr(), to_read);
				vs->ring_buffer.write(vs->read_buffer.ptr(), read);
				vs->thread_eof = vs->file->eof_reached();
			}
		}

		vs->thread_sem->wait();
	}
}

#endif

VideoStreamPlaybackTheora::VideoStreamPlaybackTheora() {}

VideoStreamPlaybackTheora::~VideoStreamPlaybackTheora() {}

void VideoStreamTheora::_bind_methods() {}

Ref<Resource> ResourceFormatLoaderTheora::load(const String &p_path, const String &p_original_path, Error *r_error, bool p_use_sub_threads, float *r_progress, CacheMode p_cache_mode) {}

void ResourceFormatLoaderTheora::get_recognized_extensions(List<String> *p_extensions) const {}

bool ResourceFormatLoaderTheora::handles_type(const String &p_type) const {}

String ResourceFormatLoaderTheora::get_resource_type(const String &p_path) const {}