From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 21EE94A4A8 for ; Thu, 30 May 2024 21:37:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9FA8168D4E4; Fri, 31 May 2024 00:37:07 +0300 (EEST) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C9CFB68CA2F for ; Fri, 31 May 2024 00:37:00 +0300 (EEST) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-35dc0472b7eso1316423f8f.2 for ; Thu, 30 May 2024 14:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717105020; x=1717709820; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ADEe2QC7tHUuncF/xdfMJBmAtDmaS63oZ82yrgJK4iY=; b=VfvT2zXj239Vqqrags5JuLj2U39KYysUDS82JVa8heWhvTtMoNWBkxsAX2FPhIoEFT a3TCE7x3O53lEfu9vBj29g55+0ivv9lE6Md9o/uPL6lHFJdr4TOCKiwDgJhlZ8Qf1TTk fc/xcZM0gSAc6KnBRiI06dYKuk4psRqYYXsM2D6b7TgmWJkHLQUc2c9MCpb7ZG435D9W u3+uUGygtnS1LhZKQPUGFZmiDkVIbCSiL2ugBuwfFaaJSsPWJPibO4u29z5icYtAhZoe pIaLiLTtnzHedoQgnqETdIypW2HLoHUveY48kUhBPxFihvcPXdVkEy64ORUFpN6Av2N5 OXvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717105020; x=1717709820; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ADEe2QC7tHUuncF/xdfMJBmAtDmaS63oZ82yrgJK4iY=; b=iQPViiZlWTCXZzpWpzQ6H7yUCaA80RI4p+OyJBJCxKlLx4YLBfrNZ+JgRsDjDzSEdo cjUKelNkkLEf1+m/RTu7tv3c415Yk58ISdN/A1Y7XcQ1ZtbWEW8iUpRH8wvYJplKGoVb LHXJ8u6HpPy8+jTVzBPDjTkHAN2fQSO7Mxq63Zy/fu5z5SETmMvPhN9wBvris0S3ntRU axyU9Twq7O7axfT2F3gg2lPNlyUys8HdJe4gESmQsKHFInfigwsAQuGNaMBkxr8FH/zL 4mya+cP12GKt0ifrLRwoVUIH7S81Qa9cqUq68tYgc3dmzKe8EuAA9h5nAcr4uSzG/Rpd GTxw== X-Gm-Message-State: AOJu0YySdEQgfFtVvB5Lkpku9QNC85iGtKN9JLFeabsDQJuJIGmMvZUZ Hgz+vHISGdF5g6OvZbfwDcuIBmq0Cnd1MePC7r5ZbyfeOxx0ZAYPLK5rsQ== X-Google-Smtp-Source: AGHT+IGcBg6ZkFlOwlwfmtDLkKOnlnOCNK6rvka9XD/3VZQcyI9MYD4Ac1LsBhQZgBEJW6Su5LLIjQ== X-Received: by 2002:a5d:6390:0:b0:354:fa57:a0c5 with SMTP id ffacd0b85a97d-35dc009880cmr2372563f8f.38.1717105019416; Thu, 30 May 2024 14:36:59 -0700 (PDT) Received: from localhost.localdomain (114.200-178-91.adsl-dyn.isp.belgacom.be. [91.178.200.114]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04da29csm365812f8f.55.2024.05.30.14.36.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 14:36:59 -0700 (PDT) From: Ramiro Polla To: ffmpeg-devel@ffmpeg.org Date: Thu, 30 May 2024 23:36:56 +0200 Message-Id: <20240530213657.1033191-1-ramiro.polla@gmail.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] ffplay: add -scaling_quality option for SDL X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --- doc/ffplay.texi | 2 ++ fftools/ffplay.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index 93f77eeece..60f883e159 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -72,6 +72,8 @@ as 100. Force format. @item -window_title @var{title} Set window title (default is the input filename). +@item -scaling_quality @var{value} +Set SDL_HINT_RENDER_SCALE_QUALITY value (default is "linear"). @item -left @var{title} Set the x position for the left of the window (default is a centered window). @item -top @var{title} diff --git a/fftools/ffplay.c b/fftools/ffplay.c index b9d11eecee..75d2bec777 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -351,6 +351,7 @@ static int filter_nbthreads = 0; static int enable_vulkan = 0; static char *vulkan_params = NULL; static const char *hwaccel = NULL; +static const char *scaling_quality = NULL; /* current context */ static int is_full_screen; @@ -3683,6 +3684,7 @@ static const OptionDef options[] = { { "framedrop", OPT_TYPE_BOOL, OPT_EXPERT, { &framedrop }, "drop frames when cpu is too slow", "" }, { "infbuf", OPT_TYPE_BOOL, OPT_EXPERT, { &infinite_buffer }, "don't limit the input buffer size (useful with realtime streams)", "" }, { "window_title", OPT_TYPE_STRING, 0, { &window_title }, "set window title", "window title" }, + { "scaling_quality", OPT_TYPE_STRING, OPT_EXPERT, { &scaling_quality }, "set SDL_HINT_RENDER_SCALE_QUALITY value (default=linear)", "value" }, { "left", OPT_TYPE_INT, OPT_EXPERT, { &screen_left }, "set the x position for the left of the window", "x pos" }, { "top", OPT_TYPE_INT, OPT_EXPERT, { &screen_top }, "set the y position for the top of the window", "y pos" }, { "vf", OPT_TYPE_FUNC, OPT_FUNC_ARG | OPT_EXPERT, { .func_arg = opt_add_vfilter }, "set video filters", "filter_graph" }, @@ -3831,7 +3833,9 @@ int main(int argc, char **argv) } } window = SDL_CreateWindow(program_name, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, default_width, default_height, flags); - SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + if (!scaling_quality) + scaling_quality = "linear"; + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, scaling_quality); if (!window) { av_log(NULL, AV_LOG_FATAL, "Failed to create window: %s", SDL_GetError()); do_exit(NULL); -- 2.39.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".