From patchwork Wed Aug 30 12:09:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2zDqW1lbnQgQsWTc2No?= X-Patchwork-Id: 4898 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.15.201 with SMTP id 70csp448342jao; Wed, 30 Aug 2017 05:10:17 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7QRMMWvaogEq8VU9e1AMRoemb4pMgyR5jUgZc4cHZEuZ69tF3UVsPnl62jdoGQIQp9Xvis X-Received: by 10.28.181.15 with SMTP id e15mr1158431wmf.97.1504095017061; Wed, 30 Aug 2017 05:10:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504095017; cv=none; d=google.com; s=arc-20160816; b=Q4xou0qmxsvd4ja7ogd5tINDBTmxqU8sXoFqjyr0Wv/Gh6t3WeqGXnKTciB8topI4n RR069XsHg1aEM+1WKxAjLMwD2oB8efU3BCfsrQpZcU/o003L5YOjOIBFit9mebyE4CTq MQ2mztel4inwAv9VcsWU/FYdU+Kyc+8PxFFVy16Ia1DsJJB4kg300vpChz+CErEsC6gb uQsjNXCOWlbGe9CriFZjnJpIF2ejkldmGPbY5GoGlai1EeX6cR4s8GkPGFWVDuZL/R9u pQKwnb/gM4MpoPblIgLIeYrDbxALScnUYbHAMrESO51/+ajwqpHzZbz0cYVByZJwr06b V7gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:references:in-reply-to :message-id:date:to:from:domainkey-signature:dkim-signature :delivered-to:arc-authentication-results; bh=aJG+Ci8fmw67UGdt+fGKCgQbGYixNnEdpGWop7ByzM4=; b=LOKfPqtjWwFCZFCuS3RJQrFYMqUBy9zDAAuapslCoxN7EbB127TcsmDNP7iYy1alYq T7IZZGpWcb8PxJy5XoOUe9uBZP9PRRgbGYgADP7TBy7I14YMZFfo1NgcO1awF6FYM6MG FPu7alqN5vrbWpiORKzLaf3cqHDK4gBICIWxPo1G/vz3BnLQFdPZ+LCrFPFqHe8/lzDr Tn5yswLLJtMCGitoc+nwHyrng6u91ABVZ4dFwyS31T1yPc6fmBLXOdvWvzVc0TYRSIl5 /wcVBkaoe8pjXuB8dDU4EnK+PfgjXzLm6dxDEaZpoNUQS5mF76MePvBlbhOEXxfjyo/G sF6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=K60S457j; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 64si1527815wmn.148.2017.08.30.05.10.16; Wed, 30 Aug 2017 05:10:17 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@pkh.me header.s=selector1 header.b=K60S457j; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DF1D568A2C2; Wed, 30 Aug 2017 15:09:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from golem.pkh.me (LStLambert-657-1-117-164.w92-154.abo.wanadoo.fr [92.154.28.164]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C7E6168A2C3 for ; Wed, 30 Aug 2017 15:09:32 +0300 (EEST) Received: from golem.pkh.me (localhost.localdomain [127.0.0.1]) by golem.pkh.me (OpenSMTPD) with ESMTP id 8b142b03; Wed, 30 Aug 2017 12:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pkh.me; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=selector1; bh=7WjzuMQ J20C49N8spGiwVG4AKLM=; b=K60S457jLDcTkMAt7HvKKvmtf4nyTZd99v2i33v 0TDdaZj02EpBoMYoEUqRPdyt0Z4A8L6oAOcdLb3A/RG/GUCrcGgPKeaDshy+cVkh 2Xa12o9bT0/V8W7PZNvMX8pLqgU2crgpqDAQN6WTtM/+ost2cEtpLS2pNeglXiGk YsyU1nhqQoi0iCh/7eaD3fY6JwnON2bvEeIaWxOvrafW40QdlBQ3SGSX4pVHTnr2 a95c31Te8f5sDLEBeNKHSnGgelkOHpRSbXxThOfZYkh/lh8i6BYC5TXgamNdWN// xD47haTTaHeXS1hQh8rA4dux5M0Q9o7e6V4ifSZ7AZifbVQ== DomainKey-Signature: a=rsa-sha1; c=nofws; d=pkh.me; h=from:to:cc:subject :date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=selector1; b=X 4XC1MmjdvY1MItc3e9VG8YbgxAHBEfjvABEN3qU9I7y5tezWT0/X2KokjyzLMdph NfabovWfrcHCeUfvIvsOkoAd8lzTPTxPs+KNpLdof4et0hrKxliLYFU0YYyPE4m1 NO4NYtU9GzPkKKY//GyyKFgtuP4VKns0Jlj7MPDxJv8T7m62QNkNKVGV+qf4MlUD az2X/ed4Vrs8tZJBQSTqlKoa9jKuxtByrYA9g/UpZDkDl8ZXIZzApaUBRtDgWdDc RCgPcZ1r3YZznnjVc7XVEzukbFKmivfMlfW3ZwyNzbKFgI+VjJaHruAL+jv1WMOi HzTCpvv+ClxWcK6RuCiOA== Received: from localhost (golem.pkh.me [local]) by golem.pkh.me (OpenSMTPD) with ESMTPA id 7ea55696; Wed, 30 Aug 2017 12:09:17 +0000 (UTC) From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= To: ffmpeg-devel@ffmpeg.org Date: Wed, 30 Aug 2017 14:09:07 +0200 Message-Id: <20170830120915.13050-9-u@pkh.me> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170830120915.13050-1-u@pkh.me> References: <20170830120915.13050-1-u@pkh.me> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/16] build: replace use of HAVE_SDL2 with existing CONFIG_SDL2 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Clément Bœsch There is no need for duplication. --- configure | 1 - libavdevice/opengl_enc.c | 22 +++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 911b9ae569..42742c5842 100755 --- a/configure +++ b/configure @@ -2068,7 +2068,6 @@ HAVE_LIST=" MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS perl pod2man - sdl2 section_data_rel_ro sndio texi2html diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c index 1fc7ddd003..bb6787c6f1 100644 --- a/libavdevice/opengl_enc.c +++ b/libavdevice/opengl_enc.c @@ -46,7 +46,7 @@ #include #endif -#if HAVE_SDL2 +#if CONFIG_SDL2 #include #endif @@ -174,7 +174,7 @@ static const GLushort g_index[6] = typedef struct OpenGLContext { AVClass *class; ///< class for private options -#if HAVE_SDL2 +#if CONFIG_SDL2 SDL_Window *window; SDL_GLContext glcontext; #endif @@ -343,7 +343,7 @@ static int opengl_control_message(AVFormatContext *h, int type, void *data, size return AVERROR(ENOSYS); } -#if HAVE_SDL2 +#if CONFIG_SDL2 static int opengl_sdl_process_events(AVFormatContext *h) { OpenGLContext *opengl = h->priv_data; @@ -448,14 +448,14 @@ static int av_cold opengl_sdl_load_procedures(OpenGLContext *opengl) #undef LOAD_OPENGL_FUN } -#endif /* HAVE_SDL2 */ +#endif /* CONFIG_SDL2 */ #if defined(__APPLE__) static int av_cold opengl_load_procedures(OpenGLContext *opengl) { FFOpenGLFunctions *procs = &opengl->glprocs; -#if HAVE_SDL2 +#if CONFIG_SDL2 if (!opengl->no_window) return opengl_sdl_load_procedures(opengl); #endif @@ -505,7 +505,7 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl) return AVERROR(ENOSYS); \ } -#if HAVE_SDL2 +#if CONFIG_SDL2 if (!opengl->no_window) return opengl_sdl_load_procedures(opengl); #endif @@ -931,7 +931,7 @@ static int opengl_create_window(AVFormatContext *h) int ret; if (!opengl->no_window) { -#if HAVE_SDL2 +#if CONFIG_SDL2 if ((ret = opengl_sdl_create_window(h)) < 0) { av_log(opengl, AV_LOG_ERROR, "Cannot create default SDL window.\n"); return ret; @@ -963,7 +963,7 @@ static int opengl_release_window(AVFormatContext *h) int ret; OpenGLContext *opengl = h->priv_data; if (!opengl->no_window) { -#if HAVE_SDL2 +#if CONFIG_SDL2 SDL_GL_DeleteContext(opengl->glcontext); SDL_DestroyWindow(opengl->window); SDL_Quit(); @@ -1099,7 +1099,7 @@ static av_cold int opengl_write_header(AVFormatContext *h) glClear(GL_COLOR_BUFFER_BIT); -#if HAVE_SDL2 +#if CONFIG_SDL2 if (!opengl->no_window) SDL_GL_SwapWindow(opengl->window); #endif @@ -1194,7 +1194,7 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt) const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); int ret; -#if HAVE_SDL2 +#if CONFIG_SDL2 if (!opengl->no_window && (ret = opengl_sdl_process_events(h)) < 0) goto fail; #endif @@ -1235,7 +1235,7 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt) ret = AVERROR_EXTERNAL; OPENGL_ERROR_CHECK(opengl); -#if HAVE_SDL2 +#if CONFIG_SDL2 if (!opengl->no_window) SDL_GL_SwapWindow(opengl->window); #endif