mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-20 21:40:15 +00:00
spout cap.: improvements
- removed inclusion of config*.h - use Sleep instead of usleep - subsequent improves in gl_common.h (removed config*.h)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* @author Martin Pulec <martin.pulec@cesnet.cz>
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2012-2013 CESNET, z. s. p. o.
|
||||
* Copyright (c) 2012-2023 CESNET, z. s. p. o.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -38,19 +38,13 @@
|
||||
#ifndef _GL_CONTEXT_H_
|
||||
#define _GL_CONTEXT_H_
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "config_win32.h"
|
||||
#include "config_unix.h"
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#if defined HAVE_LINUX || defined WIN32
|
||||
#if defined __linux__ || defined _WIN32
|
||||
#include <GL/glew.h>
|
||||
#else
|
||||
#include <OpenGL/GL.h>
|
||||
#endif /* HAVE_LINUX */
|
||||
|
||||
#ifdef HAVE_MACOSX
|
||||
#ifdef __APPLE__
|
||||
#include <Availability.h>
|
||||
#endif
|
||||
|
||||
@@ -58,7 +52,7 @@
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#if defined HAVE_MACOSX && ! defined __MAC_10_8
|
||||
#if defined __APPLE__ && ! defined __MAC_10_8
|
||||
#define glGenFramebuffers glGenFramebuffersEXT
|
||||
#define glBindFramebuffer glBindFramebufferEXT
|
||||
#define GL_FRAMEBUFFER GL_FRAMEBUFFER_EXT
|
||||
|
||||
@@ -35,22 +35,18 @@
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#include "config_unix.h"
|
||||
#include "config_win32.h"
|
||||
#endif
|
||||
|
||||
#include "gl_context.h" // it looks like it needs to be included prior to Spout.h
|
||||
|
||||
#include <array>
|
||||
#include <cctype>
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <SpoutLibrary.h>
|
||||
#include <synchapi.h>
|
||||
#include <string>
|
||||
|
||||
#include "debug.h"
|
||||
#include "gl_context.h"
|
||||
#include "host.h"
|
||||
#include "lib_common.h"
|
||||
#include "spout_sender.h" // spout_set_log_level
|
||||
@@ -214,7 +210,7 @@ static void vidcap_spout_done(void *state)
|
||||
static struct video_frame *vidcap_spout_grab(void *state, struct audio_frame **audio)
|
||||
{
|
||||
enum {
|
||||
MS100_IN_US = 100 * 1000,
|
||||
MS100 = 100,
|
||||
};
|
||||
state_vidcap_spout *s = (state_vidcap_spout *) state;
|
||||
|
||||
@@ -227,7 +223,7 @@ static struct video_frame *vidcap_spout_grab(void *state, struct audio_frame **a
|
||||
vf_free(out);
|
||||
gl_context_make_current(NULL);
|
||||
MSG(WARNING, "No signal detected...\n");
|
||||
usleep(MS100_IN_US);
|
||||
Sleep(MS100);
|
||||
return NULL;
|
||||
}
|
||||
if (s->spout_state->IsUpdated()) {
|
||||
|
||||
Reference in New Issue
Block a user