mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
small code cleanup: *bool -> bool (fullscreen, videosync args)
This commit is contained in:
@@ -48,8 +48,8 @@ typedef enum videoflip_e {
|
||||
typedef struct video_renderer_s video_renderer_t;
|
||||
|
||||
void video_renderer_init (logger_t *logger, const char *server_name, videoflip_t videoflip[2], const char *parser,
|
||||
const char *decoder, const char *converter, const char *videosink, const bool *fullscreen,
|
||||
const bool *video_sync);
|
||||
const char *decoder, const char *converter, const char *videosink, const bool fullscreen,
|
||||
const bool video_sync);
|
||||
void video_renderer_start ();
|
||||
void video_renderer_stop ();
|
||||
void video_renderer_pause ();
|
||||
|
||||
@@ -129,8 +129,8 @@ void video_renderer_size(float *f_width_source, float *f_height_source, float *f
|
||||
}
|
||||
|
||||
void video_renderer_init(logger_t *render_logger, const char *server_name, videoflip_t videoflip[2], const char *parser,
|
||||
const char *decoder, const char *converter, const char *videosink, const bool *initial_fullscreen,
|
||||
const bool *video_sync) {
|
||||
const char *decoder, const char *converter, const char *videosink, const bool initial_fullscreen,
|
||||
const bool video_sync) {
|
||||
GError *error = NULL;
|
||||
GstCaps *caps = NULL;
|
||||
GstClock *clock = gst_system_clock_obtain();
|
||||
@@ -162,7 +162,7 @@ void video_renderer_init(logger_t *render_logger, const char *server_name, vide
|
||||
g_string_append(launch, " ! ");
|
||||
g_string_append(launch, "videoscale ! ");
|
||||
g_string_append(launch, videosink);
|
||||
if (*video_sync) {
|
||||
if (video_sync) {
|
||||
g_string_append(launch, " sync=true");
|
||||
sync = true;
|
||||
} else {
|
||||
@@ -188,7 +188,7 @@ void video_renderer_init(logger_t *render_logger, const char *server_name, vide
|
||||
|
||||
#ifdef X_DISPLAY_FIX
|
||||
renderer->use_x11 = (strstr(videosink, "xvimagesink") || strstr(videosink, "ximagesink") || auto_videosink);
|
||||
fullscreen = *initial_fullscreen;
|
||||
fullscreen = initial_fullscreen;
|
||||
renderer->server_name = server_name;
|
||||
renderer->gst_window = NULL;
|
||||
X11_search_attempts = 0;
|
||||
|
||||
@@ -2130,7 +2130,7 @@ int main (int argc, char *argv[]) {
|
||||
|
||||
if (use_video) {
|
||||
video_renderer_init(render_logger, server_name.c_str(), videoflip, video_parser.c_str(),
|
||||
video_decoder.c_str(), video_converter.c_str(), videosink.c_str(), &fullscreen, &video_sync);
|
||||
video_decoder.c_str(), video_converter.c_str(), videosink.c_str(), fullscreen, video_sync);
|
||||
video_renderer_start();
|
||||
}
|
||||
|
||||
@@ -2185,8 +2185,8 @@ int main (int argc, char *argv[]) {
|
||||
if (use_video && close_window) {
|
||||
video_renderer_destroy();
|
||||
video_renderer_init(render_logger, server_name.c_str(), videoflip, video_parser.c_str(),
|
||||
video_decoder.c_str(), video_converter.c_str(), videosink.c_str(), &fullscreen,
|
||||
&video_sync);
|
||||
video_decoder.c_str(), video_converter.c_str(), videosink.c_str(), fullscreen,
|
||||
video_sync);
|
||||
video_renderer_start();
|
||||
}
|
||||
if (relaunch_video) {
|
||||
|
||||
Reference in New Issue
Block a user