2013-02-16 01:21:43 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 00:50:59 +00:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2016-01-10 03:41:52 +00:00
|
|
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
2013-02-16 01:21:43 +00:00
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2013-07-14 11:09:53 +00:00
|
|
|
#ifndef RARCH_VIDEO_THREAD_H__
|
|
|
|
#define RARCH_VIDEO_THREAD_H__
|
|
|
|
|
2015-12-08 10:09:09 +00:00
|
|
|
#include <limits.h>
|
|
|
|
|
2014-10-21 03:05:52 +00:00
|
|
|
#include <boolean.h>
|
2016-06-03 03:43:49 +00:00
|
|
|
#include <retro_common_api.h>
|
2015-12-06 20:31:20 +00:00
|
|
|
|
2015-12-08 10:09:09 +00:00
|
|
|
#include "video_driver.h"
|
2017-01-19 15:30:40 +00:00
|
|
|
#include "font_driver.h"
|
2013-02-16 01:21:43 +00:00
|
|
|
|
2016-06-03 03:43:49 +00:00
|
|
|
RETRO_BEGIN_DECLS
|
2015-11-11 19:19:48 +00:00
|
|
|
|
2015-12-08 10:05:18 +00:00
|
|
|
typedef int (*custom_command_method_t)(void*);
|
|
|
|
|
|
|
|
typedef bool (*custom_font_command_method_t)(const void **font_driver,
|
|
|
|
void **font_handle, void *video_data, const char *font_path,
|
|
|
|
float font_size, enum font_driver_render_api api);
|
2015-11-11 19:19:48 +00:00
|
|
|
|
2015-12-08 10:09:09 +00:00
|
|
|
typedef struct thread_packet thread_packet_t;
|
2014-10-06 01:41:53 +00:00
|
|
|
|
2015-12-06 20:34:39 +00:00
|
|
|
typedef struct thread_video thread_video_t;
|
2015-05-20 19:58:22 +00:00
|
|
|
|
2015-01-11 20:51:18 +00:00
|
|
|
/**
|
2016-05-10 01:14:23 +00:00
|
|
|
* video_init_thread:
|
2015-01-11 20:51:18 +00:00
|
|
|
* @out_driver : Output video driver
|
|
|
|
* @out_data : Output video data
|
|
|
|
* @input : Input input driver
|
|
|
|
* @input_data : Input input data
|
|
|
|
* @driver : Input Video driver
|
|
|
|
* @info : Video info handle.
|
|
|
|
*
|
|
|
|
* Creates, initializes and starts a video driver in a new thread.
|
|
|
|
* Access to video driver will be mediated through this driver.
|
|
|
|
*
|
|
|
|
* Returns: true (1) if successful, otherwise false (0).
|
|
|
|
**/
|
2016-05-10 01:14:23 +00:00
|
|
|
bool video_init_thread(
|
2015-01-11 20:51:18 +00:00
|
|
|
const video_driver_t **out_driver, void **out_data,
|
|
|
|
const input_driver_t **input, void **input_data,
|
2017-01-16 17:02:28 +00:00
|
|
|
const video_driver_t *driver, const video_info_t info);
|
2015-01-11 20:51:18 +00:00
|
|
|
|
|
|
|
/**
|
2016-05-10 01:14:23 +00:00
|
|
|
* video_thread_get_ptr:
|
2015-01-11 20:51:18 +00:00
|
|
|
* @drv : Found driver.
|
|
|
|
*
|
|
|
|
* Gets the underlying video driver associated with the
|
|
|
|
* threaded video wrapper. Sets @drv to the found
|
|
|
|
* video driver.
|
|
|
|
*
|
|
|
|
* Returns: Video driver data of the video driver associated
|
|
|
|
* with the threaded wrapper (if successful). If not successful,
|
|
|
|
* NULL.
|
|
|
|
**/
|
2016-05-10 01:14:23 +00:00
|
|
|
void *video_thread_get_ptr(const video_driver_t **drv);
|
2015-01-11 20:51:18 +00:00
|
|
|
|
2016-05-10 01:14:23 +00:00
|
|
|
const char *video_thread_get_ident(void);
|
2015-12-08 11:55:43 +00:00
|
|
|
|
2016-05-10 01:14:23 +00:00
|
|
|
bool video_thread_font_init(
|
|
|
|
const void **font_driver,
|
2015-12-08 10:05:18 +00:00
|
|
|
void **font_handle,
|
2016-05-10 01:14:23 +00:00
|
|
|
void *data,
|
|
|
|
const char *font_path,
|
|
|
|
float font_size,
|
|
|
|
enum font_driver_render_api api,
|
|
|
|
custom_font_command_method_t func);
|
2015-12-08 10:05:18 +00:00
|
|
|
|
2016-05-10 01:14:23 +00:00
|
|
|
unsigned video_thread_texture_load(void *data,
|
2015-12-08 10:05:18 +00:00
|
|
|
custom_command_method_t func);
|
|
|
|
|
2016-06-03 03:43:49 +00:00
|
|
|
RETRO_END_DECLS
|
2013-07-14 11:09:53 +00:00
|
|
|
|
2015-11-11 19:19:48 +00:00
|
|
|
#endif
|