From 9ddf9b01cb75cdcc55c85408e625041ac4012b26 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 11 Jan 2015 21:51:18 +0100 Subject: [PATCH] (video_thread_wrapper.c) Document video_thread_wrapper.c --- gfx/video_thread_wrapper.c | 26 +++++++++++++++++++++++ gfx/video_thread_wrapper.h | 42 ++++++++++++++++++++++++++++++-------- 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/gfx/video_thread_wrapper.c b/gfx/video_thread_wrapper.c index c744649424..9ae95cc977 100644 --- a/gfx/video_thread_wrapper.c +++ b/gfx/video_thread_wrapper.c @@ -910,6 +910,20 @@ static void thread_set_callbacks(thread_video_t *thr, thr->video_thread.poke_interface = NULL; } +/** + * rarch_threaded_video_init: + * @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). + **/ bool rarch_threaded_video_init(const video_driver_t **out_driver, void **out_data, const input_driver_t **input, void **input_data, const video_driver_t *drv, const video_info_t *info) @@ -926,6 +940,18 @@ bool rarch_threaded_video_init(const video_driver_t **out_driver, return thread_init(thr, info, input, input_data); } +/** + * rarch_threaded_video_resolve: + * @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. + **/ void *rarch_threaded_video_resolve(const video_driver_t **drv) { const thread_video_t *thr = (const thread_video_t*)driver.video_data; diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index 057a361024..6f53f2d406 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -23,15 +23,6 @@ #include #include "fonts/gl_font.h" -/* Starts a video driver in a new thread. - * Access to video driver will be mediated through this driver. */ -bool rarch_threaded_video_init( - const video_driver_t **out_driver, void **out_data, - const input_driver_t **input, void **input_data, - const video_driver_t *driver, const video_info_t *info); - -void *rarch_threaded_video_resolve(const video_driver_t **drv); - enum thread_cmd { CMD_NONE = 0, @@ -195,5 +186,38 @@ typedef struct thread_video } thread_video_t; +/** + * rarch_threaded_video_init: + * @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). + **/ +bool rarch_threaded_video_init( + const video_driver_t **out_driver, void **out_data, + const input_driver_t **input, void **input_data, + const video_driver_t *driver, const video_info_t *info); + +/** + * rarch_threaded_video_resolve: + * @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. + **/ +void *rarch_threaded_video_resolve(const video_driver_t **drv); + #endif